From 4f9db6f437253d6dc1aa89ff323b8e672723622f Mon Sep 17 00:00:00 2001 From: CrazyJasonwell Date: Thu, 17 Jul 2025 16:06:16 +0800 Subject: [PATCH] vault backup: 2025-07-17 16:06:16 --- .obsidian/community-plugins.json | 5 +- .../plugins/file-tree-alternative/data.json | 29 + .../plugins/file-tree-alternative/main.js | 4932 +++ .../file-tree-alternative/manifest.json | 11 + .../plugins/file-tree-alternative/styles.css | 535 + .obsidian/plugins/obsidian-annotator/main.js | 36360 ++++++++++++++++ .../plugins/obsidian-annotator/manifest.json | 10 + .obsidian/plugins/omnisearch/main.js | 170 + .obsidian/plugins/omnisearch/manifest.json | 14 + .obsidian/plugins/omnisearch/styles.css | 135 + .obsidian/plugins/oz-image-plugin/main.js | 191 + .../plugins/oz-image-plugin/manifest.json | 11 + .obsidian/plugins/oz-image-plugin/styles.css | 349 + .../plugins/recent-files-obsidian/data.json | 32 +- .obsidian/plugins/rss-reader/data.json | 176 +- .obsidian/workspace.json | 52 +- 01-工作日记/2025-07-17.md | 9 +- 17 files changed, 42923 insertions(+), 98 deletions(-) create mode 100644 .obsidian/plugins/file-tree-alternative/data.json create mode 100644 .obsidian/plugins/file-tree-alternative/main.js create mode 100644 .obsidian/plugins/file-tree-alternative/manifest.json create mode 100644 .obsidian/plugins/file-tree-alternative/styles.css create mode 100644 .obsidian/plugins/obsidian-annotator/main.js create mode 100644 .obsidian/plugins/obsidian-annotator/manifest.json create mode 100644 .obsidian/plugins/omnisearch/main.js create mode 100644 .obsidian/plugins/omnisearch/manifest.json create mode 100644 .obsidian/plugins/omnisearch/styles.css create mode 100644 .obsidian/plugins/oz-image-plugin/main.js create mode 100644 .obsidian/plugins/oz-image-plugin/manifest.json create mode 100644 .obsidian/plugins/oz-image-plugin/styles.css diff --git a/.obsidian/community-plugins.json b/.obsidian/community-plugins.json index 53704f4f..43048d47 100644 --- a/.obsidian/community-plugins.json +++ b/.obsidian/community-plugins.json @@ -39,5 +39,8 @@ "recent-files-obsidian", "diary-ics", "sync-contacts-macos", - "cubox-sync" + "cubox-sync", + "obsidian-annotator", + "oz-image-plugin", + "file-tree-alternative" ] \ No newline at end of file diff --git a/.obsidian/plugins/file-tree-alternative/data.json b/.obsidian/plugins/file-tree-alternative/data.json new file mode 100644 index 00000000..21e003c5 --- /dev/null +++ b/.obsidian/plugins/file-tree-alternative/data.json @@ -0,0 +1,29 @@ +{ + "openViewOnStart": true, + "ribbonIcon": true, + "showRootFolder": true, + "showFilesFromSubFolders": true, + "searchFunction": true, + "allSearchOnlyInFocusedFolder": false, + "showFilesFromSubFoldersButton": true, + "revealActiveFileButton": false, + "excludedExtensions": "", + "hideAttachments": false, + "attachmentsFolderName": "attachments", + "folderIcon": "default", + "folderCount": true, + "folderCountOption": "notes", + "evernoteView": "Vertical", + "filePreviewOnHover": false, + "iconBeforeFileName": true, + "sortFilesBy": "name", + "sortReverse": false, + "sortFoldersBy": "name", + "fixedHeaderInFileList": true, + "createdYaml": false, + "fileNameIsHeader": false, + "folderNote": false, + "deleteFileOption": "trash", + "showFileNameAsFullPath": false, + "bookmarksEvents": false +} \ No newline at end of file diff --git a/.obsidian/plugins/file-tree-alternative/main.js b/.obsidian/plugins/file-tree-alternative/main.js new file mode 100644 index 00000000..9b3af4ee --- /dev/null +++ b/.obsidian/plugins/file-tree-alternative/main.js @@ -0,0 +1,4932 @@ +'use strict'; + +var obsidian = require('obsidian'); + +function __awaiter(thisArg,_arguments,P,generator){function adopt(value){return value instanceof P?value:new P(function(resolve){resolve(value);});}return new(P||(P=Promise))(function(resolve,reject){function fulfilled(value){try{step(generator.next(value));}catch(e){reject(e);}}function rejected(value){try{step(generator["throw"](value));}catch(e){reject(e);}}function step(result){result.done?resolve(result.value):adopt(result.value).then(fulfilled,rejected);}step((generator=generator.apply(thisArg,_arguments||[])).next());});}function __generator(thisArg,body){var _={label:0,sent:function(){if(t[0]&1)throw t[1];return t[1];},trys:[],ops:[]},f,y,t,g;return g={next:verb(0),"throw":verb(1),"return":verb(2)},typeof Symbol==="function"&&(g[Symbol.iterator]=function(){return this;}),g;function verb(n){return function(v){return step([n,v]);};}function step(op){if(f)throw new TypeError("Generator is already executing.");while(g&&(g=0,op[0]&&(_=0)),_)try{if(f=1,y&&(t=op[0]&2?y["return"]:op[0]?y["throw"]||((t=y["return"])&&t.call(y),0):y.next)&&!(t=t.call(y,op[1])).done)return t;if(y=0,t)op=[op[0]&2,t.value];switch(op[0]){case 0:case 1:t=op;break;case 4:_.label++;return {value:op[1],done:false};case 5:_.label++;y=op[1];op=[0];continue;case 7:op=_.ops.pop();_.trys.pop();continue;default:if(!(t=_.trys,t=t.length>0&&t[t.length-1])&&(op[0]===6||op[0]===2)){_=0;continue;}if(op[0]===3&&(!t||op[1]>t[0]&&op[1]0)&&!(r=i.next()).done)ar.push(r.value);}catch(error){e={error:error};}finally{try{if(r&&!r.done&&(m=i["return"]))m.call(i);}finally{if(e)throw e.error;}}return ar;}function __spreadArray(to,from,pack){if(pack||arguments.length===2)for(var i=0,l=from.length,ar;i>>1,e=a[d];if(0>>1;dg(C,c))ng(x,C)?(a[d]=x,a[n]=c,d=n):(a[d]=C,a[m]=c,d=m);else if(ng(x,c))a[d]=x,a[n]=c,d=n;else break a;}}return b;}function g(a,b){var c=a.sortIndex-b.sortIndex;return 0!==c?c:a.id-b.id;}if("object"===typeof performance&&"function"===typeof performance.now){var l=performance;exports.unstable_now=function(){return l.now();};}else {var p=Date,q=p.now();exports.unstable_now=function(){return p.now()-q;};}var r=[],t=[],u=1,v=null,y=3,z=!1,A=!1,B=!1,D="function"===typeof setTimeout?setTimeout:null,E="function"===typeof clearTimeout?clearTimeout:null,F="undefined"!==typeof setImmediate?setImmediate:null;"undefined"!==typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function G(a){for(var b=h(t);null!==b;){if(null===b.callback)k(t);else if(b.startTime<=a)k(t),b.sortIndex=b.expirationTime,f(r,b);else break;b=h(t);}}function H(a){B=!1;G(a);if(!A)if(null!==h(r))A=!0,I(J);else {var b=h(t);null!==b&&K(H,b.startTime-a);}}function J(a,b){A=!1;B&&(B=!1,E(L),L=-1);z=!0;var c=y;try{G(b);for(v=h(r);null!==v&&(!(v.expirationTime>b)||a&&!M());){var d=v.callback;if("function"===typeof d){v.callback=null;y=v.priorityLevel;var e=d(v.expirationTime<=b);b=exports.unstable_now();"function"===typeof e?v.callback=e:v===h(r)&&k(r);G(b);}else k(r);v=h(r);}if(null!==v)var w=!0;else {var m=h(t);null!==m&&K(H,m.startTime-b);w=!1;}return w;}finally{v=null,y=c,z=!1;}}var N=!1,O=null,L=-1,P=5,Q=-1;function M(){return exports.unstable_now()-Qa||125d?(a.sortIndex=c,f(t,a),null===h(r)&&a===h(t)&&(B?(E(L),L=-1):B=!0,K(H,c-d))):(a.sortIndex=e,f(r,a),A||z||(A=!0,I(J)));return a;};exports.unstable_shouldYield=M;exports.unstable_wrapCallback=function(a){var b=y;return function(){var c=y;y=b;try{return a.apply(this,arguments);}finally{y=c;}};}; +} (scheduler_production_min)); + +{scheduler.exports=scheduler_production_min;} + +var schedulerExports = scheduler.exports; + +/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */ +var aa=reactExports,ca=schedulerExports;function p$1(a){for(var b="https://reactjs.org/docs/error-decoder.html?invariant="+a,c=1;cb;}return !1;}function v(a,b,c,d,e,f,g){this.acceptsBooleans=2===b||3===b||4===b;this.attributeName=d;this.attributeNamespace=e;this.mustUseProperty=c;this.propertyName=a;this.type=b;this.sanitizeURL=f;this.removeEmptyString=g;}var z={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(a){z[a]=new v(a,0,!1,a,null,!1,!1);});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(a){var b=a[0];z[b]=new v(b,1,!1,a[1],null,!1,!1);});["contentEditable","draggable","spellCheck","value"].forEach(function(a){z[a]=new v(a,2,!1,a.toLowerCase(),null,!1,!1);});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(a){z[a]=new v(a,2,!1,a,null,!1,!1);});"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach(function(a){z[a]=new v(a,3,!1,a.toLowerCase(),null,!1,!1);});["checked","multiple","muted","selected"].forEach(function(a){z[a]=new v(a,3,!0,a,null,!1,!1);});["capture","download"].forEach(function(a){z[a]=new v(a,4,!1,a,null,!1,!1);});["cols","rows","size","span"].forEach(function(a){z[a]=new v(a,6,!1,a,null,!1,!1);});["rowSpan","start"].forEach(function(a){z[a]=new v(a,5,!1,a.toLowerCase(),null,!1,!1);});var ra=/[\-:]([a-z])/g;function sa(a){return a[1].toUpperCase();}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,null,!1,!1);});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/1999/xlink",!1,!1);});["xml:base","xml:lang","xml:space"].forEach(function(a){var b=a.replace(ra,sa);z[b]=new v(b,1,!1,a,"http://www.w3.org/XML/1998/namespace",!1,!1);});["tabIndex","crossOrigin"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!1,!1);});z.xlinkHref=new v("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(a){z[a]=new v(a,1,!1,a.toLowerCase(),null,!0,!0);});function ta(a,b,c,d){var e=z.hasOwnProperty(b)?z[b]:null;if(null!==e?0!==e.type:d||!(2h||e[g]!==f[h]){var k="\n"+e[g].replace(" at new "," at ");a.displayName&&k.includes("")&&(k=k.replace("",a.displayName));return k;}while(1<=g&&0<=h);}break;}}}finally{Na=!1,Error.prepareStackTrace=c;}return (a=a?a.displayName||a.name:"")?Ma(a):"";}function Pa(a){switch(a.tag){case 5:return Ma(a.type);case 16:return Ma("Lazy");case 13:return Ma("Suspense");case 19:return Ma("SuspenseList");case 0:case 2:case 15:return a=Oa(a.type,!1),a;case 11:return a=Oa(a.type.render,!1),a;case 1:return a=Oa(a.type,!0),a;default:return "";}}function Qa(a){if(null==a)return null;if("function"===typeof a)return a.displayName||a.name||null;if("string"===typeof a)return a;switch(a){case ya:return "Fragment";case wa:return "Portal";case Aa:return "Profiler";case za:return "StrictMode";case Ea:return "Suspense";case Fa:return "SuspenseList";}if("object"===typeof a)switch(a.$$typeof){case Ca:return (a.displayName||"Context")+".Consumer";case Ba:return (a._context.displayName||"Context")+".Provider";case Da:var b=a.render;a=a.displayName;a||(a=b.displayName||b.name||"",a=""!==a?"ForwardRef("+a+")":"ForwardRef");return a;case Ga:return b=a.displayName||null,null!==b?b:Qa(a.type)||"Memo";case Ha:b=a._payload;a=a._init;try{return Qa(a(b));}catch(c){}}return null;}function Ra(a){var b=a.type;switch(a.tag){case 24:return "Cache";case 9:return (b.displayName||"Context")+".Consumer";case 10:return (b._context.displayName||"Context")+".Provider";case 18:return "DehydratedFragment";case 11:return a=b.render,a=a.displayName||a.name||"",b.displayName||(""!==a?"ForwardRef("+a+")":"ForwardRef");case 7:return "Fragment";case 5:return b;case 4:return "Portal";case 3:return "Root";case 6:return "Text";case 16:return Qa(b);case 8:return b===za?"StrictMode":"Mode";case 22:return "Offscreen";case 12:return "Profiler";case 21:return "Scope";case 13:return "Suspense";case 19:return "SuspenseList";case 25:return "TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"===typeof b)return b.displayName||b.name||null;if("string"===typeof b)return b;}return null;}function Sa(a){switch(typeof a){case"boolean":case"number":case"string":case"undefined":return a;case"object":return a;default:return "";}}function Ta(a){var b=a.type;return (a=a.nodeName)&&"input"===a.toLowerCase()&&("checkbox"===b||"radio"===b);}function Ua(a){var b=Ta(a)?"checked":"value",c=Object.getOwnPropertyDescriptor(a.constructor.prototype,b),d=""+a[b];if(!a.hasOwnProperty(b)&&"undefined"!==typeof c&&"function"===typeof c.get&&"function"===typeof c.set){var e=c.get,f=c.set;Object.defineProperty(a,b,{configurable:!0,get:function(){return e.call(this);},set:function(a){d=""+a;f.call(this,a);}});Object.defineProperty(a,b,{enumerable:c.enumerable});return {getValue:function(){return d;},setValue:function(a){d=""+a;},stopTracking:function(){a._valueTracker=null;delete a[b];}};}}function Va(a){a._valueTracker||(a._valueTracker=Ua(a));}function Wa(a){if(!a)return !1;var b=a._valueTracker;if(!b)return !0;var c=b.getValue();var d="";a&&(d=Ta(a)?a.checked?"true":"false":a.value);a=d;return a!==c?(b.setValue(a),!0):!1;}function Xa(a){a=a||("undefined"!==typeof document?document:void 0);if("undefined"===typeof a)return null;try{return a.activeElement||a.body;}catch(b){return a.body;}}function Ya(a,b){var c=b.checked;return A({},b,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=c?c:a._wrapperState.initialChecked});}function Za(a,b){var c=null==b.defaultValue?"":b.defaultValue,d=null!=b.checked?b.checked:b.defaultChecked;c=Sa(null!=b.value?b.value:c);a._wrapperState={initialChecked:d,initialValue:c,controlled:"checkbox"===b.type||"radio"===b.type?null!=b.checked:null!=b.value};}function ab(a,b){b=b.checked;null!=b&&ta(a,"checked",b,!1);}function bb(a,b){ab(a,b);var c=Sa(b.value),d=b.type;if(null!=c){if("number"===d){if(0===c&&""===a.value||a.value!=c)a.value=""+c;}else a.value!==""+c&&(a.value=""+c);}else if("submit"===d||"reset"===d){a.removeAttribute("value");return;}b.hasOwnProperty("value")?cb(a,b.type,c):b.hasOwnProperty("defaultValue")&&cb(a,b.type,Sa(b.defaultValue));null==b.checked&&null!=b.defaultChecked&&(a.defaultChecked=!!b.defaultChecked);}function db(a,b,c){if(b.hasOwnProperty("value")||b.hasOwnProperty("defaultValue")){var d=b.type;if(!("submit"!==d&&"reset"!==d||void 0!==b.value&&null!==b.value))return;b=""+a._wrapperState.initialValue;c||b===a.value||(a.value=b);a.defaultValue=b;}c=a.name;""!==c&&(a.name="");a.defaultChecked=!!a._wrapperState.initialChecked;""!==c&&(a.name=c);}function cb(a,b,c){if("number"!==b||Xa(a.ownerDocument)!==a)null==c?a.defaultValue=""+a._wrapperState.initialValue:a.defaultValue!==""+c&&(a.defaultValue=""+c);}var eb=Array.isArray;function fb(a,b,c,d){a=a.options;if(b){b={};for(var e=0;e"+b.valueOf().toString()+"";for(b=mb.firstChild;a.firstChild;)a.removeChild(a.firstChild);for(;b.firstChild;)a.appendChild(b.firstChild);}});function ob(a,b){if(b){var c=a.firstChild;if(c&&c===a.lastChild&&3===c.nodeType){c.nodeValue=b;return;}}a.textContent=b;}var pb={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},qb=["Webkit","ms","Moz","O"];Object.keys(pb).forEach(function(a){qb.forEach(function(b){b=b+a.charAt(0).toUpperCase()+a.substring(1);pb[b]=pb[a];});});function rb(a,b,c){return null==b||"boolean"===typeof b||""===b?"":c||"number"!==typeof b||0===b||pb.hasOwnProperty(a)&&pb[a]?(""+b).trim():b+"px";}function sb(a,b){a=a.style;for(var c in b)if(b.hasOwnProperty(c)){var d=0===c.indexOf("--"),e=rb(c,b[c],d);"float"===c&&(c="cssFloat");d?a.setProperty(c,e):a[c]=e;}}var tb=A({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ub(a,b){if(b){if(tb[a]&&(null!=b.children||null!=b.dangerouslySetInnerHTML))throw Error(p$1(137,a));if(null!=b.dangerouslySetInnerHTML){if(null!=b.children)throw Error(p$1(60));if("object"!==typeof b.dangerouslySetInnerHTML||!("__html"in b.dangerouslySetInnerHTML))throw Error(p$1(61));}if(null!=b.style&&"object"!==typeof b.style)throw Error(p$1(62));}}function vb(a,b){if(-1===a.indexOf("-"))return "string"===typeof b.is;switch(a){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return !1;default:return !0;}}var wb=null;function xb(a){a=a.target||a.srcElement||window;a.correspondingUseElement&&(a=a.correspondingUseElement);return 3===a.nodeType?a.parentNode:a;}var yb=null,zb=null,Ab=null;function Bb(a){if(a=Cb(a)){if("function"!==typeof yb)throw Error(p$1(280));var b=a.stateNode;b&&(b=Db(b),yb(a.stateNode,a.type,b));}}function Eb(a){zb?Ab?Ab.push(a):Ab=[a]:zb=a;}function Fb(){if(zb){var a=zb,b=Ab;Ab=zb=null;Bb(a);if(b)for(a=0;a>>=0;return 0===a?32:31-(pc(a)/qc|0)|0;}var rc=64,sc=4194304;function tc(a){switch(a&-a){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return a&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return a&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return a;}}function uc(a,b){var c=a.pendingLanes;if(0===c)return 0;var d=0,e=a.suspendedLanes,f=a.pingedLanes,g=c&268435455;if(0!==g){var h=g&~e;0!==h?d=tc(h):(f&=g,0!==f&&(d=tc(f)));}else g=c&~e,0!==g?d=tc(g):0!==f&&(d=tc(f));if(0===d)return 0;if(0!==b&&b!==d&&0===(b&e)&&(e=d&-d,f=b&-b,e>=f||16===e&&0!==(f&4194240)))return b;0!==(d&4)&&(d|=c&16);b=a.entangledLanes;if(0!==b)for(a=a.entanglements,b&=d;0c;c++)b.push(a);return b;}function Ac(a,b,c){a.pendingLanes|=b;536870912!==b&&(a.suspendedLanes=0,a.pingedLanes=0);a=a.eventTimes;b=31-oc(b);a[b]=c;}function Bc(a,b){var c=a.pendingLanes&~b;a.pendingLanes=b;a.suspendedLanes=0;a.pingedLanes=0;a.expiredLanes&=b;a.mutableReadLanes&=b;a.entangledLanes&=b;b=a.entanglements;var d=a.eventTimes;for(a=a.expirationTimes;0=be),ee=String.fromCharCode(32),fe=!1;function ge(a,b){switch(a){case"keyup":return -1!==$d.indexOf(b.keyCode);case"keydown":return 229!==b.keyCode;case"keypress":case"mousedown":case"focusout":return !0;default:return !1;}}function he(a){a=a.detail;return "object"===typeof a&&"data"in a?a.data:null;}var ie=!1;function je(a,b){switch(a){case"compositionend":return he(b);case"keypress":if(32!==b.which)return null;fe=!0;return ee;case"textInput":return a=b.data,a===ee&&fe?null:a;default:return null;}}function ke(a,b){if(ie)return "compositionend"===a||!ae&&ge(a,b)?(a=nd(),md=ld=kd=null,ie=!1,a):null;switch(a){case"paste":return null;case"keypress":if(!(b.ctrlKey||b.altKey||b.metaKey)||b.ctrlKey&&b.altKey){if(b.char&&1=b)return {node:c,offset:b-a};a=d;}a:{for(;c;){if(c.nextSibling){c=c.nextSibling;break a;}c=c.parentNode;}c=void 0;}c=Je(c);}}function Le(a,b){return a&&b?a===b?!0:a&&3===a.nodeType?!1:b&&3===b.nodeType?Le(a,b.parentNode):"contains"in a?a.contains(b):a.compareDocumentPosition?!!(a.compareDocumentPosition(b)&16):!1:!1;}function Me(){for(var a=window,b=Xa();b instanceof a.HTMLIFrameElement;){try{var c="string"===typeof b.contentWindow.location.href;}catch(d){c=!1;}if(c)a=b.contentWindow;else break;b=Xa(a.document);}return b;}function Ne(a){var b=a&&a.nodeName&&a.nodeName.toLowerCase();return b&&("input"===b&&("text"===a.type||"search"===a.type||"tel"===a.type||"url"===a.type||"password"===a.type)||"textarea"===b||"true"===a.contentEditable);}function Oe(a){var b=Me(),c=a.focusedElem,d=a.selectionRange;if(b!==c&&c&&c.ownerDocument&&Le(c.ownerDocument.documentElement,c)){if(null!==d&&Ne(c))if(b=d.start,a=d.end,void 0===a&&(a=b),"selectionStart"in c)c.selectionStart=b,c.selectionEnd=Math.min(a,c.value.length);else if(a=(b=c.ownerDocument||document)&&b.defaultView||window,a.getSelection){a=a.getSelection();var e=c.textContent.length,f=Math.min(d.start,e);d=void 0===d.end?f:Math.min(d.end,e);!a.extend&&f>d&&(e=d,d=f,f=e);e=Ke(c,f);var g=Ke(c,d);e&&g&&(1!==a.rangeCount||a.anchorNode!==e.node||a.anchorOffset!==e.offset||a.focusNode!==g.node||a.focusOffset!==g.offset)&&(b=b.createRange(),b.setStart(e.node,e.offset),a.removeAllRanges(),f>d?(a.addRange(b),a.extend(g.node,g.offset)):(b.setEnd(g.node,g.offset),a.addRange(b)));}b=[];for(a=c;a=a.parentNode;)1===a.nodeType&&b.push({element:a,left:a.scrollLeft,top:a.scrollTop});"function"===typeof c.focus&&c.focus();for(c=0;c=document.documentMode,Qe=null,Re=null,Se=null,Te=!1;function Ue(a,b,c){var d=c.window===c?c.document:9===c.nodeType?c:c.ownerDocument;Te||null==Qe||Qe!==Xa(d)||(d=Qe,"selectionStart"in d&&Ne(d)?d={start:d.selectionStart,end:d.selectionEnd}:(d=(d.ownerDocument&&d.ownerDocument.defaultView||window).getSelection(),d={anchorNode:d.anchorNode,anchorOffset:d.anchorOffset,focusNode:d.focusNode,focusOffset:d.focusOffset}),Se&&Ie(Se,d)||(Se=d,d=oe(Re,"onSelect"),0Tf||(a.current=Sf[Tf],Sf[Tf]=null,Tf--);}function G(a,b){Tf++;Sf[Tf]=a.current;a.current=b;}var Vf={},H=Uf(Vf),Wf=Uf(!1),Xf=Vf;function Yf(a,b){var c=a.type.contextTypes;if(!c)return Vf;var d=a.stateNode;if(d&&d.__reactInternalMemoizedUnmaskedChildContext===b)return d.__reactInternalMemoizedMaskedChildContext;var e={},f;for(f in c)e[f]=b[f];d&&(a=a.stateNode,a.__reactInternalMemoizedUnmaskedChildContext=b,a.__reactInternalMemoizedMaskedChildContext=e);return e;}function Zf(a){a=a.childContextTypes;return null!==a&&void 0!==a;}function $f(){E(Wf);E(H);}function ag(a,b,c){if(H.current!==Vf)throw Error(p$1(168));G(H,b);G(Wf,c);}function bg(a,b,c){var d=a.stateNode;b=b.childContextTypes;if("function"!==typeof d.getChildContext)return c;d=d.getChildContext();for(var e in d)if(!(e in b))throw Error(p$1(108,Ra(a)||"Unknown",e));return A({},c,d);}function cg(a){a=(a=a.stateNode)&&a.__reactInternalMemoizedMergedChildContext||Vf;Xf=H.current;G(H,a);G(Wf,Wf.current);return !0;}function dg(a,b,c){var d=a.stateNode;if(!d)throw Error(p$1(169));c?(a=bg(a,b,Xf),d.__reactInternalMemoizedMergedChildContext=a,E(Wf),E(H),G(H,a)):E(Wf);G(Wf,c);}var eg=null,fg=!1,gg=!1;function hg(a){null===eg?eg=[a]:eg.push(a);}function ig(a){fg=!0;hg(a);}function jg(){if(!gg&&null!==eg){gg=!0;var a=0,b=C;try{var c=eg;for(C=1;a>=g;e-=g;rg=1<<32-oc(b)+e|c<w?(x=u,u=null):x=u.sibling;var n=r(e,u,h[w],k);if(null===n){null===u&&(u=x);break;}a&&u&&null===n.alternate&&b(e,u);g=f(n,g,w);null===m?l=n:m.sibling=n;m=n;u=x;}if(w===h.length)return c(e,u),I&&tg(e,w),l;if(null===u){for(;ww?(x=m,m=null):x=m.sibling;var t=r(e,m,n.value,k);if(null===t){null===m&&(m=x);break;}a&&m&&null===t.alternate&&b(e,m);g=f(t,g,w);null===u?l=t:u.sibling=t;u=t;m=x;}if(n.done)return c(e,m),I&&tg(e,w),l;if(null===m){for(;!n.done;w++,n=h.next())n=q(e,n.value,k),null!==n&&(g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);I&&tg(e,w);return l;}for(m=d(e,m);!n.done;w++,n=h.next())n=y(m,e,w,n.value,k),null!==n&&(a&&null!==n.alternate&&m.delete(null===n.key?w:n.key),g=f(n,g,w),null===u?l=n:u.sibling=n,u=n);a&&m.forEach(function(a){return b(e,a);});I&&tg(e,w);return l;}function J(a,d,f,h){"object"===typeof f&&null!==f&&f.type===ya&&null===f.key&&(f=f.props.children);if("object"===typeof f&&null!==f){switch(f.$$typeof){case va:a:{for(var k=f.key,l=d;null!==l;){if(l.key===k){k=f.type;if(k===ya){if(7===l.tag){c(a,l.sibling);d=e(l,f.props.children);d.return=a;a=d;break a;}}else if(l.elementType===k||"object"===typeof k&&null!==k&&k.$$typeof===Ha&&uh(k)===l.type){c(a,l.sibling);d=e(l,f.props);d.ref=sh(a,l,f);d.return=a;a=d;break a;}c(a,l);break;}else b(a,l);l=l.sibling;}f.type===ya?(d=Ah(f.props.children,a.mode,h,f.key),d.return=a,a=d):(h=yh(f.type,f.key,f.props,null,a.mode,h),h.ref=sh(a,d,f),h.return=a,a=h);}return g(a);case wa:a:{for(l=f.key;null!==d;){if(d.key===l){if(4===d.tag&&d.stateNode.containerInfo===f.containerInfo&&d.stateNode.implementation===f.implementation){c(a,d.sibling);d=e(d,f.children||[]);d.return=a;a=d;break a;}else {c(a,d);break;}}else b(a,d);d=d.sibling;}d=zh(f,a.mode,h);d.return=a;a=d;}return g(a);case Ha:return l=f._init,J(a,d,l(f._payload),h);}if(eb(f))return n(a,d,f,h);if(Ka(f))return t(a,d,f,h);th(a,f);}return "string"===typeof f&&""!==f||"number"===typeof f?(f=""+f,null!==d&&6===d.tag?(c(a,d.sibling),d=e(d,f),d.return=a,a=d):(c(a,d),d=xh(f,a.mode,h),d.return=a,a=d),g(a)):c(a,d);}return J;}var Bh=vh(!0),Ch=vh(!1),Dh={},Eh=Uf(Dh),Fh=Uf(Dh),Gh=Uf(Dh);function Hh(a){if(a===Dh)throw Error(p$1(174));return a;}function Ih(a,b){G(Gh,b);G(Fh,a);G(Eh,Dh);a=b.nodeType;switch(a){case 9:case 11:b=(b=b.documentElement)?b.namespaceURI:lb(null,"");break;default:a=8===a?b.parentNode:b,b=a.namespaceURI||null,a=a.tagName,b=lb(b,a);}E(Eh);G(Eh,b);}function Jh(){E(Eh);E(Fh);E(Gh);}function Kh(a){Hh(Gh.current);var b=Hh(Eh.current);var c=lb(b,a.type);b!==c&&(G(Fh,a),G(Eh,c));}function Lh(a){Fh.current===a&&(E(Eh),E(Fh));}var M=Uf(0);function Mh(a){for(var b=a;null!==b;){if(13===b.tag){var c=b.memoizedState;if(null!==c&&(c=c.dehydrated,null===c||"$?"===c.data||"$!"===c.data))return b;}else if(19===b.tag&&void 0!==b.memoizedProps.revealOrder){if(0!==(b.flags&128))return b;}else if(null!==b.child){b.child.return=b;b=b.child;continue;}if(b===a)break;for(;null===b.sibling;){if(null===b.return||b.return===a)return null;b=b.return;}b.sibling.return=b.return;b=b.sibling;}return null;}var Nh=[];function Oh(){for(var a=0;ac?c:4;a(!0);var d=Qh.transition;Qh.transition={};try{a(!1),b();}finally{C=c,Qh.transition=d;}}function Fi(){return di().memoizedState;}function Gi(a,b,c){var d=lh(a);c={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,c);else if(c=Yg(a,b,c,d),null!==c){var e=L();mh(c,a,d,e);Ji(c,b,d);}}function ri(a,b,c){var d=lh(a),e={lane:d,action:c,hasEagerState:!1,eagerState:null,next:null};if(Hi(a))Ii(b,e);else {var f=a.alternate;if(0===a.lanes&&(null===f||0===f.lanes)&&(f=b.lastRenderedReducer,null!==f))try{var g=b.lastRenderedState,h=f(g,c);e.hasEagerState=!0;e.eagerState=h;if(He(h,g)){var k=b.interleaved;null===k?(e.next=e,Xg(b)):(e.next=k.next,k.next=e);b.interleaved=e;return;}}catch(l){}finally{}c=Yg(a,b,e,d);null!==c&&(e=L(),mh(c,a,d,e),Ji(c,b,d));}}function Hi(a){var b=a.alternate;return a===N||null!==b&&b===N;}function Ii(a,b){Th=Sh=!0;var c=a.pending;null===c?b.next=b:(b.next=c.next,c.next=b);a.pending=b;}function Ji(a,b,c){if(0!==(c&4194240)){var d=b.lanes;d&=a.pendingLanes;c|=d;b.lanes=c;Cc(a,c);}}var ai={readContext:Vg,useCallback:Q,useContext:Q,useEffect:Q,useImperativeHandle:Q,useInsertionEffect:Q,useLayoutEffect:Q,useMemo:Q,useReducer:Q,useRef:Q,useState:Q,useDebugValue:Q,useDeferredValue:Q,useTransition:Q,useMutableSource:Q,useSyncExternalStore:Q,useId:Q,unstable_isNewReconciler:!1},Yh={readContext:Vg,useCallback:function(a,b){ci().memoizedState=[a,void 0===b?null:b];return a;},useContext:Vg,useEffect:vi,useImperativeHandle:function(a,b,c){c=null!==c&&void 0!==c?c.concat([a]):null;return ti(4194308,4,yi.bind(null,b,a),c);},useLayoutEffect:function(a,b){return ti(4194308,4,a,b);},useInsertionEffect:function(a,b){return ti(4,2,a,b);},useMemo:function(a,b){var c=ci();b=void 0===b?null:b;a=a();c.memoizedState=[a,b];return a;},useReducer:function(a,b,c){var d=ci();b=void 0!==c?c(b):b;d.memoizedState=d.baseState=b;a={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:a,lastRenderedState:b};d.queue=a;a=a.dispatch=Gi.bind(null,N,a);return [d.memoizedState,a];},useRef:function(a){var b=ci();a={current:a};return b.memoizedState=a;},useState:qi,useDebugValue:Ai,useDeferredValue:function(a){return ci().memoizedState=a;},useTransition:function(){var a=qi(!1),b=a[0];a=Ei.bind(null,a[1]);ci().memoizedState=a;return [b,a];},useMutableSource:function(){},useSyncExternalStore:function(a,b,c){var d=N,e=ci();if(I){if(void 0===c)throw Error(p$1(407));c=c();}else {c=b();if(null===R)throw Error(p$1(349));0!==(Rh&30)||ni(d,b,c);}e.memoizedState=c;var f={value:c,getSnapshot:b};e.queue=f;vi(ki.bind(null,d,f,a),[a]);d.flags|=2048;li(9,mi.bind(null,d,f,c,b),void 0,null);return c;},useId:function(){var a=ci(),b=R.identifierPrefix;if(I){var c=sg;var d=rg;c=(d&~(1<<32-oc(d)-1)).toString(32)+c;b=":"+b+"R"+c;c=Uh++;0\x3c/script>",a=a.removeChild(a.firstChild)):"string"===typeof d.is?a=g.createElement(c,{is:d.is}):(a=g.createElement(c),"select"===c&&(g=a,d.multiple?g.multiple=!0:d.size&&(g.size=d.size))):a=g.createElementNS(a,c);a[Of]=b;a[Pf]=d;Aj(a,b,!1,!1);b.stateNode=a;a:{g=vb(c,d);switch(c){case"dialog":D("cancel",a);D("close",a);e=d;break;case"iframe":case"object":case"embed":D("load",a);e=d;break;case"video":case"audio":for(e=0;eHj&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);}}else {if(!d)if(a=Mh(g),null!==a){if(b.flags|=128,d=!0,c=a.updateQueue,null!==c&&(b.updateQueue=c,b.flags|=4),Ej(f,!0),null===f.tail&&"hidden"===f.tailMode&&!g.alternate&&!I)return S(b),null;}else 2*B()-f.renderingStartTime>Hj&&1073741824!==c&&(b.flags|=128,d=!0,Ej(f,!1),b.lanes=4194304);f.isBackwards?(g.sibling=b.child,b.child=g):(c=f.last,null!==c?c.sibling=g:b.child=g,f.last=g);}if(null!==f.tail)return b=f.tail,f.rendering=b,f.tail=b.sibling,f.renderingStartTime=B(),b.sibling=null,c=M.current,G(M,d?c&1|2:c&1),b;S(b);return null;case 22:case 23:return Ij(),d=null!==b.memoizedState,null!==a&&null!==a.memoizedState!==d&&(b.flags|=8192),d&&0!==(b.mode&1)?0!==(gj&1073741824)&&(S(b),b.subtreeFlags&6&&(b.flags|=8192)):S(b),null;case 24:return null;case 25:return null;}throw Error(p$1(156,b.tag));}function Jj(a,b){wg(b);switch(b.tag){case 1:return Zf(b.type)&&$f(),a=b.flags,a&65536?(b.flags=a&-65537|128,b):null;case 3:return Jh(),E(Wf),E(H),Oh(),a=b.flags,0!==(a&65536)&&0===(a&128)?(b.flags=a&-65537|128,b):null;case 5:return Lh(b),null;case 13:E(M);a=b.memoizedState;if(null!==a&&null!==a.dehydrated){if(null===b.alternate)throw Error(p$1(340));Ig();}a=b.flags;return a&65536?(b.flags=a&-65537|128,b):null;case 19:return E(M),null;case 4:return Jh(),null;case 10:return Rg(b.type._context),null;case 22:case 23:return Ij(),null;case 24:return null;default:return null;}}var Kj=!1,U=!1,Lj="function"===typeof WeakSet?WeakSet:Set,V=null;function Mj(a,b){var c=a.ref;if(null!==c)if("function"===typeof c)try{c(null);}catch(d){W(a,b,d);}else c.current=null;}function Nj(a,b,c){try{c();}catch(d){W(a,b,d);}}var Oj=!1;function Pj(a,b){Cf=dd;a=Me();if(Ne(a)){if("selectionStart"in a)var c={start:a.selectionStart,end:a.selectionEnd};else a:{c=(c=a.ownerDocument)&&c.defaultView||window;var d=c.getSelection&&c.getSelection();if(d&&0!==d.rangeCount){c=d.anchorNode;var e=d.anchorOffset,f=d.focusNode;d=d.focusOffset;try{c.nodeType,f.nodeType;}catch(F){c=null;break a;}var g=0,h=-1,k=-1,l=0,m=0,q=a,r=null;b:for(;;){for(var y;;){q!==c||0!==e&&3!==q.nodeType||(h=g+e);q!==f||0!==d&&3!==q.nodeType||(k=g+d);3===q.nodeType&&(g+=q.nodeValue.length);if(null===(y=q.firstChild))break;r=q;q=y;}for(;;){if(q===a)break b;r===c&&++l===e&&(h=g);r===f&&++m===d&&(k=g);if(null!==(y=q.nextSibling))break;q=r;r=q.parentNode;}q=y;}c=-1===h||-1===k?null:{start:h,end:k};}else c=null;}c=c||{start:0,end:0};}else c=null;Df={focusedElem:a,selectionRange:c};dd=!1;for(V=b;null!==V;)if(b=V,a=b.child,0!==(b.subtreeFlags&1028)&&null!==a)a.return=b,V=a;else for(;null!==V;){b=V;try{var n=b.alternate;if(0!==(b.flags&1024))switch(b.tag){case 0:case 11:case 15:break;case 1:if(null!==n){var t=n.memoizedProps,J=n.memoizedState,x=b.stateNode,w=x.getSnapshotBeforeUpdate(b.elementType===b.type?t:Lg(b.type,t),J);x.__reactInternalSnapshotBeforeUpdate=w;}break;case 3:var u=b.stateNode.containerInfo;1===u.nodeType?u.textContent="":9===u.nodeType&&u.documentElement&&u.removeChild(u.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(p$1(163));}}catch(F){W(b,b.return,F);}a=b.sibling;if(null!==a){a.return=b.return;V=a;break;}V=b.return;}n=Oj;Oj=!1;return n;}function Qj(a,b,c){var d=b.updateQueue;d=null!==d?d.lastEffect:null;if(null!==d){var e=d=d.next;do{if((e.tag&a)===a){var f=e.destroy;e.destroy=void 0;void 0!==f&&Nj(b,c,f);}e=e.next;}while(e!==d);}}function Rj(a,b){b=b.updateQueue;b=null!==b?b.lastEffect:null;if(null!==b){var c=b=b.next;do{if((c.tag&a)===a){var d=c.create;c.destroy=d();}c=c.next;}while(c!==b);}}function Sj(a){var b=a.ref;if(null!==b){var c=a.stateNode;switch(a.tag){case 5:a=c;break;default:a=c;}"function"===typeof b?b(a):b.current=a;}}function Tj(a){var b=a.alternate;null!==b&&(a.alternate=null,Tj(b));a.child=null;a.deletions=null;a.sibling=null;5===a.tag&&(b=a.stateNode,null!==b&&(delete b[Of],delete b[Pf],delete b[of],delete b[Qf],delete b[Rf]));a.stateNode=null;a.return=null;a.dependencies=null;a.memoizedProps=null;a.memoizedState=null;a.pendingProps=null;a.stateNode=null;a.updateQueue=null;}function Uj(a){return 5===a.tag||3===a.tag||4===a.tag;}function Vj(a){a:for(;;){for(;null===a.sibling;){if(null===a.return||Uj(a.return))return null;a=a.return;}a.sibling.return=a.return;for(a=a.sibling;5!==a.tag&&6!==a.tag&&18!==a.tag;){if(a.flags&2)continue a;if(null===a.child||4===a.tag)continue a;else a.child.return=a,a=a.child;}if(!(a.flags&2))return a.stateNode;}}function Wj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?8===c.nodeType?c.parentNode.insertBefore(a,b):c.insertBefore(a,b):(8===c.nodeType?(b=c.parentNode,b.insertBefore(a,c)):(b=c,b.appendChild(a)),c=c._reactRootContainer,null!==c&&void 0!==c||null!==b.onclick||(b.onclick=Bf));else if(4!==d&&(a=a.child,null!==a))for(Wj(a,b,c),a=a.sibling;null!==a;)Wj(a,b,c),a=a.sibling;}function Xj(a,b,c){var d=a.tag;if(5===d||6===d)a=a.stateNode,b?c.insertBefore(a,b):c.appendChild(a);else if(4!==d&&(a=a.child,null!==a))for(Xj(a,b,c),a=a.sibling;null!==a;)Xj(a,b,c),a=a.sibling;}var X=null,Yj=!1;function Zj(a,b,c){for(c=c.child;null!==c;)ak(a,b,c),c=c.sibling;}function ak(a,b,c){if(lc&&"function"===typeof lc.onCommitFiberUnmount)try{lc.onCommitFiberUnmount(kc,c);}catch(h){}switch(c.tag){case 5:U||Mj(c,b);case 6:var d=X,e=Yj;X=null;Zj(a,b,c);X=d;Yj=e;null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?a.parentNode.removeChild(c):a.removeChild(c)):X.removeChild(c.stateNode));break;case 18:null!==X&&(Yj?(a=X,c=c.stateNode,8===a.nodeType?Kf(a.parentNode,c):1===a.nodeType&&Kf(a,c),bd(a)):Kf(X,c.stateNode));break;case 4:d=X;e=Yj;X=c.stateNode.containerInfo;Yj=!0;Zj(a,b,c);X=d;Yj=e;break;case 0:case 11:case 14:case 15:if(!U&&(d=c.updateQueue,null!==d&&(d=d.lastEffect,null!==d))){e=d=d.next;do{var f=e,g=f.destroy;f=f.tag;void 0!==g&&(0!==(f&2)?Nj(c,b,g):0!==(f&4)&&Nj(c,b,g));e=e.next;}while(e!==d);}Zj(a,b,c);break;case 1:if(!U&&(Mj(c,b),d=c.stateNode,"function"===typeof d.componentWillUnmount))try{d.props=c.memoizedProps,d.state=c.memoizedState,d.componentWillUnmount();}catch(h){W(c,b,h);}Zj(a,b,c);break;case 21:Zj(a,b,c);break;case 22:c.mode&1?(U=(d=U)||null!==c.memoizedState,Zj(a,b,c),U=d):Zj(a,b,c);break;default:Zj(a,b,c);}}function bk(a){var b=a.updateQueue;if(null!==b){a.updateQueue=null;var c=a.stateNode;null===c&&(c=a.stateNode=new Lj());b.forEach(function(b){var d=ck.bind(null,a,b);c.has(b)||(c.add(b),b.then(d,d));});}}function dk(a,b){var c=b.deletions;if(null!==c)for(var d=0;de&&(e=g);d&=~f;}d=e;d=B()-d;d=(120>d?120:480>d?480:1080>d?1080:1920>d?1920:3E3>d?3E3:4320>d?4320:1960*mk(d/1960))-d;if(10a?16:a;if(null===xk)var d=!1;else {a=xk;xk=null;yk=0;if(0!==(K&6))throw Error(p$1(331));var e=K;K|=4;for(V=a.current;null!==V;){var f=V,g=f.child;if(0!==(V.flags&16)){var h=f.deletions;if(null!==h){for(var k=0;kB()-gk?Lk(a,0):sk|=c);Ek(a,b);}function Zk(a,b){0===b&&(0===(a.mode&1)?b=1:(b=sc,sc<<=1,0===(sc&130023424)&&(sc=4194304)));var c=L();a=Zg(a,b);null!==a&&(Ac(a,b,c),Ek(a,c));}function vj(a){var b=a.memoizedState,c=0;null!==b&&(c=b.retryLane);Zk(a,c);}function ck(a,b){var c=0;switch(a.tag){case 13:var d=a.stateNode;var e=a.memoizedState;null!==e&&(c=e.retryLane);break;case 19:d=a.stateNode;break;default:throw Error(p$1(314));}null!==d&&d.delete(b);Zk(a,c);}var Wk;Wk=function(a,b,c){if(null!==a){if(a.memoizedProps!==b.pendingProps||Wf.current)Ug=!0;else {if(0===(a.lanes&c)&&0===(b.flags&128))return Ug=!1,zj(a,b,c);Ug=0!==(a.flags&131072)?!0:!1;}}else Ug=!1,I&&0!==(b.flags&1048576)&&ug(b,ng,b.index);b.lanes=0;switch(b.tag){case 2:var d=b.type;jj(a,b);a=b.pendingProps;var e=Yf(b,H.current);Tg(b,c);e=Xh(null,b,d,a,e,c);var f=bi();b.flags|=1;"object"===typeof e&&null!==e&&"function"===typeof e.render&&void 0===e.$$typeof?(b.tag=1,b.memoizedState=null,b.updateQueue=null,Zf(d)?(f=!0,cg(b)):f=!1,b.memoizedState=null!==e.state&&void 0!==e.state?e.state:null,ah(b),e.updater=nh,b.stateNode=e,e._reactInternals=b,rh(b,d,a,c),b=kj(null,b,d,!0,f,c)):(b.tag=0,I&&f&&vg(b),Yi(null,b,e,c),b=b.child);return b;case 16:d=b.elementType;a:{jj(a,b);a=b.pendingProps;e=d._init;d=e(d._payload);b.type=d;e=b.tag=$k(d);a=Lg(d,a);switch(e){case 0:b=dj(null,b,d,a,c);break a;case 1:b=ij(null,b,d,a,c);break a;case 11:b=Zi(null,b,d,a,c);break a;case 14:b=aj(null,b,d,Lg(d.type,a),c);break a;}throw Error(p$1(306,d,""));}return b;case 0:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),dj(a,b,d,e,c);case 1:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),ij(a,b,d,e,c);case 3:a:{lj(b);if(null===a)throw Error(p$1(387));d=b.pendingProps;f=b.memoizedState;e=f.element;bh(a,b);gh(b,d,null,c);var g=b.memoizedState;d=g.element;if(f.isDehydrated){if(f={element:d,isDehydrated:!1,cache:g.cache,pendingSuspenseBoundaries:g.pendingSuspenseBoundaries,transitions:g.transitions},b.updateQueue.baseState=f,b.memoizedState=f,b.flags&256){e=Ki(Error(p$1(423)),b);b=mj(a,b,d,c,e);break a;}else if(d!==e){e=Ki(Error(p$1(424)),b);b=mj(a,b,d,c,e);break a;}else for(yg=Lf(b.stateNode.containerInfo.firstChild),xg=b,I=!0,zg=null,c=Ch(b,null,d,c),b.child=c;c;)c.flags=c.flags&-3|4096,c=c.sibling;}else {Ig();if(d===e){b=$i(a,b,c);break a;}Yi(a,b,d,c);}b=b.child;}return b;case 5:return Kh(b),null===a&&Eg(b),d=b.type,e=b.pendingProps,f=null!==a?a.memoizedProps:null,g=e.children,Ef(d,e)?g=null:null!==f&&Ef(d,f)&&(b.flags|=32),hj(a,b),Yi(a,b,g,c),b.child;case 6:return null===a&&Eg(b),null;case 13:return pj(a,b,c);case 4:return Ih(b,b.stateNode.containerInfo),d=b.pendingProps,null===a?b.child=Bh(b,null,d,c):Yi(a,b,d,c),b.child;case 11:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),Zi(a,b,d,e,c);case 7:return Yi(a,b,b.pendingProps,c),b.child;case 8:return Yi(a,b,b.pendingProps.children,c),b.child;case 12:return Yi(a,b,b.pendingProps.children,c),b.child;case 10:a:{d=b.type._context;e=b.pendingProps;f=b.memoizedProps;g=e.value;G(Mg,d._currentValue);d._currentValue=g;if(null!==f)if(He(f.value,g)){if(f.children===e.children&&!Wf.current){b=$i(a,b,c);break a;}}else for(f=b.child,null!==f&&(f.return=b);null!==f;){var h=f.dependencies;if(null!==h){g=f.child;for(var k=h.firstContext;null!==k;){if(k.context===d){if(1===f.tag){k=ch(-1,c&-c);k.tag=2;var l=f.updateQueue;if(null!==l){l=l.shared;var m=l.pending;null===m?k.next=k:(k.next=m.next,m.next=k);l.pending=k;}}f.lanes|=c;k=f.alternate;null!==k&&(k.lanes|=c);Sg(f.return,c,b);h.lanes|=c;break;}k=k.next;}}else if(10===f.tag)g=f.type===b.type?null:f.child;else if(18===f.tag){g=f.return;if(null===g)throw Error(p$1(341));g.lanes|=c;h=g.alternate;null!==h&&(h.lanes|=c);Sg(g,c,b);g=f.sibling;}else g=f.child;if(null!==g)g.return=f;else for(g=f;null!==g;){if(g===b){g=null;break;}f=g.sibling;if(null!==f){f.return=g.return;g=f;break;}g=g.return;}f=g;}Yi(a,b,e.children,c);b=b.child;}return b;case 9:return e=b.type,d=b.pendingProps.children,Tg(b,c),e=Vg(e),d=d(e),b.flags|=1,Yi(a,b,d,c),b.child;case 14:return d=b.type,e=Lg(d,b.pendingProps),e=Lg(d.type,e),aj(a,b,d,e,c);case 15:return cj(a,b,b.type,b.pendingProps,c);case 17:return d=b.type,e=b.pendingProps,e=b.elementType===d?e:Lg(d,e),jj(a,b),b.tag=1,Zf(d)?(a=!0,cg(b)):a=!1,Tg(b,c),ph(b,d,e),rh(b,d,e,c),kj(null,b,d,!0,a,c);case 19:return yj(a,b,c);case 22:return ej(a,b,c);}throw Error(p$1(156,b.tag));};function Gk(a,b){return ac(a,b);}function al(a,b,c,d){this.tag=a;this.key=c;this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null;this.index=0;this.ref=null;this.pendingProps=b;this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null;this.mode=d;this.subtreeFlags=this.flags=0;this.deletions=null;this.childLanes=this.lanes=0;this.alternate=null;}function Bg(a,b,c,d){return new al(a,b,c,d);}function bj(a){a=a.prototype;return !(!a||!a.isReactComponent);}function $k(a){if("function"===typeof a)return bj(a)?1:0;if(void 0!==a&&null!==a){a=a.$$typeof;if(a===Da)return 11;if(a===Ga)return 14;}return 2;}function wh(a,b){var c=a.alternate;null===c?(c=Bg(a.tag,b,a.key,a.mode),c.elementType=a.elementType,c.type=a.type,c.stateNode=a.stateNode,c.alternate=a,a.alternate=c):(c.pendingProps=b,c.type=a.type,c.flags=0,c.subtreeFlags=0,c.deletions=null);c.flags=a.flags&14680064;c.childLanes=a.childLanes;c.lanes=a.lanes;c.child=a.child;c.memoizedProps=a.memoizedProps;c.memoizedState=a.memoizedState;c.updateQueue=a.updateQueue;b=a.dependencies;c.dependencies=null===b?null:{lanes:b.lanes,firstContext:b.firstContext};c.sibling=a.sibling;c.index=a.index;c.ref=a.ref;return c;}function yh(a,b,c,d,e,f){var g=2;d=a;if("function"===typeof a)bj(a)&&(g=1);else if("string"===typeof a)g=5;else a:switch(a){case ya:return Ah(c.children,e,f,b);case za:g=8;e|=8;break;case Aa:return a=Bg(12,c,b,e|2),a.elementType=Aa,a.lanes=f,a;case Ea:return a=Bg(13,c,b,e),a.elementType=Ea,a.lanes=f,a;case Fa:return a=Bg(19,c,b,e),a.elementType=Fa,a.lanes=f,a;case Ia:return qj(c,e,f,b);default:if("object"===typeof a&&null!==a)switch(a.$$typeof){case Ba:g=10;break a;case Ca:g=9;break a;case Da:g=11;break a;case Ga:g=14;break a;case Ha:g=16;d=null;break a;}throw Error(p$1(130,null==a?a:typeof a,""));}b=Bg(g,c,b,e);b.elementType=a;b.type=d;b.lanes=f;return b;}function Ah(a,b,c,d){a=Bg(7,a,d,b);a.lanes=c;return a;}function qj(a,b,c,d){a=Bg(22,a,d,b);a.elementType=Ia;a.lanes=c;a.stateNode={isHidden:!1};return a;}function xh(a,b,c){a=Bg(6,a,null,b);a.lanes=c;return a;}function zh(a,b,c){b=Bg(4,null!==a.children?a.children:[],a.key,b);b.lanes=c;b.stateNode={containerInfo:a.containerInfo,pendingChildren:null,implementation:a.implementation};return b;}function bl(a,b,c,d,e){this.tag=b;this.containerInfo=a;this.finishedWork=this.pingCache=this.current=this.pendingChildren=null;this.timeoutHandle=-1;this.callbackNode=this.pendingContext=this.context=null;this.callbackPriority=0;this.eventTimes=zc(0);this.expirationTimes=zc(-1);this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0;this.entanglements=zc(0);this.identifierPrefix=d;this.onRecoverableError=e;this.mutableSourceEagerHydrationData=null;}function cl(a,b,c,d,e,f,g,h,k){a=new bl(a,b,c,h,k);1===b?(b=1,!0===f&&(b|=8)):b=0;f=Bg(3,null,null,b);a.current=f;f.stateNode=a;f.memoizedState={element:d,isDehydrated:c,cache:null,transitions:null,pendingSuspenseBoundaries:null};ah(f);return a;}function dl(a,b,c){var d=3 is set, +// the File will have a {webkitRelativePath} property +// https://developer.mozilla.org/en-US/docs/Web/API/HTMLInputElement/webkitdirectory +:typeof webkitRelativePath==='string'&&webkitRelativePath.length>0?webkitRelativePath:file.name,writable:false,configurable:false,enumerable:true});}return f;}function withMimeType(file){var name=file.name;var hasExtension=name&&name.lastIndexOf('.')!==-1;if(hasExtension&&!file.type){var ext=name.split('.').pop().toLowerCase();var type=COMMON_MIME_TYPES.get(ext);if(type){Object.defineProperty(file,'type',{value:type,writable:false,configurable:false,enumerable:true});}}return file;} + +var FILES_TO_IGNORE=[// Thumbnail cache files for macOS and Windows +'.DS_Store','Thumbs.db'// Windows +];/** + * Convert a DragEvent's DataTrasfer object to a list of File objects + * NOTE: If some of the items are folders, + * everything will be flattened and placed in the same list but the paths will be kept as a {path} property. + * + * EXPERIMENTAL: A list of https://developer.mozilla.org/en-US/docs/Web/API/FileSystemHandle objects can also be passed as an arg + * and a list of File objects will be returned. + * + * @param evt + */function fromEvent(evt){return __awaiter(this,void 0,void 0,function(){return __generator(this,function(_a){if(isObject(evt)&&isDataTransfer(evt.dataTransfer)){return [2/*return*/,getDataTransferFiles(evt.dataTransfer,evt.type)];}else if(isChangeEvt(evt)){return [2/*return*/,getInputFiles(evt)];}else if(Array.isArray(evt)&&evt.every(function(item){return 'getFile'in item&&typeof item.getFile==='function';})){return [2/*return*/,getFsHandleFiles(evt)];}return [2/*return*/,[]];});});}function isDataTransfer(value){return isObject(value);}function isChangeEvt(value){return isObject(value)&&isObject(value.target);}function isObject(v){return typeof v==='object'&&v!==null;}function getInputFiles(evt){return fromList(evt.target.files).map(function(file){return toFileWithPath(file);});}// Ee expect each handle to be https://developer.mozilla.org/en-US/docs/Web/API/FileSystemFileHandle +function getFsHandleFiles(handles){return __awaiter(this,void 0,void 0,function(){var files;return __generator(this,function(_a){switch(_a.label){case 0:return [4/*yield*/,Promise.all(handles.map(function(h){return h.getFile();}))];case 1:files=_a.sent();return [2/*return*/,files.map(function(file){return toFileWithPath(file);})];}});});}function getDataTransferFiles(dt,type){return __awaiter(this,void 0,void 0,function(){var items,files;return __generator(this,function(_a){switch(_a.label){case 0:if(!dt.items)return [3/*break*/,2];items=fromList(dt.items).filter(function(item){return item.kind==='file';});// According to https://html.spec.whatwg.org/multipage/dnd.html#dndevents, +// only 'dragstart' and 'drop' has access to the data (source node) +if(type!=='drop'){return [2/*return*/,items];}return [4/*yield*/,Promise.all(items.map(toFilePromises))];case 1:files=_a.sent();return [2/*return*/,noIgnoredFiles(flatten(files))];case 2:return [2/*return*/,noIgnoredFiles(fromList(dt.files).map(function(file){return toFileWithPath(file);}))];}});});}function noIgnoredFiles(files){return files.filter(function(file){return FILES_TO_IGNORE.indexOf(file.name)===-1;});}// IE11 does not support Array.from() +// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/from#Browser_compatibility +// https://developer.mozilla.org/en-US/docs/Web/API/FileList +// https://developer.mozilla.org/en-US/docs/Web/API/DataTransferItemList +function fromList(items){if(items===null){return [];}var files=[];// tslint:disable: prefer-for-of +for(var i=0;iarr.length)len=arr.length;for(var i=0,arr2=new Array(len);imaxSize)return [false,getTooLargeRejectionErr(maxSize)];if(file.sizemaxSize)return [false,getTooLargeRejectionErr(maxSize)];}return [true,null];}function isDefined(value){return value!==undefined&&value!==null;}/** + * + * @param {object} options + * @param {File[]} options.files + * @param {string|string[]} [options.accept] + * @param {number} [options.minSize] + * @param {number} [options.maxSize] + * @param {boolean} [options.multiple] + * @param {number} [options.maxFiles] + * @param {(f: File) => FileError|FileError[]|null} [options.validator] + * @returns + */function allFilesAccepted(_ref){var files=_ref.files,accept=_ref.accept,minSize=_ref.minSize,maxSize=_ref.maxSize,multiple=_ref.multiple,maxFiles=_ref.maxFiles,validator=_ref.validator;if(!multiple&&files.length>1||multiple&&maxFiles>=1&&files.length>maxFiles){return false;}return files.every(function(file){var _fileAccepted=fileAccepted(file,accept),_fileAccepted2=_slicedToArray$1(_fileAccepted,1),accepted=_fileAccepted2[0];var _fileMatchSize=fileMatchSize(file,minSize,maxSize),_fileMatchSize2=_slicedToArray$1(_fileMatchSize,1),sizeMatch=_fileMatchSize2[0];var customErrors=validator?validator(file):null;return accepted&&sizeMatch&&!customErrors;});}// React's synthetic events has event.isPropagationStopped, +// but to remain compatibility with other libs (Preact) fall back +// to check event.cancelBubble +function isPropagationStopped(event){if(typeof event.isPropagationStopped==="function"){return event.isPropagationStopped();}else if(typeof event.cancelBubble!=="undefined"){return event.cancelBubble;}return false;}function isEvtWithFiles(event){if(!event.dataTransfer){return !!event.target&&!!event.target.files;}// https://developer.mozilla.org/en-US/docs/Web/API/DataTransfer/types +// https://developer.mozilla.org/en-US/docs/Web/API/HTML_Drag_and_Drop_API/Recommended_drag_types#file +return Array.prototype.some.call(event.dataTransfer.types,function(type){return type==="Files"||type==="application/x-moz-file";});}function onDocumentDragOver(event){event.preventDefault();}function isIe(userAgent){return userAgent.indexOf("MSIE")!==-1||userAgent.indexOf("Trident/")!==-1;}function isEdge(userAgent){return userAgent.indexOf("Edge/")!==-1;}function isIeOrEdge(){var userAgent=arguments.length>0&&arguments[0]!==undefined?arguments[0]:window.navigator.userAgent;return isIe(userAgent)||isEdge(userAgent);}/** + * This is intended to be used to compose event handlers + * They are executed in order until one of them calls `event.isPropagationStopped()`. + * Note that the check is done on the first invoke too, + * meaning that if propagation was stopped before invoking the fns, + * no handlers will be executed. + * + * @param {Function} fns the event hanlder functions + * @return {Function} the event handler to add to an element + */function composeEventHandlers(){for(var _len=arguments.length,fns=new Array(_len),_key=0;_key<_len;_key++){fns[_key]=arguments[_key];}return function(event){for(var _len2=arguments.length,args=new Array(_len2>1?_len2-1:0),_key2=1;_key2<_len2;_key2++){args[_key2-1]=arguments[_key2];}return fns.some(function(fn){if(!isPropagationStopped(event)&&fn){fn.apply(void 0,[event].concat(args));}return isPropagationStopped(event);});};}/** + * canUseFileSystemAccessAPI checks if the [File System Access API](https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API) + * is supported by the browser. + * @returns {boolean} + */function canUseFileSystemAccessAPI(){return "showOpenFilePicker"in window;}/** + * Convert the `{accept}` dropzone prop to the + * `{types}` option for https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker + * + * @param {AcceptProp} accept + * @returns {{accept: string[]}[]} + */function pickerOptionsFromAccept(accept){if(isDefined(accept)){var acceptForPicker=Object.entries(accept).filter(function(_ref2){var _ref3=_slicedToArray$1(_ref2,2),mimeType=_ref3[0],ext=_ref3[1];var ok=true;if(!isMIMEType(mimeType)){console.warn("Skipped \"".concat(mimeType,"\" because it is not a valid MIME type. Check https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types for a list of valid MIME types."));ok=false;}if(!Array.isArray(ext)||!ext.every(isExt)){console.warn("Skipped \"".concat(mimeType,"\" because an invalid file extension was provided."));ok=false;}return ok;}).reduce(function(agg,_ref4){var _ref5=_slicedToArray$1(_ref4,2),mimeType=_ref5[0],ext=_ref5[1];return _objectSpread$1(_objectSpread$1({},agg),{},_defineProperty$2({},mimeType,ext));},{});return [{// description is required due to https://crbug.com/1264708 +description:"Files",accept:acceptForPicker}];}return accept;}/** + * Convert the `{accept}` dropzone prop to an array of MIME types/extensions. + * @param {AcceptProp} accept + * @returns {string} + */function acceptPropAsAcceptAttr(accept){if(isDefined(accept)){return Object.entries(accept).reduce(function(a,_ref6){var _ref7=_slicedToArray$1(_ref6,2),mimeType=_ref7[0],ext=_ref7[1];return [].concat(_toConsumableArray$2(a),[mimeType],_toConsumableArray$2(ext));},[])// Silently discard invalid entries as pickerOptionsFromAccept warns about these +.filter(function(v){return isMIMEType(v)||isExt(v);}).join(",");}return undefined;}/** + * Check if v is an exception caused by aborting a request (e.g window.showOpenFilePicker()). + * + * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException. + * @param {any} v + * @returns {boolean} True if v is an abort exception. + */function isAbort(v){return v instanceof DOMException&&(v.name==="AbortError"||v.code===v.ABORT_ERR);}/** + * Check if v is a security error. + * + * See https://developer.mozilla.org/en-US/docs/Web/API/DOMException. + * @param {any} v + * @returns {boolean} True if v is a security error. + */function isSecurityError(v){return v instanceof DOMException&&(v.name==="SecurityError"||v.code===v.SECURITY_ERR);}/** + * Check if v is a MIME type string. + * + * See accepted format: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input/file#unique_file_type_specifiers. + * + * @param {string} v + */function isMIMEType(v){return v==="audio/*"||v==="video/*"||v==="image/*"||v==="text/*"||/\w+\/[-+.\w]+/g.test(v);}/** + * Check if v is a file extension. + * @param {string} v + */function isExt(v){return /^.*\.[\w]+$/.test(v);}/** + * @typedef {Object.} AcceptProp + */ /** + * @typedef {object} FileError + * @property {string} message + * @property {ErrorCode|string} code + */ /** + * @typedef {"file-invalid-type"|"file-too-large"|"file-too-small"|"too-many-files"} ErrorCode + */ + +var _excluded=["children"],_excluded2=["open"],_excluded3=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],_excluded4=["refKey","onChange","onClick"];function _toConsumableArray$1(arr){return _arrayWithoutHoles(arr)||_iterableToArray(arr)||_unsupportedIterableToArray(arr)||_nonIterableSpread();}function _nonIterableSpread(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _iterableToArray(iter){if(typeof Symbol!=="undefined"&&iter[Symbol.iterator]!=null||iter["@@iterator"]!=null)return Array.from(iter);}function _arrayWithoutHoles(arr){if(Array.isArray(arr))return _arrayLikeToArray(arr);}function _slicedToArray(arr,i){return _arrayWithHoles(arr)||_iterableToArrayLimit(arr,i)||_unsupportedIterableToArray(arr,i)||_nonIterableRest();}function _nonIterableRest(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.");}function _unsupportedIterableToArray(o,minLen){if(!o)return;if(typeof o==="string")return _arrayLikeToArray(o,minLen);var n=Object.prototype.toString.call(o).slice(8,-1);if(n==="Object"&&o.constructor)n=o.constructor.name;if(n==="Map"||n==="Set")return Array.from(o);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return _arrayLikeToArray(o,minLen);}function _arrayLikeToArray(arr,len){if(len==null||len>arr.length)len=arr.length;for(var i=0,arr2=new Array(len);i=0)continue;if(!Object.prototype.propertyIsEnumerable.call(source,key))continue;target[key]=source[key];}}return target;}function _objectWithoutPropertiesLoose(source,excluded){if(source==null)return {};var target={};var sourceKeys=Object.keys(source);var key,i;for(i=0;i=0)continue;target[key]=source[key];}return target;}/** + * Convenience wrapper component for the `useDropzone` hook + * + * ```jsx + * + * {({getRootProps, getInputProps}) => ( + *
+ * + *

Drag 'n' drop some files here, or click to select files

+ *
+ * )} + *
+ * ``` + */var Dropzone=/*#__PURE__*/reactExports.forwardRef(function(_ref,ref){var children=_ref.children,params=_objectWithoutProperties(_ref,_excluded);var _useDropzone=useDropzone(params),open=_useDropzone.open,props=_objectWithoutProperties(_useDropzone,_excluded2);reactExports.useImperativeHandle(ref,function(){return {open:open};},[open]);// TODO: Figure out why react-styleguidist cannot create docs if we don't return a jsx element +return/*#__PURE__*/React.createElement(reactExports.Fragment,null,children(_objectSpread(_objectSpread({},props),{},{open:open})));});Dropzone.displayName="Dropzone";// Add default props for react-docgen +var defaultProps={disabled:false,getFilesFromEvent:fromEvent,maxSize:Infinity,minSize:0,multiple:true,maxFiles:0,preventDropOnDocument:true,noClick:false,noKeyboard:false,noDrag:false,noDragEventsBubbling:false,validator:null,useFsAccessApi:true,autoFocus:false};Dropzone.defaultProps=defaultProps;Dropzone.propTypes={/** + * Render function that exposes the dropzone state and prop getter fns + * + * @param {object} params + * @param {Function} params.getRootProps Returns the props you should apply to the root drop container you render + * @param {Function} params.getInputProps Returns the props you should apply to hidden file input you render + * @param {Function} params.open Open the native file selection dialog + * @param {boolean} params.isFocused Dropzone area is in focus + * @param {boolean} params.isFileDialogActive File dialog is opened + * @param {boolean} params.isDragActive Active drag is in progress + * @param {boolean} params.isDragAccept Dragged files are accepted + * @param {boolean} params.isDragReject Some dragged files are rejected + * @param {File[]} params.acceptedFiles Accepted files + * @param {FileRejection[]} params.fileRejections Rejected files and why they were rejected + */children:PropTypes.func,/** + * Set accepted file types. + * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information. + * Keep in mind that mime type determination is not reliable across platforms. CSV files, + * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under + * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276). + */accept:PropTypes.objectOf(PropTypes.arrayOf(PropTypes.string)),/** + * Allow drag 'n' drop (or selection from the file dialog) of multiple files + */multiple:PropTypes.bool,/** + * If false, allow dropped items to take over the current browser window + */preventDropOnDocument:PropTypes.bool,/** + * If true, disables click to open the native file selection dialog + */noClick:PropTypes.bool,/** + * If true, disables SPACE/ENTER to open the native file selection dialog. + * Note that it also stops tracking the focus state. + */noKeyboard:PropTypes.bool,/** + * If true, disables drag 'n' drop + */noDrag:PropTypes.bool,/** + * If true, stops drag event propagation to parents + */noDragEventsBubbling:PropTypes.bool,/** + * Minimum file size (in bytes) + */minSize:PropTypes.number,/** + * Maximum file size (in bytes) + */maxSize:PropTypes.number,/** + * Maximum accepted number of files + * The default value is 0 which means there is no limitation to how many files are accepted. + */maxFiles:PropTypes.number,/** + * Enable/disable the dropzone + */disabled:PropTypes.bool,/** + * Use this to provide a custom file aggregator + * + * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog) + */getFilesFromEvent:PropTypes.func,/** + * Cb for when closing the file dialog with no selection + */onFileDialogCancel:PropTypes.func,/** + * Cb for when opening the file dialog + */onFileDialogOpen:PropTypes.func,/** + * Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API + * to open the file picker instead of using an `` click event. + */useFsAccessApi:PropTypes.bool,/** + * Set to true to focus the root element on render + */autoFocus:PropTypes.bool,/** + * Cb for when the `dragenter` event occurs. + * + * @param {DragEvent} event + */onDragEnter:PropTypes.func,/** + * Cb for when the `dragleave` event occurs + * + * @param {DragEvent} event + */onDragLeave:PropTypes.func,/** + * Cb for when the `dragover` event occurs + * + * @param {DragEvent} event + */onDragOver:PropTypes.func,/** + * Cb for when the `drop` event occurs. + * Note that this callback is invoked after the `getFilesFromEvent` callback is done. + * + * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props. + * `accept` must be a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) or a valid file extension. + * If `multiple` is set to false and additional files are dropped, + * all files besides the first will be rejected. + * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well. + * + * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected. + * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props. + * + * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server. + * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library: + * + * ```js + * function onDrop(acceptedFiles) { + * const req = request.post('/upload') + * acceptedFiles.forEach(file => { + * req.attach(file.name, file) + * }) + * req.end(callback) + * } + * ``` + * + * @param {File[]} acceptedFiles + * @param {FileRejection[]} fileRejections + * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog) + */onDrop:PropTypes.func,/** + * Cb for when the `drop` event occurs. + * Note that if no files are accepted, this callback is not invoked. + * + * @param {File[]} files + * @param {(DragEvent|Event)} event + */onDropAccepted:PropTypes.func,/** + * Cb for when the `drop` event occurs. + * Note that if no files are rejected, this callback is not invoked. + * + * @param {FileRejection[]} fileRejections + * @param {(DragEvent|Event)} event + */onDropRejected:PropTypes.func,/** + * Cb for when there's some error from any of the promises. + * + * @param {Error} error + */onError:PropTypes.func,/** + * Custom validation function. It must return null if there's no errors. + * @param {File} file + * @returns {FileError|FileError[]|null} + */validator:PropTypes.func};var Dropzone$1 = Dropzone;/** + * A function that is invoked for the `dragenter`, + * `dragover` and `dragleave` events. + * It is not invoked if the items are not files (such as link, text, etc.). + * + * @callback dragCb + * @param {DragEvent} event + */ /** + * A function that is invoked for the `drop` or input change event. + * It is not invoked if the items are not files (such as link, text, etc.). + * + * @callback dropCb + * @param {File[]} acceptedFiles List of accepted files + * @param {FileRejection[]} fileRejections List of rejected files and why they were rejected + * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog) + */ /** + * A function that is invoked for the `drop` or input change event. + * It is not invoked if the items are files (such as link, text, etc.). + * + * @callback dropAcceptedCb + * @param {File[]} files List of accepted files that meet the given criteria + * (`accept`, `multiple`, `minSize`, `maxSize`) + * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog) + */ /** + * A function that is invoked for the `drop` or input change event. + * + * @callback dropRejectedCb + * @param {File[]} files List of rejected files that do not meet the given criteria + * (`accept`, `multiple`, `minSize`, `maxSize`) + * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog) + */ /** + * A function that is used aggregate files, + * in a asynchronous fashion, from drag or input change events. + * + * @callback getFilesFromEvent + * @param {(DragEvent|Event)} event A drag event or input change event (if files were selected via the file dialog) + * @returns {(File[]|Promise)} + */ /** + * An object with the current dropzone state. + * + * @typedef {object} DropzoneState + * @property {boolean} isFocused Dropzone area is in focus + * @property {boolean} isFileDialogActive File dialog is opened + * @property {boolean} isDragActive Active drag is in progress + * @property {boolean} isDragAccept Dragged files are accepted + * @property {boolean} isDragReject Some dragged files are rejected + * @property {File[]} acceptedFiles Accepted files + * @property {FileRejection[]} fileRejections Rejected files and why they were rejected + */ /** + * An object with the dropzone methods. + * + * @typedef {object} DropzoneMethods + * @property {Function} getRootProps Returns the props you should apply to the root drop container you render + * @property {Function} getInputProps Returns the props you should apply to hidden file input you render + * @property {Function} open Open the native file selection dialog + */var initialState={isFocused:false,isFileDialogActive:false,isDragActive:false,isDragAccept:false,isDragReject:false,acceptedFiles:[],fileRejections:[]};/** + * A React hook that creates a drag 'n' drop area. + * + * ```jsx + * function MyDropzone(props) { + * const {getRootProps, getInputProps} = useDropzone({ + * onDrop: acceptedFiles => { + * // do something with the File objects, e.g. upload to some server + * } + * }); + * return ( + *
+ * + *

Drag and drop some files here, or click to select files

+ *
+ * ) + * } + * ``` + * + * @function useDropzone + * + * @param {object} props + * @param {import("./utils").AcceptProp} [props.accept] Set accepted file types. + * Checkout https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker types option for more information. + * Keep in mind that mime type determination is not reliable across platforms. CSV files, + * for example, are reported as text/plain under macOS but as application/vnd.ms-excel under + * Windows. In some cases there might not be a mime type set at all (https://github.com/react-dropzone/react-dropzone/issues/276). + * @param {boolean} [props.multiple=true] Allow drag 'n' drop (or selection from the file dialog) of multiple files + * @param {boolean} [props.preventDropOnDocument=true] If false, allow dropped items to take over the current browser window + * @param {boolean} [props.noClick=false] If true, disables click to open the native file selection dialog + * @param {boolean} [props.noKeyboard=false] If true, disables SPACE/ENTER to open the native file selection dialog. + * Note that it also stops tracking the focus state. + * @param {boolean} [props.noDrag=false] If true, disables drag 'n' drop + * @param {boolean} [props.noDragEventsBubbling=false] If true, stops drag event propagation to parents + * @param {number} [props.minSize=0] Minimum file size (in bytes) + * @param {number} [props.maxSize=Infinity] Maximum file size (in bytes) + * @param {boolean} [props.disabled=false] Enable/disable the dropzone + * @param {getFilesFromEvent} [props.getFilesFromEvent] Use this to provide a custom file aggregator + * @param {Function} [props.onFileDialogCancel] Cb for when closing the file dialog with no selection + * @param {boolean} [props.useFsAccessApi] Set to true to use the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API + * to open the file picker instead of using an `` click event. + * @param {boolean} autoFocus Set to true to auto focus the root element. + * @param {Function} [props.onFileDialogOpen] Cb for when opening the file dialog + * @param {dragCb} [props.onDragEnter] Cb for when the `dragenter` event occurs. + * @param {dragCb} [props.onDragLeave] Cb for when the `dragleave` event occurs + * @param {dragCb} [props.onDragOver] Cb for when the `dragover` event occurs + * @param {dropCb} [props.onDrop] Cb for when the `drop` event occurs. + * Note that this callback is invoked after the `getFilesFromEvent` callback is done. + * + * Files are accepted or rejected based on the `accept`, `multiple`, `minSize` and `maxSize` props. + * `accept` must be an object with keys as a valid [MIME type](http://www.iana.org/assignments/media-types/media-types.xhtml) according to [input element specification](https://www.w3.org/wiki/HTML/Elements/input/file) and the value an array of file extensions (optional). + * If `multiple` is set to false and additional files are dropped, + * all files besides the first will be rejected. + * Any file which does not have a size in the [`minSize`, `maxSize`] range, will be rejected as well. + * + * Note that the `onDrop` callback will always be invoked regardless if the dropped files were accepted or rejected. + * If you'd like to react to a specific scenario, use the `onDropAccepted`/`onDropRejected` props. + * + * `onDrop` will provide you with an array of [File](https://developer.mozilla.org/en-US/docs/Web/API/File) objects which you can then process and send to a server. + * For example, with [SuperAgent](https://github.com/visionmedia/superagent) as a http/ajax library: + * + * ```js + * function onDrop(acceptedFiles) { + * const req = request.post('/upload') + * acceptedFiles.forEach(file => { + * req.attach(file.name, file) + * }) + * req.end(callback) + * } + * ``` + * @param {dropAcceptedCb} [props.onDropAccepted] + * @param {dropRejectedCb} [props.onDropRejected] + * @param {(error: Error) => void} [props.onError] + * + * @returns {DropzoneState & DropzoneMethods} + */function useDropzone(){var props=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{};var _defaultProps$props=_objectSpread(_objectSpread({},defaultProps),props),accept=_defaultProps$props.accept,disabled=_defaultProps$props.disabled,getFilesFromEvent=_defaultProps$props.getFilesFromEvent,maxSize=_defaultProps$props.maxSize,minSize=_defaultProps$props.minSize,multiple=_defaultProps$props.multiple,maxFiles=_defaultProps$props.maxFiles,onDragEnter=_defaultProps$props.onDragEnter,onDragLeave=_defaultProps$props.onDragLeave,onDragOver=_defaultProps$props.onDragOver,onDrop=_defaultProps$props.onDrop,onDropAccepted=_defaultProps$props.onDropAccepted,onDropRejected=_defaultProps$props.onDropRejected,onFileDialogCancel=_defaultProps$props.onFileDialogCancel,onFileDialogOpen=_defaultProps$props.onFileDialogOpen,useFsAccessApi=_defaultProps$props.useFsAccessApi,autoFocus=_defaultProps$props.autoFocus,preventDropOnDocument=_defaultProps$props.preventDropOnDocument,noClick=_defaultProps$props.noClick,noKeyboard=_defaultProps$props.noKeyboard,noDrag=_defaultProps$props.noDrag,noDragEventsBubbling=_defaultProps$props.noDragEventsBubbling,onError=_defaultProps$props.onError,validator=_defaultProps$props.validator;var acceptAttr=reactExports.useMemo(function(){return acceptPropAsAcceptAttr(accept);},[accept]);var pickerTypes=reactExports.useMemo(function(){return pickerOptionsFromAccept(accept);},[accept]);var onFileDialogOpenCb=reactExports.useMemo(function(){return typeof onFileDialogOpen==="function"?onFileDialogOpen:noop;},[onFileDialogOpen]);var onFileDialogCancelCb=reactExports.useMemo(function(){return typeof onFileDialogCancel==="function"?onFileDialogCancel:noop;},[onFileDialogCancel]);/** + * @constant + * @type {React.MutableRefObject} + */var rootRef=reactExports.useRef(null);var inputRef=reactExports.useRef(null);var _useReducer=reactExports.useReducer(reducer,initialState),_useReducer2=_slicedToArray(_useReducer,2),state=_useReducer2[0],dispatch=_useReducer2[1];var isFocused=state.isFocused,isFileDialogActive=state.isFileDialogActive;var fsAccessApiWorksRef=reactExports.useRef(typeof window!=="undefined"&&window.isSecureContext&&useFsAccessApi&&canUseFileSystemAccessAPI());// Update file dialog active state when the window is focused on +var onWindowFocus=function onWindowFocus(){// Execute the timeout only if the file dialog is opened in the browser +if(!fsAccessApiWorksRef.current&&isFileDialogActive){setTimeout(function(){if(inputRef.current){var files=inputRef.current.files;if(!files.length){dispatch({type:"closeDialog"});onFileDialogCancelCb();}}},300);}};reactExports.useEffect(function(){window.addEventListener("focus",onWindowFocus,false);return function(){window.removeEventListener("focus",onWindowFocus,false);};},[inputRef,isFileDialogActive,onFileDialogCancelCb,fsAccessApiWorksRef]);var dragTargetsRef=reactExports.useRef([]);var onDocumentDrop=function onDocumentDrop(event){if(rootRef.current&&rootRef.current.contains(event.target)){// If we intercepted an event for our instance, let it propagate down to the instance's onDrop handler +return;}event.preventDefault();dragTargetsRef.current=[];};reactExports.useEffect(function(){if(preventDropOnDocument){document.addEventListener("dragover",onDocumentDragOver,false);document.addEventListener("drop",onDocumentDrop,false);}return function(){if(preventDropOnDocument){document.removeEventListener("dragover",onDocumentDragOver);document.removeEventListener("drop",onDocumentDrop);}};},[rootRef,preventDropOnDocument]);// Auto focus the root when autoFocus is true +reactExports.useEffect(function(){if(!disabled&&autoFocus&&rootRef.current){rootRef.current.focus();}return function(){};},[rootRef,autoFocus,disabled]);var onErrCb=reactExports.useCallback(function(e){if(onError){onError(e);}else {// Let the user know something's gone wrong if they haven't provided the onError cb. +console.error(e);}},[onError]);var onDragEnterCb=reactExports.useCallback(function(event){event.preventDefault();// Persist here because we need the event later after getFilesFromEvent() is done +event.persist();stopPropagation(event);dragTargetsRef.current=[].concat(_toConsumableArray$1(dragTargetsRef.current),[event.target]);if(isEvtWithFiles(event)){Promise.resolve(getFilesFromEvent(event)).then(function(files){if(isPropagationStopped(event)&&!noDragEventsBubbling){return;}var fileCount=files.length;var isDragAccept=fileCount>0&&allFilesAccepted({files:files,accept:acceptAttr,minSize:minSize,maxSize:maxSize,multiple:multiple,maxFiles:maxFiles,validator:validator});var isDragReject=fileCount>0&&!isDragAccept;dispatch({isDragAccept:isDragAccept,isDragReject:isDragReject,isDragActive:true,type:"setDraggedFiles"});if(onDragEnter){onDragEnter(event);}}).catch(function(e){return onErrCb(e);});}},[getFilesFromEvent,onDragEnter,onErrCb,noDragEventsBubbling,acceptAttr,minSize,maxSize,multiple,maxFiles,validator]);var onDragOverCb=reactExports.useCallback(function(event){event.preventDefault();event.persist();stopPropagation(event);var hasFiles=isEvtWithFiles(event);if(hasFiles&&event.dataTransfer){try{event.dataTransfer.dropEffect="copy";}catch(_unused){}/* eslint-disable-line no-empty */}if(hasFiles&&onDragOver){onDragOver(event);}return false;},[onDragOver,noDragEventsBubbling]);var onDragLeaveCb=reactExports.useCallback(function(event){event.preventDefault();event.persist();stopPropagation(event);// Only deactivate once the dropzone and all children have been left +var targets=dragTargetsRef.current.filter(function(target){return rootRef.current&&rootRef.current.contains(target);});// Make sure to remove a target present multiple times only once +// (Firefox may fire dragenter/dragleave multiple times on the same element) +var targetIdx=targets.indexOf(event.target);if(targetIdx!==-1){targets.splice(targetIdx,1);}dragTargetsRef.current=targets;if(targets.length>0){return;}dispatch({type:"setDraggedFiles",isDragActive:false,isDragAccept:false,isDragReject:false});if(isEvtWithFiles(event)&&onDragLeave){onDragLeave(event);}},[rootRef,onDragLeave,noDragEventsBubbling]);var setFiles=reactExports.useCallback(function(files,event){var acceptedFiles=[];var fileRejections=[];files.forEach(function(file){var _fileAccepted=fileAccepted(file,acceptAttr),_fileAccepted2=_slicedToArray(_fileAccepted,2),accepted=_fileAccepted2[0],acceptError=_fileAccepted2[1];var _fileMatchSize=fileMatchSize(file,minSize,maxSize),_fileMatchSize2=_slicedToArray(_fileMatchSize,2),sizeMatch=_fileMatchSize2[0],sizeError=_fileMatchSize2[1];var customErrors=validator?validator(file):null;if(accepted&&sizeMatch&&!customErrors){acceptedFiles.push(file);}else {var errors=[acceptError,sizeError];if(customErrors){errors=errors.concat(customErrors);}fileRejections.push({file:file,errors:errors.filter(function(e){return e;})});}});if(!multiple&&acceptedFiles.length>1||multiple&&maxFiles>=1&&acceptedFiles.length>maxFiles){// Reject everything and empty accepted files +acceptedFiles.forEach(function(file){fileRejections.push({file:file,errors:[TOO_MANY_FILES_REJECTION]});});acceptedFiles.splice(0);}dispatch({acceptedFiles:acceptedFiles,fileRejections:fileRejections,type:"setFiles"});if(onDrop){onDrop(acceptedFiles,fileRejections,event);}if(fileRejections.length>0&&onDropRejected){onDropRejected(fileRejections,event);}if(acceptedFiles.length>0&&onDropAccepted){onDropAccepted(acceptedFiles,event);}},[dispatch,multiple,acceptAttr,minSize,maxSize,maxFiles,onDrop,onDropAccepted,onDropRejected,validator]);var onDropCb=reactExports.useCallback(function(event){event.preventDefault();// Persist here because we need the event later after getFilesFromEvent() is done +event.persist();stopPropagation(event);dragTargetsRef.current=[];if(isEvtWithFiles(event)){Promise.resolve(getFilesFromEvent(event)).then(function(files){if(isPropagationStopped(event)&&!noDragEventsBubbling){return;}setFiles(files,event);}).catch(function(e){return onErrCb(e);});}dispatch({type:"reset"});},[getFilesFromEvent,setFiles,onErrCb,noDragEventsBubbling]);// Fn for opening the file dialog programmatically +var openFileDialog=reactExports.useCallback(function(){// No point to use FS access APIs if context is not secure +// https://developer.mozilla.org/en-US/docs/Web/Security/Secure_Contexts#feature_detection +if(fsAccessApiWorksRef.current){dispatch({type:"openDialog"});onFileDialogOpenCb();// https://developer.mozilla.org/en-US/docs/Web/API/window/showOpenFilePicker +var opts={multiple:multiple,types:pickerTypes};window.showOpenFilePicker(opts).then(function(handles){return getFilesFromEvent(handles);}).then(function(files){setFiles(files,null);dispatch({type:"closeDialog"});}).catch(function(e){// AbortError means the user canceled +if(isAbort(e)){onFileDialogCancelCb(e);dispatch({type:"closeDialog"});}else if(isSecurityError(e)){fsAccessApiWorksRef.current=false;// CORS, so cannot use this API +// Try using the input +if(inputRef.current){inputRef.current.value=null;inputRef.current.click();}else {onErrCb(new Error("Cannot open the file picker because the https://developer.mozilla.org/en-US/docs/Web/API/File_System_Access_API is not supported and no was provided."));}}else {onErrCb(e);}});return;}if(inputRef.current){dispatch({type:"openDialog"});onFileDialogOpenCb();inputRef.current.value=null;inputRef.current.click();}},[dispatch,onFileDialogOpenCb,onFileDialogCancelCb,useFsAccessApi,setFiles,onErrCb,pickerTypes,multiple]);// Cb to open the file dialog when SPACE/ENTER occurs on the dropzone +var onKeyDownCb=reactExports.useCallback(function(event){// Ignore keyboard events bubbling up the DOM tree +if(!rootRef.current||!rootRef.current.isEqualNode(event.target)){return;}if(event.key===" "||event.key==="Enter"||event.keyCode===32||event.keyCode===13){event.preventDefault();openFileDialog();}},[rootRef,openFileDialog]);// Update focus state for the dropzone +var onFocusCb=reactExports.useCallback(function(){dispatch({type:"focus"});},[]);var onBlurCb=reactExports.useCallback(function(){dispatch({type:"blur"});},[]);// Cb to open the file dialog when click occurs on the dropzone +var onClickCb=reactExports.useCallback(function(){if(noClick){return;}// In IE11/Edge the file-browser dialog is blocking, therefore, use setTimeout() +// to ensure React can handle state changes +// See: https://github.com/react-dropzone/react-dropzone/issues/450 +if(isIeOrEdge()){setTimeout(openFileDialog,0);}else {openFileDialog();}},[noClick,openFileDialog]);var composeHandler=function composeHandler(fn){return disabled?null:fn;};var composeKeyboardHandler=function composeKeyboardHandler(fn){return noKeyboard?null:composeHandler(fn);};var composeDragHandler=function composeDragHandler(fn){return noDrag?null:composeHandler(fn);};var stopPropagation=function stopPropagation(event){if(noDragEventsBubbling){event.stopPropagation();}};var getRootProps=reactExports.useMemo(function(){return function(){var _ref2=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref2$refKey=_ref2.refKey,refKey=_ref2$refKey===void 0?"ref":_ref2$refKey,role=_ref2.role,onKeyDown=_ref2.onKeyDown,onFocus=_ref2.onFocus,onBlur=_ref2.onBlur,onClick=_ref2.onClick,onDragEnter=_ref2.onDragEnter,onDragOver=_ref2.onDragOver,onDragLeave=_ref2.onDragLeave,onDrop=_ref2.onDrop,rest=_objectWithoutProperties(_ref2,_excluded3);return _objectSpread(_objectSpread(_defineProperty$1({onKeyDown:composeKeyboardHandler(composeEventHandlers(onKeyDown,onKeyDownCb)),onFocus:composeKeyboardHandler(composeEventHandlers(onFocus,onFocusCb)),onBlur:composeKeyboardHandler(composeEventHandlers(onBlur,onBlurCb)),onClick:composeHandler(composeEventHandlers(onClick,onClickCb)),onDragEnter:composeDragHandler(composeEventHandlers(onDragEnter,onDragEnterCb)),onDragOver:composeDragHandler(composeEventHandlers(onDragOver,onDragOverCb)),onDragLeave:composeDragHandler(composeEventHandlers(onDragLeave,onDragLeaveCb)),onDrop:composeDragHandler(composeEventHandlers(onDrop,onDropCb)),role:typeof role==="string"&&role!==""?role:"presentation"},refKey,rootRef),!disabled&&!noKeyboard?{tabIndex:0}:{}),rest);};},[rootRef,onKeyDownCb,onFocusCb,onBlurCb,onClickCb,onDragEnterCb,onDragOverCb,onDragLeaveCb,onDropCb,noKeyboard,noDrag,disabled]);var onInputElementClick=reactExports.useCallback(function(event){event.stopPropagation();},[]);var getInputProps=reactExports.useMemo(function(){return function(){var _ref3=arguments.length>0&&arguments[0]!==undefined?arguments[0]:{},_ref3$refKey=_ref3.refKey,refKey=_ref3$refKey===void 0?"ref":_ref3$refKey,onChange=_ref3.onChange,onClick=_ref3.onClick,rest=_objectWithoutProperties(_ref3,_excluded4);var inputProps=_defineProperty$1({accept:acceptAttr,multiple:multiple,type:"file",style:{display:"none"},onChange:composeHandler(composeEventHandlers(onChange,onDropCb)),onClick:composeHandler(composeEventHandlers(onClick,onInputElementClick)),tabIndex:-1},refKey,inputRef);return _objectSpread(_objectSpread({},inputProps),rest);};},[inputRef,accept,multiple,onDropCb,disabled]);return _objectSpread(_objectSpread({},state),{},{isFocused:isFocused&&!disabled,getRootProps:getRootProps,getInputProps:getInputProps,rootRef:rootRef,inputRef:inputRef,open:composeHandler(openFileDialog)});}/** + * @param {DropzoneState} state + * @param {{type: string} & DropzoneState} action + * @returns {DropzoneState} + */function reducer(state,action){/* istanbul ignore next */switch(action.type){case"focus":return _objectSpread(_objectSpread({},state),{},{isFocused:true});case"blur":return _objectSpread(_objectSpread({},state),{},{isFocused:false});case"openDialog":return _objectSpread(_objectSpread({},initialState),{},{isFileDialogActive:true});case"closeDialog":return _objectSpread(_objectSpread({},state),{},{isFileDialogActive:false});case"setDraggedFiles":return _objectSpread(_objectSpread({},state),{},{isDragActive:action.isDragActive,isDragAccept:action.isDragAccept,isDragReject:action.isDragReject});case"setFiles":return _objectSpread(_objectSpread({},state),{},{acceptedFiles:action.acceptedFiles,fileRejections:action.fileRejections});case"reset":return _objectSpread({},initialState);default:return state;}}function noop(){} + +var DefaultContext={color:undefined,size:undefined,className:undefined,style:undefined,attr:undefined};var IconContext=React.createContext&&/*#__PURE__*/React.createContext(DefaultContext); + +var __assign=window&&window.__assign||function(){__assign=Object.assign||function(t){for(var s,i=1,n=arguments.length;i (React.createElement("svg", Object.assign({}, props, { viewBox: "64 -65 897 897" }), + React.createElement("g", null, + React.createElement("path", { d: "M888 760v0v0v-753v0h-752v0v753v0h752zM888 832h-752q-30 0 -51 -21t-21 -51v-753q0 -29 21 -50.5t51 -21.5h753q29 0 50.5 21.5t21.5 50.5v753q0 30 -21.5 51t-51.5 21v0zM732 347h-442q-14 0 -25 10.5t-11 25.5v0q0 15 11 25.5t25 10.5h442q14 0 25 -10.5t11 -25.5v0\n q0 -15 -11 -25.5t-25 -10.5z" })))); +const PlusSquareO = (props) => (React.createElement("svg", Object.assign({}, props, { viewBox: "64 -65 897 897" }), + React.createElement("g", null, + React.createElement("path", { d: "M888 760v0v0v-753v0h-752v0v753v0h752zM888 832h-752q-30 0 -51 -21t-21 -51v-753q0 -29 21 -50.5t51 -21.5h753q29 0 50.5 21.5t21.5 50.5v753q0 30 -21.5 51t-51.5 21v0zM732 420h-184v183q0 15 -10.5 25.5t-25.5 10.5v0q-14 0 -25 -10.5t-11 -25.5v-183h-184\n q-15 0 -25.5 -11t-10.5 -25v0q0 -15 10.5 -25.5t25.5 -10.5h184v-183q0 -15 11 -25.5t25 -10.5v0q15 0 25.5 10.5t10.5 25.5v183h184q15 0 25.5 10.5t10.5 25.5v0q0 14 -10.5 25t-25.5 11z" })))); +const CloseSquareO = (props) => (React.createElement("svg", Object.assign({}, props, { viewBox: "64 -65 897 897" }), + React.createElement("g", null, + React.createElement("path", { d: "M717.5 589.5q-10.5 10.5 -25.5 10.5t-26 -10l-154 -155l-154 155q-11 10 -26 10t-25.5 -10.5t-10.5 -25.5t11 -25l154 -155l-154 -155q-11 -10 -11 -25t10.5 -25.5t25.5 -10.5t26 10l154 155l154 -155q11 -10 26 -10t25.5 10.5t10.5 25t-11 25.5l-154 155l154 155\n q11 10 11 25t-10.5 25.5zM888 760v0v0v-753v0h-752v0v753v0h752zM888 832h-752q-30 0 -51 -21t-21 -51v-753q0 -29 21 -50.5t51 -21.5h753q29 0 50.5 21.5t21.5 50.5v753q0 30 -21.5 51t-51.5 21v0z" })))); +const LocationIcon = ``; +const ZoomOutIcon = ``; +const ZoomOutDoubleIcon = ``; +const ZoomInIcon = ``; +const SpaceIcon = ``; +const getFolderIcon = (plugin, children, open) => { + let setting = plugin.settings.folderIcon; + let OpenFolderIcon = MinusSquareO; + let InactiveOpenFolderIcon = CloseSquareO; + let ClosedFolderIcon = PlusSquareO; + if (setting === 'box-folder') { + OpenFolderIcon = BiFolderMinus; + InactiveOpenFolderIcon = BiFolder; + ClosedFolderIcon = BiFolderPlus; + } + else if (setting === 'icomoon') { + OpenFolderIcon = ImFolderMinus; + InactiveOpenFolderIcon = ImFolder; + ClosedFolderIcon = ImFolderPlus; + } + else if (setting === 'typicon') { + OpenFolderIcon = TiFolderOpen; + InactiveOpenFolderIcon = TiFolder; + ClosedFolderIcon = TiFolder; + } + else if (setting === 'circle-gg') { + OpenFolderIcon = CgRemove; + InactiveOpenFolderIcon = CgCloseO; + ClosedFolderIcon = CgAdd; + } + const Icon = children ? (open ? OpenFolderIcon : ClosedFolderIcon) : InactiveOpenFolderIcon; + return Icon; +}; + +var _createClass=function(){function defineProperties(target,props){for(var i=0;i1?_len2-1:0),_key2=1;_key2<_len2;_key2++){expressions[_key2-1]=arguments[_key2];}if(typeof strings==='function'){// if the first argument passed is a function, assume it is a template tag and return +// an intermediary tag that processes the template using the aforementioned tag, passing the +// result to our tag +return _this.interimTag.bind(_this,strings);}if(typeof strings==='string'){// if the first argument passed is a string, just transform it +return _this.transformEndResult(strings);}// else, return a transformed end result of processing the template with our tag +strings=strings.map(_this.transformString.bind(_this));return _this.transformEndResult(strings.reduce(_this.processSubstitutions.bind(_this,expressions)));};// if first argument is an array, extrude it as a list of transformers +if(transformers.length>0&&Array.isArray(transformers[0])){transformers=transformers[0];}// if any transformers are functions, this means they are not initiated - automatically initiate them +this.transformers=transformers.map(function(transformer){return typeof transformer==='function'?transformer():transformer;});// return an ES2015 template tag +return this.tag;}/** + * Applies all transformers to a template literal tagged with this method. + * If a function is passed as the first argument, assumes the function is a template tag + * and applies it to the template, returning a template tag. + * @param {(Function|String|Array)} strings - Either a template tag or an array containing template strings separated by identifier + * @param {...*} ...expressions - Optional list of substitution values. + * @return {(String|Function)} - Either an intermediary tag function or the results of processing the template. + */_createClass(TemplateTag,[{key:'interimTag',/** + * An intermediary template tag that receives a template tag and passes the result of calling the template with the received + * template tag to our own template tag. + * @param {Function} nextTag - the received template tag + * @param {Array} template - the template to process + * @param {...*} ...substitutions - `substitutions` is an array of all substitutions in the template + * @return {*} - the final processed value + */value:function interimTag(previousTag,template){for(var _len3=arguments.length,substitutions=Array(_len3>2?_len3-2:0),_key3=2;_key3<_len3;_key3++){substitutions[_key3-2]=arguments[_key3];}return this.tag(_templateObject,previousTag.apply(undefined,[template].concat(substitutions)));}/** + * Performs bulk processing on the tagged template, transforming each substitution and then + * concatenating the resulting values into a string. + * @param {Array<*>} substitutions - an array of all remaining substitutions present in this template + * @param {String} resultSoFar - this iteration's result string so far + * @param {String} remainingPart - the template chunk after the current substitution + * @return {String} - the result of joining this iteration's processed substitution with the result + */},{key:'processSubstitutions',value:function processSubstitutions(substitutions,resultSoFar,remainingPart){var substitution=this.transformSubstitution(substitutions.shift(),resultSoFar);return ''.concat(resultSoFar,substitution,remainingPart);}/** + * Iterate through each transformer, applying the transformer's `onString` method to the template + * strings before all substitutions are processed. + * @param {String} str - The input string + * @return {String} - The final results of processing each transformer + */},{key:'transformString',value:function transformString(str){var cb=function cb(res,transform){return transform.onString?transform.onString(res):res;};return this.transformers.reduce(cb,str);}/** + * When a substitution is encountered, iterates through each transformer and applies the transformer's + * `onSubstitution` method to the substitution. + * @param {*} substitution - The current substitution + * @param {String} resultSoFar - The result up to and excluding this substitution. + * @return {*} - The final result of applying all substitution transformations. + */},{key:'transformSubstitution',value:function transformSubstitution(substitution,resultSoFar){var cb=function cb(res,transform){return transform.onSubstitution?transform.onSubstitution(res,resultSoFar):res;};return this.transformers.reduce(cb,substitution);}/** + * Iterates through each transformer, applying the transformer's `onEndResult` method to the + * template literal after all substitutions have finished processing. + * @param {String} endResult - The processed template, just before it is returned from the tag + * @return {String} - The final results of processing each transformer + */},{key:'transformEndResult',value:function transformEndResult(endResult){var cb=function cb(res,transform){return transform.onEndResult?transform.onEndResult(res):res;};return this.transformers.reduce(cb,endResult);}}]);return TemplateTag;}(); + +/** + * TemplateTag transformer that trims whitespace on the end result of a tagged template + * @param {String} side = '' - The side of the string to trim. Can be 'start' or 'end' (alternatively 'left' or 'right') + * @return {Object} - a TemplateTag transformer + */var trimResultTransformer=function trimResultTransformer(){var side=arguments.length>0&&arguments[0]!==undefined?arguments[0]:'';return {onEndResult:function onEndResult(endResult){if(side===''){return endResult.trim();}side=side.toLowerCase();if(side==='start'||side==='left'){return endResult.replace(/^\s*/,'');}if(side==='end'||side==='right'){return endResult.replace(/\s*$/,'');}throw new Error('Side not supported: '+side);}};}; + +function _toConsumableArray(arr){if(Array.isArray(arr)){for(var i=0,arr2=Array(arr.length);i0&&arguments[0]!==undefined?arguments[0]:'initial';return {onEndResult:function onEndResult(endResult){if(type==='initial'){// remove the shortest leading indentation from each line +var match=endResult.match(/^[^\S\n]*(?=\S)/gm);var indent=match&&Math.min.apply(Math,_toConsumableArray(match.map(function(el){return el.length;})));if(indent){var regexp=new RegExp('^.{'+indent+'}','gm');return endResult.replace(regexp,'');}return endResult;}if(type==='all'){// remove all indentation from each line +return endResult.replace(/^[^\S\n]+/gm,'');}throw new Error('Unknown type: '+type);}};}; + +/** + * Replaces tabs, newlines and spaces with the chosen value when they occur in sequences + * @param {(String|RegExp)} replaceWhat - the value or pattern that should be replaced + * @param {*} replaceWith - the replacement value + * @return {Object} - a TemplateTag transformer + */var replaceResultTransformer=function replaceResultTransformer(replaceWhat,replaceWith){return {onEndResult:function onEndResult(endResult){if(replaceWhat==null||replaceWith==null){throw new Error('replaceResultTransformer requires at least 2 arguments.');}return endResult.replace(replaceWhat,replaceWith);}};}; + +var replaceSubstitutionTransformer=function replaceSubstitutionTransformer(replaceWhat,replaceWith){return {onSubstitution:function onSubstitution(substitution,resultSoFar){if(replaceWhat==null||replaceWith==null){throw new Error('replaceSubstitutionTransformer requires at least 2 arguments.');}// Do not touch if null or undefined +if(substitution==null){return substitution;}else {return substitution.toString().replace(replaceWhat,replaceWith);}}};}; + +var defaults={separator:'',conjunction:'',serial:false};/** + * Converts an array substitution to a string containing a list + * @param {String} [opts.separator = ''] - the character that separates each item + * @param {String} [opts.conjunction = ''] - replace the last separator with this + * @param {Boolean} [opts.serial = false] - include the separator before the conjunction? (Oxford comma use-case) + * + * @return {Object} - a TemplateTag transformer + */var inlineArrayTransformer=function inlineArrayTransformer(){var opts=arguments.length>0&&arguments[0]!==undefined?arguments[0]:defaults;return {onSubstitution:function onSubstitution(substitution,resultSoFar){// only operate on arrays +if(Array.isArray(substitution)){var arrayLength=substitution.length;var separator=opts.separator;var conjunction=opts.conjunction;var serial=opts.serial;// join each item in the array into a string where each item is separated by separator +// be sure to maintain indentation +var indent=resultSoFar.match(/(\n?[^\S\n]+)$/);if(indent){substitution=substitution.join(separator+indent[1]);}else {substitution=substitution.join(separator+' ');}// if conjunction is set, replace the last separator with conjunction, but only if there is more than one substitution +if(conjunction&&arrayLength>1){var separatorIndex=substitution.lastIndexOf(separator);substitution=substitution.slice(0,separatorIndex)+(serial?separator:'')+' '+conjunction+substitution.slice(separatorIndex+1);}}return substitution;}};}; + +var splitStringTransformer=function splitStringTransformer(splitBy){return {onSubstitution:function onSubstitution(substitution,resultSoFar){if(splitBy!=null&&typeof splitBy==='string'){if(typeof substitution==='string'&&substitution.includes(splitBy)){substitution=substitution.split(splitBy);}}else {throw new Error('You need to specify a string character to split by.');}return substitution;}};}; + +var isValidValue=function isValidValue(x){return x!=null&&!Number.isNaN(x)&&typeof x!=='boolean';};var removeNonPrintingValuesTransformer=function removeNonPrintingValuesTransformer(){return {onSubstitution:function onSubstitution(substitution){if(Array.isArray(substitution)){return substitution.filter(isValidValue);}if(isValidValue(substitution)){return substitution;}return '';}};}; + +new TemplateTag(inlineArrayTransformer({separator:','}),stripIndentTransformer,trimResultTransformer); + +new TemplateTag(inlineArrayTransformer({separator:',',conjunction:'and'}),stripIndentTransformer,trimResultTransformer); + +new TemplateTag(inlineArrayTransformer({separator:',',conjunction:'or'}),stripIndentTransformer,trimResultTransformer); + +new TemplateTag(splitStringTransformer('\n'),removeNonPrintingValuesTransformer,inlineArrayTransformer,stripIndentTransformer,trimResultTransformer); + +new TemplateTag(splitStringTransformer('\n'),inlineArrayTransformer,stripIndentTransformer,trimResultTransformer,replaceSubstitutionTransformer(/&/g,'&'),replaceSubstitutionTransformer(//g,'>'),replaceSubstitutionTransformer(/"/g,'"'),replaceSubstitutionTransformer(/'/g,'''),replaceSubstitutionTransformer(/`/g,'`')); + +new TemplateTag(replaceResultTransformer(/(?:\n(?:\s*))+/g,' '),trimResultTransformer); + +new TemplateTag(replaceResultTransformer(/(?:\n\s*)/g,''),trimResultTransformer); + +new TemplateTag(inlineArrayTransformer({separator:','}),replaceResultTransformer(/(?:\s+)/g,' '),trimResultTransformer); + +new TemplateTag(inlineArrayTransformer({separator:',',conjunction:'or'}),replaceResultTransformer(/(?:\s+)/g,' '),trimResultTransformer); + +new TemplateTag(inlineArrayTransformer({separator:',',conjunction:'and'}),replaceResultTransformer(/(?:\s+)/g,' '),trimResultTransformer); + +new TemplateTag(inlineArrayTransformer,stripIndentTransformer,trimResultTransformer); + +new TemplateTag(inlineArrayTransformer,replaceResultTransformer(/(?:\s+)/g,' '),trimResultTransformer); + +new TemplateTag(stripIndentTransformer,trimResultTransformer); + +var stripIndents=new TemplateTag(stripIndentTransformer('all'),trimResultTransformer); + +var dayjs_min = {exports: {}}; + +(function (module, exports) { + !function(t,e){module.exports=e();}(commonjsGlobal,function(){var t=1e3,e=6e4,n=36e5,r="millisecond",i="second",s="minute",u="hour",a="day",o="week",c="month",f="quarter",h="year",d="date",l="Invalid Date",$=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,y=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,M={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],n=t%100;return "["+t+(e[(n-20)%10]||e[n]||e[0])+"]";}},m=function(t,e,n){var r=String(t);return !r||r.length>=e?t:""+Array(e+1-r.length).join(n)+t;},v={s:m,z:function(t){var e=-t.utcOffset(),n=Math.abs(e),r=Math.floor(n/60),i=n%60;return (e<=0?"+":"-")+m(r,2,"0")+":"+m(i,2,"0");},m:function t(e,n){if(e.date()1)return t(u[0]);}else {var a=e.name;D[a]=e,i=a;}return !r&&i&&(g=i),i||!r&&g;},O=function(t,e){if(S(t))return t.clone();var n="object"==typeof e?e:{};return n.date=t,n.args=arguments,new _(n);},b=v;b.l=w,b.i=S,b.w=function(t,e){return O(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset});};var _=function(){function M(t){this.$L=w(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[p]=!0;}var m=M.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,n=t.utc;if(null===e)return new Date(NaN);if(b.u(e))return new Date();if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var r=e.match($);if(r){var i=r[2]-1||0,s=(r[7]||"0").substring(0,3);return n?new Date(Date.UTC(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s)):new Date(r[1],i,r[3]||1,r[4]||0,r[5]||0,r[6]||0,s);}}return new Date(e);}(t),this.init();},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds();},m.$utils=function(){return b;},m.isValid=function(){return !(this.$d.toString()===l);},m.isSame=function(t,e){var n=O(t);return this.startOf(e)<=n&&n<=this.endOf(e);},m.isAfter=function(t,e){return O(t) { + const { file, app, newLeaf, leafBySplit } = props; + let fileToOpen = app.vault.getAbstractFileByPath(file.path); + if (!fileToOpen) + return; + let leaf = app.workspace.getLeaf(newLeaf); + if (leafBySplit) + leaf = app.workspace.createLeafBySplit(leaf, 'vertical'); + app.workspace.setActiveLeaf(leaf, { + focus: true, + }); + leaf.openFile(fileToOpen, { eState: { focus: true } }); +}; +const getFileCreateString = (params) => { + const { plugin, fileName } = params; + return stripIndents ` + ${plugin.settings.createdYaml + ? ` + --- + created: ${dayjs(new Date()).format('YYYY-MM-DD hh:mm:ss')} + --- + ` + : ''} + ${plugin.settings.fileNameIsHeader ? `# ${fileName}` : ''} + `; +}; +const createNewMarkdownFile = (plugin, folder, newFileName, content) => __awaiter(void 0, void 0, void 0, function* () { + // @ts-ignore + const newFile = yield plugin.app.fileManager.createNewMarkdownFile(folder, newFileName); + if (content && content !== '') + yield plugin.app.vault.modify(newFile, content); + openFile$1({ file: newFile, app: plugin.app, newLeaf: false }); + let evt = new CustomEvent(eventTypes.activeFileChange, { detail: { filePath: newFile.path } }); + window.dispatchEvent(evt); +}); +const openFileInNewTab = (app, file) => { + openFile$1({ file: file, app: app, newLeaf: true }); +}; +const openFileInNewTabGroup = (app, file) => { + openFile$1({ file: file, app: app, newLeaf: false, leafBySplit: true }); +}; + +class ConfirmationModal extends obsidian.Modal { + constructor(plugin, confirmationNote, callBackAfterConfirmation) { + super(plugin.app); + this.confirmationNote = confirmationNote; + this.callBackAfterConfirmation = callBackAfterConfirmation; + this.plugin = plugin; + } + onOpen() { + let { contentEl } = this; + let confirmationModal = this; + const headerEl = contentEl.createEl('div', { text: this.confirmationNote }); + headerEl.addClass('modal-title'); + this.confirmButton = contentEl.createEl('button', { text: 'Confirm' }); + const cancelButton = contentEl.createEl('button', { text: 'Cancel' }); + cancelButton.style.cssText = 'float: right;'; + cancelButton.addEventListener('click', () => { + confirmationModal.close(); + }); + // Create Button Action and Assign to the Global Variable of the class + this.onConfirmClickAction = (e) => { + this.callBackAfterConfirmation(); + this.close(); + }; + // Assign the event listener + this.confirmButton.addEventListener('click', this.onConfirmClickAction); + } + onClose() { + let { contentEl } = this; + contentEl.empty(); + this.confirmButton.removeEventListener('click', this.onConfirmClickAction); + } +} +class VaultChangeModal extends obsidian.Modal { + constructor(plugin, file, action) { + super(plugin.app); + this.file = file; + this.action = action; + this.plugin = plugin; + } + onOpen() { + let { contentEl } = this; + let myModal = this; + // Header + let headerText; + if (this.action === 'rename') { + headerText = 'Rename: Provide a New Name'; + } + else if (this.action === 'create folder') { + headerText = 'Create Folder: Provide Name'; + } + else if (this.action === 'create note') { + headerText = 'Create Note: Provide Name'; + } + const headerEl = contentEl.createEl('div', { text: headerText }); + headerEl.addClass('modal-title'); + // Input El + const inputEl = contentEl.createEl('input'); + inputEl.style.cssText = 'width: 100%; height: 2.5em; margin-bottom: 15px;'; + if (this.action === 'rename') { + // Manual Rename Handler For md Files + if (this.file.path.endsWith('.md')) { + if (this.file instanceof obsidian.TFolder || this.file instanceof obsidian.TAbstractFile) { + inputEl.value = this.file.name.substring(0, this.file.name.lastIndexOf('.')); + } + else { + inputEl.value = this.file.basename; + } + } + else { + if (this.file instanceof obsidian.TFolder || this.file instanceof obsidian.TAbstractFile) { + inputEl.value = this.file.name; + } + else { + inputEl.value = this.file.basename; + } + } + } + else if (this.action === 'create note' || this.action === 'create folder') { + inputEl.value = 'Untitled'; + inputEl.select(); + } + inputEl.focus(); + // Buttons + let changeButtonText; + if (this.action === 'rename') { + changeButtonText = 'Change Name'; + } + else if (this.action === 'create folder') { + changeButtonText = 'Create Folder'; + } + else if (this.action === 'create note') { + changeButtonText = 'Create Note'; + } + const changeButton = contentEl.createEl('button', { text: changeButtonText }); + const cancelButton = contentEl.createEl('button', { text: 'Cancel' }); + cancelButton.style.cssText = 'float: right;'; + cancelButton.addEventListener('click', () => { + myModal.close(); + }); + const onClickAction = () => __awaiter(this, void 0, void 0, function* () { + let newName = inputEl.value; + if (this.action === 'rename') { + // Manual Rename Handler For md Files + if (this.file.path.endsWith('.md')) { + newName = newName + '.' + this.file.path.slice(this.file.path.lastIndexOf('.') + 1); + } + // Folder Note files to be updated + if (this.file instanceof obsidian.TFolder && this.plugin.settings.folderNote) { + let folderNoteFile = this.app.vault.getAbstractFileByPath(this.file.path + '/' + this.file.name + '.md'); + if (folderNoteFile) + this.app.fileManager.renameFile(folderNoteFile, this.file.path + '/' + newName + '.md'); + } + // Rename the destination file/folder name + this.app.fileManager.renameFile(this.file instanceof obsidian.TFolder || this.file instanceof obsidian.TAbstractFile + ? this.file + : this.plugin.app.vault.getAbstractFileByPath(this.file.path), this.file.parent.path + '/' + newName); + } + else if (this.action === 'create folder') { + this.app.vault.createFolder(this.file.path + '/' + newName); + } + else if (this.action === 'create note') { + yield createNewMarkdownFile(this.plugin, this.file, newName, this.plugin.settings.createdYaml ? getFileCreateString({ plugin: this.plugin, fileName: newName }) : ''); + } + myModal.close(); + }); + // Event Listener + changeButton.addEventListener('click', onClickAction); + inputEl.addEventListener('keydown', (e) => { + if (e.key === 'Enter') + onClickAction(); + }); + } + onClose() { + let { contentEl } = this; + contentEl.empty(); + } +} +class MoveSuggestionModal extends obsidian.FuzzySuggestModal { + constructor(app, fileOrFolderToMove) { + super(app); + this.fileOrFolderToMove = fileOrFolderToMove; + } + getItemText(item) { + return item.path; + } + getItems() { + return getAllFoldersInVault(this.app); + } + onChooseItem(item, evt) { + let fileToRename = this.app.vault.getAbstractFileByPath(item.path); + if (fileToRename) { + this.app.vault.rename(fileToRename, item.path + '/' + fileToRename.name); + } + } +} +function getAllFoldersInVault(app) { + let folders = []; + let rootFolder = app.vault.getRoot(); + folders.push(rootFolder); + function recursiveFx(folder) { + for (let child of folder.children) { + if (child instanceof obsidian.TFolder) { + let childFolder = child; + folders.push(childFolder); + if (childFolder.children) + recursiveFx(childFolder); + } + } + } + recursiveFx(rootFolder); + return folders; +} + +// Helper Function To Get List of Files +const getFilesUnderPath = (params) => { + const { path, plugin, getAllFiles, excludedExtensions, excludedFolders } = params; + var filesUnderPath = []; + var showFilesFromSubFolders = getAllFiles ? true : plugin.settings.showFilesFromSubFolders; + var folderObj = plugin.app.vault.getAbstractFileByPath(path); + recursiveFx(folderObj, plugin.app); + function recursiveFx(folderObj, app) { + if (folderObj instanceof obsidian.TFolder && folderObj.children) { + for (let child of folderObj.children) { + if (child instanceof obsidian.TFile) { + if (excludedExtensions.includes(child.extension) || + (plugin.settings.hideAttachments && child.path.toLowerCase().includes(plugin.settings.attachmentsFolderName.toLowerCase())) || + excludedFolders.includes(child.parent.path)) + continue; + filesUnderPath.push(TFile2OZFile(child)); + } + if (child instanceof obsidian.TFolder && showFilesFromSubFolders) + recursiveFx(child); + } + } + } + return filesUnderPath; +}; +// Converted from TFile to OZFile +const TFile2OZFile = (t) => { + return { + path: t.path, + basename: t.basename, + extension: t.extension, + stat: { + mtime: t.stat.mtime, + ctime: t.stat.ctime, + size: t.stat.size, + }, + parent: { + path: t.parent.path, + }, + isFolderNote: isFolderNote(t), + }; +}; +// Check if the file is a folder note +const isFolderNote = (t) => { + return t.extension === 'md' && t.basename === t.parent.name; +}; +// Helper Function to Create Folder Tree +const createFolderTree = (params) => { + const { startFolder, excludedFolders, plugin } = params; + let fileTree = { folder: startFolder, children: [] }; + function recursive(folder, object) { + if (!(folder && folder.children)) + return; + for (let child of folder.children) { + if (child instanceof obsidian.TFolder) { + let childFolder = child; + if ((plugin.settings.hideAttachments && childFolder.name === plugin.settings.attachmentsFolderName) || + (excludedFolders.length > 0 && excludedFolders.contains(child.path))) { + continue; + } + let newObj = { folder: childFolder, children: [] }; + object.children.push(newObj); + if (childFolder.children) + recursive(childFolder, newObj); + } + } + } + recursive(startFolder, fileTree); + return fileTree; +}; +// Create Folder File Count Map +const getFolderNoteCountMap = (plugin) => { + const counts = {}; + let files; + if (plugin.settings.folderCountOption === 'notes') { + files = plugin.app.vault.getMarkdownFiles(); + } + else { + files = plugin.app.vault.getFiles(); + } + // Filter Folder Note Files + if (plugin.settings.folderNote) { + files = files.filter((f) => f.extension !== 'md' || (f.extension === 'md' && f.basename !== f.parent.name)); + } + files.forEach((file) => { + for (let folder = file.parent; folder != null; folder = folder.parent) { + // -> Create object if doesn't exist + if (!counts[folder.path]) + counts[folder.path] = { open: 0, closed: 0 }; + // -> Create number for open state + if (folder == file.parent) + counts[folder.path].open = 1 + counts[folder.path].open; + // -> Create number for closed state + counts[folder.path].closed = 1 + counts[folder.path].closed; + } + }); + return counts; +}; +// Check if folder has child folder +const hasChildFolder = (folder) => { + let children = folder.children; + for (let child of children) { + if (child instanceof obsidian.TFolder) + return true; + } + return false; +}; +// Files out of Md should be listed with extension badge - Md without extension +const getFileNameAndExtension = (fullName) => { + var index = fullName.lastIndexOf('.'); + return { + fileName: fullName.substring(0, index), + extension: fullName.substring(index + 1), + }; +}; +// Extracts the Folder Name from the Full Folder Path +const getFolderName = (folderPath, app) => { + if (folderPath === '/') + return app.vault.getName(); + let index = folderPath.lastIndexOf('/'); + if (index !== -1) + return folderPath.substring(index + 1); + return folderPath; +}; +const internalPluginLoaded = (pluginName, app) => { + var _a; + // @ts-ignore + return (_a = app.internalPlugins.plugins[pluginName]) === null || _a === void 0 ? void 0 : _a._loaded; +}; +const pluginIsLoaded = (app, pluginId) => { + // @ts-ignore + return app.plugins.getPlugin(pluginId); +}; +const createNewFile = (e, folderPath, plugin) => __awaiter(void 0, void 0, void 0, function* () { + let targetFolder = plugin.app.vault.getAbstractFileByPath(folderPath); + if (!targetFolder) + return; + let modal = new VaultChangeModal(plugin, targetFolder, 'create note'); + modal.open(); +}); +const getBookmarksPluginItems = () => { + return app.internalPlugins.plugins['bookmarks'].instance.items; +}; +const getBookmarkTitle = (title) => { + let bookmarkItems = getBookmarksPluginItems(); + let titleParts = title.split('/'); + let currentItem = bookmarkItems.find((b) => b.title === titleParts[0]); + for (let i = 1; i < titleParts.length; i++) { + currentItem = currentItem.items.find((b) => b.title === titleParts[i]); + } + return currentItem; +}; + +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function err(message){const error=new Error(message);// In V8, Error objects keep the closure scope chain alive until the +// err.stack property is accessed. +if(error.stack===undefined){// IE sets the stack only if error is thrown +try{throw error;}catch(_){}// eslint-disable-line fb-www/no-unused-catch-bindings, no-empty +}return error;}var err_1=err;// @oss-only +var Recoil_err=err_1;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ // Split declaration and implementation to allow this function to pretend to +// check for actual instance of Promise instead of something with a `then` +// method. +// eslint-disable-next-line no-redeclare +function isPromise(p){return !!p&&typeof p.then==='function';}var Recoil_isPromise=isPromise;function nullthrows(x,message){if(x!=null){return x;}throw Recoil_err(message!==null&&message!==void 0?message:'Got unexpected null or undefined');}var Recoil_nullthrows=nullthrows;function _defineProperty(obj,key,value){if(key in obj){Object.defineProperty(obj,key,{value:value,enumerable:true,configurable:true,writable:true});}else {obj[key]=value;}return obj;}class BaseLoadable{getValue(){throw Recoil_err('BaseLoadable');}toPromise(){throw Recoil_err('BaseLoadable');}valueMaybe(){throw Recoil_err('BaseLoadable');}valueOrThrow(){// $FlowFixMe[prop-missing] +throw Recoil_err(`Loadable expected value, but in "${this.state}" state`);}promiseMaybe(){throw Recoil_err('BaseLoadable');}promiseOrThrow(){// $FlowFixMe[prop-missing] +throw Recoil_err(`Loadable expected promise, but in "${this.state}" state`);}errorMaybe(){throw Recoil_err('BaseLoadable');}errorOrThrow(){// $FlowFixMe[prop-missing] +throw Recoil_err(`Loadable expected error, but in "${this.state}" state`);}is(other){// $FlowFixMe[prop-missing] +return other.state===this.state&&other.contents===this.contents;}map(_map){throw Recoil_err('BaseLoadable');}}class ValueLoadable extends BaseLoadable{constructor(value){super();_defineProperty(this,"state",'hasValue');_defineProperty(this,"contents",void 0);this.contents=value;}getValue(){return this.contents;}toPromise(){return Promise.resolve(this.contents);}valueMaybe(){return this.contents;}valueOrThrow(){return this.contents;}promiseMaybe(){return undefined;}errorMaybe(){return undefined;}map(map){try{const next=map(this.contents);return Recoil_isPromise(next)?loadableWithPromise(next):isLoadable(next)?next:loadableWithValue(next);}catch(e){return Recoil_isPromise(e)?// If we "suspended", then try again. +// errors and subsequent retries will be handled in 'loading' case +// $FlowFixMe[prop-missing] +loadableWithPromise(e.next(()=>this.map(map))):loadableWithError(e);}}}class ErrorLoadable extends BaseLoadable{constructor(error){super();_defineProperty(this,"state",'hasError');_defineProperty(this,"contents",void 0);this.contents=error;}getValue(){throw this.contents;}toPromise(){return Promise.reject(this.contents);}valueMaybe(){return undefined;}promiseMaybe(){return undefined;}errorMaybe(){return this.contents;}errorOrThrow(){return this.contents;}map(_map){// $FlowIssue[incompatible-return] +return this;}}class LoadingLoadable extends BaseLoadable{constructor(promise){super();_defineProperty(this,"state",'loading');_defineProperty(this,"contents",void 0);this.contents=promise;}getValue(){throw this.contents;}toPromise(){return this.contents;}valueMaybe(){return undefined;}promiseMaybe(){return this.contents;}promiseOrThrow(){return this.contents;}errorMaybe(){return undefined;}map(map){return loadableWithPromise(this.contents.then(value=>{const next=map(value);if(isLoadable(next)){const nextLoadable=next;switch(nextLoadable.state){case'hasValue':return nextLoadable.contents;case'hasError':throw nextLoadable.contents;case'loading':return nextLoadable.contents;}}// $FlowIssue[incompatible-return] +return next;})// $FlowFixMe[incompatible-call] +.catch(e=>{if(Recoil_isPromise(e)){// we were "suspended," try again +return e.then(()=>this.map(map).contents);}throw e;}));}}function loadableWithValue(value){return Object.freeze(new ValueLoadable(value));}function loadableWithError(error){return Object.freeze(new ErrorLoadable(error));}function loadableWithPromise(promise){return Object.freeze(new LoadingLoadable(promise));}function loadableLoading(){return Object.freeze(new LoadingLoadable(new Promise(()=>{})));}function loadableAllArray(inputs){return inputs.every(i=>i.state==='hasValue')?loadableWithValue(inputs.map(i=>i.contents)):inputs.some(i=>i.state==='hasError')?loadableWithError(Recoil_nullthrows(inputs.find(i=>i.state==='hasError'),'Invalid loadable passed to loadableAll').contents):loadableWithPromise(Promise.all(inputs.map(i=>i.contents)));}function loadableAll(inputs){const unwrapedInputs=Array.isArray(inputs)?inputs:Object.getOwnPropertyNames(inputs).map(key=>inputs[key]);const normalizedInputs=unwrapedInputs.map(x=>isLoadable(x)?x:Recoil_isPromise(x)?loadableWithPromise(x):loadableWithValue(x));const output=loadableAllArray(normalizedInputs);return Array.isArray(inputs)?// $FlowIssue[incompatible-return] +output:// Object.getOwnPropertyNames() has consistent key ordering with ES6 +// $FlowIssue[incompatible-call] +output.map(outputs=>Object.getOwnPropertyNames(inputs).reduce(// $FlowFixMe[invalid-computed-prop] +(out,key,idx)=>({...out,[key]:outputs[idx]}),{}));}function isLoadable(x){return x instanceof BaseLoadable;}const LoadableStaticInterface={of:value=>Recoil_isPromise(value)?loadableWithPromise(value):isLoadable(value)?value:loadableWithValue(value),error:error=>loadableWithError(error),// $FlowIssue[incompatible-return] +loading:()=>loadableLoading(),// $FlowIssue[unclear-type] +all:loadableAll,isLoadable};var Recoil_Loadable={loadableWithValue,loadableWithError,loadableWithPromise,loadableLoading,loadableAll,isLoadable,RecoilLoadable:LoadableStaticInterface};var Recoil_Loadable_1=Recoil_Loadable.loadableWithValue;var Recoil_Loadable_2=Recoil_Loadable.loadableWithError;var Recoil_Loadable_3=Recoil_Loadable.loadableWithPromise;var Recoil_Loadable_4=Recoil_Loadable.loadableLoading;var Recoil_Loadable_5=Recoil_Loadable.loadableAll;var Recoil_Loadable_6=Recoil_Loadable.isLoadable;var Recoil_Loadable_7=Recoil_Loadable.RecoilLoadable;var Recoil_Loadable$1=/*#__PURE__*/Object.freeze({__proto__:null,loadableWithValue:Recoil_Loadable_1,loadableWithError:Recoil_Loadable_2,loadableWithPromise:Recoil_Loadable_3,loadableLoading:Recoil_Loadable_4,loadableAll:Recoil_Loadable_5,isLoadable:Recoil_Loadable_6,RecoilLoadable:Recoil_Loadable_7});const env={RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED:true,// Note: RECOIL_GKS_ENABLED settings will only be honored in OSS builds of Recoil +RECOIL_GKS_ENABLED:new Set(['recoil_hamt_2020','recoil_sync_external_store','recoil_suppress_rerender_in_callback','recoil_memory_managament_2020'])};function readProcessEnvBooleanFlag(name,set){var _process$env$name,_process$env$name$toL;const sanitizedValue=(_process$env$name=process.env[name])===null||_process$env$name===void 0?void 0:(_process$env$name$toL=_process$env$name.toLowerCase())===null||_process$env$name$toL===void 0?void 0:_process$env$name$toL.trim();if(sanitizedValue==null||sanitizedValue===''){return;}const allowedValues=['true','false'];if(!allowedValues.includes(sanitizedValue)){throw Recoil_err(`process.env.${name} value must be 'true', 'false', or empty: ${sanitizedValue}`);}set(sanitizedValue==='true');}function readProcessEnvStringArrayFlag(name,set){var _process$env$name2;const sanitizedValue=(_process$env$name2=process.env[name])===null||_process$env$name2===void 0?void 0:_process$env$name2.trim();if(sanitizedValue==null||sanitizedValue===''){return;}set(sanitizedValue.split(/\s*,\s*|\s+/));}/** + * Allow NodeJS/NextJS/etc to set the initial state through process.env variable + * Note: we don't assume 'process' is available in all runtime environments + * + * @see https://github.com/facebookexperimental/Recoil/issues/733 + */function applyProcessEnvFlagOverrides(){var _process;// note: this check is needed in addition to the check below, runtime error will occur without it! +// eslint-disable-next-line fb-www/typeof-undefined +if(typeof process==='undefined'){return;}if(((_process=process)===null||_process===void 0?void 0:_process.env)==null){return;}readProcessEnvBooleanFlag('RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED',value=>{env.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED=value;});readProcessEnvStringArrayFlag('RECOIL_GKS_ENABLED',value=>{value.forEach(gk=>{env.RECOIL_GKS_ENABLED.add(gk);});});}applyProcessEnvFlagOverrides();var Recoil_RecoilEnv=env;function Recoil_gkx_OSS(gk){return Recoil_RecoilEnv.RECOIL_GKS_ENABLED.has(gk);}Recoil_gkx_OSS.setPass=gk=>{Recoil_RecoilEnv.RECOIL_GKS_ENABLED.add(gk);};Recoil_gkx_OSS.setFail=gk=>{Recoil_RecoilEnv.RECOIL_GKS_ENABLED.delete(gk);};Recoil_gkx_OSS.clear=()=>{Recoil_RecoilEnv.RECOIL_GKS_ENABLED.clear();};var Recoil_gkx=Recoil_gkx_OSS;// @oss-only +/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function recoverableViolation(message,_projectName,{error}={}){return null;}var recoverableViolation_1=recoverableViolation;// @oss-only +var Recoil_recoverableViolation=recoverableViolation_1;var _createMutableSource,_useMutableSource,_useSyncExternalStore;const createMutableSource=// flowlint-next-line unclear-type:off +(_createMutableSource=React.createMutableSource)!==null&&_createMutableSource!==void 0?_createMutableSource:React.unstable_createMutableSource;const useMutableSource=// flowlint-next-line unclear-type:off +(_useMutableSource=React.useMutableSource)!==null&&_useMutableSource!==void 0?_useMutableSource:React.unstable_useMutableSource;// https://github.com/reactwg/react-18/discussions/86 +const useSyncExternalStore=// flowlint-next-line unclear-type:off +(_useSyncExternalStore=React.useSyncExternalStore)!==null&&_useSyncExternalStore!==void 0?_useSyncExternalStore:// flowlint-next-line unclear-type:off +React.unstable_useSyncExternalStore;// Since React goes through a proxy dispatcher and the current renderer can +// change we can't simply check if `React.useSyncExternalStore()` is defined. +function currentRendererSupportsUseSyncExternalStore(){var _ReactCurrentDispatch;// $FlowFixMe[incompatible-use] +const{ReactCurrentDispatcher,ReactCurrentOwner}=/* $FlowFixMe[prop-missing] This workaround was approved as a safer mechanism + * to detect if the current renderer supports useSyncExternalStore() + * https://fb.workplace.com/groups/reactjs/posts/9558682330846963/ */React.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;const dispatcher=(_ReactCurrentDispatch=ReactCurrentDispatcher===null||ReactCurrentDispatcher===void 0?void 0:ReactCurrentDispatcher.current)!==null&&_ReactCurrentDispatch!==void 0?_ReactCurrentDispatch:ReactCurrentOwner.currentDispatcher;const isUseSyncExternalStoreSupported=dispatcher.useSyncExternalStore!=null;return isUseSyncExternalStoreSupported;}/** + * mode: The React API and approach to use for syncing state with React + * early: Re-renders from Recoil updates occur: + * 1) earlier + * 2) in sync with React updates in the same batch + * 3) before transaction observers instead of after. + * concurrent: Is the current mode compatible with Concurrent Mode and useTransition() + */function reactMode(){// NOTE: This mode is currently broken with some Suspense cases +// see Recoil_selector-test.js +if(Recoil_gkx('recoil_transition_support')){return {mode:'TRANSITION_SUPPORT',early:true,concurrent:true};}if(Recoil_gkx('recoil_sync_external_store')&&useSyncExternalStore!=null){return {mode:'SYNC_EXTERNAL_STORE',early:true,concurrent:false};}if(Recoil_gkx('recoil_mutable_source')&&useMutableSource!=null&&typeof window!=='undefined'&&!window.$disableRecoilValueMutableSource_TEMP_HACK_DO_NOT_USE){return Recoil_gkx('recoil_suppress_rerender_in_callback')?{mode:'MUTABLE_SOURCE',early:true,concurrent:true}:{mode:'MUTABLE_SOURCE',early:false,concurrent:false};}return Recoil_gkx('recoil_suppress_rerender_in_callback')?{mode:'LEGACY',early:true,concurrent:false}:{mode:'LEGACY',early:false,concurrent:false};}// TODO Need to figure out if there is a standard/open-source equivalent to see if hot module replacement is happening: +function isFastRefreshEnabled(){// @fb-only: const {isAcceptingUpdate} = require('__debug'); +// @fb-only: return typeof isAcceptingUpdate === 'function' && isAcceptingUpdate(); +return false;// @oss-only +}var Recoil_ReactMode={createMutableSource,useMutableSource,useSyncExternalStore,currentRendererSupportsUseSyncExternalStore,reactMode,isFastRefreshEnabled};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ // eslint-disable-next-line no-unused-vars +class AbstractRecoilValue{constructor(newKey){_defineProperty(this,"key",void 0);this.key=newKey;}toJSON(){return {key:this.key};}}class RecoilState extends AbstractRecoilValue{}class RecoilValueReadOnly extends AbstractRecoilValue{}function isRecoilValue(x){return x instanceof RecoilState||x instanceof RecoilValueReadOnly;}var Recoil_RecoilValue={AbstractRecoilValue,RecoilState,RecoilValueReadOnly,isRecoilValue};var Recoil_RecoilValue_1=Recoil_RecoilValue.AbstractRecoilValue;var Recoil_RecoilValue_2=Recoil_RecoilValue.RecoilState;var Recoil_RecoilValue_3=Recoil_RecoilValue.RecoilValueReadOnly;var Recoil_RecoilValue_4=Recoil_RecoilValue.isRecoilValue;var Recoil_RecoilValue$1=/*#__PURE__*/Object.freeze({__proto__:null,AbstractRecoilValue:Recoil_RecoilValue_1,RecoilState:Recoil_RecoilValue_2,RecoilValueReadOnly:Recoil_RecoilValue_3,isRecoilValue:Recoil_RecoilValue_4});/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Creates a new iterable whose output is generated by passing the input + * iterable's values through the mapper function. + */function mapIterable(iterable,callback){// Use generator to create iterable/iterator +return function*(){let index=0;for(const value of iterable){yield callback(value,index++);}}();}var Recoil_mapIterable=mapIterable;class DefaultValue{}const DEFAULT_VALUE=new DefaultValue();// flowlint-next-line unclear-type:off +const nodes=new Map();// flowlint-next-line unclear-type:off +const recoilValues=new Map();/* eslint-disable no-redeclare */function recoilValuesForKeys(keys){return Recoil_mapIterable(keys,key=>Recoil_nullthrows(recoilValues.get(key)));}function checkForDuplicateAtomKey(key){if(nodes.has(key)){const message=`Duplicate atom key "${key}". This is a FATAL ERROR in + production. But it is safe to ignore this warning if it occurred because of + hot module replacement.`;{// @fb-only: recoverableViolation(message, 'recoil'); +console.warn(message);// @oss-only +}}}function registerNode(node){if(Recoil_RecoilEnv.RECOIL_DUPLICATE_ATOM_KEY_CHECKING_ENABLED){checkForDuplicateAtomKey(node.key);}nodes.set(node.key,node);const recoilValue=node.set==null?new Recoil_RecoilValue$1.RecoilValueReadOnly(node.key):new Recoil_RecoilValue$1.RecoilState(node.key);recoilValues.set(node.key,recoilValue);return recoilValue;}/* eslint-enable no-redeclare */class NodeMissingError extends Error{}// flowlint-next-line unclear-type:off +function getNode(key){const node=nodes.get(key);if(node==null){throw new NodeMissingError(`Missing definition for RecoilValue: "${key}""`);}return node;}// flowlint-next-line unclear-type:off +function getNodeMaybe(key){return nodes.get(key);}const configDeletionHandlers=new Map();function deleteNodeConfigIfPossible(key){var _node$shouldDeleteCon;if(!Recoil_gkx('recoil_memory_managament_2020')){return;}const node=nodes.get(key);if(node!==null&&node!==void 0&&(_node$shouldDeleteCon=node.shouldDeleteConfigOnRelease)!==null&&_node$shouldDeleteCon!==void 0&&_node$shouldDeleteCon.call(node)){var _getConfigDeletionHan;nodes.delete(key);(_getConfigDeletionHan=getConfigDeletionHandler(key))===null||_getConfigDeletionHan===void 0?void 0:_getConfigDeletionHan();configDeletionHandlers.delete(key);}}function setConfigDeletionHandler(key,fn){if(!Recoil_gkx('recoil_memory_managament_2020')){return;}if(fn===undefined){configDeletionHandlers.delete(key);}else {configDeletionHandlers.set(key,fn);}}function getConfigDeletionHandler(key){return configDeletionHandlers.get(key);}var Recoil_Node={nodes,recoilValues,registerNode,getNode,getNodeMaybe,deleteNodeConfigIfPossible,setConfigDeletionHandler,getConfigDeletionHandler,recoilValuesForKeys,NodeMissingError,DefaultValue,DEFAULT_VALUE};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function enqueueExecution(s,f){f();}var Recoil_Queue={enqueueExecution};function createCommonjsModule(fn,module){return module={exports:{}},fn(module,module.exports),module.exports;}var hamt_1=createCommonjsModule(function(module){var _typeof=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?function(obj){return typeof obj;}:function(obj){return obj&&typeof Symbol==="function"&&obj.constructor===Symbol&&obj!==Symbol.prototype?"symbol":typeof obj;};/** + @fileOverview Hash Array Mapped Trie. + + Code based on: https://github.com/exclipy/pdata +*/var hamt={};// export +/* Configuration + ******************************************************************************/var SIZE=5;var BUCKET_SIZE=Math.pow(2,SIZE);var MASK=BUCKET_SIZE-1;var MAX_INDEX_NODE=BUCKET_SIZE/2;var MIN_ARRAY_NODE=BUCKET_SIZE/4;/* + ******************************************************************************/var nothing={};var constant=function constant(x){return function(){return x;};};/** + Get 32 bit hash of string. + + Based on: + http://stackoverflow.com/questions/7616461/generate-a-hash-from-string-in-javascript-jquery +*/var hash=hamt.hash=function(str){var type=typeof str==='undefined'?'undefined':_typeof(str);if(type==='number')return str;if(type!=='string')str+='';var hash=0;for(var i=0,len=str.length;i>1&0x55555555;x=(x&0x33333333)+(x>>2&0x33333333);x=x+(x>>4)&0x0f0f0f0f;x+=x>>8;x+=x>>16;return x&0x7f;};var hashFragment=function hashFragment(shift,h){return h>>>shift&MASK;};var toBitmap=function toBitmap(x){return 1<=at){arr[_i--]=arr[_i];}arr[at]=v;return arr;}var i=0,g=0;var out=new Array(len+1);while(i>>=1;}arr[frag]=child;return ArrayNode(edit,count+1,arr);};/** + Collapse an array node into a indexed node. + + @param edit Current edit. + @param count Number of elements in new array. + @param removed Index of removed element. + @param elements Array node children before remove. +*/var pack=function pack(edit,count,removed,elements){var children=new Array(count-1);var g=0;var bitmap=0;for(var i=0,len=elements.length;i1?Collision(edit,this.hash,list):list[0];// collapse single element collision list +}var v=f();if(v===nothing)return this;++size.value;return mergeLeaves(edit,shift,this.hash,this,h,Leaf(edit,h,k,v));};var IndexedNode__modify=function IndexedNode__modify(edit,keyEq,shift,f,h,k,size){var mask=this.mask;var children=this.children;var frag=hashFragment(shift,h);var bit=toBitmap(frag);var indx=fromBitmap(mask,bit);var exists=mask&bit;var current=exists?children[indx]:empty;var child=current._modify(edit,keyEq,shift+SIZE,f,h,k,size);if(current===child)return this;var canEdit=canEditNode(edit,this);var bitmap=mask;var newChildren=void 0;if(exists&&isEmptyNode(child)){// remove +bitmap&=~bit;if(!bitmap)return empty;if(children.length<=2&&isLeaf(children[indx^1]))return children[indx^1];// collapse +newChildren=arraySpliceOut(canEdit,indx,children);}else if(!exists&&!isEmptyNode(child)){// add +if(children.length>=MAX_INDEX_NODE)return expand(edit,frag,child,mask,children);bitmap|=bit;newChildren=arraySpliceIn(canEdit,indx,child,children);}else {// modify +newChildren=arrayUpdate(canEdit,indx,child,children);}if(canEdit){this.mask=bitmap;this.children=newChildren;return this;}return IndexedNode(edit,bitmap,newChildren);};var ArrayNode__modify=function ArrayNode__modify(edit,keyEq,shift,f,h,k,size){var count=this.size;var children=this.children;var frag=hashFragment(shift,h);var child=children[frag];var newChild=(child||empty)._modify(edit,keyEq,shift+SIZE,f,h,k,size);if(child===newChild)return this;var canEdit=canEditNode(edit,this);var newChildren=void 0;if(isEmptyNode(child)&&!isEmptyNode(newChild)){// add +++count;newChildren=arrayUpdate(canEdit,frag,newChild,children);}else if(!isEmptyNode(child)&&isEmptyNode(newChild)){// remove +--count;if(count<=MIN_ARRAY_NODE)return pack(edit,count,frag,children);newChildren=arrayUpdate(canEdit,frag,empty,children);}else {// modify +newChildren=arrayUpdate(canEdit,frag,newChild,children);}if(canEdit){this.size=count;this.children=newChildren;return this;}return ArrayNode(edit,count,newChildren);};empty._modify=function(edit,keyEq,shift,f,h,k,size){var v=f();if(v===nothing)return empty;++size.value;return Leaf(edit,h,k,v);};/* + ******************************************************************************/function Map(editable,edit,config,root,size){this._editable=editable;this._edit=edit;this._config=config;this._root=root;this._size=size;}Map.prototype.setTree=function(newRoot,newSize){if(this._editable){this._root=newRoot;this._size=newSize;return this;}return newRoot===this._root?this:new Map(this._editable,this._edit,this._config,newRoot,newSize);};/* Queries + ******************************************************************************/ /** + Lookup the value for `key` in `map` using a custom `hash`. + + Returns the value or `alt` if none. +*/var tryGetHash=hamt.tryGetHash=function(alt,hash,key,map){var node=map._root;var shift=0;var keyEq=map._config.keyEq;while(true){switch(node.type){case LEAF:{return keyEq(key,node.key)?node.value:alt;}case COLLISION:{if(hash===node.hash){var children=node.children;for(var i=0,len=children.length;i. +// $FlowIssue +constructor(existing){_defineProperty(this,"_hamt",hamt_1.empty.beginMutation());if(existing instanceof HashArrayMappedTrieMap){const h=existing._hamt.endMutation();existing._hamt=h.beginMutation();this._hamt=h.beginMutation();}else if(existing){for(const[k,v]of existing.entries()){this._hamt.set(k,v);}}}keys(){return this._hamt.keys();}entries(){return this._hamt.entries();}get(k){return this._hamt.get(k);}has(k){return this._hamt.has(k);}set(k,v){this._hamt.set(k,v);return this;}delete(k){this._hamt.delete(k);return this;}clone(){return persistentMap(this);}toMap(){return new Map(this._hamt);}}function persistentMap(existing){if(Recoil_gkx('recoil_hamt_2020')){return new HashArrayMappedTrieMap(existing);}else {return new BuiltInMap(existing);}}var Recoil_PersistentMap={persistentMap};var Recoil_PersistentMap_1=Recoil_PersistentMap.persistentMap;var Recoil_PersistentMap$1=/*#__PURE__*/Object.freeze({__proto__:null,persistentMap:Recoil_PersistentMap_1});/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Returns a set containing all of the values from the first set that are not + * present in any of the subsequent sets. + * + * Note: this is written procedurally (i.e., without filterSet) for performant + * use in tight loops. + */function differenceSets(set,...setsWithValuesToRemove){const ret=new Set();FIRST:for(const value of set){for(const otherSet of setsWithValuesToRemove){if(otherSet.has(value)){continue FIRST;}}ret.add(value);}return ret;}var Recoil_differenceSets=differenceSets;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Returns a new Map object with the same keys as the original, but with the + * values replaced with the output of the given callback function. + */function mapMap(map,callback){const result=new Map();map.forEach((value,key)=>{result.set(key,callback(value,key));});return result;}var Recoil_mapMap=mapMap;function makeGraph(){return {nodeDeps:new Map(),nodeToNodeSubscriptions:new Map()};}function cloneGraph(graph){return {nodeDeps:Recoil_mapMap(graph.nodeDeps,s=>new Set(s)),nodeToNodeSubscriptions:Recoil_mapMap(graph.nodeToNodeSubscriptions,s=>new Set(s))};}// Note that this overwrites the deps of existing nodes, rather than unioning +// the new deps with the old deps. +function mergeDepsIntoGraph(key,newDeps,graph,// If olderGraph is given then we will not overwrite changes made to the given +// graph compared with olderGraph: +olderGraph){const{nodeDeps,nodeToNodeSubscriptions}=graph;const oldDeps=nodeDeps.get(key);if(oldDeps&&olderGraph&&oldDeps!==olderGraph.nodeDeps.get(key)){return;}// Update nodeDeps: +nodeDeps.set(key,newDeps);// Add new deps to nodeToNodeSubscriptions: +const addedDeps=oldDeps==null?newDeps:Recoil_differenceSets(newDeps,oldDeps);for(const dep of addedDeps){if(!nodeToNodeSubscriptions.has(dep)){nodeToNodeSubscriptions.set(dep,new Set());}const existing=Recoil_nullthrows(nodeToNodeSubscriptions.get(dep));existing.add(key);}// Remove removed deps from nodeToNodeSubscriptions: +if(oldDeps){const removedDeps=Recoil_differenceSets(oldDeps,newDeps);for(const dep of removedDeps){if(!nodeToNodeSubscriptions.has(dep)){return;}const existing=Recoil_nullthrows(nodeToNodeSubscriptions.get(dep));existing.delete(key);if(existing.size===0){nodeToNodeSubscriptions.delete(dep);}}}}function saveDepsToStore(key,deps,store,version){var _storeState$nextTree,_storeState$previousT,_storeState$previousT2,_storeState$previousT3;const storeState=store.getState();if(!(version===storeState.currentTree.version||version===((_storeState$nextTree=storeState.nextTree)===null||_storeState$nextTree===void 0?void 0:_storeState$nextTree.version)||version===((_storeState$previousT=storeState.previousTree)===null||_storeState$previousT===void 0?void 0:_storeState$previousT.version)));// Merge the dependencies discovered into the store's dependency map +// for the version that was read: +const graph=store.getGraph(version);mergeDepsIntoGraph(key,deps,graph);// If this version is not the latest version, also write these dependencies +// into later versions if they don't already have their own: +if(version===((_storeState$previousT2=storeState.previousTree)===null||_storeState$previousT2===void 0?void 0:_storeState$previousT2.version)){const currentGraph=store.getGraph(storeState.currentTree.version);mergeDepsIntoGraph(key,deps,currentGraph,graph);}if(version===((_storeState$previousT3=storeState.previousTree)===null||_storeState$previousT3===void 0?void 0:_storeState$previousT3.version)||version===storeState.currentTree.version){var _storeState$nextTree2;const nextVersion=(_storeState$nextTree2=storeState.nextTree)===null||_storeState$nextTree2===void 0?void 0:_storeState$nextTree2.version;if(nextVersion!==undefined){const nextGraph=store.getGraph(nextVersion);mergeDepsIntoGraph(key,deps,nextGraph,graph);}}}var Recoil_Graph={cloneGraph,graph:makeGraph,saveDepsToStore};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */let nextTreeStateVersion=0;const getNextTreeStateVersion=()=>nextTreeStateVersion++;let nextStoreID=0;const getNextStoreID=()=>nextStoreID++;let nextComponentID=0;const getNextComponentID=()=>nextComponentID++;var Recoil_Keys={getNextTreeStateVersion,getNextStoreID,getNextComponentID};const{persistentMap:persistentMap$1}=Recoil_PersistentMap$1;const{graph}=Recoil_Graph;const{getNextTreeStateVersion:getNextTreeStateVersion$1}=Recoil_Keys;function makeEmptyTreeState(){const version=getNextTreeStateVersion$1();return {version,stateID:version,transactionMetadata:{},dirtyAtoms:new Set(),atomValues:persistentMap$1(),nonvalidatedAtoms:persistentMap$1()};}function makeEmptyStoreState(){const currentTree=makeEmptyTreeState();return {currentTree,nextTree:null,previousTree:null,commitDepth:0,knownAtoms:new Set(),knownSelectors:new Set(),transactionSubscriptions:new Map(),nodeTransactionSubscriptions:new Map(),nodeToComponentSubscriptions:new Map(),queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set(),graphsByVersion:new Map().set(currentTree.version,graph()),retention:{referenceCounts:new Map(),nodesRetainedByZone:new Map(),retainablesToCheckForRelease:new Set()},nodeCleanupFunctions:new Map()};}var Recoil_State={makeEmptyTreeState,makeEmptyStoreState,getNextTreeStateVersion:getNextTreeStateVersion$1};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */class RetentionZone{}function retentionZone(){return new RetentionZone();}var Recoil_RetentionZone={RetentionZone,retentionZone};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * Utilities for working with built-in Maps and Sets without mutating them. + * + * + * @format + * @oncall recoil + */function setByAddingToSet(set,v){const next=new Set(set);next.add(v);return next;}function setByDeletingFromSet(set,v){const next=new Set(set);next.delete(v);return next;}function mapBySettingInMap(map,k,v){const next=new Map(map);next.set(k,v);return next;}function mapByUpdatingInMap(map,k,updater){const next=new Map(map);next.set(k,updater(next.get(k)));return next;}function mapByDeletingFromMap(map,k){const next=new Map(map);next.delete(k);return next;}function mapByDeletingMultipleFromMap(map,ks){const next=new Map(map);ks.forEach(k=>next.delete(k));return next;}var Recoil_CopyOnWrite={setByAddingToSet,setByDeletingFromSet,mapBySettingInMap,mapByUpdatingInMap,mapByDeletingFromMap,mapByDeletingMultipleFromMap};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Creates a new iterable whose output is generated by passing the input + * iterable's values through the filter function. + */function*filterIterable(iterable,predicate){// Use generator to create iterable/iterator +let index=0;for(const value of iterable){if(predicate(value,index++)){yield value;}}}var Recoil_filterIterable=filterIterable;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Return a proxy object based on the provided base and factories objects. + * The proxy will include all properties of the base object as-is. + * The factories object contains callbacks to obtain the values of the properies + * for its keys. + * + * This is useful for providing users an object where some properties may be + * lazily computed only on first access. + */ // $FlowIssue[unclear-type] +function lazyProxy(base,factories){const proxy=new Proxy(base,{// Compute and cache lazy property if not already done. +get:(target,prop)=>{if(!(prop in target)&&prop in factories){target[prop]=factories[prop]();}return target[prop];},// This method allows user to iterate keys as normal +ownKeys:target=>{return Object.keys(target);}});// $FlowIssue[incompatible-return] +return proxy;}var Recoil_lazyProxy=lazyProxy;const{getNode:getNode$1,getNodeMaybe:getNodeMaybe$1,recoilValuesForKeys:recoilValuesForKeys$1}=Recoil_Node;const{RetentionZone:RetentionZone$1}=Recoil_RetentionZone;const{setByAddingToSet:setByAddingToSet$1}=Recoil_CopyOnWrite;// flowlint-next-line unclear-type:off +const emptySet=Object.freeze(new Set());class ReadOnlyRecoilValueError extends Error{}function initializeRetentionForNode(store,nodeKey,retainedBy){if(!Recoil_gkx('recoil_memory_managament_2020')){return ()=>undefined;}const{nodesRetainedByZone}=store.getState().retention;function addToZone(zone){let set=nodesRetainedByZone.get(zone);if(!set){nodesRetainedByZone.set(zone,set=new Set());}set.add(nodeKey);}if(retainedBy instanceof RetentionZone$1){addToZone(retainedBy);}else if(Array.isArray(retainedBy)){for(const zone of retainedBy){addToZone(zone);}}return ()=>{if(!Recoil_gkx('recoil_memory_managament_2020')){return;}const{retention}=store.getState();function deleteFromZone(zone){const set=retention.nodesRetainedByZone.get(zone);set===null||set===void 0?void 0:set.delete(nodeKey);if(set&&set.size===0){retention.nodesRetainedByZone.delete(zone);}}if(retainedBy instanceof RetentionZone$1){deleteFromZone(retainedBy);}else if(Array.isArray(retainedBy)){for(const zone of retainedBy){deleteFromZone(zone);}}};}function initializeNodeIfNewToStore(store,treeState,key,trigger){const storeState=store.getState();if(storeState.nodeCleanupFunctions.has(key)){return;}const node=getNode$1(key);const retentionCleanup=initializeRetentionForNode(store,key,node.retainedBy);const nodeCleanup=node.init(store,treeState,trigger);storeState.nodeCleanupFunctions.set(key,()=>{nodeCleanup();retentionCleanup();});}function initializeNode(store,key,trigger){initializeNodeIfNewToStore(store,store.getState().currentTree,key,trigger);}function cleanUpNode(store,key){var _state$nodeCleanupFun;const state=store.getState();(_state$nodeCleanupFun=state.nodeCleanupFunctions.get(key))===null||_state$nodeCleanupFun===void 0?void 0:_state$nodeCleanupFun();state.nodeCleanupFunctions.delete(key);}// Get the current value loadable of a node and update the state. +// Update dependencies and subscriptions for selectors. +// Update saved value validation for atoms. +function getNodeLoadable(store,state,key){initializeNodeIfNewToStore(store,state,key,'get');return getNode$1(key).get(store,state);}// Peek at the current value loadable for a node without any evaluation or state change +function peekNodeLoadable(store,state,key){return getNode$1(key).peek(store,state);}// Write value directly to state bypassing the Node interface as the node +// definitions may not have been loaded yet when processing the initial snapshot. +function setUnvalidatedAtomValue_DEPRECATED(state,key,newValue){var _node$invalidate;const node=getNodeMaybe$1(key);node===null||node===void 0?void 0:(_node$invalidate=node.invalidate)===null||_node$invalidate===void 0?void 0:_node$invalidate.call(node,state);return {...state,atomValues:state.atomValues.clone().delete(key),nonvalidatedAtoms:state.nonvalidatedAtoms.clone().set(key,newValue),dirtyAtoms:setByAddingToSet$1(state.dirtyAtoms,key)};}// Return the discovered dependencies and values to be written by setting +// a node value. (Multiple values may be written due to selectors getting to +// set upstreams; deps may be discovered because of reads in updater functions.) +function setNodeValue(store,state,key,newValue){const node=getNode$1(key);if(node.set==null){throw new ReadOnlyRecoilValueError(`Attempt to set read-only RecoilValue: ${key}`);}const set=node.set;// so flow doesn't lose the above refinement. +initializeNodeIfNewToStore(store,state,key,'set');return set(store,state,newValue);}function peekNodeInfo(store,state,key){const storeState=store.getState();const graph=store.getGraph(state.version);const type=getNode$1(key).nodeType;return Recoil_lazyProxy({type},{// $FlowFixMe[underconstrained-implicit-instantiation] +loadable:()=>peekNodeLoadable(store,state,key),isActive:()=>storeState.knownAtoms.has(key)||storeState.knownSelectors.has(key),isSet:()=>type==='selector'?false:state.atomValues.has(key),isModified:()=>state.dirtyAtoms.has(key),// Report current dependencies. If the node hasn't been evaluated, then +// dependencies may be missing based on the current state. +deps:()=>{var _graph$nodeDeps$get;return recoilValuesForKeys$1((_graph$nodeDeps$get=graph.nodeDeps.get(key))!==null&&_graph$nodeDeps$get!==void 0?_graph$nodeDeps$get:[]);},// Reports all "current" subscribers. Evaluating other nodes or +// previous in-progress async evaluations may introduce new subscribers. +subscribers:()=>{var _storeState$nodeToCom,_storeState$nodeToCom2;return {nodes:recoilValuesForKeys$1(Recoil_filterIterable(getDownstreamNodes(store,state,new Set([key])),nodeKey=>nodeKey!==key)),components:Recoil_mapIterable((_storeState$nodeToCom=(_storeState$nodeToCom2=storeState.nodeToComponentSubscriptions.get(key))===null||_storeState$nodeToCom2===void 0?void 0:_storeState$nodeToCom2.values())!==null&&_storeState$nodeToCom!==void 0?_storeState$nodeToCom:[],([name])=>({name}))};}});}// Find all of the recursively dependent nodes +function getDownstreamNodes(store,state,keys){const visitedNodes=new Set();const visitingNodes=Array.from(keys);const graph=store.getGraph(state.version);for(let key=visitingNodes.pop();key;key=visitingNodes.pop()){var _graph$nodeToNodeSubs;visitedNodes.add(key);const subscribedNodes=(_graph$nodeToNodeSubs=graph.nodeToNodeSubscriptions.get(key))!==null&&_graph$nodeToNodeSubs!==void 0?_graph$nodeToNodeSubs:emptySet;for(const downstreamNode of subscribedNodes){if(!visitedNodes.has(downstreamNode)){visitingNodes.push(downstreamNode);}}}return visitedNodes;}var Recoil_FunctionalCore={getNodeLoadable,peekNodeLoadable,setNodeValue,initializeNode,cleanUpNode,setUnvalidatedAtomValue_DEPRECATED,peekNodeInfo,getDownstreamNodes};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */let _invalidateMemoizedSnapshot=null;function setInvalidateMemoizedSnapshot(invalidate){_invalidateMemoizedSnapshot=invalidate;}function invalidateMemoizedSnapshot(){var _invalidateMemoizedSn;(_invalidateMemoizedSn=_invalidateMemoizedSnapshot)===null||_invalidateMemoizedSn===void 0?void 0:_invalidateMemoizedSn();}var Recoil_SnapshotCache={setInvalidateMemoizedSnapshot,invalidateMemoizedSnapshot};const{getDownstreamNodes:getDownstreamNodes$1,getNodeLoadable:getNodeLoadable$1,setNodeValue:setNodeValue$1}=Recoil_FunctionalCore;const{getNextComponentID:getNextComponentID$1}=Recoil_Keys;const{getNode:getNode$2,getNodeMaybe:getNodeMaybe$2}=Recoil_Node;const{DefaultValue:DefaultValue$1}=Recoil_Node;const{reactMode:reactMode$1}=Recoil_ReactMode;const{AbstractRecoilValue:AbstractRecoilValue$1,RecoilState:RecoilState$1,RecoilValueReadOnly:RecoilValueReadOnly$1,isRecoilValue:isRecoilValue$1}=Recoil_RecoilValue$1;const{invalidateMemoizedSnapshot:invalidateMemoizedSnapshot$1}=Recoil_SnapshotCache;function getRecoilValueAsLoadable(store,{key},treeState=store.getState().currentTree){var _storeState$nextTree,_storeState$previousT;// Reading from an older tree can cause bugs because the dependencies that we +// discover during the read are lost. +const storeState=store.getState();if(!(treeState.version===storeState.currentTree.version||treeState.version===((_storeState$nextTree=storeState.nextTree)===null||_storeState$nextTree===void 0?void 0:_storeState$nextTree.version)||treeState.version===((_storeState$previousT=storeState.previousTree)===null||_storeState$previousT===void 0?void 0:_storeState$previousT.version)));const loadable=getNodeLoadable$1(store,treeState,key);if(loadable.state==='loading'){loadable.contents.catch(()=>{/** + * HACK: intercept thrown error here to prevent an uncaught promise exception. Ideally this would happen closer to selector + * execution (perhaps introducing a new ERROR class to be resolved by async selectors that are in an error state) + */return;});}return loadable;}function applyAtomValueWrites(atomValues,writes){const result=atomValues.clone();writes.forEach((v,k)=>{if(v.state==='hasValue'&&v.contents instanceof DefaultValue$1){result.delete(k);}else {result.set(k,v);}});return result;}function valueFromValueOrUpdater(store,state,{key},valueOrUpdater){if(typeof valueOrUpdater==='function'){// Updater form: pass in the current value. Throw if the current value +// is unavailable (namely when updating an async selector that's +// pending or errored): +const current=getNodeLoadable$1(store,state,key);if(current.state==='loading'){const msg=`Tried to set atom or selector "${key}" using an updater function while the current state is pending, this is not currently supported.`;throw Recoil_err(msg);}else if(current.state==='hasError'){throw current.contents;}// T itself may be a function, so our refinement is not sufficient: +return valueOrUpdater(current.contents);// flowlint-line unclear-type:off +}else {return valueOrUpdater;}}function applyAction(store,state,action){if(action.type==='set'){const{recoilValue,valueOrUpdater}=action;const newValue=valueFromValueOrUpdater(store,state,recoilValue,valueOrUpdater);const writes=setNodeValue$1(store,state,recoilValue.key,newValue);for(const[key,loadable]of writes.entries()){writeLoadableToTreeState(state,key,loadable);}}else if(action.type==='setLoadable'){const{recoilValue:{key},loadable}=action;writeLoadableToTreeState(state,key,loadable);}else if(action.type==='markModified'){const{recoilValue:{key}}=action;state.dirtyAtoms.add(key);}else if(action.type==='setUnvalidated'){var _node$invalidate;// Write value directly to state bypassing the Node interface as the node +// definitions may not have been loaded yet when processing the initial snapshot. +const{recoilValue:{key},unvalidatedValue}=action;const node=getNodeMaybe$2(key);node===null||node===void 0?void 0:(_node$invalidate=node.invalidate)===null||_node$invalidate===void 0?void 0:_node$invalidate.call(node,state);state.atomValues.delete(key);state.nonvalidatedAtoms.set(key,unvalidatedValue);state.dirtyAtoms.add(key);}else {Recoil_recoverableViolation(`Unknown action ${action.type}`);}}function writeLoadableToTreeState(state,key,loadable){if(loadable.state==='hasValue'&&loadable.contents instanceof DefaultValue$1){state.atomValues.delete(key);}else {state.atomValues.set(key,loadable);}state.dirtyAtoms.add(key);state.nonvalidatedAtoms.delete(key);}function applyActionsToStore(store,actions){store.replaceState(state=>{const newState=copyTreeState(state);for(const action of actions){applyAction(store,newState,action);}invalidateDownstreams(store,newState);invalidateMemoizedSnapshot$1();return newState;});}function queueOrPerformStateUpdate(store,action){if(batchStack.length){const actionsByStore=batchStack[batchStack.length-1];let actions=actionsByStore.get(store);if(!actions){actionsByStore.set(store,actions=[]);}actions.push(action);}else {applyActionsToStore(store,[action]);}}const batchStack=[];function batchStart(){const actionsByStore=new Map();batchStack.push(actionsByStore);return ()=>{for(const[store,actions]of actionsByStore){applyActionsToStore(store,actions);}batchStack.pop();};}function copyTreeState(state){return {...state,atomValues:state.atomValues.clone(),nonvalidatedAtoms:state.nonvalidatedAtoms.clone(),dirtyAtoms:new Set(state.dirtyAtoms)};}function invalidateDownstreams(store,state){// Inform any nodes that were changed or downstream of changes so that they +// can clear out any caches as needed due to the update: +const downstreams=getDownstreamNodes$1(store,state,state.dirtyAtoms);for(const key of downstreams){var _getNodeMaybe,_getNodeMaybe$invalid;(_getNodeMaybe=getNodeMaybe$2(key))===null||_getNodeMaybe===void 0?void 0:(_getNodeMaybe$invalid=_getNodeMaybe.invalidate)===null||_getNodeMaybe$invalid===void 0?void 0:_getNodeMaybe$invalid.call(_getNodeMaybe,state);}}function setRecoilValue(store,recoilValue,valueOrUpdater){queueOrPerformStateUpdate(store,{type:'set',recoilValue,valueOrUpdater});}function setRecoilValueLoadable(store,recoilValue,loadable){if(loadable instanceof DefaultValue$1){return setRecoilValue(store,recoilValue,loadable);}queueOrPerformStateUpdate(store,{type:'setLoadable',recoilValue,loadable:loadable});}function markRecoilValueModified(store,recoilValue){queueOrPerformStateUpdate(store,{type:'markModified',recoilValue});}function setUnvalidatedRecoilValue(store,recoilValue,unvalidatedValue){queueOrPerformStateUpdate(store,{type:'setUnvalidated',recoilValue,unvalidatedValue});}function subscribeToRecoilValue(store,{key},callback,componentDebugName=null){const subID=getNextComponentID$1();const storeState=store.getState();if(!storeState.nodeToComponentSubscriptions.has(key)){storeState.nodeToComponentSubscriptions.set(key,new Map());}Recoil_nullthrows(storeState.nodeToComponentSubscriptions.get(key)).set(subID,[componentDebugName!==null&&componentDebugName!==void 0?componentDebugName:'',callback]);// Handle the case that, during the same tick that we are subscribing, an atom +// has been updated by some effect handler. Otherwise we will miss the update. +const mode=reactMode$1();if(mode.early&&(mode.mode==='LEGACY'||mode.mode==='MUTABLE_SOURCE')){const nextTree=store.getState().nextTree;if(nextTree&&nextTree.dirtyAtoms.has(key)){callback(nextTree);}}return {release:()=>{const releaseStoreState=store.getState();const subs=releaseStoreState.nodeToComponentSubscriptions.get(key);if(subs===undefined||!subs.has(subID)){return;}subs.delete(subID);if(subs.size===0){releaseStoreState.nodeToComponentSubscriptions.delete(key);}}};}function refreshRecoilValue(store,recoilValue){var _node$clearCache;const{currentTree}=store.getState();const node=getNode$2(recoilValue.key);(_node$clearCache=node.clearCache)===null||_node$clearCache===void 0?void 0:_node$clearCache.call(node,store,currentTree);}var Recoil_RecoilValueInterface={RecoilValueReadOnly:RecoilValueReadOnly$1,AbstractRecoilValue:AbstractRecoilValue$1,RecoilState:RecoilState$1,getRecoilValueAsLoadable,setRecoilValue,setRecoilValueLoadable,markRecoilValueModified,setUnvalidatedRecoilValue,subscribeToRecoilValue,isRecoilValue:isRecoilValue$1,applyAtomValueWrites,// TODO Remove export when deprecating initialStoreState_DEPRECATED in RecoilRoot +batchStart,writeLoadableToTreeState,invalidateDownstreams,copyTreeState,refreshRecoilValue};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * The someSet() method tests whether some elements in the given Set pass the + * test implemented by the provided function. + */function someSet(set,callback,context){const iterator=set.entries();let current=iterator.next();while(!current.done){const entry=current.value;if(callback.call(context,entry[1],entry[0],set)){return true;}current=iterator.next();}return false;}var Recoil_someSet=someSet;const{cleanUpNode:cleanUpNode$1}=Recoil_FunctionalCore;const{deleteNodeConfigIfPossible:deleteNodeConfigIfPossible$1,getNode:getNode$3}=Recoil_Node;const{RetentionZone:RetentionZone$2}=Recoil_RetentionZone;// Components that aren't mounted after suspending for this long will be assumed +// to be discarded and their resources released. +const SUSPENSE_TIMEOUT_MS=120000;const emptySet$1=new Set();function releaseRetainablesNowOnCurrentTree(store,retainables){const storeState=store.getState();const treeState=storeState.currentTree;if(storeState.nextTree){return;// leak memory rather than erase something that's about to be used. +}const nodes=new Set();for(const r of retainables){if(r instanceof RetentionZone$2){for(const n of nodesRetainedByZone(storeState,r)){nodes.add(n);}}else {nodes.add(r);}}const releasableNodes=findReleasableNodes(store,nodes);for(const node of releasableNodes){releaseNode(store,treeState,node);}}function findReleasableNodes(store,searchFromNodes){const storeState=store.getState();const treeState=storeState.currentTree;const graph=store.getGraph(treeState.version);const releasableNodes=new Set();// mutated to collect answer +const nonReleasableNodes=new Set();findReleasableNodesInner(searchFromNodes);return releasableNodes;function findReleasableNodesInner(searchFromNodes){const releasableNodesFoundThisIteration=new Set();const downstreams=getDownstreamNodesInTopologicalOrder(store,treeState,searchFromNodes,releasableNodes,// don't descend into these +nonReleasableNodes// don't descend into these +);// Find which of the downstream nodes are releasable and which are not: +for(const node of downstreams){var _storeState$retention;// Not releasable if configured to be retained forever: +if(getNode$3(node).retainedBy==='recoilRoot'){nonReleasableNodes.add(node);continue;}// Not releasable if retained directly by a component: +if(((_storeState$retention=storeState.retention.referenceCounts.get(node))!==null&&_storeState$retention!==void 0?_storeState$retention:0)>0){nonReleasableNodes.add(node);continue;}// Not releasable if retained by a zone: +if(zonesThatCouldRetainNode(node).some(z=>storeState.retention.referenceCounts.get(z))){nonReleasableNodes.add(node);continue;}// Not releasable if it has a non-releasable child (which will already be in +// nonReleasableNodes because we are going in topological order): +const nodeChildren=graph.nodeToNodeSubscriptions.get(node);if(nodeChildren&&Recoil_someSet(nodeChildren,child=>nonReleasableNodes.has(child))){nonReleasableNodes.add(node);continue;}releasableNodes.add(node);releasableNodesFoundThisIteration.add(node);}// If we found any releasable nodes, we need to walk UP from those nodes to +// find whether their parents can now be released as well: +const parents=new Set();for(const node of releasableNodesFoundThisIteration){for(const parent of (_graph$nodeDeps$get=graph.nodeDeps.get(node))!==null&&_graph$nodeDeps$get!==void 0?_graph$nodeDeps$get:emptySet$1){var _graph$nodeDeps$get;if(!releasableNodes.has(parent)){parents.add(parent);}}}if(parents.size){findReleasableNodesInner(parents);}}}// Children before parents +function getDownstreamNodesInTopologicalOrder(store,treeState,nodes,// Mutable set is destroyed in place +doNotDescendInto1,doNotDescendInto2){const graph=store.getGraph(treeState.version);const answer=[];const visited=new Set();while(nodes.size>0){visit(Recoil_nullthrows(nodes.values().next().value));}return answer;function visit(node){if(doNotDescendInto1.has(node)||doNotDescendInto2.has(node)){nodes.delete(node);return;}if(visited.has(node)){return;}const children=graph.nodeToNodeSubscriptions.get(node);if(children){for(const child of children){visit(child);}}visited.add(node);nodes.delete(node);answer.push(node);}}function releaseNode(store,treeState,node){if(!Recoil_gkx('recoil_memory_managament_2020')){return;}// Atom effects, in-closure caches, etc.: +cleanUpNode$1(store,node);// Delete from store state: +const storeState=store.getState();storeState.knownAtoms.delete(node);storeState.knownSelectors.delete(node);storeState.nodeTransactionSubscriptions.delete(node);storeState.retention.referenceCounts.delete(node);const zones=zonesThatCouldRetainNode(node);for(const zone of zones){var _storeState$retention2;(_storeState$retention2=storeState.retention.nodesRetainedByZone.get(zone))===null||_storeState$retention2===void 0?void 0:_storeState$retention2.delete(node);}// Note that we DO NOT delete from nodeToComponentSubscriptions because this +// already happens when the last component that was retaining the node unmounts, +// and this could happen either before or after that. +// Delete from TreeState and dep graph: +treeState.atomValues.delete(node);treeState.dirtyAtoms.delete(node);treeState.nonvalidatedAtoms.delete(node);const graph=storeState.graphsByVersion.get(treeState.version);if(graph){const deps=graph.nodeDeps.get(node);if(deps!==undefined){graph.nodeDeps.delete(node);for(const dep of deps){var _graph$nodeToNodeSubs;(_graph$nodeToNodeSubs=graph.nodeToNodeSubscriptions.get(dep))===null||_graph$nodeToNodeSubs===void 0?void 0:_graph$nodeToNodeSubs.delete(node);}}// No need to delete sub's deps as there should be no subs at this point. +// But an invariant would require deleting nodes in topological order. +graph.nodeToNodeSubscriptions.delete(node);}// Node config (for family members only as their configs can be recreated, and +// only if they are not retained within any other Stores): +deleteNodeConfigIfPossible$1(node);}function nodesRetainedByZone(storeState,zone){var _storeState$retention3;return (_storeState$retention3=storeState.retention.nodesRetainedByZone.get(zone))!==null&&_storeState$retention3!==void 0?_storeState$retention3:emptySet$1;}function zonesThatCouldRetainNode(node){const retainedBy=getNode$3(node).retainedBy;if(retainedBy===undefined||retainedBy==='components'||retainedBy==='recoilRoot'){return [];}else if(retainedBy instanceof RetentionZone$2){return [retainedBy];}else {return retainedBy;// it's an array of zones +}}function scheduleOrPerformPossibleReleaseOfRetainable(store,retainable){const state=store.getState();if(state.nextTree){state.retention.retainablesToCheckForRelease.add(retainable);}else {releaseRetainablesNowOnCurrentTree(store,new Set([retainable]));}}function updateRetainCount(store,retainable,delta){var _map$get;if(!Recoil_gkx('recoil_memory_managament_2020')){return;}const map=store.getState().retention.referenceCounts;const newCount=((_map$get=map.get(retainable))!==null&&_map$get!==void 0?_map$get:0)+delta;if(newCount===0){updateRetainCountToZero(store,retainable);}else {map.set(retainable,newCount);}}function updateRetainCountToZero(store,retainable){if(!Recoil_gkx('recoil_memory_managament_2020')){return;}const map=store.getState().retention.referenceCounts;map.delete(retainable);scheduleOrPerformPossibleReleaseOfRetainable(store,retainable);}function releaseScheduledRetainablesNow(store){if(!Recoil_gkx('recoil_memory_managament_2020')){return;}const state=store.getState();releaseRetainablesNowOnCurrentTree(store,state.retention.retainablesToCheckForRelease);state.retention.retainablesToCheckForRelease.clear();}function retainedByOptionWithDefault(r){// The default will change from 'recoilRoot' to 'components' in the future. +return r===undefined?'recoilRoot':r;}var Recoil_Retention={SUSPENSE_TIMEOUT_MS,updateRetainCount,updateRetainCountToZero,releaseScheduledRetainablesNow,retainedByOptionWithDefault};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * This is to export esstiential functions from react-dom + * for our web build + * + * + * @format + * @oncall recoil + */const{unstable_batchedUpdates}=reactDom;var ReactBatchedUpdates={unstable_batchedUpdates};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * This is to export esstiential functions from react-dom + * for our web build + * + * + * @format + * @oncall recoil + */ // @fb-only: const {unstable_batchedUpdates} = require('ReactDOMComet'); +// prettier-ignore +const{unstable_batchedUpdates:unstable_batchedUpdates$1}=ReactBatchedUpdates;// @oss-only +var Recoil_ReactBatchedUpdates={unstable_batchedUpdates:unstable_batchedUpdates$1};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */const{batchStart:batchStart$1}=Recoil_RecoilValueInterface;const{unstable_batchedUpdates:unstable_batchedUpdates$2}=Recoil_ReactBatchedUpdates;// flowlint-next-line unclear-type:off +/* + * During SSR, unstable_batchedUpdates may be undefined so this + * falls back to a basic function that executes the batch + */let batcher=unstable_batchedUpdates$2||(batchFn=>batchFn());/** + * Sets the provided batcher function as the batcher function used by Recoil. + * + * Set the batcher to a custom batcher for your renderer, + * if you use a renderer other than React DOM or React Native. + */const setBatcher=newBatcher=>{batcher=newBatcher;};/** + * Returns the current batcher function. + */const getBatcher=()=>batcher;/** + * Calls the current batcher function and passes the + * provided callback function. + */const batchUpdates=callback=>{batcher(()=>{let batchEnd=()=>undefined;try{batchEnd=batchStart$1();callback();}finally{batchEnd();}});};var Recoil_Batching={getBatcher,setBatcher,batchUpdates};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Combines multiple Iterables into a single Iterable. + * Traverses the input Iterables in the order provided and maintains the order + * of their elements. + * + * Example: + * ``` + * const r = Array.from(concatIterables(['a', 'b'], ['c'], ['d', 'e', 'f'])); + * r == ['a', 'b', 'c', 'd', 'e', 'f']; + * ``` + */function*concatIterables(iters){for(const iter of iters){for(const val of iter){yield val;}}}var Recoil_concatIterables=concatIterables;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /* eslint-disable fb-www/typeof-undefined */const isSSR=// $FlowFixMe(site=recoil) Window does not have a FlowType definition https://github.com/facebook/flow/issues/6709 +typeof Window==='undefined'||typeof window==='undefined';/* eslint-enable fb-www/typeof-undefined */const isWindow=value=>!isSSR&&(// $FlowFixMe(site=recoil) Window does not have a FlowType definition https://github.com/facebook/flow/issues/6709 +value===window||value instanceof Window);const isReactNative=typeof navigator!=='undefined'&&navigator.product==='ReactNative';// eslint-disable-line fb-www/typeof-undefined +var Recoil_Environment={isSSR,isReactNative,isWindow};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Caches a function's results based on the key returned by the passed + * hashFunction. + */function memoizeWithArgsHash(fn,hashFunction){let cache;return (...args)=>{if(!cache){cache={};}const key=hashFunction(...args);if(!Object.hasOwnProperty.call(cache,key)){cache[key]=fn(...args);}return cache[key];};}/** + * Caches a function's results based on a comparison of the arguments. + * Only caches the last return of the function. + * Defaults to reference equality + */function memoizeOneWithArgsHash(fn,hashFunction){let lastKey;let lastResult;// breaking cache when arguments change +return (...args)=>{const key=hashFunction(...args);if(lastKey===key){return lastResult;}lastKey=key;lastResult=fn(...args);return lastResult;};}/** + * Caches a function's results based on a comparison of the arguments. + * Only caches the last return of the function. + * Defaults to reference equality + */function memoizeOneWithArgsHashAndInvalidation(fn,hashFunction){let lastKey;let lastResult;// breaking cache when arguments change +const memoizedFn=(...args)=>{const key=hashFunction(...args);if(lastKey===key){return lastResult;}lastKey=key;lastResult=fn(...args);return lastResult;};const invalidate=()=>{lastKey=null;};return [memoizedFn,invalidate];}var Recoil_Memoize={memoizeWithArgsHash,memoizeOneWithArgsHash,memoizeOneWithArgsHashAndInvalidation};const{batchUpdates:batchUpdates$1}=Recoil_Batching;const{initializeNode:initializeNode$1,peekNodeInfo:peekNodeInfo$1}=Recoil_FunctionalCore;const{graph:graph$1}=Recoil_Graph;const{getNextStoreID:getNextStoreID$1}=Recoil_Keys;const{DEFAULT_VALUE:DEFAULT_VALUE$1,recoilValues:recoilValues$1,recoilValuesForKeys:recoilValuesForKeys$2}=Recoil_Node;const{AbstractRecoilValue:AbstractRecoilValue$2,getRecoilValueAsLoadable:getRecoilValueAsLoadable$1,setRecoilValue:setRecoilValue$1,setUnvalidatedRecoilValue:setUnvalidatedRecoilValue$1}=Recoil_RecoilValueInterface;const{updateRetainCount:updateRetainCount$1}=Recoil_Retention;const{setInvalidateMemoizedSnapshot:setInvalidateMemoizedSnapshot$1}=Recoil_SnapshotCache;const{getNextTreeStateVersion:getNextTreeStateVersion$2,makeEmptyStoreState:makeEmptyStoreState$1}=Recoil_State;const{isSSR:isSSR$1}=Recoil_Environment;const{memoizeOneWithArgsHashAndInvalidation:memoizeOneWithArgsHashAndInvalidation$1}=Recoil_Memoize;// Opaque at this surface because it's part of the public API from here. +// However, the data-flow-graph and selector values may evolve as selector +// evaluation functions are executed and async selectors resolve. +class Snapshot{// eslint-disable-next-line fb-www/no-uninitialized-properties +constructor(storeState,parentStoreID){_defineProperty(this,"_store",void 0);_defineProperty(this,"_refCount",1);_defineProperty(this,"getLoadable",recoilValue=>{this.checkRefCount_INTERNAL();return getRecoilValueAsLoadable$1(this._store,recoilValue);});_defineProperty(this,"getPromise",recoilValue=>{this.checkRefCount_INTERNAL();return this.getLoadable(recoilValue).toPromise();});_defineProperty(this,"getNodes_UNSTABLE",opt=>{this.checkRefCount_INTERNAL();// TODO Deal with modified selectors +if((opt===null||opt===void 0?void 0:opt.isModified)===true){if((opt===null||opt===void 0?void 0:opt.isInitialized)===false){return [];}const state=this._store.getState().currentTree;return recoilValuesForKeys$2(state.dirtyAtoms);}const knownAtoms=this._store.getState().knownAtoms;const knownSelectors=this._store.getState().knownSelectors;return (opt===null||opt===void 0?void 0:opt.isInitialized)==null?recoilValues$1.values():opt.isInitialized===true?recoilValuesForKeys$2(Recoil_concatIterables([knownAtoms,knownSelectors])):Recoil_filterIterable(recoilValues$1.values(),({key})=>!knownAtoms.has(key)&&!knownSelectors.has(key));});_defineProperty(this,"getInfo_UNSTABLE",({key})=>{this.checkRefCount_INTERNAL();return peekNodeInfo$1(this._store,this._store.getState().currentTree,key);});_defineProperty(this,"map",mapper=>{this.checkRefCount_INTERNAL();const mutableSnapshot=new MutableSnapshot(this,batchUpdates$1);mapper(mutableSnapshot);// if removing batchUpdates from `set` add it here +return mutableSnapshot;});_defineProperty(this,"asyncMap",async mapper=>{this.checkRefCount_INTERNAL();const mutableSnapshot=new MutableSnapshot(this,batchUpdates$1);mutableSnapshot.retain();// Retain new snapshot during async mapper +await mapper(mutableSnapshot);// Continue to retain the new snapshot for the user, but auto-release it +// after the next tick, the same as a new synchronous snapshot. +mutableSnapshot.autoRelease_INTERNAL();return mutableSnapshot;});this._store={storeID:getNextStoreID$1(),parentStoreID,getState:()=>storeState,replaceState:replacer=>{// no batching, so nextTree is never active +storeState.currentTree=replacer(storeState.currentTree);},getGraph:version=>{const graphs=storeState.graphsByVersion;if(graphs.has(version)){return Recoil_nullthrows(graphs.get(version));}const newGraph=graph$1();graphs.set(version,newGraph);return newGraph;},subscribeToTransactions:()=>({release:()=>{}}),addTransactionMetadata:()=>{throw Recoil_err('Cannot subscribe to Snapshots');}};// Initialize any nodes that are live in the parent store (primarily so that +// this snapshot gets counted towards the node's live stores count). +// TODO Optimize this when cloning snapshots for callbacks +for(const nodeKey of this._store.getState().knownAtoms){initializeNode$1(this._store,nodeKey,'get');updateRetainCount$1(this._store,nodeKey,1);}this.autoRelease_INTERNAL();}retain(){if(this._refCount<=0);this._refCount++;let released=false;return ()=>{if(!released){released=true;this._release();}};}/** + * Release the snapshot on the next tick. This means the snapshot is retained + * during the execution of the current function using it. + */autoRelease_INTERNAL(){if(!isSSR$1){// Use timeout of 10 to workaround Firefox issue: https://github.com/facebookexperimental/Recoil/issues/1936 +window.setTimeout(()=>this._release(),10);}}_release(){this._refCount--;if(this._refCount===0){this._store.getState().nodeCleanupFunctions.forEach(cleanup=>cleanup());this._store.getState().nodeCleanupFunctions.clear();if(!Recoil_gkx('recoil_memory_managament_2020')){return;}// Temporarily nerfing this to allow us to find broken call sites without +// actually breaking anybody yet. +// for (const k of this._store.getState().knownAtoms) { +// updateRetainCountToZero(this._store, k); +// } +}else if(this._refCount<0);}isRetained(){return this._refCount>0;}checkRefCount_INTERNAL(){if(Recoil_gkx('recoil_memory_managament_2020')&&this._refCount<=0);}getStore_INTERNAL(){this.checkRefCount_INTERNAL();return this._store;}getID(){this.checkRefCount_INTERNAL();return this._store.getState().currentTree.stateID;}getStoreID(){this.checkRefCount_INTERNAL();return this._store.storeID;}// We want to allow the methods to be destructured and used as accessors +/* eslint-disable fb-www/extra-arrow-initializer */ /* eslint-enable fb-www/extra-arrow-initializer */}function cloneStoreState(store,treeState,bumpVersion=false){const storeState=store.getState();const version=bumpVersion?getNextTreeStateVersion$2():treeState.version;return {// Always clone the TreeState to isolate stores from accidental mutations. +// For example, reading a selector from a cloned snapshot shouldn't cache +// in the original treestate which may cause the original to skip +// initialization of upstream atoms. +currentTree:{// TODO snapshots shouldn't really have versions because a new version number +// is always assigned when the snapshot is gone to. +version:bumpVersion?version:treeState.version,stateID:bumpVersion?version:treeState.stateID,transactionMetadata:{...treeState.transactionMetadata},dirtyAtoms:new Set(treeState.dirtyAtoms),atomValues:treeState.atomValues.clone(),nonvalidatedAtoms:treeState.nonvalidatedAtoms.clone()},commitDepth:0,nextTree:null,previousTree:null,knownAtoms:new Set(storeState.knownAtoms),// FIXME here's a copy +knownSelectors:new Set(storeState.knownSelectors),// FIXME here's a copy +transactionSubscriptions:new Map(),nodeTransactionSubscriptions:new Map(),nodeToComponentSubscriptions:new Map(),queuedComponentCallbacks_DEPRECATED:[],suspendedComponentResolvers:new Set(),graphsByVersion:new Map().set(version,store.getGraph(treeState.version)),retention:{referenceCounts:new Map(),nodesRetainedByZone:new Map(),retainablesToCheckForRelease:new Set()},// FIXME here's a copy +// Create blank cleanup handlers for atoms so snapshots don't re-run +// atom effects. +nodeCleanupFunctions:new Map(Recoil_mapIterable(storeState.nodeCleanupFunctions.entries(),([key])=>[key,()=>{}]))};}// Factory to build a fresh snapshot +function freshSnapshot(initializeState){const snapshot=new Snapshot(makeEmptyStoreState$1());return initializeState!=null?snapshot.map(initializeState):snapshot;}// Factory to clone a snapshot state +const[memoizedCloneSnapshot,invalidateMemoizedSnapshot$2]=memoizeOneWithArgsHashAndInvalidation$1(// $FlowFixMe[missing-local-annot] +(store,version)=>{var _storeState$nextTree;const storeState=store.getState();const treeState=version==='latest'?(_storeState$nextTree=storeState.nextTree)!==null&&_storeState$nextTree!==void 0?_storeState$nextTree:storeState.currentTree:Recoil_nullthrows(storeState.previousTree);return new Snapshot(cloneStoreState(store,treeState),store.storeID);},(store,version)=>{var _store$getState$nextT,_store$getState$previ;return String(version)+String(store.storeID)+String((_store$getState$nextT=store.getState().nextTree)===null||_store$getState$nextT===void 0?void 0:_store$getState$nextT.version)+String(store.getState().currentTree.version)+String((_store$getState$previ=store.getState().previousTree)===null||_store$getState$previ===void 0?void 0:_store$getState$previ.version);});// Avoid circular dependencies +setInvalidateMemoizedSnapshot$1(invalidateMemoizedSnapshot$2);function cloneSnapshot(store,version='latest'){const snapshot=memoizedCloneSnapshot(store,version);if(!snapshot.isRetained()){invalidateMemoizedSnapshot$2();return memoizedCloneSnapshot(store,version);}return snapshot;}class MutableSnapshot extends Snapshot{constructor(snapshot,batch){super(cloneStoreState(snapshot.getStore_INTERNAL(),snapshot.getStore_INTERNAL().getState().currentTree,true),snapshot.getStoreID());_defineProperty(this,"_batch",void 0);_defineProperty(this,"set",(recoilState,newValueOrUpdater)=>{this.checkRefCount_INTERNAL();const store=this.getStore_INTERNAL();// This batchUpdates ensures this `set` is applied immediately and you can +// read the written value after calling `set`. I would like to remove this +// behavior and only batch in `Snapshot.map`, but this would be a breaking +// change potentially. +this._batch(()=>{updateRetainCount$1(store,recoilState.key,1);setRecoilValue$1(this.getStore_INTERNAL(),recoilState,newValueOrUpdater);});});_defineProperty(this,"reset",recoilState=>{this.checkRefCount_INTERNAL();const store=this.getStore_INTERNAL();// See note at `set` about batched updates. +this._batch(()=>{updateRetainCount$1(store,recoilState.key,1);setRecoilValue$1(this.getStore_INTERNAL(),recoilState,DEFAULT_VALUE$1);});});_defineProperty(this,"setUnvalidatedAtomValues_DEPRECATED",values=>{this.checkRefCount_INTERNAL();const store=this.getStore_INTERNAL();// See note at `set` about batched updates. +batchUpdates$1(()=>{for(const[k,v]of values.entries()){updateRetainCount$1(store,k,1);setUnvalidatedRecoilValue$1(store,new AbstractRecoilValue$2(k),v);}});});this._batch=batch;}}var Recoil_Snapshot={Snapshot,MutableSnapshot,freshSnapshot,cloneSnapshot};var Recoil_Snapshot_1=Recoil_Snapshot.Snapshot;var Recoil_Snapshot_2=Recoil_Snapshot.MutableSnapshot;var Recoil_Snapshot_3=Recoil_Snapshot.freshSnapshot;var Recoil_Snapshot_4=Recoil_Snapshot.cloneSnapshot;var Recoil_Snapshot$1=/*#__PURE__*/Object.freeze({__proto__:null,Snapshot:Recoil_Snapshot_1,MutableSnapshot:Recoil_Snapshot_2,freshSnapshot:Recoil_Snapshot_3,cloneSnapshot:Recoil_Snapshot_4});/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function unionSets(...sets){const result=new Set();for(const set of sets){for(const value of set){result.add(value);}}return result;}var Recoil_unionSets=unionSets;const{useRef}=React;/** + * The same as `useRef()` except that if a function is specified then it will + * call that function to get the value to initialize the reference with. + * This is similar to how `useState()` behaves when given a function. It allows + * the user to avoid generating the initial value for subsequent renders. + * The tradeoff is that to set the reference to a function itself you need to + * nest it: useRefInitOnce(() => () => {...}); + */function useRefInitOnce(initialValue){// $FlowExpectedError[incompatible-call] +const ref=useRef(initialValue);if(ref.current===initialValue&&typeof initialValue==='function'){// $FlowExpectedError[incompatible-use] +ref.current=initialValue();}return ref;}var Recoil_useRefInitOnce=useRefInitOnce;// @fb-only: const RecoilusagelogEvent = require('RecoilusagelogEvent'); +// @fb-only: const RecoilUsageLogFalcoEvent = require('RecoilUsageLogFalcoEvent'); +// @fb-only: const URI = require('URI'); +const{getNextTreeStateVersion:getNextTreeStateVersion$3,makeEmptyStoreState:makeEmptyStoreState$2}=Recoil_State;const{cleanUpNode:cleanUpNode$2,getDownstreamNodes:getDownstreamNodes$2,initializeNode:initializeNode$2,setNodeValue:setNodeValue$2,setUnvalidatedAtomValue_DEPRECATED:setUnvalidatedAtomValue_DEPRECATED$1}=Recoil_FunctionalCore;const{graph:graph$2}=Recoil_Graph;const{cloneGraph:cloneGraph$1}=Recoil_Graph;const{getNextStoreID:getNextStoreID$2}=Recoil_Keys;const{createMutableSource:createMutableSource$1,reactMode:reactMode$2}=Recoil_ReactMode;const{applyAtomValueWrites:applyAtomValueWrites$1}=Recoil_RecoilValueInterface;const{releaseScheduledRetainablesNow:releaseScheduledRetainablesNow$1}=Recoil_Retention;const{freshSnapshot:freshSnapshot$1}=Recoil_Snapshot$1;const{useCallback,useContext,useEffect,useMemo,useRef:useRef$1,useState}=React;function notInAContext(){throw Recoil_err('This component must be used inside a component.');}const defaultStore=Object.freeze({storeID:getNextStoreID$2(),getState:notInAContext,replaceState:notInAContext,getGraph:notInAContext,subscribeToTransactions:notInAContext,addTransactionMetadata:notInAContext});let stateReplacerIsBeingExecuted=false;function startNextTreeIfNeeded(store){if(stateReplacerIsBeingExecuted){throw Recoil_err('An atom update was triggered within the execution of a state updater function. State updater functions provided to Recoil must be pure functions.');}const storeState=store.getState();if(storeState.nextTree===null){if(Recoil_gkx('recoil_memory_managament_2020')&&Recoil_gkx('recoil_release_on_cascading_update_killswitch_2021')){// If this is a cascading update (that is, rendering due to one state change +// invokes a second state change), we won't have cleaned up retainables yet +// because this normally happens after notifying components. Do it before +// proceeding with the cascading update so that it remains predictable: +if(storeState.commitDepth>0){releaseScheduledRetainablesNow$1(store);}}const version=storeState.currentTree.version;const nextVersion=getNextTreeStateVersion$3();storeState.nextTree={...storeState.currentTree,version:nextVersion,stateID:nextVersion,dirtyAtoms:new Set(),transactionMetadata:{}};storeState.graphsByVersion.set(nextVersion,cloneGraph$1(Recoil_nullthrows(storeState.graphsByVersion.get(version))));}}const AppContext=/*#__PURE__*/React.createContext({current:defaultStore});const useStoreRef=()=>useContext(AppContext);// $FlowExpectedError[incompatible-call] +const MutableSourceContext=/*#__PURE__*/React.createContext(null);function useRecoilMutableSource(){const mutableSource=useContext(MutableSourceContext);return mutableSource;}function notifyComponents(store,storeState,treeState){const dependentNodes=getDownstreamNodes$2(store,treeState,treeState.dirtyAtoms);for(const key of dependentNodes){const comps=storeState.nodeToComponentSubscriptions.get(key);if(comps){for(const[_subID,[_debugName,callback]]of comps){callback(treeState);}}}}function sendEndOfBatchNotifications(store){const storeState=store.getState();const treeState=storeState.currentTree;// Inform transaction subscribers of the transaction: +const dirtyAtoms=treeState.dirtyAtoms;if(dirtyAtoms.size){// Execute Node-specific subscribers before global subscribers +for(const[key,subscriptions]of storeState.nodeTransactionSubscriptions){if(dirtyAtoms.has(key)){for(const[_,subscription]of subscriptions){subscription(store);}}}for(const[_,subscription]of storeState.transactionSubscriptions){subscription(store);}if(!reactMode$2().early||storeState.suspendedComponentResolvers.size>0){// Notifying components is needed to wake from suspense, even when using +// early rendering. +notifyComponents(store,storeState,treeState);// Wake all suspended components so the right one(s) can try to re-render. +// We need to wake up components not just when some asynchronous selector +// resolved, but also when changing synchronous values because this may cause +// a selector to change from asynchronous to synchronous, in which case there +// would be no follow-up asynchronous resolution to wake us up. +// TODO OPTIMIZATION Only wake up related downstream components +storeState.suspendedComponentResolvers.forEach(cb=>cb());storeState.suspendedComponentResolvers.clear();}}// Special behavior ONLY invoked by useInterface. +// FIXME delete queuedComponentCallbacks_DEPRECATED when deleting useInterface. +storeState.queuedComponentCallbacks_DEPRECATED.forEach(cb=>cb(treeState));storeState.queuedComponentCallbacks_DEPRECATED.splice(0,storeState.queuedComponentCallbacks_DEPRECATED.length);}function endBatch(store){const storeState=store.getState();storeState.commitDepth++;try{const{nextTree}=storeState;// Ignore commits that are not because of Recoil transactions -- namely, +// because something above RecoilRoot re-rendered: +if(nextTree==null){return;}// nextTree is now committed -- note that copying and reset occurs when +// a transaction begins, in startNextTreeIfNeeded: +storeState.previousTree=storeState.currentTree;storeState.currentTree=nextTree;storeState.nextTree=null;sendEndOfBatchNotifications(store);if(storeState.previousTree!=null){storeState.graphsByVersion.delete(storeState.previousTree.version);}else {Recoil_recoverableViolation('Ended batch with no previous state, which is unexpected','recoil');}storeState.previousTree=null;if(Recoil_gkx('recoil_memory_managament_2020')){// Only release retainables if there were no writes during the end of the +// batch. This avoids releasing something we might be about to use. +if(nextTree==null){releaseScheduledRetainablesNow$1(store);}}}finally{storeState.commitDepth--;}}/* + * The purpose of the Batcher is to observe when React batches end so that + * Recoil state changes can be batched. Whenever Recoil state changes, we call + * setState on the batcher. Then we wait for that change to be committed, which + * signifies the end of the batch. That's when we respond to the Recoil change. + */function Batcher({setNotifyBatcherOfChange}){const storeRef=useStoreRef();const[,setState]=useState([]);// $FlowFixMe[incompatible-call] +setNotifyBatcherOfChange(()=>setState({}));useEffect(()=>{// $FlowFixMe[incompatible-call] +setNotifyBatcherOfChange(()=>setState({}));// If an asynchronous selector resolves after the Batcher is unmounted, +// notifyBatcherOfChange will still be called. An error gets thrown whenever +// setState is called after a component is already unmounted, so this sets +// notifyBatcherOfChange to be a no-op. +return ()=>{setNotifyBatcherOfChange(()=>{});};},[setNotifyBatcherOfChange]);useEffect(()=>{// enqueueExecution runs this function immediately; it is only used to +// manipulate the order of useEffects during tests, since React seems to +// call useEffect in an unpredictable order sometimes. +Recoil_Queue.enqueueExecution('Batcher',()=>{endBatch(storeRef.current);});});return null;}// which will no longer be needed. +function initialStoreState_DEPRECATED(store,initializeState){const initial=makeEmptyStoreState$2();initializeState({set:(atom,value)=>{const state=initial.currentTree;const writes=setNodeValue$2(store,state,atom.key,value);const writtenNodes=new Set(writes.keys());const nonvalidatedAtoms=state.nonvalidatedAtoms.clone();for(const n of writtenNodes){nonvalidatedAtoms.delete(n);}initial.currentTree={...state,dirtyAtoms:Recoil_unionSets(state.dirtyAtoms,writtenNodes),atomValues:applyAtomValueWrites$1(state.atomValues,writes),// NB: PLEASE un-export applyAtomValueWrites when deleting this code +nonvalidatedAtoms};},setUnvalidatedAtomValues:atomValues=>{// FIXME replace this with a mutative loop +atomValues.forEach((v,k)=>{initial.currentTree=setUnvalidatedAtomValue_DEPRECATED$1(initial.currentTree,k,v);});}});return initial;}// Initialize state snapshot for for the initializeState prop. +// Atom effect initialization takes precedence over this prop. +// Any atom effects will be run before initialization, but then cleaned up, +// they are then re-run when used as part of rendering. These semantics are +// compatible with React StrictMode where effects may be re-run multiple times +// but state initialization only happens once the first time. +function initialStoreState(initializeState){// Initialize a snapshot and get its store +const snapshot=freshSnapshot$1(initializeState);const storeState=snapshot.getStore_INTERNAL().getState();// Counteract the snapshot auto-release +snapshot.retain();// Cleanup any effects run during initialization and clear the handlers so +// they will re-initialize if used during rendering. This allows atom effect +// initialization to take precedence over initializeState and be compatible +// with StrictMode semantics. +storeState.nodeCleanupFunctions.forEach(cleanup=>cleanup());storeState.nodeCleanupFunctions.clear();return storeState;}let nextID=0;function RecoilRoot_INTERNAL({initializeState_DEPRECATED,initializeState,store_INTERNAL:storeProp,// For use with React "context bridging" +children}){// prettier-ignore +// @fb-only: useEffect(() => { +// @fb-only: if (gkx('recoil_usage_logging')) { +// @fb-only: try { +// @fb-only: RecoilUsageLogFalcoEvent.log(() => ({ +// @fb-only: type: RecoilusagelogEvent.RECOIL_ROOT_MOUNTED, +// @fb-only: path: URI.getRequestURI().getPath(), +// @fb-only: })); +// @fb-only: } catch { +// @fb-only: recoverableViolation( +// @fb-only: 'Error when logging Recoil Usage event', +// @fb-only: 'recoil', +// @fb-only: ); +// @fb-only: } +// @fb-only: } +// @fb-only: }, []); +let storeStateRef;// eslint-disable-line prefer-const +const getGraph=version=>{const graphs=storeStateRef.current.graphsByVersion;if(graphs.has(version)){return Recoil_nullthrows(graphs.get(version));}const newGraph=graph$2();graphs.set(version,newGraph);return newGraph;};const subscribeToTransactions=(callback,key)=>{if(key==null){// Global transaction subscriptions +const{transactionSubscriptions}=storeRef.current.getState();const id=nextID++;transactionSubscriptions.set(id,callback);return {release:()=>{transactionSubscriptions.delete(id);}};}else {// Node-specific transaction subscriptions: +const{nodeTransactionSubscriptions}=storeRef.current.getState();if(!nodeTransactionSubscriptions.has(key)){nodeTransactionSubscriptions.set(key,new Map());}const id=nextID++;Recoil_nullthrows(nodeTransactionSubscriptions.get(key)).set(id,callback);return {release:()=>{const subs=nodeTransactionSubscriptions.get(key);if(subs){subs.delete(id);if(subs.size===0){nodeTransactionSubscriptions.delete(key);}}}};}};const addTransactionMetadata=metadata=>{startNextTreeIfNeeded(storeRef.current);for(const k of Object.keys(metadata)){Recoil_nullthrows(storeRef.current.getState().nextTree).transactionMetadata[k]=metadata[k];}};const replaceState=replacer=>{startNextTreeIfNeeded(storeRef.current);// Use replacer to get the next state: +const nextTree=Recoil_nullthrows(storeStateRef.current.nextTree);let replaced;try{stateReplacerIsBeingExecuted=true;replaced=replacer(nextTree);}finally{stateReplacerIsBeingExecuted=false;}if(replaced===nextTree){return;}storeStateRef.current.nextTree=replaced;if(reactMode$2().early){notifyComponents(storeRef.current,storeStateRef.current,replaced);}Recoil_nullthrows(notifyBatcherOfChange.current)();};const notifyBatcherOfChange=useRef$1(null);const setNotifyBatcherOfChange=useCallback(x=>{notifyBatcherOfChange.current=x;},[notifyBatcherOfChange]);const storeRef=Recoil_useRefInitOnce(()=>storeProp!==null&&storeProp!==void 0?storeProp:{storeID:getNextStoreID$2(),getState:()=>storeStateRef.current,replaceState,getGraph,subscribeToTransactions,addTransactionMetadata});if(storeProp!=null){storeRef.current=storeProp;}storeStateRef=Recoil_useRefInitOnce(()=>initializeState_DEPRECATED!=null?initialStoreState_DEPRECATED(storeRef.current,initializeState_DEPRECATED):initializeState!=null?initialStoreState(initializeState):makeEmptyStoreState$2());const mutableSource=useMemo(()=>createMutableSource$1===null||createMutableSource$1===void 0?void 0:createMutableSource$1(storeStateRef,()=>storeStateRef.current.currentTree.version),[storeStateRef]);// Cleanup when the is unmounted +useEffect(()=>{// React is free to call effect cleanup handlers and effects at will, the +// deps array is only an optimization. For example, React strict mode +// will execute each effect twice for testing. Therefore, we need symmetry +// to re-initialize all known atoms after they were cleaned up. +const store=storeRef.current;for(const atomKey of new Set(store.getState().knownAtoms)){initializeNode$2(store,atomKey,'get');}return ()=>{for(const atomKey of store.getState().knownAtoms){cleanUpNode$2(store,atomKey);}};},[storeRef]);return/*#__PURE__*/React.createElement(AppContext.Provider,{value:storeRef},/*#__PURE__*/React.createElement(MutableSourceContext.Provider,{value:mutableSource},/*#__PURE__*/React.createElement(Batcher,{setNotifyBatcherOfChange:setNotifyBatcherOfChange}),children));}function RecoilRoot(props){const{override,...propsExceptOverride}=props;const ancestorStoreRef=useStoreRef();if(override===false&&ancestorStoreRef.current!==defaultStore){// If ancestorStoreRef.current !== defaultStore, it means that this +// RecoilRoot is not nested within another. +return props.children;}return/*#__PURE__*/React.createElement(RecoilRoot_INTERNAL,propsExceptOverride);}function useRecoilStoreID(){return useStoreRef().current.storeID;}var Recoil_RecoilRoot={RecoilRoot,useStoreRef,useRecoilMutableSource,useRecoilStoreID,notifyComponents_FOR_TESTING:notifyComponents,sendEndOfBatchNotifications_FOR_TESTING:sendEndOfBatchNotifications};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function shallowArrayEqual(a,b){if(a===b){return true;}if(a.length!==b.length){return false;}for(let i=0,l=a.length;i{// $FlowFixMe[incompatible-type] +ref.current=value;});return ref.current;}var Recoil_usePrevious=usePrevious;const{useStoreRef:useStoreRef$1}=Recoil_RecoilRoot;const{SUSPENSE_TIMEOUT_MS:SUSPENSE_TIMEOUT_MS$1}=Recoil_Retention;const{updateRetainCount:updateRetainCount$2}=Recoil_Retention;const{RetentionZone:RetentionZone$3}=Recoil_RetentionZone;const{useEffect:useEffect$2,useRef:useRef$3}=React;const{isSSR:isSSR$2}=Recoil_Environment;// I don't see a way to avoid the any type here because we want to accept readable +// and writable values with any type parameter, but normally with writable ones +// RecoilState is not a subtype of RecoilState. +// flowlint-line unclear-type:off +function useRetain(toRetain){if(!Recoil_gkx('recoil_memory_managament_2020')){return;}// eslint-disable-next-line fb-www/react-hooks +return useRetain_ACTUAL(toRetain);}function useRetain_ACTUAL(toRetain){const array=Array.isArray(toRetain)?toRetain:[toRetain];const retainables=array.map(a=>a instanceof RetentionZone$3?a:a.key);const storeRef=useStoreRef$1();useEffect$2(()=>{if(!Recoil_gkx('recoil_memory_managament_2020')){return;}const store=storeRef.current;if(timeoutID.current&&!isSSR$2){// Already performed a temporary retain on render, simply cancel the release +// of that temporary retain. +window.clearTimeout(timeoutID.current);timeoutID.current=null;}else {for(const r of retainables){updateRetainCount$2(store,r,1);}}return ()=>{for(const r of retainables){updateRetainCount$2(store,r,-1);}};// eslint-disable-next-line fb-www/react-hooks-deps +},[storeRef,...retainables]);// We want to retain if the component suspends. This is terrible but the Suspense +// API affords us no better option. If we suspend and never commit after some +// seconds, then release. The 'actual' retain/release in the effect above +// cancels this. +const timeoutID=useRef$3();const previousRetainables=Recoil_usePrevious(retainables);if(!isSSR$2&&(previousRetainables===undefined||!Recoil_shallowArrayEqual(previousRetainables,retainables))){const store=storeRef.current;for(const r of retainables){updateRetainCount$2(store,r,1);}if(previousRetainables){for(const r of previousRetainables){updateRetainCount$2(store,r,-1);}}if(timeoutID.current){window.clearTimeout(timeoutID.current);}timeoutID.current=window.setTimeout(()=>{timeoutID.current=null;for(const r of retainables){updateRetainCount$2(store,r,-1);}},SUSPENSE_TIMEOUT_MS$1);}}var Recoil_useRetain=useRetain;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * THIS CODE HAS BEEN COMMENTED OUT INTENTIONALLY + * + * This technique of getting the component name is imperfect, since it both only + * works in a non-minified code base, and more importantly introduces performance + * problems since it relies in throwing errors which is an expensive operation. + * + * At some point we may want to reevaluate this technique hence why we have commented + * this code out, rather than delete it all together. + */ // const {useRef} = require('react'); +// const gkx = require('recoil-shared/util/Recoil_gkx'); +// const stackTraceParser = require('recoil-shared/util/Recoil_stackTraceParser'); +function useComponentName(){// const nameRef = useRef(); +// if (__DEV__) { +// if (gkx('recoil_infer_component_names')) { +// if (nameRef.current === undefined) { +// // There is no blessed way to determine the calling React component from +// // within a hook. This hack uses the fact that hooks must start with 'use' +// // and that hooks are either called by React Components or other hooks. It +// // follows therefore, that to find the calling component, you simply need +// // to look down the stack and find the first function which doesn't start +// // with 'use'. We are only enabling this in dev for now, since once the +// // codebase is minified, the naming assumptions no longer hold true. +// // eslint-disable-next-line fb-www/no-new-error +// const frames = stackTraceParser(new Error().stack); +// for (const {methodName} of frames) { +// // I observed cases where the frame was of the form 'Object.useXXX' +// // hence why I'm searching for hooks following a word boundary +// if (!methodName.match(/\buse[^\b]+$/)) { +// return (nameRef.current = methodName); +// } +// } +// nameRef.current = null; +// } +// return nameRef.current ?? ''; +// } +// } +// @fb-only: return ""; +return '';// @oss-only +}var Recoil_useComponentName=useComponentName;const{batchUpdates:batchUpdates$2}=Recoil_Batching;const{DEFAULT_VALUE:DEFAULT_VALUE$2}=Recoil_Node;const{currentRendererSupportsUseSyncExternalStore:currentRendererSupportsUseSyncExternalStore$1,reactMode:reactMode$3,useMutableSource:useMutableSource$1,useSyncExternalStore:useSyncExternalStore$1}=Recoil_ReactMode;const{useRecoilMutableSource:useRecoilMutableSource$1,useStoreRef:useStoreRef$2}=Recoil_RecoilRoot;const{AbstractRecoilValue:AbstractRecoilValue$3,getRecoilValueAsLoadable:getRecoilValueAsLoadable$2,setRecoilValue:setRecoilValue$2,setUnvalidatedRecoilValue:setUnvalidatedRecoilValue$2,subscribeToRecoilValue:subscribeToRecoilValue$1}=Recoil_RecoilValueInterface;const{useCallback:useCallback$1,useEffect:useEffect$3,useMemo:useMemo$1,useRef:useRef$4,useState:useState$1}=React;const{setByAddingToSet:setByAddingToSet$2}=Recoil_CopyOnWrite;const{isSSR:isSSR$3}=Recoil_Environment;function handleLoadable(loadable,recoilValue,storeRef){// We can't just throw the promise we are waiting on to Suspense. If the +// upstream dependencies change it may produce a state in which the component +// can render, but it would still be suspended on a Promise that may never resolve. +if(loadable.state==='hasValue'){return loadable.contents;}else if(loadable.state==='loading'){const promise=new Promise(resolve=>{const suspendedComponentResolvers=storeRef.current.getState().suspendedComponentResolvers;suspendedComponentResolvers.add(resolve);// SSR should clear out the wake-up resolver if the Promise is resolved +// to avoid infinite loops. (See https://github.com/facebookexperimental/Recoil/pull/2073) +if(isSSR$3&&Recoil_isPromise(loadable.contents)){loadable.contents.finally(()=>{suspendedComponentResolvers.delete(resolve);});}});// $FlowExpectedError Flow(prop-missing) for integrating with tools that inspect thrown promises @fb-only +// @fb-only: promise.displayName = `Recoil State: ${recoilValue.key}`; +throw promise;}else if(loadable.state==='hasError'){throw loadable.contents;}else {throw Recoil_err(`Invalid value of loadable atom "${recoilValue.key}"`);}}/** + * Various things are broken with useRecoilInterface, particularly concurrent + * mode, React strict mode, and memory management. They will not be fixed. + * */function useRecoilInterface_DEPRECATED(){const componentName=Recoil_useComponentName();const storeRef=useStoreRef$2();// eslint-disable-next-line fb-www/react-no-unused-state-hook +const[,forceUpdate]=useState$1([]);const recoilValuesUsed=useRef$4(new Set());recoilValuesUsed.current=new Set();// Track the RecoilValues used just during this render +const previousSubscriptions=useRef$4(new Set());const subscriptions=useRef$4(new Map());const unsubscribeFrom=useCallback$1(key=>{const sub=subscriptions.current.get(key);if(sub){sub.release();subscriptions.current.delete(key);}},[subscriptions]);const updateState=useCallback$1((_state,key)=>{if(subscriptions.current.has(key)){forceUpdate([]);}},[]);// Effect to add/remove subscriptions as nodes are used +useEffect$3(()=>{const store=storeRef.current;Recoil_differenceSets(recoilValuesUsed.current,previousSubscriptions.current).forEach(key=>{if(subscriptions.current.has(key)){return;}const sub=subscribeToRecoilValue$1(store,new AbstractRecoilValue$3(key),state=>updateState(state,key),componentName);subscriptions.current.set(key,sub);/** + * Since we're subscribing in an effect we need to update to the latest + * value of the atom since it may have changed since we rendered. We can + * go ahead and do that now, unless we're in the middle of a batch -- + * in which case we should do it at the end of the batch, due to the + * following edge case: Suppose an atom is updated in another useEffect + * of this same component. Then the following sequence of events occur: + * 1. Atom is updated and subs fired (but we may not be subscribed + * yet depending on order of effects, so we miss this) Updated value + * is now in nextTree, but not currentTree. + * 2. This effect happens. We subscribe and update. + * 3. From the update we re-render and read currentTree, with old value. + * 4. Batcher's effect sets currentTree to nextTree. + * In this sequence we miss the update. To avoid that, add the update + * to queuedComponentCallback if a batch is in progress. + */ // FIXME delete queuedComponentCallbacks_DEPRECATED when deleting useInterface. +const state=store.getState();if(state.nextTree){store.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{updateState(store.getState(),key);});}else {updateState(store.getState(),key);}});Recoil_differenceSets(previousSubscriptions.current,recoilValuesUsed.current).forEach(key=>{unsubscribeFrom(key);});previousSubscriptions.current=recoilValuesUsed.current;});// Effect to unsubscribe from all when unmounting +useEffect$3(()=>{const currentSubscriptions=subscriptions.current;// Restore subscriptions that were cleared due to StrictMode running this effect twice +Recoil_differenceSets(recoilValuesUsed.current,new Set(currentSubscriptions.keys())).forEach(key=>{const sub=subscribeToRecoilValue$1(storeRef.current,new AbstractRecoilValue$3(key),state=>updateState(state,key),componentName);currentSubscriptions.set(key,sub);});return ()=>currentSubscriptions.forEach((_,key)=>unsubscribeFrom(key));},[componentName,storeRef,unsubscribeFrom,updateState]);return useMemo$1(()=>{// eslint-disable-next-line no-shadow +function useSetRecoilState(recoilState){return newValueOrUpdater=>{setRecoilValue$2(storeRef.current,recoilState,newValueOrUpdater);};}// eslint-disable-next-line no-shadow +function useResetRecoilState(recoilState){return ()=>setRecoilValue$2(storeRef.current,recoilState,DEFAULT_VALUE$2);}// eslint-disable-next-line no-shadow +function useRecoilValueLoadable(recoilValue){var _storeState$nextTree;if(!recoilValuesUsed.current.has(recoilValue.key)){recoilValuesUsed.current=setByAddingToSet$2(recoilValuesUsed.current,recoilValue.key);}// TODO Restore optimization to memoize lookup +const storeState=storeRef.current.getState();return getRecoilValueAsLoadable$2(storeRef.current,recoilValue,reactMode$3().early?(_storeState$nextTree=storeState.nextTree)!==null&&_storeState$nextTree!==void 0?_storeState$nextTree:storeState.currentTree:storeState.currentTree);}// eslint-disable-next-line no-shadow +function useRecoilValue(recoilValue){const loadable=useRecoilValueLoadable(recoilValue);return handleLoadable(loadable,recoilValue,storeRef);}// eslint-disable-next-line no-shadow +function useRecoilState(recoilState){return [useRecoilValue(recoilState),useSetRecoilState(recoilState)];}// eslint-disable-next-line no-shadow +function useRecoilStateLoadable(recoilState){return [useRecoilValueLoadable(recoilState),useSetRecoilState(recoilState)];}return {getRecoilValue:useRecoilValue,getRecoilValueLoadable:useRecoilValueLoadable,getRecoilState:useRecoilState,getRecoilStateLoadable:useRecoilStateLoadable,getSetRecoilState:useSetRecoilState,getResetRecoilState:useResetRecoilState};},[recoilValuesUsed,storeRef]);}const recoilComponentGetRecoilValueCount_FOR_TESTING={current:0};function useRecoilValueLoadable_SYNC_EXTERNAL_STORE(recoilValue){const storeRef=useStoreRef$2();const componentName=Recoil_useComponentName();const getSnapshot=useCallback$1(()=>{var _storeState$nextTree2;const store=storeRef.current;const storeState=store.getState();const treeState=reactMode$3().early?(_storeState$nextTree2=storeState.nextTree)!==null&&_storeState$nextTree2!==void 0?_storeState$nextTree2:storeState.currentTree:storeState.currentTree;const loadable=getRecoilValueAsLoadable$2(store,recoilValue,treeState);return {loadable,key:recoilValue.key};},[storeRef,recoilValue]);// Memoize the state to avoid unnecessary rerenders +const memoizePreviousSnapshot=useCallback$1(getState=>{let prevState;return ()=>{var _prevState,_prevState2;const nextState=getState();if((_prevState=prevState)!==null&&_prevState!==void 0&&_prevState.loadable.is(nextState.loadable)&&((_prevState2=prevState)===null||_prevState2===void 0?void 0:_prevState2.key)===nextState.key){return prevState;}prevState=nextState;return nextState;};},[]);const getMemoizedSnapshot=useMemo$1(()=>memoizePreviousSnapshot(getSnapshot),[getSnapshot,memoizePreviousSnapshot]);const subscribe=useCallback$1(notify=>{const store=storeRef.current;const subscription=subscribeToRecoilValue$1(store,recoilValue,notify,componentName);return subscription.release;},[storeRef,recoilValue,componentName]);return useSyncExternalStore$1(subscribe,getMemoizedSnapshot,// getSnapshot() +getMemoizedSnapshot// getServerSnapshot() for SSR support +).loadable;}function useRecoilValueLoadable_MUTABLE_SOURCE(recoilValue){const storeRef=useStoreRef$2();const getLoadable=useCallback$1(()=>{var _storeState$nextTree3;const store=storeRef.current;const storeState=store.getState();const treeState=reactMode$3().early?(_storeState$nextTree3=storeState.nextTree)!==null&&_storeState$nextTree3!==void 0?_storeState$nextTree3:storeState.currentTree:storeState.currentTree;return getRecoilValueAsLoadable$2(store,recoilValue,treeState);},[storeRef,recoilValue]);const getLoadableWithTesting=useCallback$1(()=>{return getLoadable();},[getLoadable]);const componentName=Recoil_useComponentName();const subscribe=useCallback$1((_storeState,notify)=>{const store=storeRef.current;const subscription=subscribeToRecoilValue$1(store,recoilValue,()=>{if(!Recoil_gkx('recoil_suppress_rerender_in_callback')){return notify();}// Only re-render if the value has changed. +// This will evaluate the atom/selector now as well as when the +// component renders, but that may help with prefetching. +const newLoadable=getLoadable();if(!prevLoadableRef.current.is(newLoadable)){notify();}// If the component is suspended then the effect setting prevLoadableRef +// will not run. So, set the previous value here when its subscription +// is fired to wake it up. We can't just rely on this, though, because +// this only executes when an atom/selector is dirty and the atom/selector +// passed to the hook can dynamically change. +prevLoadableRef.current=newLoadable;},componentName);return subscription.release;},[storeRef,recoilValue,componentName,getLoadable]);const source=useRecoilMutableSource$1();if(source==null){throw Recoil_err('Recoil hooks must be used in components contained within a component.');}const loadable=useMutableSource$1(source,getLoadableWithTesting,subscribe);const prevLoadableRef=useRef$4(loadable);useEffect$3(()=>{prevLoadableRef.current=loadable;});return loadable;}function useRecoilValueLoadable_TRANSITION_SUPPORT(recoilValue){const storeRef=useStoreRef$2();const componentName=Recoil_useComponentName();// Accessors to get the current state +const getLoadable=useCallback$1(()=>{var _storeState$nextTree4;const store=storeRef.current;const storeState=store.getState();const treeState=reactMode$3().early?(_storeState$nextTree4=storeState.nextTree)!==null&&_storeState$nextTree4!==void 0?_storeState$nextTree4:storeState.currentTree:storeState.currentTree;return getRecoilValueAsLoadable$2(store,recoilValue,treeState);},[storeRef,recoilValue]);const getState=useCallback$1(()=>({loadable:getLoadable(),key:recoilValue.key}),[getLoadable,recoilValue.key]);// Memoize state snapshots +const updateState=useCallback$1(prevState=>{const nextState=getState();return prevState.loadable.is(nextState.loadable)&&prevState.key===nextState.key?prevState:nextState;},[getState]);// Subscribe to Recoil state changes +useEffect$3(()=>{const subscription=subscribeToRecoilValue$1(storeRef.current,recoilValue,_state=>{setState(updateState);},componentName);// Update state in case we are using a different key +setState(updateState);return subscription.release;},[componentName,recoilValue,storeRef,updateState]);// Get the current state +const[state,setState]=useState$1(getState);// If we changed keys, then return the state for the new key. +// This is important in case the old key would cause the component to suspend. +// We don't have to set the new state here since the subscribing effect above +// will do that. +return state.key!==recoilValue.key?getState().loadable:state.loadable;}function useRecoilValueLoadable_LEGACY(recoilValue){const storeRef=useStoreRef$2();// eslint-disable-next-line fb-www/react-no-unused-state-hook +const[,forceUpdate]=useState$1([]);const componentName=Recoil_useComponentName();const getLoadable=useCallback$1(()=>{var _storeState$nextTree5;const store=storeRef.current;const storeState=store.getState();const treeState=reactMode$3().early?(_storeState$nextTree5=storeState.nextTree)!==null&&_storeState$nextTree5!==void 0?_storeState$nextTree5:storeState.currentTree:storeState.currentTree;return getRecoilValueAsLoadable$2(store,recoilValue,treeState);},[storeRef,recoilValue]);const loadable=getLoadable();const prevLoadableRef=useRef$4(loadable);useEffect$3(()=>{prevLoadableRef.current=loadable;});useEffect$3(()=>{const store=storeRef.current;const storeState=store.getState();const subscription=subscribeToRecoilValue$1(store,recoilValue,_state=>{var _prevLoadableRef$curr;if(!Recoil_gkx('recoil_suppress_rerender_in_callback')){return forceUpdate([]);}const newLoadable=getLoadable();if(!((_prevLoadableRef$curr=prevLoadableRef.current)!==null&&_prevLoadableRef$curr!==void 0&&_prevLoadableRef$curr.is(newLoadable))){// $FlowFixMe[incompatible-call] +forceUpdate(newLoadable);}prevLoadableRef.current=newLoadable;},componentName);/** + * Since we're subscribing in an effect we need to update to the latest + * value of the atom since it may have changed since we rendered. We can + * go ahead and do that now, unless we're in the middle of a batch -- + * in which case we should do it at the end of the batch, due to the + * following edge case: Suppose an atom is updated in another useEffect + * of this same component. Then the following sequence of events occur: + * 1. Atom is updated and subs fired (but we may not be subscribed + * yet depending on order of effects, so we miss this) Updated value + * is now in nextTree, but not currentTree. + * 2. This effect happens. We subscribe and update. + * 3. From the update we re-render and read currentTree, with old value. + * 4. Batcher's effect sets currentTree to nextTree. + * In this sequence we miss the update. To avoid that, add the update + * to queuedComponentCallback if a batch is in progress. + */if(storeState.nextTree){store.getState().queuedComponentCallbacks_DEPRECATED.push(()=>{// $FlowFixMe[incompatible-type] +prevLoadableRef.current=null;forceUpdate([]);});}else {var _prevLoadableRef$curr2;if(!Recoil_gkx('recoil_suppress_rerender_in_callback')){return forceUpdate([]);}const newLoadable=getLoadable();if(!((_prevLoadableRef$curr2=prevLoadableRef.current)!==null&&_prevLoadableRef$curr2!==void 0&&_prevLoadableRef$curr2.is(newLoadable))){// $FlowFixMe[incompatible-call] +forceUpdate(newLoadable);}prevLoadableRef.current=newLoadable;}return subscription.release;},[componentName,getLoadable,recoilValue,storeRef]);return loadable;}/** + Like useRecoilValue(), but either returns the value if available or + just undefined if not available for any reason, such as pending or error. +*/function useRecoilValueLoadable(recoilValue){if(Recoil_gkx('recoil_memory_managament_2020')){// eslint-disable-next-line fb-www/react-hooks +Recoil_useRetain(recoilValue);}return {TRANSITION_SUPPORT:useRecoilValueLoadable_TRANSITION_SUPPORT,// Recoil will attemp to detect if `useSyncExternalStore()` is supported with +// `reactMode()` before calling it. However, sometimes the host React +// environment supports it but uses additional React renderers (such as with +// `react-three-fiber`) which do not. While this is technically a user issue +// by using a renderer with React 18+ that doesn't fully support React 18 we +// don't want to break users if it can be avoided. As the current renderer can +// change at runtime, we need to dynamically check and fallback if necessary. +SYNC_EXTERNAL_STORE:currentRendererSupportsUseSyncExternalStore$1()?useRecoilValueLoadable_SYNC_EXTERNAL_STORE:useRecoilValueLoadable_TRANSITION_SUPPORT,MUTABLE_SOURCE:useRecoilValueLoadable_MUTABLE_SOURCE,LEGACY:useRecoilValueLoadable_LEGACY}[reactMode$3().mode](recoilValue);}/** + Returns the value represented by the RecoilValue. + If the value is pending, it will throw a Promise to suspend the component, + if the value is an error it will throw it for the nearest React error boundary. + This will also subscribe the component for any updates in the value. + */function useRecoilValue(recoilValue){const storeRef=useStoreRef$2();const loadable=useRecoilValueLoadable(recoilValue);return handleLoadable(loadable,recoilValue,storeRef);}/** + Returns a function that allows the value of a RecoilState to be updated, but does + not subscribe the component to changes to that RecoilState. +*/function useSetRecoilState(recoilState){const storeRef=useStoreRef$2();return useCallback$1(newValueOrUpdater=>{setRecoilValue$2(storeRef.current,recoilState,newValueOrUpdater);},[storeRef,recoilState]);}/** + Returns a function that will reset the value of a RecoilState to its default +*/function useResetRecoilState(recoilState){const storeRef=useStoreRef$2();return useCallback$1(()=>{setRecoilValue$2(storeRef.current,recoilState,DEFAULT_VALUE$2);},[storeRef,recoilState]);}/** + Equivalent to useState(). Allows the value of the RecoilState to be read and written. + Subsequent updates to the RecoilState will cause the component to re-render. If the + RecoilState is pending, this will suspend the component and initiate the + retrieval of the value. If evaluating the RecoilState resulted in an error, this will + throw the error so that the nearest React error boundary can catch it. +*/function useRecoilState(recoilState){return [useRecoilValue(recoilState),useSetRecoilState(recoilState)];}/** + Like useRecoilState(), but does not cause Suspense or React error handling. Returns + an object that indicates whether the RecoilState is available, pending, or + unavailable due to an error. +*/function useRecoilStateLoadable(recoilState){return [useRecoilValueLoadable(recoilState),useSetRecoilState(recoilState)];}function useSetUnvalidatedAtomValues(){const storeRef=useStoreRef$2();return (values,transactionMetadata={})=>{batchUpdates$2(()=>{storeRef.current.addTransactionMetadata(transactionMetadata);values.forEach((value,key)=>setUnvalidatedRecoilValue$2(storeRef.current,new AbstractRecoilValue$3(key),value));});};}/** + * Experimental variants of hooks with support for useTransition() + */function useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE(recoilValue){if(Recoil_gkx('recoil_memory_managament_2020')){// eslint-disable-next-line fb-www/react-hooks +Recoil_useRetain(recoilValue);}return useRecoilValueLoadable_TRANSITION_SUPPORT(recoilValue);}function useRecoilValue_TRANSITION_SUPPORT_UNSTABLE(recoilValue){const storeRef=useStoreRef$2();const loadable=useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE(recoilValue);return handleLoadable(loadable,recoilValue,storeRef);}function useRecoilState_TRANSITION_SUPPORT_UNSTABLE(recoilState){return [useRecoilValue_TRANSITION_SUPPORT_UNSTABLE(recoilState),useSetRecoilState(recoilState)];}var Recoil_Hooks={recoilComponentGetRecoilValueCount_FOR_TESTING,useRecoilInterface:useRecoilInterface_DEPRECATED,useRecoilState,useRecoilStateLoadable,useRecoilValue,useRecoilValueLoadable,useResetRecoilState,useSetRecoilState,useSetUnvalidatedAtomValues,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE,useRecoilState_TRANSITION_SUPPORT_UNSTABLE};/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Returns a map containing all of the keys + values from the original map where + * the given callback returned true. + */function filterMap(map,callback){const result=new Map();for(const[key,value]of map){if(callback(value,key)){result.set(key,value);}}return result;}var Recoil_filterMap=filterMap;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */ /** + * Returns a set containing all of the values from the original set where + * the given callback returned true. + */function filterSet(set,callback){const result=new Set();for(const value of set){if(callback(value)){result.add(value);}}return result;}var Recoil_filterSet=filterSet;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function mergeMaps(...maps){const result=new Map();for(let i=0;i{const sub=storeRef.current.subscribeToTransactions(callback);return sub.release;},[callback,storeRef]);}function externallyVisibleAtomValuesInState(state){const atomValues=state.atomValues.toMap();const persistedAtomContentsValues=Recoil_mapMap(Recoil_filterMap(atomValues,(v,k)=>{const node=getNode$4(k);const persistence=node.persistence_UNSTABLE;return persistence!=null&&persistence.type!=='none'&&v.state==='hasValue';}),v=>v.contents);// Merge in nonvalidated atoms; we may not have defs for them but they will +// all have persistence on or they wouldn't be there in the first place. +return Recoil_mergeMaps(state.nonvalidatedAtoms.toMap(),persistedAtomContentsValues);}/** + Calls the given callback after any atoms have been modified and the consequent + component re-renders have been committed. This is intended for persisting + the values of the atoms to storage. The stored values can then be restored + using the useSetUnvalidatedAtomValues hook. + + The callback receives the following info: + + atomValues: The current value of every atom that is both persistable (persistence + type not set to 'none') and whose value is available (not in an + error or loading state). + + previousAtomValues: The value of every persistable and available atom before + the transaction began. + + atomInfo: A map containing the persistence settings for each atom. Every key + that exists in atomValues will also exist in atomInfo. + + modifiedAtoms: The set of atoms that were written to during the transaction. + + transactionMetadata: Arbitrary information that was added via the + useSetUnvalidatedAtomValues hook. Useful for ignoring the useSetUnvalidatedAtomValues + transaction, to avoid loops. +*/function useTransactionObservation_DEPRECATED(callback){useTransactionSubscription(useCallback$2(store=>{let previousTree=store.getState().previousTree;const currentTree=store.getState().currentTree;if(!previousTree){previousTree=store.getState().currentTree;// attempt to trundle on +}const atomValues=externallyVisibleAtomValuesInState(currentTree);const previousAtomValues=externallyVisibleAtomValuesInState(previousTree);const atomInfo=Recoil_mapMap(nodes$1,node=>{var _node$persistence_UNS,_node$persistence_UNS2,_node$persistence_UNS3,_node$persistence_UNS4;return {persistence_UNSTABLE:{type:(_node$persistence_UNS=(_node$persistence_UNS2=node.persistence_UNSTABLE)===null||_node$persistence_UNS2===void 0?void 0:_node$persistence_UNS2.type)!==null&&_node$persistence_UNS!==void 0?_node$persistence_UNS:'none',backButton:(_node$persistence_UNS3=(_node$persistence_UNS4=node.persistence_UNSTABLE)===null||_node$persistence_UNS4===void 0?void 0:_node$persistence_UNS4.backButton)!==null&&_node$persistence_UNS3!==void 0?_node$persistence_UNS3:false}};});// Filter on existance in atomValues so that externally-visible rules +// are also applied to modified atoms (specifically exclude selectors): +const modifiedAtoms=Recoil_filterSet(currentTree.dirtyAtoms,k=>atomValues.has(k)||previousAtomValues.has(k));callback({atomValues,previousAtomValues,atomInfo,modifiedAtoms,transactionMetadata:{...currentTree.transactionMetadata}});},[callback]));}function useRecoilTransactionObserver(callback){useTransactionSubscription(useCallback$2(store=>{const snapshot=cloneSnapshot$1(store,'latest');const previousSnapshot=cloneSnapshot$1(store,'previous');callback({snapshot,previousSnapshot});},[callback]));}// Return a snapshot of the current state and subscribe to all state changes +function useRecoilSnapshot(){const storeRef=useStoreRef$3();const[snapshot,setSnapshot]=useState$2(()=>cloneSnapshot$1(storeRef.current));const previousSnapshot=Recoil_usePrevious(snapshot);const timeoutID=useRef$5();const releaseRef=useRef$5();useTransactionSubscription(useCallback$2(store=>setSnapshot(cloneSnapshot$1(store)),[]));// Retain snapshot for duration component is mounted +useEffect$4(()=>{const release=snapshot.retain();// Release the retain from the rendering call +if(timeoutID.current&&!isSSR$4){var _releaseRef$current;window.clearTimeout(timeoutID.current);timeoutID.current=null;(_releaseRef$current=releaseRef.current)===null||_releaseRef$current===void 0?void 0:_releaseRef$current.call(releaseRef);releaseRef.current=null;}return ()=>{// Defer the release. If "Fast Refresh"" is used then the component may +// re-render with the same state. The previous cleanup will then run and +// then the new effect will run. We don't want the snapshot to be released +// by that cleanup before the new effect has a chance to retain it again. +// Use timeout of 10 to workaround Firefox issue: https://github.com/facebookexperimental/Recoil/issues/1936 +window.setTimeout(release,10);};},[snapshot]);// Retain snapshot until above effect is run. +// Release after a threshold in case component is suspended. +if(previousSnapshot!==snapshot&&!isSSR$4){// Release the previous snapshot +if(timeoutID.current){var _releaseRef$current2;window.clearTimeout(timeoutID.current);timeoutID.current=null;(_releaseRef$current2=releaseRef.current)===null||_releaseRef$current2===void 0?void 0:_releaseRef$current2.call(releaseRef);releaseRef.current=null;}releaseRef.current=snapshot.retain();timeoutID.current=window.setTimeout(()=>{var _releaseRef$current3;timeoutID.current=null;(_releaseRef$current3=releaseRef.current)===null||_releaseRef$current3===void 0?void 0:_releaseRef$current3.call(releaseRef);releaseRef.current=null;},SUSPENSE_TIMEOUT_MS$2);}return snapshot;}function gotoSnapshot(store,snapshot){var _storeState$nextTree;const storeState=store.getState();const prev=(_storeState$nextTree=storeState.nextTree)!==null&&_storeState$nextTree!==void 0?_storeState$nextTree:storeState.currentTree;const next=snapshot.getStore_INTERNAL().getState().currentTree;batchUpdates$3(()=>{const keysToUpdate=new Set();for(const keys of [prev.atomValues.keys(),next.atomValues.keys()]){for(const key of keys){var _prev$atomValues$get,_next$atomValues$get;if(((_prev$atomValues$get=prev.atomValues.get(key))===null||_prev$atomValues$get===void 0?void 0:_prev$atomValues$get.contents)!==((_next$atomValues$get=next.atomValues.get(key))===null||_next$atomValues$get===void 0?void 0:_next$atomValues$get.contents)&&getNode$4(key).shouldRestoreFromSnapshots){keysToUpdate.add(key);}}}keysToUpdate.forEach(key=>{setRecoilValueLoadable$1(store,new AbstractRecoilValue$4(key),next.atomValues.has(key)?Recoil_nullthrows(next.atomValues.get(key)):DEFAULT_VALUE$3);});store.replaceState(state=>({...state,stateID:snapshot.getID()}));});}function useGotoRecoilSnapshot(){const storeRef=useStoreRef$3();return useCallback$2(snapshot=>gotoSnapshot(storeRef.current,snapshot),[storeRef]);}var Recoil_SnapshotHooks={useRecoilSnapshot,gotoSnapshot,useGotoRecoilSnapshot,useRecoilTransactionObserver,useTransactionObservation_DEPRECATED,useTransactionSubscription_DEPRECATED:useTransactionSubscription};const{peekNodeInfo:peekNodeInfo$2}=Recoil_FunctionalCore;const{useStoreRef:useStoreRef$4}=Recoil_RecoilRoot;function useGetRecoilValueInfo(){const storeRef=useStoreRef$4();// $FlowFixMe[incompatible-return] +return ({key})=>peekNodeInfo$2(storeRef.current,storeRef.current.getState().currentTree,key);}var Recoil_useGetRecoilValueInfo=useGetRecoilValueInfo;const{reactMode:reactMode$4}=Recoil_ReactMode;const{RecoilRoot:RecoilRoot$1,useStoreRef:useStoreRef$5}=Recoil_RecoilRoot;const{useMemo:useMemo$2}=React;function useRecoilBridgeAcrossReactRoots(){// The test fails when using useMutableSource(), but only if act() is used +// for the nested root. So, this may only be a testing environment issue. +if(reactMode$4().mode==='MUTABLE_SOURCE'){// eslint-disable-next-line fb-www/no-console +console.warn('Warning: There are known issues using useRecoilBridgeAcrossReactRoots() in recoil_mutable_source rendering mode. Please consider upgrading to recoil_sync_external_store mode.');}const store=useStoreRef$5().current;return useMemo$2(()=>{// eslint-disable-next-line no-shadow +function RecoilBridge({children}){return/*#__PURE__*/React.createElement(RecoilRoot$1,{store_INTERNAL:store},children);}return RecoilBridge;},[store]);}var Recoil_useRecoilBridgeAcrossReactRoots=useRecoilBridgeAcrossReactRoots;const{loadableWithValue:loadableWithValue$1}=Recoil_Loadable$1;const{initializeNode:initializeNode$3}=Recoil_FunctionalCore;const{DEFAULT_VALUE:DEFAULT_VALUE$4,getNode:getNode$5}=Recoil_Node;const{copyTreeState:copyTreeState$1,getRecoilValueAsLoadable:getRecoilValueAsLoadable$3,invalidateDownstreams:invalidateDownstreams$1,writeLoadableToTreeState:writeLoadableToTreeState$1}=Recoil_RecoilValueInterface;function isAtom(recoilValue){return getNode$5(recoilValue.key).nodeType==='atom';}class TransactionInterfaceImpl{constructor(store,treeState){_defineProperty(this,"_store",void 0);_defineProperty(this,"_treeState",void 0);_defineProperty(this,"_changes",void 0);_defineProperty(this,"get",recoilValue=>{if(this._changes.has(recoilValue.key)){// $FlowIssue[incompatible-return] +return this._changes.get(recoilValue.key);}if(!isAtom(recoilValue)){throw Recoil_err('Reading selectors within atomicUpdate is not supported');}const loadable=getRecoilValueAsLoadable$3(this._store,recoilValue,this._treeState);if(loadable.state==='hasValue'){return loadable.contents;}else if(loadable.state==='hasError'){throw loadable.contents;}else {throw Recoil_err(`Expected Recoil atom ${recoilValue.key} to have a value, but it is in a loading state.`);}});_defineProperty(this,"set",(recoilState,valueOrUpdater)=>{if(!isAtom(recoilState)){throw Recoil_err('Setting selectors within atomicUpdate is not supported');}if(typeof valueOrUpdater==='function'){const current=this.get(recoilState);this._changes.set(recoilState.key,valueOrUpdater(current));// flowlint-line unclear-type:off +}else {// Initialize atom and run effects if not initialized yet +initializeNode$3(this._store,recoilState.key,'set');this._changes.set(recoilState.key,valueOrUpdater);}});_defineProperty(this,"reset",recoilState=>{this.set(recoilState,DEFAULT_VALUE$4);});this._store=store;this._treeState=treeState;this._changes=new Map();}// Allow destructing +// eslint-disable-next-line fb-www/extra-arrow-initializer +newTreeState_INTERNAL(){if(this._changes.size===0){return this._treeState;}const newState=copyTreeState$1(this._treeState);for(const[k,v]of this._changes){writeLoadableToTreeState$1(newState,k,loadableWithValue$1(v));}invalidateDownstreams$1(this._store,newState);return newState;}}function atomicUpdater(store){return fn=>{store.replaceState(treeState=>{const changeset=new TransactionInterfaceImpl(store,treeState);fn(changeset);return changeset.newTreeState_INTERNAL();});};}var Recoil_AtomicUpdates={atomicUpdater};var Recoil_AtomicUpdates_1=Recoil_AtomicUpdates.atomicUpdater;var Recoil_AtomicUpdates$1=/*#__PURE__*/Object.freeze({__proto__:null,atomicUpdater:Recoil_AtomicUpdates_1});/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */function invariant(condition,message){if(!condition){throw new Error(message);}}var invariant_1=invariant;// @oss-only +var Recoil_invariant=invariant_1;const{atomicUpdater:atomicUpdater$1}=Recoil_AtomicUpdates$1;const{batchUpdates:batchUpdates$4}=Recoil_Batching;const{DEFAULT_VALUE:DEFAULT_VALUE$5}=Recoil_Node;const{useStoreRef:useStoreRef$6}=Recoil_RecoilRoot;const{refreshRecoilValue:refreshRecoilValue$1,setRecoilValue:setRecoilValue$3}=Recoil_RecoilValueInterface;const{cloneSnapshot:cloneSnapshot$2}=Recoil_Snapshot$1;const{gotoSnapshot:gotoSnapshot$1}=Recoil_SnapshotHooks;const{useCallback:useCallback$3}=React;class Sentinel{}const SENTINEL=new Sentinel();function recoilCallback(store,fn,args,extraInterface){let ret=SENTINEL;let releaseSnapshot;batchUpdates$4(()=>{const errMsg='useRecoilCallback() expects a function that returns a function: '+'it accepts a function of the type (RecoilInterface) => (Args) => ReturnType '+'and returns a callback function (Args) => ReturnType, where RecoilInterface is '+'an object {snapshot, set, ...} and Args and ReturnType are the argument and return '+'types of the callback you want to create. Please see the docs '+'at recoiljs.org for details.';if(typeof fn!=='function'){throw Recoil_err(errMsg);}// Clone the snapshot lazily to avoid overhead if the callback does not use it. +// Note that this means the snapshot may represent later state from when +// the callback was called if it first accesses the snapshot asynchronously. +const callbackInterface=Recoil_lazyProxy({...(extraInterface!==null&&extraInterface!==void 0?extraInterface:{}),// flowlint-line unclear-type:off +// $FlowFixMe[missing-local-annot] +set:(node,newValue)=>setRecoilValue$3(store,node,newValue),// $FlowFixMe[missing-local-annot] +reset:node=>setRecoilValue$3(store,node,DEFAULT_VALUE$5),// $FlowFixMe[missing-local-annot] +refresh:node=>refreshRecoilValue$1(store,node),gotoSnapshot:snapshot=>gotoSnapshot$1(store,snapshot),transact_UNSTABLE:transaction=>atomicUpdater$1(store)(transaction)},{snapshot:()=>{const snapshot=cloneSnapshot$2(store);releaseSnapshot=snapshot.retain();return snapshot;}});const callback=fn(callbackInterface);if(typeof callback!=='function'){throw Recoil_err(errMsg);}ret=callback(...args);});!!(ret instanceof Sentinel)?Recoil_invariant(false):void 0;if(Recoil_isPromise(ret)){ret=ret.finally(()=>{var _releaseSnapshot;(_releaseSnapshot=releaseSnapshot)===null||_releaseSnapshot===void 0?void 0:_releaseSnapshot();});}else {var _releaseSnapshot2;(_releaseSnapshot2=releaseSnapshot)===null||_releaseSnapshot2===void 0?void 0:_releaseSnapshot2();}return ret;}function useRecoilCallback(fn,deps){const storeRef=useStoreRef$6();return useCallback$3(// $FlowIssue[incompatible-call] +(...args)=>{return recoilCallback(storeRef.current,fn,args);},deps!=null?[...deps,storeRef]:undefined// eslint-disable-line fb-www/react-hooks-deps +);}var Recoil_useRecoilCallback={recoilCallback,useRecoilCallback};const{useStoreRef:useStoreRef$7}=Recoil_RecoilRoot;const{refreshRecoilValue:refreshRecoilValue$2}=Recoil_RecoilValueInterface;const{useCallback:useCallback$4}=React;function useRecoilRefresher(recoilValue){const storeRef=useStoreRef$7();return useCallback$4(()=>{const store=storeRef.current;refreshRecoilValue$2(store,recoilValue);},[recoilValue,storeRef]);}var Recoil_useRecoilRefresher=useRecoilRefresher;const{atomicUpdater:atomicUpdater$2}=Recoil_AtomicUpdates$1;const{useStoreRef:useStoreRef$8}=Recoil_RecoilRoot;const{useMemo:useMemo$3}=React;function useRecoilTransaction(fn,deps){const storeRef=useStoreRef$8();return useMemo$3(()=>(...args)=>{const atomicUpdate=atomicUpdater$2(storeRef.current);atomicUpdate(transactionInterface=>{fn(transactionInterface)(...args);});},deps!=null?[...deps,storeRef]:undefined// eslint-disable-line fb-www/react-hooks-deps +);}var Recoil_useRecoilTransaction=useRecoilTransaction;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */class WrappedValue{constructor(value){_defineProperty(this,"value",void 0);this.value=value;}}var Recoil_Wrapper={WrappedValue};var Recoil_Wrapper_1=Recoil_Wrapper.WrappedValue;var Recoil_Wrapper$1=/*#__PURE__*/Object.freeze({__proto__:null,WrappedValue:Recoil_Wrapper_1});const{isFastRefreshEnabled:isFastRefreshEnabled$2}=Recoil_ReactMode;class ChangedPathError extends Error{}class TreeCache{// $FlowIssue[unclear-type] +constructor(options){var _options$onHit,_options$onSet,_options$mapNodeValue;_defineProperty(this,"_name",void 0);_defineProperty(this,"_numLeafs",void 0);_defineProperty(this,"_root",void 0);_defineProperty(this,"_onHit",void 0);_defineProperty(this,"_onSet",void 0);_defineProperty(this,"_mapNodeValue",void 0);this._name=options===null||options===void 0?void 0:options.name;this._numLeafs=0;this._root=null;this._onHit=(_options$onHit=options===null||options===void 0?void 0:options.onHit)!==null&&_options$onHit!==void 0?_options$onHit:()=>{};this._onSet=(_options$onSet=options===null||options===void 0?void 0:options.onSet)!==null&&_options$onSet!==void 0?_options$onSet:()=>{};this._mapNodeValue=(_options$mapNodeValue=options===null||options===void 0?void 0:options.mapNodeValue)!==null&&_options$mapNodeValue!==void 0?_options$mapNodeValue:val=>val;}size(){return this._numLeafs;}// $FlowIssue[unclear-type] +root(){return this._root;}get(getNodeValue,handlers){var _this$getLeafNode;return (_this$getLeafNode=this.getLeafNode(getNodeValue,handlers))===null||_this$getLeafNode===void 0?void 0:_this$getLeafNode.value;}getLeafNode(getNodeValue,handlers){if(this._root==null){return undefined;}// Iterate down the tree based on the current node values until we hit a leaf +// $FlowIssue[unclear-type] +let node=this._root;while(node){handlers===null||handlers===void 0?void 0:handlers.onNodeVisit(node);if(node.type==='leaf'){this._onHit(node);return node;}const nodeValue=this._mapNodeValue(getNodeValue(node.nodeKey));node=node.branches.get(nodeValue);}return undefined;}set(route,value,handlers){const addLeaf=()=>{var _node2,_node3,_this$_root2,_handlers$onNodeVisit2;// First, setup the branch nodes for the route: +// Iterate down the tree to find or add branch nodes following the route +let node;let branchKey;for(const[nodeKey,nodeValue]of route){var _node,_handlers$onNodeVisit,_this$_root;// If the previous root was a leaf, while we not have a get(), it means +// the selector has inconsistent values or implementation changed. +const root=this._root;if((root===null||root===void 0?void 0:root.type)==='leaf'){throw this.invalidCacheError();}// node now refers to the next node down in the tree +const parent=node;// $FlowFixMe[prop-missing] +// $FlowFixMe[incompatible-type] +node=parent?parent.branches.get(branchKey):root;// $FlowFixMe[prop-missing] +// $FlowFixMe[incompatible-type] +node=(_node=node)!==null&&_node!==void 0?_node:{type:'branch',nodeKey,parent,branches:new Map(),branchKey};// If we found an existing node, confirm it has a consistent value +if(node.type!=='branch'||node.nodeKey!==nodeKey){throw this.invalidCacheError();}// Add the branch node to the tree +parent===null||parent===void 0?void 0:parent.branches.set(branchKey,node);handlers===null||handlers===void 0?void 0:(_handlers$onNodeVisit=handlers.onNodeVisit)===null||_handlers$onNodeVisit===void 0?void 0:_handlers$onNodeVisit.call(handlers,node);// Prepare for next iteration and install root if it is new. +branchKey=this._mapNodeValue(nodeValue);this._root=(_this$_root=this._root)!==null&&_this$_root!==void 0?_this$_root:node;}// Second, setup the leaf node: +// If there is an existing leaf for this route confirm it is consistent +const oldLeaf=node?(_node2=node)===null||_node2===void 0?void 0:_node2.branches.get(branchKey):this._root;if(oldLeaf!=null&&(oldLeaf.type!=='leaf'||oldLeaf.branchKey!==branchKey)){throw this.invalidCacheError();}// Create a new or replacement leaf. +const leafNode={type:'leaf',value,parent:node,branchKey};// Install the leaf and call handlers +(_node3=node)===null||_node3===void 0?void 0:_node3.branches.set(branchKey,leafNode);this._root=(_this$_root2=this._root)!==null&&_this$_root2!==void 0?_this$_root2:leafNode;this._numLeafs++;this._onSet(leafNode);handlers===null||handlers===void 0?void 0:(_handlers$onNodeVisit2=handlers.onNodeVisit)===null||_handlers$onNodeVisit2===void 0?void 0:_handlers$onNodeVisit2.call(handlers,leafNode);};try{addLeaf();}catch(error){// If the cache was stale or observed inconsistent values, such as with +// Fast Refresh, then clear it and rebuild with the new values. +if(error instanceof ChangedPathError){this.clear();addLeaf();}else {throw error;}}}// Returns true if leaf was actually deleted from the tree +delete(leaf){const root=this.root();if(!root){return false;}if(leaf===root){this._root=null;this._numLeafs=0;return true;}// Iterate up from the leaf deleteing it from it's parent's branches. +let node=leaf.parent;let branchKey=leaf.branchKey;while(node){var _node4;node.branches.delete(branchKey);// Stop iterating if we hit the root. +if(node===root){if(node.branches.size===0){this._root=null;this._numLeafs=0;}else {this._numLeafs--;}return true;}// Stop iterating if there are other branches since we don't need to +// remove any more nodes. +if(node.branches.size>0){break;}// Iterate up to our parent +branchKey=(_node4=node)===null||_node4===void 0?void 0:_node4.branchKey;node=node.parent;}// Confirm that the leaf we are deleting is actually attached to our tree +for(;node!==root;node=node.parent){if(node==null){return false;}}this._numLeafs--;return true;}clear(){this._numLeafs=0;this._root=null;}invalidCacheError(){const CHANGED_PATH_ERROR_MESSAGE=isFastRefreshEnabled$2()?'Possible Fast Refresh module reload detected. '+'This may also be caused by an selector returning inconsistent values. '+'Resetting cache.':'Invalid cache values. This happens when selectors do not return '+'consistent values for the same input dependency values. That may also '+'be caused when using Fast Refresh to change a selector implementation. '+'Resetting cache.';Recoil_recoverableViolation(CHANGED_PATH_ERROR_MESSAGE+(this._name!=null?` - ${this._name}`:''));throw new ChangedPathError();}}var Recoil_TreeCache={TreeCache};var Recoil_TreeCache_1=Recoil_TreeCache.TreeCache;var Recoil_TreeCache$1=/*#__PURE__*/Object.freeze({__proto__:null,TreeCache:Recoil_TreeCache_1});class LRUCache{constructor(options){var _options$mapKey;_defineProperty(this,"_maxSize",void 0);_defineProperty(this,"_size",void 0);_defineProperty(this,"_head",void 0);_defineProperty(this,"_tail",void 0);_defineProperty(this,"_map",void 0);_defineProperty(this,"_keyMapper",void 0);this._maxSize=options.maxSize;this._size=0;this._head=null;this._tail=null;this._map=new Map();this._keyMapper=(_options$mapKey=options.mapKey)!==null&&_options$mapKey!==void 0?_options$mapKey:v=>v;}head(){return this._head;}tail(){return this._tail;}size(){return this._size;}maxSize(){return this._maxSize;}has(key){return this._map.has(this._keyMapper(key));}get(key){const mappedKey=this._keyMapper(key);const node=this._map.get(mappedKey);if(!node){return undefined;}this.set(key,node.value);return node.value;}set(key,val){const mappedKey=this._keyMapper(key);const existingNode=this._map.get(mappedKey);if(existingNode){this.delete(key);}const head=this.head();const node={key,right:head,left:null,value:val};if(head){head.left=node;}else {this._tail=node;}this._map.set(mappedKey,node);this._head=node;this._size++;this._maybeDeleteLRU();}_maybeDeleteLRU(){if(this.size()>this.maxSize()){this.deleteLru();}}deleteLru(){const tail=this.tail();if(tail){this.delete(tail.key);}}delete(key){const mappedKey=this._keyMapper(key);if(!this._size||!this._map.has(mappedKey)){return;}const node=Recoil_nullthrows(this._map.get(mappedKey));const right=node.right;const left=node.left;if(right){right.left=node.left;}if(left){left.right=node.right;}if(node===this.head()){this._head=right;}if(node===this.tail()){this._tail=left;}this._map.delete(mappedKey);this._size--;}clear(){this._size=0;this._head=null;this._tail=null;this._map=new Map();}}var Recoil_LRUCache={LRUCache};var Recoil_LRUCache_1=Recoil_LRUCache.LRUCache;var Recoil_LRUCache$1=/*#__PURE__*/Object.freeze({__proto__:null,LRUCache:Recoil_LRUCache_1});const{LRUCache:LRUCache$1}=Recoil_LRUCache$1;const{TreeCache:TreeCache$1}=Recoil_TreeCache$1;function treeCacheLRU({name,maxSize,mapNodeValue=v=>v}){const lruCache=new LRUCache$1({maxSize});const cache=new TreeCache$1({name,mapNodeValue,onHit:node=>{lruCache.set(node,true);},onSet:node=>{const lruNode=lruCache.tail();lruCache.set(node,true);if(lruNode&&cache.size()>maxSize){// $FlowFixMe[incompatible-call] +cache.delete(lruNode.key);}}});return cache;}var Recoil_treeCacheLRU=treeCacheLRU;function stringify(x,opt,key){// A optimization to avoid the more expensive JSON.stringify() for simple strings +// This may lose protection for u2028 and u2029, though. +if(typeof x==='string'&&!x.includes('"')&&!x.includes('\\')){return `"${x}"`;}// Handle primitive types +switch(typeof x){case'undefined':return '';// JSON.stringify(undefined) returns undefined, but we always want to return a string +case'boolean':return x?'true':'false';case'number':case'symbol':// case 'bigint': // BigInt is not supported in www +return String(x);case'string':// Add surrounding quotes and escape internal quotes +return JSON.stringify(x);case'function':if((opt===null||opt===void 0?void 0:opt.allowFunctions)!==true){throw Recoil_err('Attempt to serialize function in a Recoil cache key');}return `__FUNCTION(${x.name})__`;}if(x===null){return 'null';}// Fallback case for unknown types +if(typeof x!=='object'){var _JSON$stringify;return (_JSON$stringify=JSON.stringify(x))!==null&&_JSON$stringify!==void 0?_JSON$stringify:'';}// Deal with all promises as equivalent for now. +if(Recoil_isPromise(x)){return '__PROMISE__';}// Arrays handle recursive stringification +if(Array.isArray(x)){// $FlowFixMe[missing-local-annot] +return `[${x.map((v,i)=>stringify(v,opt,i.toString()))}]`;}// If an object defines a toJSON() method, then use that to override the +// serialization. This matches the behavior of JSON.stringify(). +// Pass the key for compatibility. +// Immutable.js collections define this method to allow us to serialize them. +if(typeof x.toJSON==='function'){// flowlint-next-line unclear-type: off +return stringify(x.toJSON(key),opt,key);}// For built-in Maps, sort the keys in a stable order instead of the +// default insertion order. Support non-string keys. +if(x instanceof Map){const obj={};for(const[k,v]of x){// Stringify will escape any nested quotes +obj[typeof k==='string'?k:stringify(k,opt)]=v;}return stringify(obj,opt,key);}// For built-in Sets, sort the keys in a stable order instead of the +// default insertion order. +if(x instanceof Set){return stringify(// $FlowFixMe[missing-local-annot] +Array.from(x).sort((a,b)=>stringify(a,opt).localeCompare(stringify(b,opt))),opt,key);}// Anything else that is iterable serialize as an Array. +if(Symbol!==undefined&&x[Symbol.iterator]!=null&&typeof x[Symbol.iterator]==='function'){// flowlint-next-line unclear-type: off +return stringify(Array.from(x),opt,key);}// For all other Objects, sort the keys in a stable order. +return `{${Object.keys(x).filter(k=>x[k]!==undefined).sort()// stringify the key to add quotes and escape any nested slashes or quotes. +.map(k=>`${stringify(k,opt)}:${stringify(x[k],opt,k)}`).join(',')}}`;}// Utility similar to JSON.stringify() except: +// * Serialize built-in Sets as an Array +// * Serialize built-in Maps as an Object. Supports non-string keys. +// * Serialize other iterables as arrays +// * Sort the keys of Objects and Maps to have a stable order based on string conversion. +// This overrides their default insertion order. +// * Still uses toJSON() of any object to override serialization +// * Support Symbols (though don't guarantee uniqueness) +// * We could support BigInt, but Flow doesn't seem to like it. +// See Recoil_stableStringify-test.js for examples +function stableStringify(x,opt={allowFunctions:false}){return stringify(x,opt);}var Recoil_stableStringify=stableStringify;const{TreeCache:TreeCache$2}=Recoil_TreeCache$1;const defaultPolicy={equality:'reference',eviction:'keep-all',maxSize:Infinity};function treeCacheFromPolicy({equality=defaultPolicy.equality,eviction=defaultPolicy.eviction,maxSize=defaultPolicy.maxSize}=defaultPolicy,name){const valueMapper=getValueMapper(equality);return getTreeCache(eviction,maxSize,valueMapper,name);}function getValueMapper(equality){switch(equality){case'reference':return val=>val;case'value':return val=>Recoil_stableStringify(val);}throw Recoil_err(`Unrecognized equality policy ${equality}`);}function getTreeCache(eviction,maxSize,mapNodeValue,name){switch(eviction){case'keep-all':return new TreeCache$2({name,mapNodeValue});case'lru':return Recoil_treeCacheLRU({name,maxSize:Recoil_nullthrows(maxSize),mapNodeValue});case'most-recent':return Recoil_treeCacheLRU({name,maxSize:1,mapNodeValue});}throw Recoil_err(`Unrecognized eviction policy ${eviction}`);}var Recoil_treeCacheFromPolicy=treeCacheFromPolicy;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * This is a stub for some integration into FB internal stuff + * + * + * @format + * @oncall recoil + */function startPerfBlock(_id){return ()=>null;}var Recoil_PerformanceTimings={startPerfBlock};const{isLoadable:isLoadable$1,loadableWithError:loadableWithError$1,loadableWithPromise:loadableWithPromise$1,loadableWithValue:loadableWithValue$2}=Recoil_Loadable$1;const{WrappedValue:WrappedValue$1}=Recoil_Wrapper$1;const{getNodeLoadable:getNodeLoadable$2,peekNodeLoadable:peekNodeLoadable$1,setNodeValue:setNodeValue$3}=Recoil_FunctionalCore;const{saveDepsToStore:saveDepsToStore$1}=Recoil_Graph;const{DEFAULT_VALUE:DEFAULT_VALUE$6,getConfigDeletionHandler:getConfigDeletionHandler$1,getNode:getNode$6,registerNode:registerNode$1}=Recoil_Node;const{isRecoilValue:isRecoilValue$3}=Recoil_RecoilValue$1;const{markRecoilValueModified:markRecoilValueModified$1}=Recoil_RecoilValueInterface;const{retainedByOptionWithDefault:retainedByOptionWithDefault$1}=Recoil_Retention;const{recoilCallback:recoilCallback$1}=Recoil_useRecoilCallback;const{startPerfBlock:startPerfBlock$1}=Recoil_PerformanceTimings;class Canceled{}const CANCELED=new Canceled();/** + * An ExecutionID is an arbitrary ID that lets us distinguish executions from + * each other. This is necessary as we need a way of solving this problem: + * "given 3 async executions, only update state for the 'latest' execution when + * it finishes running regardless of when the other 2 finish". ExecutionIDs + * provide a convenient way of identifying executions so that we can track and + * manage them over time. + */const dependencyStack=[];// for detecting circular dependencies. +const waitingStores=new Map();const getNewExecutionID=(()=>{let executionID=0;return ()=>executionID++;})();/* eslint-disable no-redeclare */function selector(options){let recoilValue=null;const{key,get,cachePolicy_UNSTABLE:cachePolicy}=options;const set=options.set!=null?options.set:undefined;// flow +const discoveredDependencyNodeKeys=new Set();const cache=Recoil_treeCacheFromPolicy(cachePolicy!==null&&cachePolicy!==void 0?cachePolicy:{equality:'reference',eviction:'keep-all'},key);const retainedBy=retainedByOptionWithDefault$1(options.retainedBy_UNSTABLE);const executionInfoMap=new Map();let liveStoresCount=0;function selectorIsLive(){return !Recoil_gkx('recoil_memory_managament_2020')||liveStoresCount>0;}function selectorInit(store){store.getState().knownSelectors.add(key);liveStoresCount++;return ()=>{liveStoresCount--;};}function selectorShouldDeleteConfigOnRelease(){return getConfigDeletionHandler$1(key)!==undefined&&!selectorIsLive();}function resolveAsync(store,state,executionID,loadable,depValues){setCache(state,loadable,depValues);notifyStoresOfResolvedAsync(store,executionID);}function notifyStoresOfResolvedAsync(store,executionID){if(isLatestExecution(store,executionID)){clearExecutionInfo(store);}notifyWaitingStores(executionID,true);}/** + * Notify stores to pull the selector again if a new async dep was discovered. + * 1) Async selector adds a new dep but doesn't resolve yet. + * Note that deps for an async selector are based on the state when the + * evaluation started, in order to provide a consistent picture of state. + * 2) But, new value of dep based on the current state might cause the selector + * to resolve or resolve differently. + * 3) Therefore, this notification will pull the selector based on the current + * state for the components + */function notifyStoresOfNewAsyncDep(store,executionID){if(isLatestExecution(store,executionID)){const executionInfo=Recoil_nullthrows(getExecutionInfo(store));executionInfo.stateVersions.clear();notifyWaitingStores(executionID,false);}}function notifyWaitingStores(executionID,clearWaitlist){const stores=waitingStores.get(executionID);if(stores!=null){for(const waitingStore of stores){markRecoilValueModified$1(waitingStore,Recoil_nullthrows(recoilValue));}if(clearWaitlist){waitingStores.delete(executionID);}}}function markStoreWaitingForResolvedAsync(store,executionID){let stores=waitingStores.get(executionID);if(stores==null){waitingStores.set(executionID,stores=new Set());}stores.add(store);}/** + * This function attaches a then() and a catch() to a promise that was + * returned from a selector's get() (either explicitly or implicitly by + * running a function that uses the "async" keyword). If a selector's get() + * returns a promise, we have two possibilities: + * + * 1. The promise will resolve, in which case it will have completely finished + * executing without any remaining pending dependencies. No more retries + * are needed and we can proceed with updating the cache and notifying + * subscribers (if it is the latest execution, otherwise only the cache + * will be updated and subscriptions will not be fired). This is the case + * handled by the attached then() handler. + * + * 2. The promise will throw because it either has an error or it came across + * an async dependency that has not yet resolved, in which case we will + * call wrapDepdencyPromise(), whose responsibility is to handle dependency + * promises. This case is handled by the attached catch() handler. + * + * Both branches will eventually resolve to the final result of the selector + * (or an error if a real error occurred). + * + * The execution will run to completion even if it is stale, and its value + * will be cached. But stale executions will not update global state or update + * executionInfo as that is the responsibility of the 'latest' execution. + * + * Note this function should not be passed a promise that was thrown--AKA a + * dependency promise. Dependency promises should be passed to + * wrapPendingDependencyPromise()). + */function wrapResultPromise(store,promise,state,depValues,executionID,loadingDepsState){return promise.then(value=>{if(!selectorIsLive()){// The selector was released since the request began; ignore the response. +clearExecutionInfo(store);throw CANCELED;}const loadable=loadableWithValue$2(value);resolveAsync(store,state,executionID,loadable,depValues);return value;}).catch(errorOrPromise=>{if(!selectorIsLive()){// The selector was released since the request began; ignore the response. +clearExecutionInfo(store);throw CANCELED;}if(Recoil_isPromise(errorOrPromise)){return wrapPendingDependencyPromise(store,errorOrPromise,state,depValues,executionID,loadingDepsState);}const loadable=loadableWithError$1(errorOrPromise);resolveAsync(store,state,executionID,loadable,depValues);throw errorOrPromise;});}/** + * This function attaches a then() and a catch() to a promise that was + * thrown from a selector's get(). If a selector's get() throws a promise, + * we have two possibilities: + * + * 1. The promise will resolve, meaning one of our selector's dependencies is + * now available and we should "retry" our get() by running it again. This + * is the case handled by the attached then() handler. + * + * 2. The promise will throw because something went wrong with the dependency + * promise (in other words a real error occurred). This case is handled by + * the attached catch() handler. If the dependency promise throws, it is + * _always_ a real error and not another dependency promise (any dependency + * promises would have been handled upstream). + * + * The then() branch will eventually resolve to the final result of the + * selector (or an error if a real error occurs), and the catch() will always + * resolve to an error because the dependency promise is a promise that was + * wrapped upstream, meaning it will only resolve to its real value or to a + * real error. + * + * The execution will run to completion even if it is stale, and its value + * will be cached. But stale executions will not update global state or update + * executionInfo as that is the responsibility of the 'latest' execution. + * + * Note this function should not be passed a promise that was returned from + * get(). The intention is that this function is only passed promises that + * were thrown due to a pending dependency. Promises returned by get() should + * be passed to wrapResultPromise() instead. + */function wrapPendingDependencyPromise(store,promise,state,existingDeps,executionID,loadingDepsState){return promise.then(resolvedDep=>{if(!selectorIsLive()){// The selector was released since the request began; ignore the response. +clearExecutionInfo(store);throw CANCELED;}// Check if we are handling a pending Recoil dependency or if the user +// threw their own Promise to "suspend" a selector evaluation. We need +// to check that the loadingDepPromise actually matches the promise that +// we caught in case the selector happened to catch the promise we threw +// for a pending Recoil dependency from `getRecoilValue()` and threw +// their own promise instead. +if(loadingDepsState.loadingDepKey!=null&&loadingDepsState.loadingDepPromise===promise){/** + * Note for async atoms, this means we are changing the atom's value + * in the store for the given version. This should be alright because + * the version of state is now stale and a new version will have + * already been triggered by the atom being resolved (see this logic + * in Recoil_atom.js) + */state.atomValues.set(loadingDepsState.loadingDepKey,loadableWithValue$2(resolvedDep));}else {/** + * If resolvedDepKey is not defined, the promise was a user-thrown + * promise. User-thrown promises are an advanced feature and they + * should be avoided in almost all cases. Using `loadable.map()` inside + * of selectors for loading loadables and then throwing that mapped + * loadable's promise is an example of a user-thrown promise. + * + * When we hit a user-thrown promise, we have to bail out of an optimization + * where we bypass calculating selector cache keys for selectors that + * have been previously seen for a given state (these selectors are saved in + * state.atomValues) to avoid stale state as we have no way of knowing + * what state changes happened (if any) in result to the promise resolving. + * + * Ideally we would only bail out selectors that are in the chain of + * dependencies for this selector, but there's currently no way to get + * a full list of a selector's downstream nodes because the state that + * is executing may be a discarded tree (so store.getGraph(state.version) + * will be empty), and the full dep tree may not be in the selector + * caches in the case where the selector's cache was cleared. To solve + * for this we would have to keep track of all running selector + * executions and their downstream deps. Because this only covers edge + * cases, that complexity might not be justifyable. + */store.getState().knownSelectors.forEach(nodeKey=>{state.atomValues.delete(nodeKey);});}/** + * Optimization: Now that the dependency has resolved, let's try hitting + * the cache in case the dep resolved to a value we have previously seen. + * + * TODO: + * Note this optimization is not perfect because it only prevents re-executions + * _after_ the point where an async dependency is found. Any code leading + * up to the async dependency may have run unnecessarily. The ideal case + * would be to wait for the async dependency to resolve first, check the + * cache, and prevent _any_ execution of the selector if the resulting + * value of the dependency leads to a path that is found in the cache. + * The ideal case is more difficult to implement as it would require that + * we capture and wait for the the async dependency right after checking + * the cache. The current approach takes advantage of the fact that running + * the selector already has a code path that lets us exit early when + * an async dep resolves. + */const cachedLoadable=getLoadableFromCacheAndUpdateDeps(store,state);if(cachedLoadable&&cachedLoadable.state!=='loading'){/** + * This has to notify stores of a resolved async, even if there is no + * current pending execution for the following case: + * 1) A component renders with this pending loadable. + * 2) The upstream dependency resolves. + * 3) While processing some other selector it reads this one, such as + * while traversing its dependencies. At this point it gets the + * new resolved value synchronously and clears the current + * execution ID. The component wasn't getting the value itself, + * though, so it still has the pending loadable. + * 4) When this code executes the current execution id was cleared + * and it wouldn't notify the component of the new value. + * + * I think this is only an issue with "early" rendering since the + * components got their value using the in-progress execution. + * We don't have a unit test for this case yet. I'm not sure it is + * necessary with recoil_transition_support mode. + */if(isLatestExecution(store,executionID)||getExecutionInfo(store)==null){notifyStoresOfResolvedAsync(store,executionID);}if(cachedLoadable.state==='hasValue'){return cachedLoadable.contents;}else {throw cachedLoadable.contents;}}/** + * If this execution is stale, let's check to see if there is some in + * progress execution with a matching state. If we find a match, then + * we can take the value from that in-progress execution. Note this may + * sound like an edge case, but may be very common in cases where a + * loading dependency resolves from loading to having a value (thus + * possibly triggering a re-render), and React re-renders before the + * chained .then() functions run, thus starting a new execution as the + * dep has changed value. Without this check we will run the selector + * twice (once in the new execution and once again in this .then(), so + * this check is necessary to keep unnecessary re-executions to a + * minimum). + * + * Also note this code does not check across all executions that may be + * running. It only optimizes for the _latest_ execution per store as + * we currently do not maintain a list of all currently running executions. + * This means in some cases we may run selectors more than strictly + * necessary when there are multiple executions running for the same + * selector. This may be a valid tradeoff as checking for dep changes + * across all in-progress executions may take longer than just + * re-running the selector. This will be app-dependent, and maybe in the + * future we can make the behavior configurable. An ideal fix may be + * to extend the tree cache to support caching loading states. + */if(!isLatestExecution(store,executionID)){const executionInfo=getInProgressExecutionInfo(store,state);if(executionInfo!=null){/** + * Returning promise here without wrapping as the wrapper logic was + * already done upstream when this promise was generated. + */return executionInfo.loadingLoadable.contents;}}// Retry the selector evaluation now that the dependency has resolved +const[loadable,depValues]=evaluateSelectorGetter(store,state,executionID);if(loadable.state!=='loading'){resolveAsync(store,state,executionID,loadable,depValues);}if(loadable.state==='hasError'){throw loadable.contents;}return loadable.contents;}).catch(error=>{// The selector was released since the request began; ignore the response. +if(error instanceof Canceled){throw CANCELED;}if(!selectorIsLive()){clearExecutionInfo(store);throw CANCELED;}const loadable=loadableWithError$1(error);resolveAsync(store,state,executionID,loadable,existingDeps);throw error;});}function updateDeps(store,state,deps,executionID){var _store$getState,_store$getState$curre,_store$getState2,_store$getState2$next;if(isLatestExecution(store,executionID)||state.version===((_store$getState=store.getState())===null||_store$getState===void 0?void 0:(_store$getState$curre=_store$getState.currentTree)===null||_store$getState$curre===void 0?void 0:_store$getState$curre.version)||state.version===((_store$getState2=store.getState())===null||_store$getState2===void 0?void 0:(_store$getState2$next=_store$getState2.nextTree)===null||_store$getState2$next===void 0?void 0:_store$getState2$next.version)){var _store$getState$nextT,_store$getState3,_store$getState3$next;saveDepsToStore$1(key,deps,store,(_store$getState$nextT=(_store$getState3=store.getState())===null||_store$getState3===void 0?void 0:(_store$getState3$next=_store$getState3.nextTree)===null||_store$getState3$next===void 0?void 0:_store$getState3$next.version)!==null&&_store$getState$nextT!==void 0?_store$getState$nextT:store.getState().currentTree.version);}for(const nodeKey of deps){discoveredDependencyNodeKeys.add(nodeKey);}}function evaluateSelectorGetter(store,state,executionID){const endPerfBlock=startPerfBlock$1(key);// TODO T63965866: use execution ID here +let duringSynchronousExecution=true;let duringAsynchronousExecution=true;const finishEvaluation=()=>{endPerfBlock();duringAsynchronousExecution=false;};let result;let resultIsError=false;let loadable;const loadingDepsState={loadingDepKey:null,loadingDepPromise:null};/** + * Starting a fresh set of deps that we'll be using to update state. We're + * starting a new set versus adding it in existing state deps because + * the version of state that we update deps for may be a more recent version + * than the version the selector was called with. This is because the latest + * execution will update the deps of the current/latest version of state + * (This is safe to do because the fact that the selector is the latest + * execution means the deps we discover below are our best guess at the + * deps for the current/latest state in the store) + */const depValues=new Map();function getRecoilValue({key:depKey}){const depLoadable=getNodeLoadable$2(store,state,depKey);depValues.set(depKey,depLoadable);// We need to update asynchronous dependencies as we go so the selector +// knows if it has to restart evaluation if one of them is updated before +// the asynchronous selector completely resolves. +if(!duringSynchronousExecution){updateDeps(store,state,new Set(depValues.keys()),executionID);notifyStoresOfNewAsyncDep(store,executionID);}switch(depLoadable.state){case'hasValue':return depLoadable.contents;case'hasError':throw depLoadable.contents;case'loading':loadingDepsState.loadingDepKey=depKey;loadingDepsState.loadingDepPromise=depLoadable.contents;throw depLoadable.contents;}throw Recoil_err('Invalid Loadable state');}const getCallback=fn=>{return (...args)=>{if(duringAsynchronousExecution){throw Recoil_err('Callbacks from getCallback() should only be called asynchronously after the selector is evalutated. It can be used for selectors to return objects with callbacks that can work with Recoil state without a subscription.');}!(recoilValue!=null)?Recoil_invariant(false):void 0;return recoilCallback$1(store,fn,args,{node:recoilValue}// flowlint-line unclear-type:off +);};};try{result=get({get:getRecoilValue,getCallback});result=isRecoilValue$3(result)?getRecoilValue(result):result;if(isLoadable$1(result)){if(result.state==='hasError'){resultIsError=true;}result=result.contents;}if(Recoil_isPromise(result)){result=wrapResultPromise(store,result,state,depValues,executionID,loadingDepsState).finally(finishEvaluation);}else {finishEvaluation();}result=result instanceof WrappedValue$1?result.value:result;}catch(errorOrDepPromise){result=errorOrDepPromise;if(Recoil_isPromise(result)){result=wrapPendingDependencyPromise(store,result,state,depValues,executionID,loadingDepsState).finally(finishEvaluation);}else {resultIsError=true;finishEvaluation();}}if(resultIsError){loadable=loadableWithError$1(result);}else if(Recoil_isPromise(result)){loadable=loadableWithPromise$1(result);}else {loadable=loadableWithValue$2(result);}duringSynchronousExecution=false;updateExecutionInfoDepValues(store,executionID,depValues);updateDeps(store,state,new Set(depValues.keys()),executionID);return [loadable,depValues];}function getLoadableFromCacheAndUpdateDeps(store,state){// First, look up in the state cache +// If it's here, then the deps in the store should already be valid. +let cachedLoadable=state.atomValues.get(key);if(cachedLoadable!=null){return cachedLoadable;}// Second, look up in the selector cache and update the deps in the store +const depsAfterCacheLookup=new Set();try{cachedLoadable=cache.get(nodeKey=>{!(typeof nodeKey==='string')?"production"!=="production"?Recoil_invariant(false,'Cache nodeKey is type string'):Recoil_invariant(false):void 0;return getNodeLoadable$2(store,state,nodeKey).contents;},{onNodeVisit:node=>{if(node.type==='branch'&&node.nodeKey!==key){depsAfterCacheLookup.add(node.nodeKey);}}});}catch(error){throw Recoil_err(`Problem with cache lookup for selector "${key}": ${error.message}`);}if(cachedLoadable){var _getExecutionInfo;// Cache the results in the state to allow for cheaper lookup than +// iterating the tree cache of dependencies. +state.atomValues.set(key,cachedLoadable);/** + * Ensure store contains correct dependencies if we hit the cache so that + * the store deps and cache are in sync for a given state. This is important + * because store deps are normally updated when new executions are created, + * but cache hits don't trigger new executions but they still _may_ signify + * a change in deps in the store if the store deps for this state are empty + * or stale. + */updateDeps(store,state,depsAfterCacheLookup,(_getExecutionInfo=getExecutionInfo(store))===null||_getExecutionInfo===void 0?void 0:_getExecutionInfo.executionID);}return cachedLoadable;}/** + * Given a tree state, this function returns a Loadable of the current state. + * + * The selector's get() function will only be re-evaluated if _both_ of the + * following statements are true: + * + * 1. The current dep values from the given state produced a cache key that + * was not found in the cache. + * 2. There is no currently running async execution OR there is an + * async execution that is running, but after comparing the dep values in + * the given state with the dep values that the execution has discovered so + * far we find that at least one dep value has changed, in which case we + * start a new execution (the previously running execution will continue to + * run to completion, but only the new execution will be deemed the + * 'latest' execution, meaning it will be the only execution that will + * update global state when it is finished. Any non-latest executions will + * run to completion and update the selector cache but not global state). + */function getSelectorLoadableAndUpdateDeps(store,state){// First, see if our current state is cached +const cachedVal=getLoadableFromCacheAndUpdateDeps(store,state);if(cachedVal!=null){clearExecutionInfo(store);return cachedVal;}// Second, check if there is already an ongoing execution based on the current state +const inProgressExecutionInfo=getInProgressExecutionInfo(store,state);if(inProgressExecutionInfo!=null){var _inProgressExecutionI;if(((_inProgressExecutionI=inProgressExecutionInfo.loadingLoadable)===null||_inProgressExecutionI===void 0?void 0:_inProgressExecutionI.state)==='loading'){markStoreWaitingForResolvedAsync(store,inProgressExecutionInfo.executionID);}// FIXME: check after the fact to see if we made the right choice by waiting +return inProgressExecutionInfo.loadingLoadable;}// Third, start a new evaluation of the selector +const newExecutionID=getNewExecutionID();const[loadable,newDepValues]=evaluateSelectorGetter(store,state,newExecutionID);/** + * Conditionally updates the cache with a given loadable. + * + * We only cache loadables that are not loading because our cache keys are + * based on dep values, which are in an unfinished state for loadables that + * have a 'loading' state (new deps may be discovered while the selector + * runs its async code). We never want to cache partial dependencies b/c it + * could lead to errors, such as prematurely returning the result based on a + * partial list of deps-- we need the full list of deps to ensure that we + * are returning the correct result from cache. + */if(loadable.state==='loading'){setExecutionInfo(store,newExecutionID,loadable,newDepValues,state);markStoreWaitingForResolvedAsync(store,newExecutionID);}else {clearExecutionInfo(store);setCache(state,loadable,newDepValues);}return loadable;}/** + * Searches execution info across all stores to see if there is an in-progress + * execution whose dependency values match the values of the requesting store. + */function getInProgressExecutionInfo(store,state){// Sort the pending executions so that our current store is checked first. +const pendingExecutions=Recoil_concatIterables([executionInfoMap.has(store)?[Recoil_nullthrows(executionInfoMap.get(store))]:[],Recoil_mapIterable(Recoil_filterIterable(executionInfoMap,([s])=>s!==store),([,execInfo])=>execInfo)]);function anyDepChanged(execDepValues){for(const[depKey,execLoadable]of execDepValues){if(!getNodeLoadable$2(store,state,depKey).is(execLoadable)){return true;}}return false;}for(const execInfo of pendingExecutions){if(// If this execution was already checked to be valid with this version +// of state, then let's use it! +execInfo.stateVersions.get(state.version)||// If the deps for the execution match our current state, then it's valid +!anyDepChanged(execInfo.depValuesDiscoveredSoFarDuringAsyncWork)){execInfo.stateVersions.set(state.version,true);return execInfo;}else {execInfo.stateVersions.set(state.version,false);}}return undefined;}function getExecutionInfo(store){return executionInfoMap.get(store);}/** + * This function will update the selector's execution info when the selector + * has either finished running an execution or has started a new execution. If + * the given loadable is in a 'loading' state, the intention is that a new + * execution has started. Otherwise, the intention is that an execution has + * just finished. + */function setExecutionInfo(store,newExecutionID,loadable,depValues,state){executionInfoMap.set(store,{depValuesDiscoveredSoFarDuringAsyncWork:depValues,executionID:newExecutionID,loadingLoadable:loadable,stateVersions:new Map([[state.version,true]])});}function updateExecutionInfoDepValues(store,executionID,depValues){// We only need to bother updating the deps for the latest execution because +// that's all getInProgressExecutionInfo() will be looking for. +if(isLatestExecution(store,executionID)){const executionInfo=getExecutionInfo(store);if(executionInfo!=null){executionInfo.depValuesDiscoveredSoFarDuringAsyncWork=depValues;}}}function clearExecutionInfo(store){executionInfoMap.delete(store);}function isLatestExecution(store,executionID){var _getExecutionInfo2;return executionID===((_getExecutionInfo2=getExecutionInfo(store))===null||_getExecutionInfo2===void 0?void 0:_getExecutionInfo2.executionID);}/** + * FIXME: dep keys should take into account the state of the loadable to + * prevent the edge case where a loadable with an error and a loadable with + * an error as a value are treated as the same thing incorrectly. For example + * these two should be treated differently: + * + * selector({key: '', get: () => new Error('hi')}); + * selector({key: '', get () => {throw new Error('hi')}}); + * + * With current implementation they are treated the same + */function depValuesToDepRoute(depValues){return Array.from(depValues.entries()).map(([depKey,valLoadable])=>[depKey,valLoadable.contents]);}function setCache(state,loadable,depValues){state.atomValues.set(key,loadable);try{cache.set(depValuesToDepRoute(depValues),loadable);}catch(error){throw Recoil_err(`Problem with setting cache for selector "${key}": ${error.message}`);}}function detectCircularDependencies(fn){if(dependencyStack.includes(key)){const message=`Recoil selector has circular dependencies: ${dependencyStack.slice(dependencyStack.indexOf(key)).join(' \u2192 ')}`;return loadableWithError$1(Recoil_err(message));}dependencyStack.push(key);try{return fn();}finally{dependencyStack.pop();}}function selectorPeek(store,state){const cachedLoadable=state.atomValues.get(key);if(cachedLoadable!=null){return cachedLoadable;}return cache.get(nodeKey=>{var _peekNodeLoadable;!(typeof nodeKey==='string')?Recoil_invariant(false):void 0;return (_peekNodeLoadable=peekNodeLoadable$1(store,state,nodeKey))===null||_peekNodeLoadable===void 0?void 0:_peekNodeLoadable.contents;});}function selectorGet(store,state){return detectCircularDependencies(()=>getSelectorLoadableAndUpdateDeps(store,state));}function invalidateSelector(state){state.atomValues.delete(key);}function clearSelectorCache(store,treeState){!(recoilValue!=null)?Recoil_invariant(false):void 0;for(const nodeKey of discoveredDependencyNodeKeys){var _node$clearCache;const node=getNode$6(nodeKey);(_node$clearCache=node.clearCache)===null||_node$clearCache===void 0?void 0:_node$clearCache.call(node,store,treeState);}discoveredDependencyNodeKeys.clear();invalidateSelector(treeState);cache.clear();markRecoilValueModified$1(store,recoilValue);}if(set!=null){/** + * ES5 strict mode prohibits defining non-top-level function declarations, + * so don't use function declaration syntax here + */const selectorSet=(store,state,newValue)=>{let syncSelectorSetFinished=false;const writes=new Map();function getRecoilValue({key:depKey}){if(syncSelectorSetFinished){throw Recoil_err('Recoil: Async selector sets are not currently supported.');}const loadable=getNodeLoadable$2(store,state,depKey);if(loadable.state==='hasValue'){return loadable.contents;}else if(loadable.state==='loading'){const msg=`Getting value of asynchronous atom or selector "${depKey}" in a pending state while setting selector "${key}" is not yet supported.`;throw Recoil_err(msg);}else {throw loadable.contents;}}function setRecoilState(recoilState,valueOrUpdater// $FlowFixMe[missing-local-annot] +){if(syncSelectorSetFinished){const msg='Recoil: Async selector sets are not currently supported.';throw Recoil_err(msg);}const setValue=typeof valueOrUpdater==='function'?// cast to any because we can't restrict type S from being a function itself without losing support for opaque types +// flowlint-next-line unclear-type:off +valueOrUpdater(getRecoilValue(recoilState)):valueOrUpdater;const upstreamWrites=setNodeValue$3(store,state,recoilState.key,setValue);upstreamWrites.forEach((v,k)=>writes.set(k,v));}function resetRecoilState(recoilState){setRecoilState(recoilState,DEFAULT_VALUE$6);}const ret=set({set:setRecoilState,get:getRecoilValue,reset:resetRecoilState},newValue);// set should be a void method, but if the user makes it `async`, then it +// will return a Promise, which we don't currently support. +if(ret!==undefined){throw Recoil_isPromise(ret)?Recoil_err('Recoil: Async selector sets are not currently supported.'):Recoil_err('Recoil: selector set should be a void function.');}syncSelectorSetFinished=true;return writes;};return recoilValue=registerNode$1({key,nodeType:'selector',peek:selectorPeek,get:selectorGet,set:selectorSet,init:selectorInit,invalidate:invalidateSelector,clearCache:clearSelectorCache,shouldDeleteConfigOnRelease:selectorShouldDeleteConfigOnRelease,dangerouslyAllowMutability:options.dangerouslyAllowMutability,shouldRestoreFromSnapshots:false,retainedBy});}else {return recoilValue=registerNode$1({key,nodeType:'selector',peek:selectorPeek,get:selectorGet,init:selectorInit,invalidate:invalidateSelector,clearCache:clearSelectorCache,shouldDeleteConfigOnRelease:selectorShouldDeleteConfigOnRelease,dangerouslyAllowMutability:options.dangerouslyAllowMutability,shouldRestoreFromSnapshots:false,retainedBy});}}/* eslint-enable no-redeclare */ // $FlowIssue[incompatible-use] +// $FlowFixMe[missing-local-annot] +selector.value=value=>new WrappedValue$1(value);var Recoil_selector=selector;// @fb-only: import type {ScopeRules} from 'Recoil_ScopedAtom'; +// @fb-only: const {scopedAtom} = require('Recoil_ScopedAtom'); +const{isLoadable:isLoadable$2,loadableWithError:loadableWithError$2,loadableWithPromise:loadableWithPromise$2,loadableWithValue:loadableWithValue$3}=Recoil_Loadable$1;const{WrappedValue:WrappedValue$2}=Recoil_Wrapper$1;const{peekNodeInfo:peekNodeInfo$3}=Recoil_FunctionalCore;const{DEFAULT_VALUE:DEFAULT_VALUE$7,DefaultValue:DefaultValue$2,getConfigDeletionHandler:getConfigDeletionHandler$2,registerNode:registerNode$2,setConfigDeletionHandler:setConfigDeletionHandler$1}=Recoil_Node;const{isRecoilValue:isRecoilValue$4}=Recoil_RecoilValue$1;const{getRecoilValueAsLoadable:getRecoilValueAsLoadable$4,markRecoilValueModified:markRecoilValueModified$2,setRecoilValue:setRecoilValue$4,setRecoilValueLoadable:setRecoilValueLoadable$2}=Recoil_RecoilValueInterface;const{retainedByOptionWithDefault:retainedByOptionWithDefault$2}=Recoil_Retention;const unwrap=x=>x instanceof WrappedValue$2?x.value:x;function baseAtom(options){const{key,persistence_UNSTABLE:persistence}=options;const retainedBy=retainedByOptionWithDefault$2(options.retainedBy_UNSTABLE);let liveStoresCount=0;function unwrapPromise(promise){return loadableWithPromise$2(promise.then(value=>{defaultLoadable=loadableWithValue$3(value);return value;}).catch(error=>{defaultLoadable=loadableWithError$2(error);throw error;}));}let defaultLoadable=Recoil_isPromise(options.default)?unwrapPromise(options.default):isLoadable$2(options.default)?options.default.state==='loading'?unwrapPromise(options.default.contents):options.default:// $FlowFixMe[incompatible-call] +loadableWithValue$3(unwrap(options.default));maybeFreezeValueOrPromise(defaultLoadable.contents);let cachedAnswerForUnvalidatedValue=undefined;// Cleanup handlers for this atom +// Rely on stable reference equality of the store to use it as a key per +const cleanupEffectsByStore=new Map();function maybeFreezeValueOrPromise(valueOrPromise){return valueOrPromise;}function wrapPendingPromise(store,promise){const wrappedPromise=promise.then(value=>{var _store$getState$nextT,_state$atomValues$get;const state=(_store$getState$nextT=store.getState().nextTree)!==null&&_store$getState$nextT!==void 0?_store$getState$nextT:store.getState().currentTree;if(((_state$atomValues$get=state.atomValues.get(key))===null||_state$atomValues$get===void 0?void 0:_state$atomValues$get.contents)===wrappedPromise){setRecoilValue$4(store,node,value);}return value;}).catch(error=>{var _store$getState$nextT2,_state$atomValues$get2;const state=(_store$getState$nextT2=store.getState().nextTree)!==null&&_store$getState$nextT2!==void 0?_store$getState$nextT2:store.getState().currentTree;if(((_state$atomValues$get2=state.atomValues.get(key))===null||_state$atomValues$get2===void 0?void 0:_state$atomValues$get2.contents)===wrappedPromise){setRecoilValueLoadable$2(store,node,loadableWithError$2(error));}throw error;});return wrappedPromise;}function initAtom(store,initState,trigger){var _options$effects;liveStoresCount++;const cleanupAtom=()=>{var _cleanupEffectsByStor;liveStoresCount--;(_cleanupEffectsByStor=cleanupEffectsByStore.get(store))===null||_cleanupEffectsByStor===void 0?void 0:_cleanupEffectsByStor.forEach(cleanup=>cleanup());cleanupEffectsByStore.delete(store);};store.getState().knownAtoms.add(key);// Setup async defaults to notify subscribers when they resolve +if(defaultLoadable.state==='loading'){const notifyDefaultSubscribers=()=>{var _store$getState$nextT3;const state=(_store$getState$nextT3=store.getState().nextTree)!==null&&_store$getState$nextT3!==void 0?_store$getState$nextT3:store.getState().currentTree;if(!state.atomValues.has(key)){markRecoilValueModified$2(store,node);}};defaultLoadable.contents.finally(notifyDefaultSubscribers);}/////////////////// +// Run Atom Effects +/////////////////// +const effects=(_options$effects=options.effects)!==null&&_options$effects!==void 0?_options$effects:options.effects_UNSTABLE;if(effects!=null){// This state is scoped by Store, since this is in the initAtom() closure +let initValue=DEFAULT_VALUE$7;let isDuringInit=true;let isInitError=false;let pendingSetSelf=null;function getLoadable(recoilValue){// Normally we can just get the current value of another atom. +// But for our own value we need to check if there is a pending +// initialized value or get the fallback default value. +if(isDuringInit&&recoilValue.key===key){// Cast T to S +const retValue=initValue;// flowlint-line unclear-type:off +return retValue instanceof DefaultValue$2?peekAtom(store,initState)// flowlint-line unclear-type:off +:Recoil_isPromise(retValue)?loadableWithPromise$2(retValue.then(v=>v instanceof DefaultValue$2?// Cast T to S +defaultLoadable.toPromise()// flowlint-line unclear-type:off +:v)):// $FlowFixMe[incompatible-call] +loadableWithValue$3(retValue);}return getRecoilValueAsLoadable$4(store,recoilValue);}function getPromise(recoilValue){return getLoadable(recoilValue).toPromise();}function getInfo_UNSTABLE(recoilValue){var _store$getState$nextT4;const info=peekNodeInfo$3(store,(_store$getState$nextT4=store.getState().nextTree)!==null&&_store$getState$nextT4!==void 0?_store$getState$nextT4:store.getState().currentTree,recoilValue.key);return isDuringInit&&recoilValue.key===key&&!(initValue instanceof DefaultValue$2)?{...info,isSet:true,loadable:getLoadable(recoilValue)}:info;}const setSelf=effect=>valueOrUpdater=>{if(isDuringInit){const currentLoadable=getLoadable(node);const currentValue=currentLoadable.state==='hasValue'?currentLoadable.contents:DEFAULT_VALUE$7;initValue=typeof valueOrUpdater==='function'?// cast to any because we can't restrict T from being a function without losing support for opaque types +valueOrUpdater(currentValue)// flowlint-line unclear-type:off +:valueOrUpdater;if(Recoil_isPromise(initValue)){initValue=initValue.then(value=>{// Avoid calling onSet() when setSelf() initializes with a Promise +pendingSetSelf={effect,value};return value;});}}else {if(Recoil_isPromise(valueOrUpdater)){throw Recoil_err('Setting atoms to async values is not implemented.');}if(typeof valueOrUpdater!=='function'){pendingSetSelf={effect,value:unwrap(valueOrUpdater)};}setRecoilValue$4(store,node,typeof valueOrUpdater==='function'?currentValue=>{const newValue=unwrap(// cast to any because we can't restrict T from being a function without losing support for opaque types +valueOrUpdater(currentValue)// flowlint-line unclear-type:off +);// $FlowFixMe[incompatible-type] +pendingSetSelf={effect,value:newValue};return newValue;}:unwrap(valueOrUpdater));}};const resetSelf=effect=>()=>setSelf(effect)(DEFAULT_VALUE$7);const onSet=effect=>handler=>{var _cleanupEffectsByStor2;const{release}=store.subscribeToTransactions(currentStore=>{var _currentTree$atomValu;// eslint-disable-next-line prefer-const +let{currentTree,previousTree}=currentStore.getState();if(!previousTree){previousTree=currentTree;// attempt to trundle on +}const newLoadable=(_currentTree$atomValu=currentTree.atomValues.get(key))!==null&&_currentTree$atomValu!==void 0?_currentTree$atomValu:defaultLoadable;if(newLoadable.state==='hasValue'){var _previousTree$atomVal,_pendingSetSelf,_pendingSetSelf2,_pendingSetSelf3;const newValue=newLoadable.contents;const oldLoadable=(_previousTree$atomVal=previousTree.atomValues.get(key))!==null&&_previousTree$atomVal!==void 0?_previousTree$atomVal:defaultLoadable;const oldValue=oldLoadable.state==='hasValue'?oldLoadable.contents:DEFAULT_VALUE$7;// TODO This isn't actually valid, use as a placeholder for now. +// Ignore atom value changes that were set via setSelf() in the same effect. +// We will still properly call the handler if there was a subsequent +// set from something other than an atom effect which was batched +// with the `setSelf()` call. However, we may incorrectly ignore +// the handler if the subsequent batched call happens to set the +// atom to the exact same value as the `setSelf()`. But, in that +// case, it was kind of a noop, so the semantics are debatable.. +if(((_pendingSetSelf=pendingSetSelf)===null||_pendingSetSelf===void 0?void 0:_pendingSetSelf.effect)!==effect||((_pendingSetSelf2=pendingSetSelf)===null||_pendingSetSelf2===void 0?void 0:_pendingSetSelf2.value)!==newValue){handler(newValue,oldValue,!currentTree.atomValues.has(key));}else if(((_pendingSetSelf3=pendingSetSelf)===null||_pendingSetSelf3===void 0?void 0:_pendingSetSelf3.effect)===effect){pendingSetSelf=null;}}},key);cleanupEffectsByStore.set(store,[...((_cleanupEffectsByStor2=cleanupEffectsByStore.get(store))!==null&&_cleanupEffectsByStor2!==void 0?_cleanupEffectsByStor2:[]),release]);};for(const effect of effects){try{const cleanup=effect({node,storeID:store.storeID,parentStoreID_UNSTABLE:store.parentStoreID,trigger,setSelf:setSelf(effect),resetSelf:resetSelf(effect),onSet:onSet(effect),getPromise,getLoadable,getInfo_UNSTABLE});if(cleanup!=null){var _cleanupEffectsByStor3;cleanupEffectsByStore.set(store,[...((_cleanupEffectsByStor3=cleanupEffectsByStore.get(store))!==null&&_cleanupEffectsByStor3!==void 0?_cleanupEffectsByStor3:[]),cleanup]);}}catch(error){initValue=error;isInitError=true;}}isDuringInit=false;// Mutate initial state in place since we know there are no other subscribers +// since we are the ones initializing on first use. +if(!(initValue instanceof DefaultValue$2)){var _store$getState$nextT5;const initLoadable=isInitError?loadableWithError$2(initValue):Recoil_isPromise(initValue)?loadableWithPromise$2(wrapPendingPromise(store,initValue)):loadableWithValue$3(unwrap(initValue));maybeFreezeValueOrPromise(initLoadable.contents);initState.atomValues.set(key,initLoadable);// If there is a pending transaction, then also mutate the next state tree. +// This could happen if the atom was first initialized in an action that +// also updated some other atom's state. +(_store$getState$nextT5=store.getState().nextTree)===null||_store$getState$nextT5===void 0?void 0:_store$getState$nextT5.atomValues.set(key,initLoadable);}}return cleanupAtom;}function peekAtom(_store,state){var _ref,_state$atomValues$get3;return (_ref=(_state$atomValues$get3=state.atomValues.get(key))!==null&&_state$atomValues$get3!==void 0?_state$atomValues$get3:cachedAnswerForUnvalidatedValue)!==null&&_ref!==void 0?_ref:defaultLoadable;}function getAtom(_store,state){if(state.atomValues.has(key)){// Atom value is stored in state: +return Recoil_nullthrows(state.atomValues.get(key));}else if(state.nonvalidatedAtoms.has(key)){// Atom value is stored but needs validation before use. +// We might have already validated it and have a cached validated value: +if(cachedAnswerForUnvalidatedValue!=null){return cachedAnswerForUnvalidatedValue;}if(persistence==null){return defaultLoadable;}const nonvalidatedValue=state.nonvalidatedAtoms.get(key);const validatorResult=persistence.validator(nonvalidatedValue,DEFAULT_VALUE$7);const validatedValueLoadable=validatorResult instanceof DefaultValue$2?defaultLoadable:loadableWithValue$3(validatorResult);cachedAnswerForUnvalidatedValue=validatedValueLoadable;return cachedAnswerForUnvalidatedValue;}else {return defaultLoadable;}}function invalidateAtom(){cachedAnswerForUnvalidatedValue=undefined;}function setAtom(_store,state,newValue){// Bail out if we're being set to the existing value, or if we're being +// reset but have no stored value (validated or unvalidated) to reset from: +if(state.atomValues.has(key)){const existing=Recoil_nullthrows(state.atomValues.get(key));if(existing.state==='hasValue'&&newValue===existing.contents){return new Map();}}else if(!state.nonvalidatedAtoms.has(key)&&newValue instanceof DefaultValue$2){return new Map();}cachedAnswerForUnvalidatedValue=undefined;// can be released now if it was previously in use +return new Map().set(key,loadableWithValue$3(newValue));}function shouldDeleteConfigOnReleaseAtom(){return getConfigDeletionHandler$2(key)!==undefined&&liveStoresCount<=0;}const node=registerNode$2({key,nodeType:'atom',peek:peekAtom,get:getAtom,set:setAtom,init:initAtom,invalidate:invalidateAtom,shouldDeleteConfigOnRelease:shouldDeleteConfigOnReleaseAtom,dangerouslyAllowMutability:options.dangerouslyAllowMutability,persistence_UNSTABLE:options.persistence_UNSTABLE?{type:options.persistence_UNSTABLE.type,backButton:options.persistence_UNSTABLE.backButton}:undefined,shouldRestoreFromSnapshots:true,retainedBy});return node;}// prettier-ignore +function atom(options){const{// @fb-only: scopeRules_APPEND_ONLY_READ_THE_DOCS, +...restOptions}=options;const optionsDefault='default'in options?// $FlowIssue[incompatible-type] No way to refine in Flow that property is not defined +options.default:new Promise(()=>{});if(isRecoilValue$4(optionsDefault)// Continue to use atomWithFallback for promise defaults for scoped atoms +// for now, since scoped atoms don't support async defaults +// @fb-only: || (isPromise(optionsDefault) && scopeRules_APPEND_ONLY_READ_THE_DOCS) +// @fb-only: || (isLoadable(optionsDefault) && scopeRules_APPEND_ONLY_READ_THE_DOCS) +){return atomWithFallback({...restOptions,default:optionsDefault// @fb-only: scopeRules_APPEND_ONLY_READ_THE_DOCS, +});// @fb-only: } else if (scopeRules_APPEND_ONLY_READ_THE_DOCS +// @fb-only: && !isPromise(optionsDefault) +// @fb-only: && !isLoadable(optionsDefault) +// @fb-only: ) { +// @fb-only: return scopedAtom({ +// @fb-only: ...restOptions, +// @fb-only: default: unwrap(optionsDefault), +// @fb-only: scopeRules_APPEND_ONLY_READ_THE_DOCS, +// @fb-only: }); +}else {return baseAtom({...restOptions,default:optionsDefault});}}function atomWithFallback(options){const base=atom({...options,default:DEFAULT_VALUE$7,persistence_UNSTABLE:options.persistence_UNSTABLE===undefined?undefined:{...options.persistence_UNSTABLE,validator:storedValue=>storedValue instanceof DefaultValue$2?storedValue:Recoil_nullthrows(options.persistence_UNSTABLE).validator(storedValue,DEFAULT_VALUE$7)},// TODO Hack for now. +effects:options.effects,// flowlint-line unclear-type: off +effects_UNSTABLE:options.effects_UNSTABLE// flowlint-line unclear-type: off +});// $FlowFixMe[incompatible-call] +const sel=Recoil_selector({key:`${options.key}__withFallback`,get:({get})=>{const baseValue=get(base);return baseValue instanceof DefaultValue$2?options.default:baseValue;},// $FlowFixMe[incompatible-call] +set:({set},newValue)=>set(base,newValue),// This selector does not need to cache as it is a wrapper selector +// and the selector within the wrapper selector will have a cache +// option by default +cachePolicy_UNSTABLE:{eviction:'most-recent'},dangerouslyAllowMutability:options.dangerouslyAllowMutability});setConfigDeletionHandler$1(sel.key,getConfigDeletionHandler$2(options.key));return sel;}// $FlowFixMe[missing-local-annot] +atom.value=value=>new WrappedValue$2(value);var Recoil_atom=atom;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * + * @format + * @oncall recoil + */class MapCache{constructor(options){var _options$mapKey;_defineProperty(this,"_map",void 0);_defineProperty(this,"_keyMapper",void 0);this._map=new Map();this._keyMapper=(_options$mapKey=options===null||options===void 0?void 0:options.mapKey)!==null&&_options$mapKey!==void 0?_options$mapKey:v=>v;}size(){return this._map.size;}has(key){return this._map.has(this._keyMapper(key));}get(key){return this._map.get(this._keyMapper(key));}set(key,val){this._map.set(this._keyMapper(key),val);}delete(key){this._map.delete(this._keyMapper(key));}clear(){this._map.clear();}}var Recoil_MapCache={MapCache};var Recoil_MapCache_1=Recoil_MapCache.MapCache;var Recoil_MapCache$1=/*#__PURE__*/Object.freeze({__proto__:null,MapCache:Recoil_MapCache_1});const{LRUCache:LRUCache$2}=Recoil_LRUCache$1;const{MapCache:MapCache$1}=Recoil_MapCache$1;const defaultPolicy$1={equality:'reference',eviction:'none',maxSize:Infinity};function cacheFromPolicy({equality=defaultPolicy$1.equality,eviction=defaultPolicy$1.eviction,maxSize=defaultPolicy$1.maxSize}=defaultPolicy$1){const valueMapper=getValueMapper$1(equality);const cache=getCache(eviction,maxSize,valueMapper);return cache;}function getValueMapper$1(equality){switch(equality){case'reference':return val=>val;case'value':return val=>Recoil_stableStringify(val);}throw Recoil_err(`Unrecognized equality policy ${equality}`);}function getCache(eviction,maxSize,mapKey){switch(eviction){case'keep-all':return new MapCache$1({mapKey});case'lru':return new LRUCache$2({mapKey,maxSize:Recoil_nullthrows(maxSize)});case'most-recent':return new LRUCache$2({mapKey,maxSize:1});}throw Recoil_err(`Unrecognized eviction policy ${eviction}`);}var Recoil_cacheFromPolicy=cacheFromPolicy;// @fb-only: import type {ScopeRules} from 'Recoil_ScopedAtom'; +const{setConfigDeletionHandler:setConfigDeletionHandler$2}=Recoil_Node;// Process scopeRules to handle any entries which are functions taking parameters +// prettier-ignore +// @fb-only: function mapScopeRules

( +// @fb-only: scopeRules?: ParameterizedScopeRules

, +// @fb-only: param: P, +// @fb-only: ): ScopeRules | void { +// @fb-only: return scopeRules?.map(rule => +// @fb-only: Array.isArray(rule) +// @fb-only: ? rule.map(entry => (typeof entry === 'function' ? entry(param) : entry)) +// @fb-only: : rule, +// @fb-only: ); +// @fb-only: } +/* +A function which returns an atom based on the input parameter. + +Each unique parameter returns a unique atom. E.g., + + const f = atomFamily(...); + f({a: 1}) => an atom + f({a: 2}) => a different atom + +This allows components to persist local, private state using atoms. Each +instance of the component may have a different key, which it uses as the +parameter for a family of atoms; in this way, each component will have +its own atom not shared by other instances. These state keys may be composed +into children's state keys as well. +*/function atomFamily(options){var _options$cachePolicyF,_options$cachePolicyF2;const atomCache=Recoil_cacheFromPolicy({equality:(_options$cachePolicyF=(_options$cachePolicyF2=options.cachePolicyForParams_UNSTABLE)===null||_options$cachePolicyF2===void 0?void 0:_options$cachePolicyF2.equality)!==null&&_options$cachePolicyF!==void 0?_options$cachePolicyF:'value',eviction:'keep-all'});// Simple atomFamily implementation to cache individual atoms based +// on the parameter value equality. +return params=>{var _stableStringify,_options$effects;const cachedAtom=atomCache.get(params);if(cachedAtom!=null){return cachedAtom;}const{cachePolicyForParams_UNSTABLE,...atomOptions}=options;const optionsDefault='default'in options?// $FlowIssue[incompatible-type] No way to refine in Flow that property is not defined +options.default:new Promise(()=>{});const newAtom=Recoil_atom({...atomOptions,key:`${options.key}__${(_stableStringify=Recoil_stableStringify(params))!==null&&_stableStringify!==void 0?_stableStringify:'void'}`,default:typeof optionsDefault==='function'?// The default was parameterized +// Flow doesn't know that T isn't a function, so we need to case to any +// $FlowIssue[incompatible-use] +optionsDefault(params):// Default may be a static value, promise, or RecoilValue +optionsDefault,retainedBy_UNSTABLE:typeof options.retainedBy_UNSTABLE==='function'?options.retainedBy_UNSTABLE(params):options.retainedBy_UNSTABLE,effects:typeof options.effects==='function'?options.effects(params):typeof options.effects_UNSTABLE==='function'?options.effects_UNSTABLE(params):(_options$effects=options.effects)!==null&&_options$effects!==void 0?_options$effects:options.effects_UNSTABLE// prettier-ignore +// @fb-only: scopeRules_APPEND_ONLY_READ_THE_DOCS: mapScopeRules( +// @fb-only: options.scopeRules_APPEND_ONLY_READ_THE_DOCS, +// @fb-only: params, +// @fb-only: ), +});atomCache.set(params,newAtom);setConfigDeletionHandler$2(newAtom.key,()=>{atomCache.delete(params);});return newAtom;};}var Recoil_atomFamily=atomFamily;const{setConfigDeletionHandler:setConfigDeletionHandler$3}=Recoil_Node;// Keep in mind the parameter needs to be serializable as a cahche key +// using Recoil_stableStringify +// Add a unique index to each selector in case the cache implementation allows +// duplicate keys based on equivalent stringified parameters +let nextIndex=0;/* eslint-disable no-redeclare */ // Return a function that returns members of a family of selectors of the same type +// E.g., +// +// const s = selectorFamily(...); +// s({a: 1}) => a selector +// s({a: 2}) => a different selector +// +// By default, the selectors are distinguished by distinct values of the +// parameter based on value equality, not reference equality. This allows using +// object literals or other equivalent objects at callsites to not create +// duplicate cache entries. This behavior may be overridden with the +// cacheImplementationForParams option. +function selectorFamily(options){var _options$cachePolicyF,_options$cachePolicyF2;const selectorCache=Recoil_cacheFromPolicy({equality:(_options$cachePolicyF=(_options$cachePolicyF2=options.cachePolicyForParams_UNSTABLE)===null||_options$cachePolicyF2===void 0?void 0:_options$cachePolicyF2.equality)!==null&&_options$cachePolicyF!==void 0?_options$cachePolicyF:'value',eviction:'keep-all'});return params=>{var _stableStringify;// Throw an error with selector key so that it is clear which +// selector is causing an error +let cachedSelector;try{cachedSelector=selectorCache.get(params);}catch(error){throw Recoil_err(`Problem with cache lookup for selector ${options.key}: ${error.message}`);}if(cachedSelector!=null){return cachedSelector;}const myKey=`${options.key}__selectorFamily/${(_stableStringify=Recoil_stableStringify(params,{// It is possible to use functions in parameters if the user uses +// a cache with reference equality thanks to the incrementing index. +allowFunctions:true}))!==null&&_stableStringify!==void 0?_stableStringify:'void'}/${nextIndex++}`;// Append index in case values serialize to the same key string +const myGet=callbacks=>options.get(params)(callbacks);const myCachePolicy=options.cachePolicy_UNSTABLE;const retainedBy=typeof options.retainedBy_UNSTABLE==='function'?options.retainedBy_UNSTABLE(params):options.retainedBy_UNSTABLE;let newSelector;if(options.set!=null){const set=options.set;const mySet=(callbacks,newValue)=>set(params)(callbacks,newValue);newSelector=Recoil_selector({key:myKey,get:myGet,set:mySet,cachePolicy_UNSTABLE:myCachePolicy,dangerouslyAllowMutability:options.dangerouslyAllowMutability,retainedBy_UNSTABLE:retainedBy});}else {newSelector=Recoil_selector({key:myKey,get:myGet,cachePolicy_UNSTABLE:myCachePolicy,dangerouslyAllowMutability:options.dangerouslyAllowMutability,retainedBy_UNSTABLE:retainedBy});}selectorCache.set(params,newSelector);setConfigDeletionHandler$3(newSelector.key,()=>{selectorCache.delete(params);});return newSelector;};}/* eslint-enable no-redeclare */var Recoil_selectorFamily=selectorFamily;// flowlint-next-line unclear-type:off +const constantSelector=Recoil_selectorFamily({key:'__constant',get:constant=>()=>constant,cachePolicyForParams_UNSTABLE:{equality:'reference'}});// Function that returns a selector which always produces the +// same constant value. It may be called multiple times with the +// same value, based on reference equality, and will provide the +// same selector. +function constSelector(constant){return constantSelector(constant);}var Recoil_constSelector=constSelector;// flowlint-next-line unclear-type:off +const throwingSelector=Recoil_selectorFamily({key:'__error',get:message=>()=>{throw Recoil_err(message);},// TODO Why? +cachePolicyForParams_UNSTABLE:{equality:'reference'}});// Function that returns a selector which always throws an error +// with the provided message. +function errorSelector(message){return throwingSelector(message);}var Recoil_errorSelector=errorSelector;/** + * Copyright (c) Meta Platforms, Inc. and affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + * + * Wraps another recoil value and prevents writing to it. + * + * + * @format + * @oncall recoil + */function readOnlySelector(atom){// flowlint-next-line unclear-type: off +return atom;}var Recoil_readOnlySelector=readOnlySelector;const{loadableWithError:loadableWithError$3,loadableWithPromise:loadableWithPromise$3,loadableWithValue:loadableWithValue$4}=Recoil_Loadable$1;///////////////// +// TRUTH TABLE +///////////////// +// Dependencies waitForNone waitForAny waitForAll waitForAllSettled +// [loading, loading] [Promise, Promise] Promise Promise Promise +// [value, loading] [value, Promise] [value, Promise] Promise Promise +// [value, value] [value, value] [value, value] [value, value] [value, value] +// +// [error, loading] [Error, Promise] [Error, Promise] Error Promise +// [error, error] [Error, Error] [Error, Error] Error [error, error] +// [value, error] [value, Error] [value, Error] Error [value, error] +// Issue parallel requests for all dependencies and return the current +// status if they have results, have some error, or are still pending. +function concurrentRequests(getRecoilValue,deps){const results=Array(deps.length).fill(undefined);const exceptions=Array(deps.length).fill(undefined);for(const[i,dep]of deps.entries()){try{results[i]=getRecoilValue(dep);}catch(e){// exceptions can either be Promises of pending results or real errors +exceptions[i]=e;}}return [results,exceptions];}function isError(exp){return exp!=null&&!Recoil_isPromise(exp);}function unwrapDependencies(dependencies){return Array.isArray(dependencies)?dependencies:Object.getOwnPropertyNames(dependencies).map(key=>dependencies[key]);}function wrapResults(dependencies,/* $FlowFixMe[missing-local-annot] The type annotation(s) required by Flow's + * LTI update could not be added via codemod */results){return Array.isArray(dependencies)?results:// Object.getOwnPropertyNames() has consistent key ordering with ES6 +Object.getOwnPropertyNames(dependencies).reduce((out,key,idx)=>({...out,[key]:results[idx]}),{});}function wrapLoadables(dependencies,results,exceptions){const output=exceptions.map((exception,idx)=>exception==null?loadableWithValue$4(results[idx]):Recoil_isPromise(exception)?loadableWithPromise$3(exception):loadableWithError$3(exception));return wrapResults(dependencies,output);}function combineAsyncResultsWithSyncResults(syncResults,asyncResults){return asyncResults.map((result,idx)=>/** + * it's important we use === undefined as opposed to == null, because the + * resolved value of the async promise could be `null`, in which case we + * don't want to use syncResults[idx], which would be undefined. If async + * promise resolves to `undefined`, that's ok because `syncResults[idx]` + * will also be `undefined`. That's a little hacky, but it works. + */result===undefined?syncResults[idx]:result);}// Selector that requests all dependencies in parallel and immediately returns +// current results without waiting. +const waitForNone=Recoil_selectorFamily({key:'__waitForNone',get:dependencies=>({get})=>{// Issue requests for all dependencies in parallel. +const deps=unwrapDependencies(dependencies);const[results,exceptions]=concurrentRequests(get,deps);// Always return the current status of the results; never block. +return wrapLoadables(dependencies,results,exceptions);},dangerouslyAllowMutability:true});// Selector that requests all dependencies in parallel and waits for at least +// one to be available before returning results. It will only error if all +// dependencies have errors. +const waitForAny=Recoil_selectorFamily({key:'__waitForAny',get:dependencies=>({get})=>{// Issue requests for all dependencies in parallel. +// Exceptions can either be Promises of pending results or real errors +const deps=unwrapDependencies(dependencies);const[results,exceptions]=concurrentRequests(get,deps);// If any results are available, value or error, return the current status +if(exceptions.some(exp=>!Recoil_isPromise(exp))){return wrapLoadables(dependencies,results,exceptions);}// Otherwise, return a promise that will resolve when the next result is +// available, whichever one happens to be next. But, if all pending +// dependencies end up with errors, then reject the promise. +return new Promise(resolve=>{for(const[i,exp]of exceptions.entries()){if(Recoil_isPromise(exp)){exp.then(result=>{results[i]=result;exceptions[i]=undefined;resolve(wrapLoadables(dependencies,results,exceptions));}).catch(error=>{exceptions[i]=error;resolve(wrapLoadables(dependencies,results,exceptions));});}}});},dangerouslyAllowMutability:true});// Selector that requests all dependencies in parallel and waits for all to be +// available before returning a value. It will error if any dependencies error. +const waitForAll=Recoil_selectorFamily({key:'__waitForAll',get:dependencies=>({get})=>{// Issue requests for all dependencies in parallel. +// Exceptions can either be Promises of pending results or real errors +const deps=unwrapDependencies(dependencies);const[results,exceptions]=concurrentRequests(get,deps);// If all results are available, return the results +if(exceptions.every(exp=>exp==null)){return wrapResults(dependencies,results);}// If we have any errors, throw the first error +const error=exceptions.find(isError);if(error!=null){throw error;}// Otherwise, return a promise that will resolve when all results are available +return Promise.all(exceptions).then(exceptionResults=>wrapResults(dependencies,combineAsyncResultsWithSyncResults(results,exceptionResults)));},dangerouslyAllowMutability:true});const waitForAllSettled=Recoil_selectorFamily({key:'__waitForAllSettled',get:dependencies=>({get})=>{// Issue requests for all dependencies in parallel. +// Exceptions can either be Promises of pending results or real errors +const deps=unwrapDependencies(dependencies);const[results,exceptions]=concurrentRequests(get,deps);// If all results are available, return the results +if(exceptions.every(exp=>!Recoil_isPromise(exp))){return wrapLoadables(dependencies,results,exceptions);}// Wait for all results to settle +return Promise.all(exceptions.map((exp,i)=>Recoil_isPromise(exp)?exp.then(result=>{results[i]=result;exceptions[i]=undefined;}).catch(error=>{results[i]=undefined;exceptions[i]=error;}):null))// Then wrap them as loadables +.then(()=>wrapLoadables(dependencies,results,exceptions));},dangerouslyAllowMutability:true});const noWait=Recoil_selectorFamily({key:'__noWait',get:dependency=>({get})=>{try{return Recoil_selector.value(loadableWithValue$4(get(dependency)));}catch(exception){return Recoil_selector.value(Recoil_isPromise(exception)?loadableWithPromise$3(exception):loadableWithError$3(exception));}},dangerouslyAllowMutability:true});var Recoil_WaitFor={waitForNone,waitForAny,waitForAll,waitForAllSettled,noWait};const{RecoilLoadable}=Recoil_Loadable$1;const{DefaultValue:DefaultValue$3}=Recoil_Node;const{RecoilRoot:RecoilRoot$2,useRecoilStoreID:useRecoilStoreID$1}=Recoil_RecoilRoot;const{isRecoilValue:isRecoilValue$5}=Recoil_RecoilValue$1;const{retentionZone:retentionZone$1}=Recoil_RetentionZone;const{freshSnapshot:freshSnapshot$2}=Recoil_Snapshot$1;const{useRecoilState:useRecoilState$1,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:useRecoilState_TRANSITION_SUPPORT_UNSTABLE$1,useRecoilStateLoadable:useRecoilStateLoadable$1,useRecoilValue:useRecoilValue$1,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:useRecoilValue_TRANSITION_SUPPORT_UNSTABLE$1,useRecoilValueLoadable:useRecoilValueLoadable$1,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE$1,useResetRecoilState:useResetRecoilState$1,useSetRecoilState:useSetRecoilState$1}=Recoil_Hooks;const{useGotoRecoilSnapshot:useGotoRecoilSnapshot$1,useRecoilSnapshot:useRecoilSnapshot$1,useRecoilTransactionObserver:useRecoilTransactionObserver$1}=Recoil_SnapshotHooks;const{useRecoilCallback:useRecoilCallback$1}=Recoil_useRecoilCallback;const{noWait:noWait$1,waitForAll:waitForAll$1,waitForAllSettled:waitForAllSettled$1,waitForAny:waitForAny$1,waitForNone:waitForNone$1}=Recoil_WaitFor;var Recoil_index={// Types +DefaultValue:DefaultValue$3,isRecoilValue:isRecoilValue$5,RecoilLoadable,// Global Recoil environment settiongs +RecoilEnv:Recoil_RecoilEnv,// Recoil Root +RecoilRoot:RecoilRoot$2,useRecoilStoreID:useRecoilStoreID$1,useRecoilBridgeAcrossReactRoots_UNSTABLE:Recoil_useRecoilBridgeAcrossReactRoots,// Atoms/Selectors +atom:Recoil_atom,selector:Recoil_selector,// Convenience Atoms/Selectors +atomFamily:Recoil_atomFamily,selectorFamily:Recoil_selectorFamily,constSelector:Recoil_constSelector,errorSelector:Recoil_errorSelector,readOnlySelector:Recoil_readOnlySelector,// Concurrency Helpers for Atoms/Selectors +noWait:noWait$1,waitForNone:waitForNone$1,waitForAny:waitForAny$1,waitForAll:waitForAll$1,waitForAllSettled:waitForAllSettled$1,// Hooks for Atoms/Selectors +useRecoilValue:useRecoilValue$1,useRecoilValueLoadable:useRecoilValueLoadable$1,useRecoilState:useRecoilState$1,useRecoilStateLoadable:useRecoilStateLoadable$1,useSetRecoilState:useSetRecoilState$1,useResetRecoilState:useResetRecoilState$1,useGetRecoilValueInfo_UNSTABLE:Recoil_useGetRecoilValueInfo,useRecoilRefresher_UNSTABLE:Recoil_useRecoilRefresher,useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE:useRecoilValueLoadable_TRANSITION_SUPPORT_UNSTABLE$1,useRecoilValue_TRANSITION_SUPPORT_UNSTABLE:useRecoilValue_TRANSITION_SUPPORT_UNSTABLE$1,useRecoilState_TRANSITION_SUPPORT_UNSTABLE:useRecoilState_TRANSITION_SUPPORT_UNSTABLE$1,// Hooks for complex operations +useRecoilCallback:useRecoilCallback$1,useRecoilTransaction_UNSTABLE:Recoil_useRecoilTransaction,// Snapshots +useGotoRecoilSnapshot:useGotoRecoilSnapshot$1,useRecoilSnapshot:useRecoilSnapshot$1,useRecoilTransactionObserver_UNSTABLE:useRecoilTransactionObserver$1,snapshot_UNSTABLE:freshSnapshot$2,// Memory Management +useRetain:Recoil_useRetain,retentionZone:retentionZone$1};var Recoil_index_5=Recoil_index.RecoilRoot;var Recoil_index_8=Recoil_index.atom;var Recoil_index_22=Recoil_index.useRecoilState; + +const view = Recoil_index_8({ + key: 'fileTreeViewState', + default: 'folder', +}); +const activeFolderPath = Recoil_index_8({ + key: 'fileTreeActiveFolderPathState', + default: '', +}); +const activeOZFile = Recoil_index_8({ + key: 'fileTreeActiveOZFile', + default: null, +}); +const excludedFolders = Recoil_index_8({ + key: 'fileTreeExcludedFoldersState', + default: [], +}); +const excludedExtensions = Recoil_index_8({ + key: 'fileTreeExcludedExtensions', + default: [], +}); +const folderFileCountMap = Recoil_index_8({ + key: 'fileTreeFolderFileCountMapState', + default: {}, +}); +const folderTree = Recoil_index_8({ + key: 'fileTreeFolderTreeState', + default: null, + dangerouslyAllowMutability: true, +}); +const ozFileList = Recoil_index_8({ + key: 'fileTreeOzFileListState', + default: [], +}); +const ozPinnedFileList = Recoil_index_8({ + key: 'fileTreeOzPinnedFilesState', + default: [], +}); +const openFolders = Recoil_index_8({ + key: 'fileTreeOpenFoldersState', + default: [], +}); +const showSubFolders = Recoil_index_8({ + key: 'showSubFoldersInVault', + default: false, +}); +const focusedFolder = Recoil_index_8({ + key: 'fileTreeFocusedFolder', + default: null, + dangerouslyAllowMutability: true, +}); + +function useForceUpdate() { + const [value, setValue] = reactExports.useState(0); + return () => setValue((value) => value + 1); +} + +function isMouseEvent(e) { + return e && 'screenX' in e; +} +function useLongPress(callback = (e) => { }, ms = 300) { + const [startLongPress, setStartLongPress] = reactExports.useState(false); + const [longPressEvent, setLongPressEvent] = reactExports.useState(null); + const [startLocationY, setStartLocationY] = reactExports.useState(null); + reactExports.useEffect(() => { + let timerId; + if (startLongPress && startLocationY) { + timerId = setTimeout(() => { + callback(longPressEvent); + stop(longPressEvent); + }, ms); + } + else { + clearTimeout(timerId); + } + return () => { + clearTimeout(timerId); + }; + }, [callback, ms, startLongPress, startLocationY]); + const start = reactExports.useCallback((e) => { + setStartLongPress(true); + setStartLocationY(e.touches[0].clientY); + setLongPressEvent(e); + }, []); + const move = reactExports.useCallback((e) => { + if (startLocationY) { + let dist = Math.abs(e.touches[0].clientY - startLocationY); + if (dist >= 0.5) + stop(e); + } + }, [startLocationY]); + const stop = reactExports.useCallback((e) => { + setStartLongPress(false); + setLongPressEvent(null); + }, []); + return { + onTouchStart: start, + onTouchMove: move, + onTouchEnd: stop, + }; +} + +// ----> FILE TREE COMPONENT HANDLERS <----- \\ +// Function After an External File Dropped into Folder Name +const handleOnDropFiles = (params) => { + let { files, activeFolderPath, plugin } = params; + files.map((file) => __awaiter(void 0, void 0, void 0, function* () { + file.arrayBuffer().then((arrayBuffer) => { + plugin.app.vault.adapter.writeBinary(activeFolderPath + '/' + file.name, arrayBuffer); + }); + })); +}; +const getFilesWithName = (params) => { + let { searchPhrase, searchFolder, plugin, getAllFiles, excludedExtensions, excludedFolders } = params; + var files = getFilesUnderPath({ + path: searchFolder, + plugin: plugin, + excludedExtensions: excludedExtensions, + excludedFolders: excludedFolders, + getAllFiles: getAllFiles, + }); + var filteredFiles = files.filter((file) => file.basename.toLowerCase().includes(searchPhrase.toLowerCase().trimStart())); + return filteredFiles; +}; +const getFileTags = (params) => { + let { f, plugin } = params; + let mdFile = plugin.app.vault.getAbstractFileByPath(f.path); + if (!mdFile) + return []; + let fileCache = plugin.app.metadataCache.getFileCache(mdFile); + let fileTags = []; + if (fileCache.tags) { + for (let fileTag of fileCache.tags) { + fileTags.push(fileTag.tag); + } + } + if (fileCache.frontmatter && fileCache.frontmatter['tags']) { + let tagsFM = fileCache.frontmatter['tags']; + if (typeof tagsFM === 'string') { + let fileFMTags = tagsFM.split(','); + for (let i = 0; i < fileFMTags.length; i++) { + fileTags.push(fileFMTags[i]); + } + } + else if (Array.isArray(tagsFM)) { + for (let i = 0; i < tagsFM.length; i++) { + fileTags.push(tagsFM[i]); + } + } + } + return fileTags; +}; +const getFilesWithTag = (params) => { + let { searchTag, plugin, focusedFolder, excludedExtensions, excludedFolders } = params; + let filesWithTag = new Set(); + let ozFiles = getFilesUnderPath({ + path: plugin.settings.allSearchOnlyInFocusedFolder ? focusedFolder.path : '/', + plugin: plugin, + excludedExtensions: excludedExtensions, + excludedFolders: excludedFolders, + getAllFiles: true, + }); + for (let ozFile of ozFiles) { + let fileTags = getFileTags({ + f: ozFile, + plugin: plugin, + }); + for (let fileTag of fileTags) { + if (fileTag.toLowerCase().contains(searchTag.toLowerCase().trimStart())) { + if (!filesWithTag.has(ozFile)) + filesWithTag.add(ozFile); + } + } + } + return filesWithTag; +}; +const handleRevealActiveFileButton = (params) => { + let { plugin } = params; + let event = new CustomEvent(eventTypes.revealFile, { + detail: { + file: plugin.app.workspace.getActiveFile(), + }, + }); + window.dispatchEvent(event); +}; +// Sort - Filter Files Depending on Preferences +const sortedFiles = (params) => { + let { fileList, plugin, ozPinnedFiles } = params; + let sortedfileList = fileList; + // Remove Files for Folder Note (If file name is same as parent folder name) + if (plugin.settings.folderNote) { + sortedfileList = sortedfileList.filter((f) => !f.isFolderNote); + } + // Sort File by Name or Last Content Update, moving pinned files to the front + sortedfileList = sortedfileList.sort((a, b) => { + if (ozPinnedFiles.some((f) => f.path === a.path) && !ozPinnedFiles.some((f) => f.path === b.path)) { + return -1; + } + else if (!ozPinnedFiles.some((f) => f.path === a.path) && ozPinnedFiles.some((f) => f.path === b.path)) { + return 1; + } + if (plugin.settings.sortReverse) { + [a, b] = [b, a]; + } + if (plugin.settings.sortFilesBy === 'name') { + return plugin.settings.showFileNameAsFullPath + ? a.path.localeCompare(b.path, 'en', { numeric: true }) + : a.basename.localeCompare(b.basename, 'en', { numeric: true }); + } + else if (plugin.settings.sortFilesBy === 'last-update') { + return b.stat.mtime - a.stat.mtime; + } + else if (plugin.settings.sortFilesBy === 'created') { + return b.stat.ctime - a.stat.ctime; + } + else if (plugin.settings.sortFilesBy === 'file-size') { + return b.stat.size - a.stat.size; + } + }); + return sortedfileList; +}; +const sortFileListClickHandle = (params) => { + let { e, plugin, forceUpdate } = params; + const sortMenu = new obsidian.Menu(); + const changeSortSettingTo = (newValue) => { + plugin.settings.sortFilesBy = newValue; + plugin.saveSettings(); + forceUpdate(); + }; + const addMenuItem = (label, low, high, value) => { + sortMenu.addItem((menuItem) => { + const order = plugin.settings.sortReverse ? `${high} to ${low}` : `${low} to ${high}`; + menuItem.setTitle(`${label} (${order})`); + menuItem.setIcon(value === plugin.settings.sortFilesBy ? 'checkmark' : 'spaceIcon'); + menuItem.onClick(() => changeSortSettingTo(value)); + }); + }; + addMenuItem('File Name', 'A', 'Z', 'name'); + addMenuItem('Created', 'New', 'Old', 'created'); + addMenuItem('File Size', 'Big', 'Small', 'file-size'); + addMenuItem('Last Update', 'New', 'Old', 'last-update'); + sortMenu.addSeparator(); + sortMenu.addItem((menuItem) => { + menuItem.setTitle('Reverse Order'); + menuItem.setIcon(plugin.settings.sortReverse ? 'checkmark' : 'spaceIcon'); + menuItem.onClick(() => { + plugin.settings.sortReverse = !plugin.settings.sortReverse; + plugin.saveSettings(); + forceUpdate(); + }); + }); + // Trigger + sortMenu.showAtPosition({ x: e.pageX, y: e.pageY }); +}; +// Search Function +const searchAllRegex = new RegExp('all:(.*)?'); +const searchTagRegex = new RegExp('tag:(.*)?'); +const handleSearch = (params) => { + let { e, activeFolderPath, setSearchPhrase, setOzFileList, setTreeHeader, plugin, focusedFolder, excludedExtensions, excludedFolders } = params; + var searchPhrase = e.target.value; + setSearchPhrase(searchPhrase); + var searchFolder = activeFolderPath; + // Check Tag Regex in Search Phrase + let tagRegexMatch = searchPhrase.match(searchTagRegex); + if (tagRegexMatch) { + setTreeHeader('Files with Tag'); + if (tagRegexMatch[1] === undefined || tagRegexMatch[1].replace(/\s/g, '').length === 0) { + setOzFileList([]); + return; + } + setOzFileList([ + ...getFilesWithTag({ + searchTag: tagRegexMatch[1], + plugin: plugin, + focusedFolder: focusedFolder, + excludedExtensions: excludedExtensions, + excludedFolders: excludedFolders, + }), + ]); + return; + } + // Check All Regex in Search Phrase + let allRegexMatch = searchPhrase.match(searchAllRegex); + if (allRegexMatch) { + searchPhrase = allRegexMatch[1] ? allRegexMatch[1] : ''; + searchFolder = plugin.settings.allSearchOnlyInFocusedFolder ? focusedFolder.path : '/'; + setTreeHeader('All Files'); + } + else { + setTreeHeader(getFolderName(activeFolderPath, plugin.app)); + } + let getAllFiles = allRegexMatch ? true : false; + let filteredFiles = getFilesWithName({ + searchPhrase, + searchFolder, + plugin, + excludedExtensions, + excludedFolders, + getAllFiles, + }); + setOzFileList(filteredFiles); +}; +// ----> NAV FILE COMPONENT HANDLERS <----- \\ +// Handle Click Event on File - Allows Open with Cmd/Ctrl +const openFile = (params) => { + let { file, e, plugin, setActiveOzFile } = params; + openFile$1({ + file: file, + app: plugin.app, + newLeaf: (e.ctrlKey || e.metaKey) && !(e.shiftKey || e.altKey), + leafBySplit: (e.ctrlKey || e.metaKey) && (e.shiftKey || e.altKey), + }); + setActiveOzFile(file); +}; +const getFileIcon = (params) => { + let { file } = params; + return file.extension === 'pdf' + ? AiFillFilePdf + : ['png', 'jpg', 'jpeg', 'svg'].contains(file.extension) + ? AiFillFileImage + : ['doc', 'docx'].contains(file.extension) + ? AiFillFileWord + : BiFile; +}; +// --> Dragging for File +const dragStarted = (params) => { + let { e, file, plugin } = params; + let obsidianFile = plugin.app.vault.getAbstractFileByPath(file.path); + if (!obsidianFile) + return; + // json to move file to folder + e.dataTransfer.setData('application/json', JSON.stringify({ filePath: file.path })); + let dragManager = plugin.app.dragManager; + const dragData = dragManager.dragFile(e.nativeEvent, obsidianFile); + dragManager.onDragStart(e.nativeEvent, dragData); +}; +// --> AuxClick (Mouse Wheel Button Action) +const onAuxClick = (params) => { + let { e, plugin, file } = params; + if (e.button === 1) + openFileInNewTab(plugin.app, file); +}; +const mouseEnteredOnFile = (params) => { + let { e, file, plugin, setHoverActive } = params; + setHoverActive(true); + if (plugin.settings.filePreviewOnHover && (e.ctrlKey || e.metaKey)) { + plugin.app.workspace.trigger('link-hover', {}, e.target, file.path, file.path); + } +}; +const mouseLeftFile = (params) => { + params.setHoverActive(false); +}; +// Handle Right Click Event on File - Custom Menu +const triggerContextMenu = (params) => { + let { file, e, ozPinnedFiles, setOzPinnedFiles, plugin } = params; + const fileMenu = new obsidian.Menu(); + let fileToTrigger = plugin.app.vault.getAbstractFileByPath(file.path); + if (!fileToTrigger) + return; + // Pin - Unpin Item + fileMenu.addItem((menuItem) => { + menuItem.setIcon('pin'); + const isAlreadyPinned = ozPinnedFiles.some((pinnedFile) => pinnedFile.path === file.path); + if (isAlreadyPinned) + menuItem.setTitle('Unpin'); + else + menuItem.setTitle('Pin to Top'); + menuItem.onClick((ev) => { + if (isAlreadyPinned) { + let newPinnedFiles = ozPinnedFiles.filter((pinnedFile) => pinnedFile.path !== file.path); + setOzPinnedFiles(newPinnedFiles); + } + else { + setOzPinnedFiles([...ozPinnedFiles, file]); + } + }); + }); + // Rename Item + fileMenu.addItem((menuItem) => { + menuItem.setTitle('Rename'); + menuItem.setIcon('pencil'); + menuItem.onClick((ev) => { + let vaultChangeModal = new VaultChangeModal(plugin, file, 'rename'); + vaultChangeModal.open(); + }); + }); + // Delete Item + fileMenu.addItem((menuItem) => { + menuItem.setTitle('Delete'); + menuItem.setIcon('trash'); + menuItem.onClick((ev) => { + let confirmationModal = new ConfirmationModal(plugin, `Are you sure you want to delete the file "${file.basename}${file.extension === 'md' ? '' : file.extension}"?`, function () { + let deleteOption = plugin.settings.deleteFileOption; + let fileToDelete = plugin.app.vault.getAbstractFileByPath(file.path); + if (!fileToDelete) + return; + if (deleteOption === 'permanent') { + plugin.app.vault.delete(fileToDelete, true); + } + else if (deleteOption === 'system-trash') { + plugin.app.vault.trash(fileToDelete, true); + } + else if (deleteOption === 'trash') { + plugin.app.vault.trash(fileToDelete, false); + } + }); + confirmationModal.open(); + }); + }); + // Open in a New Pane + fileMenu.addItem((menuItem) => { + menuItem.setIcon('go-to-file'); + menuItem.setTitle('Open in a new tab'); + menuItem.onClick((ev) => { + openFileInNewTab(plugin.app, file); + }); + }); + // Open in a New Pane + fileMenu.addItem((menuItem) => { + menuItem.setIcon('go-to-file'); + menuItem.setTitle('Open to right'); + menuItem.onClick((ev) => { + openFileInNewTabGroup(plugin.app, file); + }); + }); + // Make a Copy Item + fileMenu.addItem((menuItem) => { + menuItem.setTitle('Make a copy'); + menuItem.setIcon('documents'); + menuItem.onClick((ev) => { + let fileToCopy = plugin.app.vault.getAbstractFileByPath(file.path); + if (fileToCopy) { + plugin.app.vault.copy(fileToCopy, `${file.parent.path}/${file.basename} 1.${file.extension}`); + } + }); + }); + // Move Item + if (!internalPluginLoaded('file-explorer', plugin.app)) { + fileMenu.addItem((menuItem) => { + menuItem.setTitle('Move file to...'); + menuItem.setIcon('paper-plane'); + menuItem.onClick((ev) => { + let fileMoveSuggester = new MoveSuggestionModal(plugin.app, file); + fileMoveSuggester.open(); + }); + }); + } + // Trigger + plugin.app.workspace.trigger('file-menu', fileMenu, fileToTrigger, 'file-explorer'); + if (isMouseEvent(e)) { + fileMenu.showAtPosition({ x: e.pageX, y: e.pageY }); + } + else { + // @ts-ignore + fileMenu.showAtPosition({ x: e.nativeEvent.locationX, y: e.nativeEvent.locationY }); + } + return false; +}; + +var h=Object.defineProperty;var u=(n,t,e)=>t in n?h(n,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):n[t]=e;var c=(n,t,e)=>(u(n,typeof t!="symbol"?t+"":t,e),e);const p=(n,t)=>typeof getComputedStyle<"u"?getComputedStyle(n,null).getPropertyValue(t):n.style.getPropertyValue(t),y=n=>p(n,"overflow")+p(n,"overflow-y")+p(n,"overflow-x"),w=n=>{if(!(n instanceof HTMLElement))return window;let t=n;for(;t&&!(t===document.body||t===document.documentElement||!t.parentNode);){if(/(scroll|auto)/.test(y(t)))return t;t=t.parentNode;}return window;};class g extends reactExports.Component{constructor(e){super(e);c(this,"elementObserver");c(this,"wrapper");c(this,"lazyLoadHandler",e=>{var o,i;const{onContentVisible:s}=this.props,[r]=e,{isIntersecting:l}=r;if(l){this.setState({visible:!0},()=>{s&&s();});const a=(o=this.wrapper)==null?void 0:o.current;a&&a instanceof HTMLElement&&((i=this.elementObserver)==null||i.unobserve(a));}});this.elementObserver=null,this.wrapper=/*#__PURE__*/React.createRef(),this.state={visible:!1};}componentDidMount(){var o;this.getEventNode();const{offset:e,threshold:s}=this.props,r={rootMargin:typeof e=="number"?`${e}px`:e||"0px",threshold:s||0};this.elementObserver=new IntersectionObserver(this.lazyLoadHandler,r);const l=(o=this.wrapper)==null?void 0:o.current;l instanceof HTMLElement&&this.elementObserver.observe(l);}shouldComponentUpdate(e,s){return s.visible;}componentWillUnmount(){var s,r;const e=(s=this.wrapper)==null?void 0:s.current;e&&e instanceof HTMLElement&&((r=this.elementObserver)==null||r.unobserve(e));}getEventNode(){var e;return w((e=this.wrapper)==null?void 0:e.current);}render(){const{children:e,className:s,height:r,width:l,elementType:o}=this.props,{visible:i}=this.state,a={height:r,width:l},d=`LazyLoad${i?" is-visible":""}${s?` ${s}`:""}`;return/*#__PURE__*/reactExports.createElement(o||"div",{className:d,style:a,ref:this.wrapper},i&&reactExports.Children.only(e));}}c(g,"defaultProps",{elementType:"div",className:"",offset:0,threshold:0,width:null,onContentVisible:null,height:null}); + +function FileComponent(props) { + let searchInput = React.useRef(null); + const plugin = props.plugin; + // States Coming From Main Component + const [_view, setView] = Recoil_index_22(view); + const [ozFileList$1, setOzFileList] = Recoil_index_22(ozFileList); + const [ozPinnedFiles] = Recoil_index_22(ozPinnedFileList); + const [activeFolderPath$1, setActiveFolderPath] = Recoil_index_22(activeFolderPath); + const [excludedExtensions$1] = Recoil_index_22(excludedExtensions); + const [excludedFolders$1] = Recoil_index_22(excludedFolders); + const [showSubFolders$1, setShowSubFolders] = Recoil_index_22(showSubFolders); + const [focusedFolder$1, _setFocusedFolder] = Recoil_index_22(focusedFolder); + // Local States + const [highlight, setHighlight] = reactExports.useState(false); + const [searchPhrase, setSearchPhrase] = reactExports.useState(''); + const [searchBoxVisible, setSearchBoxVisible] = reactExports.useState(false); + const [treeHeader, setTreeHeader] = reactExports.useState(getFolderName(activeFolderPath$1, plugin.app)); + // Force Update + const forceUpdate = useForceUpdate(); + // Folder Name Update once Active Folder Path Change + reactExports.useEffect(() => setTreeHeader(getFolderName(activeFolderPath$1, plugin.app)), [activeFolderPath$1]); + // File List Update once showSubFolders change + reactExports.useEffect(() => { + setOzFileList(getFilesUnderPath({ + path: activeFolderPath$1, + plugin: plugin, + excludedExtensions: excludedExtensions$1, + excludedFolders: excludedFolders$1, + })); + }, [showSubFolders$1, excludedExtensions$1, excludedFolders$1]); + // To focus on Search box if visible set + reactExports.useEffect(() => { + if (searchBoxVisible) + searchInput.current.focus(); + }, [searchBoxVisible]); + const filesToList = reactExports.useMemo(() => sortedFiles({ + fileList: ozFileList$1, + plugin: plugin, + ozPinnedFiles: ozPinnedFiles, + }), [excludedFolders$1, excludedExtensions$1, ozPinnedFiles, ozFileList$1, plugin.settings.sortFilesBy, plugin.settings.sortReverse]); + // Go Back Button - Sets Main Component View to Folder + const handleGoBack = (e) => { + setView('folder'); + setActiveFolderPath(''); + }; + // Toggle Search Box Visibility State + const toggleSearchBox = () => { + setSearchPhrase(''); + setSearchBoxVisible(!searchBoxVisible); + setOzFileList(getFilesUnderPath({ + path: activeFolderPath$1, + plugin: plugin, + excludedExtensions: excludedExtensions$1, + excludedFolders: excludedFolders$1, + })); + }; + const toggleShowSubFolders = () => __awaiter(this, void 0, void 0, function* () { + plugin.settings.showFilesFromSubFolders = !showSubFolders$1; + yield plugin.saveSettings(); + setShowSubFolders(!showSubFolders$1); + }); + const topIconSize = 19; + return (React.createElement(React.Fragment, null, + React.createElement(Dropzone$1, { onDrop: (files) => handleOnDropFiles({ + files, + activeFolderPath: activeFolderPath$1, + plugin, + }), noClick: true, onDragEnter: () => setHighlight(true), onDragLeave: () => setHighlight(false), onDropAccepted: () => setHighlight(false), onDropRejected: () => setHighlight(false) }, ({ getRootProps, getInputProps }) => (React.createElement("div", Object.assign({}, getRootProps(), { className: highlight ? 'drag-entered' : '', style: { width: '100%', height: '100%', position: 'relative' } }), + React.createElement("input", Object.assign({}, getInputProps())), + React.createElement("div", { className: "oz-explorer-container" }, + React.createElement("div", { className: `oz-file-tree-header-wrapper${plugin.settings.fixedHeaderInFileList ? ' file-tree-header-fixed' : ''}` }, + React.createElement("div", { className: "oz-flex-container" }, + React.createElement("div", { className: "oz-nav-action-button", style: { marginLeft: '0px' } }, ['Horizontal', 'Vertical'].includes(plugin.settings.evernoteView) ? (React.createElement(IoIosCloseCircleOutline, { onClick: (e) => handleGoBack(), size: topIconSize, "aria-label": "Close File Pane" })) : (React.createElement(IoIosArrowBack, { onClick: (e) => handleGoBack(), size: topIconSize, "aria-label": "Go Back to Folder View" }))), + React.createElement("div", { className: "oz-nav-buttons-right-block" }, + plugin.settings.revealActiveFileButton && (React.createElement("div", { className: "oz-nav-action-button" }, + React.createElement(BiCurrentLocation, { onClick: () => handleRevealActiveFileButton({ plugin }), size: topIconSize, "aria-label": "Reveal Active File" }))), + plugin.settings.showFilesFromSubFoldersButton && (React.createElement("div", { className: "oz-nav-action-button" }, showSubFolders$1 ? (React.createElement(IoIosEyeOff, { onClick: toggleShowSubFolders, size: topIconSize, "aria-label": "Hide Files from Sub-Folders" })) : (React.createElement(IoIosEye, { onClick: toggleShowSubFolders, size: topIconSize, "aria-label": "Show Files from Sub-Folders" })))), + plugin.settings.searchFunction && (React.createElement("div", { className: "oz-nav-action-button" }, + React.createElement(IoIosSearch, { onClick: toggleSearchBox, size: topIconSize, "aria-label": "Search File by Name or Tag" }))), + React.createElement("div", { className: "oz-nav-action-button" }, + React.createElement(CgSortAz, { size: topIconSize + 2, onClick: (e) => { + sortFileListClickHandle({ e, plugin, forceUpdate }); + }, "aria-label": "Sorting Options" })), + React.createElement("div", { className: "oz-nav-action-button" }, + React.createElement(IoIosAddCircle, { onClick: (e) => createNewFile(e, activeFolderPath$1, plugin), size: topIconSize, "aria-label": "Create a Note" })))), + searchBoxVisible && (React.createElement("div", { className: "oz-input-container" }, + React.createElement("input", { type: "search", placeholder: "Search...", ref: searchInput, value: searchPhrase, onChange: (e) => { + handleSearch({ + e, + plugin, + activeFolderPath: activeFolderPath$1, + setSearchPhrase, + setTreeHeader, + setOzFileList, + excludedExtensions: excludedExtensions$1, + excludedFolders: excludedFolders$1, + focusedFolder: focusedFolder$1, + }); + }, onKeyDown: (e) => { + if (e.key === 'Escape') { + e.preventDefault(); + toggleSearchBox(); + } + } }))), + React.createElement("div", { className: "oz-file-tree-header" }, treeHeader)), + React.createElement("div", { className: `oz-file-tree-files${plugin.settings.fixedHeaderInFileList + ? searchBoxVisible + ? ' file-tree-files-fixed-with-search' + : ' file-tree-files-fixed' + : ''}` }, filesToList.map((file, index) => { + return (React.createElement(g, { height: 22, key: index }, + React.createElement(NavFile, { file: file, plugin: plugin }))); + })))))))); +} +/* ----------- SINGLE NAVFILE ELEMENT ----------- */ +const NavFile = (props) => { + const { file, plugin } = props; + const [ozPinnedFiles, setOzPinnedFiles] = Recoil_index_22(ozPinnedFileList); + const [activeOzFile, setActiveOzFile] = Recoil_index_22(activeOZFile); + const [hoverActive, setHoverActive] = reactExports.useState(false); + const longPressEvents = useLongPress((e) => { + triggerContextMenu({ + file, + e, + plugin, + ozPinnedFiles, + setOzPinnedFiles, + }); + }, 500); + reactExports.useEffect(() => { + const handleKeyDownEvent = (e) => { + if (e.key === 'Control' || e.key === 'Meta') { + let el = document.querySelector(`.oz-nav-file-title[data-path="${file.path}"]`); + if (el) + plugin.app.workspace.trigger('link-hover', {}, el, file.path, file.path); + } + }; + if (hoverActive && plugin.settings.filePreviewOnHover) { + document.addEventListener('keydown', handleKeyDownEvent); + return () => { + document.removeEventListener('keydown', handleKeyDownEvent); + }; + } + }, [hoverActive]); + const FileIcon = reactExports.useMemo(() => getFileIcon({ + file, + }), [plugin.settings.iconBeforeFileName, file]); + const fileDisplayName = reactExports.useMemo(() => { + return plugin.settings.showFileNameAsFullPath ? getFileNameAndExtension(file.path).fileName : file.basename; + }, [plugin.settings.showFileNameAsFullPath, file.path]); + return (React.createElement("div", Object.assign({ className: 'oz-nav-file' + (activeOzFile && activeOzFile.path === file.path ? ' is-active' : ''), key: file.path, draggable: true, onDragStart: (e) => dragStarted({ + e, + file, + plugin, + }), onClick: (e) => openFile({ + e, + file, + plugin, + setActiveOzFile, + }), onAuxClick: (e) => onAuxClick({ e, plugin, file }), onContextMenu: (e) => triggerContextMenu({ + e, + file, + plugin, + ozPinnedFiles, + setOzPinnedFiles, + }), onMouseEnter: (e) => mouseEnteredOnFile({ + e, + file, + plugin, + setHoverActive, + }), onMouseLeave: (e) => mouseLeftFile({ e, file, setHoverActive }) }, longPressEvents), + React.createElement("div", { className: "oz-nav-file-title", "data-path": file.path }, + React.createElement("div", { className: "oz-nav-file-title-content" }, + plugin.settings.iconBeforeFileName && React.createElement(FileIcon, { className: "oz-nav-file-icon", size: 15 }), + fileDisplayName), + ozPinnedFiles.some((f) => f.path === file.path) && React.createElement(FaThumbtack, { className: "oz-nav-file-tag", size: 14 }), + file.extension !== 'md' && React.createElement("span", { className: "oz-nav-file-tag" }, file.extension)))); +}; + +function Tree(props) { + // Global States + const [openFolders$1, setOpenFolders] = Recoil_index_22(openFolders); + const [folderFileCountMap$1] = Recoil_index_22(folderFileCountMap); + const [activeFolderPath$1] = Recoil_index_22(activeFolderPath); + const longPressEvents = useLongPress((e) => { + props.onContextMenu(e); + }, 500); + // Local States + const [open, setOpen] = reactExports.useState(props.open); + const [highlight, setHightlight] = reactExports.useState(false); + const isFolderActive = props.folder.path === activeFolderPath$1; + // --> For state update from outside of the component + reactExports.useEffect(() => setOpen(props.open), [props.open]); + // --> Icon to be toggled between min(-) and plus(+) Each click sets openFolders Main Component state to save in settings + const toggle = () => { + if (props.children) { + // Set State in Main Component for Keeping Folders Open + if (!open) { + setOpenFolders([...openFolders$1, props.folder.path]); + } + else { + const newOpenFolders = openFolders$1.filter((openFolder) => props.folder.path !== openFolder); + setOpenFolders(newOpenFolders); + } + // Set State Open for the Folder + setOpen(!open); + } + }; + // --> Function After an External File Dropped into Folder Name + const onDrop = (files) => { + files.map((file) => __awaiter(this, void 0, void 0, function* () { + file.arrayBuffer().then((arrayBuffer) => { + props.plugin.app.vault.adapter.writeBinary(props.folder.path + '/' + file.name, arrayBuffer); + }); + })); + }; + // --> Click Events + const folderNameClickEvent = (ev) => { + if (props.plugin.settings.folderNote && ev.shiftKey) { + const fileFullPath = `${props.folder.path}/${props.folder.name}.md`; + props.plugin.app.vault.getAbstractFileByPath(fileFullPath); + props.plugin.app.workspace.openLinkText(fileFullPath, '/', false); + } + else { + props.onClick(); + } + }; + const folderContextMenuEvent = () => props.onContextMenu(); + const folderNameDoubleClickEvent = (ev) => { + setOpen(true); + props.onDoubleClick(); + }; + // --> Icon + const Icon = reactExports.useMemo(() => getFolderIcon(props.plugin, props.children, open), [open, props.children, props.plugin.settings.folderIcon]); + // --> Folder Count Map + const folderCount = folderFileCountMap$1[props.folder.path]; + // --> Drag and Drop Actions + const dropFileOrFolder = (e) => { + let data = e.dataTransfer.getData('application/json'); + if (data !== '') { + let dataJson = JSON.parse(data); + // File Drop + if (dataJson['filePath']) { + const filePath = dataJson.filePath; + // check if file exists + let file = props.plugin.app.vault.getAbstractFileByPath(filePath); + if (file) { + props.plugin.app.vault.rename(file, `${props.folder.path}/${file.name}`); + } + else { + new obsidian.Notice('Couldnt find the file'); + } + } + // Folder Drop + else if (dataJson['folderPath']) { + const folderPath = dataJson.folderPath; + let folder = props.plugin.app.vault.getAbstractFileByPath(folderPath); + if (folder) { + if (!props.folder.path.startsWith(folder.path)) { + props.plugin.app.vault.rename(folder, `${props.folder.path}/${folder.name}`); + } + else { + new obsidian.Notice('You cant move folder under its child'); + } + } + else { + new obsidian.Notice('Couldnt find the folder'); + } + } + } + setHightlight(false); + e.dataTransfer.clearData(); + }; + const onFolderDragStart = (e, folder) => { + e.dataTransfer.setData('application/json', JSON.stringify({ folderPath: folder.path })); + let dragManager = props.plugin.app.dragManager; + const dragData = dragManager.dragFile(e.nativeEvent, folder); + dragManager.onDragStart(e.nativeEvent, dragData); + }; + return (React.createElement(Dropzone$1, { onDrop: onDrop, noClick: true, onDragEnter: () => setHightlight(true), onDragLeave: () => setHightlight(false), onDropAccepted: () => setHightlight(false), onDropRejected: () => setHightlight(false) }, ({ getRootProps, getInputProps }) => (React.createElement(React.Fragment, null, + React.createElement("div", { style: Object.assign({}, props.style), className: "treeview", draggable: true, onDragStart: (e) => onFolderDragStart(e, props.folder), onDrop: (e) => dropFileOrFolder(e), onDragOver: () => setHightlight(true), onDragLeave: () => setHightlight(false) }, + React.createElement("div", Object.assign({}, getRootProps({ className: 'dropzone' }), { className: 'oz-folder-element' + (highlight ? ' drag-entered' : ''), "data-path": props.folder.path }), + React.createElement("input", Object.assign({}, getInputProps())), + React.createElement("div", { className: "oz-folder-line" }, + React.createElement("div", { className: "oz-icon-div" }, + React.createElement(Icon, { className: "oz-folder-toggle", style: { opacity: props.children ? 1 : 0.3 }, onClick: toggle })), + React.createElement("div", Object.assign({ className: "oz-folder-block", onClick: folderNameClickEvent, onDoubleClick: folderNameDoubleClickEvent, onContextMenu: folderContextMenuEvent }, longPressEvents), + React.createElement("div", { className: "oz-folder-type", style: { marginRight: props.type ? 10 : 0 } }, props.type), + React.createElement("div", { className: `oz-folder-name ${isFolderActive ? 'is-folder-active' : ''}${props.isRootFolder ? ' is-root-folder' : ''}` }, + props.content, + ' ', + props.plugin.settings.folderNote && props.folder.children.some((f) => f.name === `${props.folder.name}.md`) ? (React.createElement(IoMdArrowDropright, { size: 10, className: "oz-folder-note-icon" })) : ('')), + props.plugin.settings.folderCount && (React.createElement("div", { className: "oz-folder-count" }, + React.createElement("span", { className: "oz-nav-file-tag" }, folderCount ? (open ? folderCount.open : folderCount.closed) : 0))))))), + props.children && (React.createElement("div", { className: "oz-folder-contents", style: { + height: open ? 'auto' : 0, + opacity: open ? 1 : 0, + display: open ? 'inherit' : 'none', + } }, props.children)))))); +} + +const ConditionalRootFolderWrapper = ({ condition, wrapper, children }) => condition ? wrapper(children) : children; + +function NestedFolders(props) { + const plugin = props.plugin; + const app = plugin.app; + let rootFolder = app.vault.getRoot(); + // Global States + const [openFolders$1] = Recoil_index_22(openFolders); + const [activeFolderPath$1, setActiveFolderPath] = Recoil_index_22(activeFolderPath); + const [excludedFolders$1, setExcludedFolders] = Recoil_index_22(excludedFolders); + const [focusedFolder$1, setFocusedFolder] = Recoil_index_22(focusedFolder); + const [folderFileCountMap$1] = Recoil_index_22(folderFileCountMap); + const [_view, setView] = Recoil_index_22(view); + const handleFolderNameClick = (folderPath) => setActiveFolderPath(folderPath); + const focusOnFolder = (folder) => { + setFocusedFolder(folder); + setActiveFolderPath(folder.path); + }; + const getSortedFolderTree = (folderTree) => { + let newTree = folderTree; + newTree = newTree.sort((a, b) => { + if (plugin.settings.sortFoldersBy === 'name') { + return a.folder.name.localeCompare(b.folder.name, 'en', { numeric: true }); + } + else if (plugin.settings.sortFoldersBy === 'item-number') { + let aCount = folderFileCountMap$1[a.folder.path] ? folderFileCountMap$1[a.folder.path].closed : 0; + let bCount = folderFileCountMap$1[b.folder.path] ? folderFileCountMap$1[b.folder.path].closed : 0; + return bCount - aCount; + } + }); + return newTree; + }; + const handleFolderContextMenu = (params) => { + let { event, folder } = params; + // Event Undefined Correction + let e = event; + if (event === undefined) + e = window.event; + // Menu Items + const folderMenu = new obsidian.Menu(); + // Focus Items + if (hasChildFolder(folder)) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Focus on Folder') + .setIcon('zoomInIcon') + .onClick(() => focusOnFolder(folder)); + }); + } + if (!focusedFolder$1.isRoot()) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Focus Back to Root') + .setIcon('zoomOutIcon') + .onClick(() => focusOnFolder(rootFolder)); + }); + } + // CRUD Items + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('New Folder') + .setIcon('folder') + .onClick((ev) => { + let vaultChangeModal = new VaultChangeModal(plugin, folder, 'create folder'); + vaultChangeModal.open(); + }); + }); + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Delete') + .setIcon('trash') + .onClick((ev) => { + let confirmationModal = new ConfirmationModal(plugin, `Are you sure you want to delete folder "${folder.name}" and all folders & files under it?`, () => { + let deleteOption = plugin.settings.deleteFileOption; + if (deleteOption === 'permanent') { + plugin.app.vault.delete(folder, true); + } + else if (deleteOption === 'system-trash') { + plugin.app.vault.trash(folder, true); + } + else if (deleteOption === 'trash') { + plugin.app.vault.trash(folder, false); + } + if (activeFolderPath$1 === folder.path) { + setActiveFolderPath(''); + setView('folder'); + } + }); + confirmationModal.open(); + }); + }); + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Rename') + .setIcon('pencil') + .onClick((ev) => { + let vaultChangeModal = new VaultChangeModal(plugin, folder, 'rename'); + vaultChangeModal.open(); + }); + }); + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('New File') + .setIcon('document') + .onClick((ev) => { + createNewFile(ev, folder.path, plugin); + }); + }); + // Move Item + if (!internalPluginLoaded('file-explorer', app)) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Move folder to...') + .setIcon('paper-plane') + .onClick((ev) => { + let folderMoveModal = new MoveSuggestionModal(app, folder); + folderMoveModal.open(); + }); + }); + } + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Add to Excluded Folders') + .setIcon('switch') + .onClick((ev) => { + setExcludedFolders([...excludedFolders$1, folder.path]); + }); + }); + // Folder Note Open & Create & Delete (If folder note loaded, avoid duplicate create, delete buttons) + const folderNotePath = `${folder.path}/${folder.name}.md`; + let folderNoteExists = folder.children.some((f) => `${folder.name}.md` === f.name); + if (folderNoteExists) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Open Folder Note') + .setIcon('go-to-file') + .onClick((ev) => { + plugin.app.workspace.activeLeaf.setViewState({ + type: 'markdown', + state: { file: folderNotePath }, + }); + }); + }); + } + if (!pluginIsLoaded(plugin.app, 'folder-note-core')) { + // Delete Folder Note Button + if (folderNoteExists) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Delete Folder Note') + .setIcon('trash') + .onClick((ev) => { + const folderNoteFile = plugin.app.vault.getAbstractFileByPath(folderNotePath); + if (folderNoteFile) + plugin.app.vault.delete(folderNoteFile, true); + }); + }); + } + // Create Folder Note Button + else { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Create Folder Note') + .setIcon('create-new') + .onClick((ev) => __awaiter(this, void 0, void 0, function* () { + createNewMarkdownFile(plugin, folder, folder.name, `# ${folder.name}`); + })); + }); + } + } + // Trigger + app.workspace.trigger('file-menu', folderMenu, folder, 'file-explorer'); + if (e instanceof MouseEvent) { + folderMenu.showAtPosition({ x: e.pageX, y: e.pageY }); + } + else { + folderMenu.showAtPosition({ x: 0, y: 0 }); + } + return false; + }; + if (!props.folderTree.children) + return null; + let sortedFolderTree = reactExports.useMemo(() => getSortedFolderTree(props.folderTree.children), [props.folderTree.children, excludedFolders$1, plugin.settings.sortFoldersBy]); + return (React.createElement(React.Fragment, null, Array.isArray(props.folderTree.children) && + sortedFolderTree.map((child) => { + return (React.createElement(React.Fragment, { key: child.folder.path }, child.children.length > 0 ? (React.createElement(Tree, { plugin: plugin, content: child.folder.name, open: openFolders$1.contains(child.folder.path), onClick: () => handleFolderNameClick(child.folder.path), onDoubleClick: () => focusOnFolder(child.folder), onContextMenu: (e) => handleFolderContextMenu({ + event: e, + folder: child.folder, + }), folder: child.folder }, + React.createElement(NestedFolders, { plugin: plugin, folderTree: child }))) : (React.createElement(Tree, { plugin: plugin, content: child.folder.name, onClick: () => handleFolderNameClick(child.folder.path), onDoubleClick: () => focusOnFolder(child.folder), onContextMenu: (e) => handleFolderContextMenu({ + event: e, + folder: child.folder, + }), folder: child.folder })))); + }))); +} + +function MainFolder(props) { + const treeStyles = { color: 'var(--text-muted)', fill: '#c16ff7', width: '100%' }; + const plugin = props.plugin; + const app = plugin.app; + const rootFolder = app.vault.getRoot(); + // Global States + const [_activeFolderPath, setActiveFolderPath] = Recoil_index_22(activeFolderPath); + const [folderTree$1] = Recoil_index_22(folderTree); + const [focusedFolder$1, setFocusedFolder] = Recoil_index_22(focusedFolder); + const [_openFolders, setOpenFolders] = Recoil_index_22(openFolders); + // Force Update + const forceUpdate = useForceUpdate(); + const focusOnFolder = (folder) => { + setFocusedFolder(folder); + setActiveFolderPath(folder.path); + }; + const createFolder = (underFolder) => { + let vaultChangeModal = new VaultChangeModal(plugin, underFolder, 'create folder'); + vaultChangeModal.open(); + }; + const handleRootFolderContextMenu = (event, folder) => { + // Event Undefined Correction + let e = event; + if (event === undefined) + e = window.event; + // Menu Items + const folderMenu = new obsidian.Menu(); + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('New Folder') + .setIcon('folder') + .onClick((ev) => createFolder(folder)); + }); + if (!folder.isRoot()) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Focus Back to Root') + .setIcon('zoomOutDoubleIcon') + .onClick(() => focusOnFolder(rootFolder)); + }); + } + if (folder.parent && !folder.parent.isRoot() && folder.parent !== focusedFolder$1) { + folderMenu.addItem((menuItem) => { + menuItem + .setTitle('Focus to Parent Folder') + .setIcon('zoomOutIcon') + .onClick(() => focusOnFolder(folder.parent)); + }); + } + // Trigger + app.workspace.trigger('root-folder-menu', folderMenu, folder); + folderMenu.showAtPosition({ x: e.pageX, y: e.pageY }); + return false; + }; + // --> Collapse, Expland Button Functions + const collapseAllFolders = () => setOpenFolders([]); + const explandAllFolders = () => { + let newOpenFolders = []; + newOpenFolders.push(folderTree$1.folder.path); + const recursiveFx = (folderTreeChildren) => { + for (let folderTreeChild of folderTreeChildren) { + newOpenFolders.push(folderTreeChild.folder.path); + if (folderTreeChild.children.length > 0) { + recursiveFx(folderTreeChild.children); + } + } + }; + recursiveFx(folderTree$1.children); + setOpenFolders(newOpenFolders); + }; + const triggerFolderSortOptions = (e) => { + const sortMenu = new obsidian.Menu(); + const changeSortSettingTo = (newValue) => { + plugin.settings.sortFoldersBy = newValue; + plugin.saveSettings(); + forceUpdate(); + }; + sortMenu.addItem((menuItem) => { + menuItem.setTitle('Folder Name (A to Z)'); + menuItem.onClick((ev) => { + changeSortSettingTo('name'); + }); + }); + if (plugin.settings.folderCount) { + sortMenu.addItem((menuItem) => { + menuItem.setTitle('Item Numbers (Bigger to Smaller)'); + menuItem.onClick((ev) => { + changeSortSettingTo('item-number'); + }); + }); + } + // Trigger + plugin.app.workspace.trigger('sort-menu', sortMenu); + sortMenu.showAtPosition({ x: e.pageX, y: e.pageY }); + return false; + }; + const handleFolderNameDoubleClick = (folder) => { + if (!folder.isRoot()) + focusOnFolder(folder.parent); + }; + let folderActionItemSize = 22; + return (React.createElement("div", { className: "oz-folders-tree-wrapper" }, + React.createElement("div", { className: "oz-folders-action-items file-tree-header-fixed" }, + React.createElement(MdOutlineCreateNewFolder, { className: "oz-nav-action-button", size: folderActionItemSize, onClick: (e) => createFolder(plugin.app.vault.getRoot()), "aria-label": "Create Folder" }), + React.createElement(CgSortAz, { className: "oz-nav-action-button", size: folderActionItemSize, onClick: triggerFolderSortOptions, "aria-label": "Sorting Options" }), + React.createElement(CgChevronDoubleUp, { className: "oz-nav-action-button", size: folderActionItemSize, onClick: collapseAllFolders, "aria-label": "Collapse Folders" }), + React.createElement(CgChevronDoubleDown, { className: "oz-nav-action-button", size: folderActionItemSize, onClick: explandAllFolders, "aria-label": "Expand Folders" })), + React.createElement(ConditionalRootFolderWrapper, { condition: (focusedFolder$1 && !focusedFolder$1.isRoot()) || (focusedFolder$1 && focusedFolder$1.isRoot && plugin.settings.showRootFolder), wrapper: (children) => { + return (React.createElement(Tree, { plugin: plugin, content: focusedFolder$1.isRoot() ? plugin.app.vault.getName() : focusedFolder$1.name, open: true, isRootFolder: focusedFolder$1.isRoot(), style: treeStyles, onClick: () => setActiveFolderPath(focusedFolder$1.path), onDoubleClick: () => handleFolderNameDoubleClick(focusedFolder$1), folder: focusedFolder$1, onContextMenu: (e) => handleRootFolderContextMenu(e, focusedFolder$1) }, children)); + } }, folderTree$1 && React.createElement(NestedFolders, { plugin: plugin, folderTree: folderTree$1 })))); +} + +const SingleViewVertical = (props) => { + let { plugin } = props; + const [dividerOnMove, setDividerOnMove] = reactExports.useState(false); + const [folderPaneHeight, setFolderPaneHeight] = reactExports.useState(null); + const [clientY, setClientY] = reactExports.useState(null); + let folderPaneRef = reactExports.useRef(); + let dividerRef = reactExports.useRef(); + let heightSetting = localStorage.getItem(plugin.keys.customHeightKey); + reactExports.useEffect(() => { + if (folderPaneHeight) { + localStorage.setItem(plugin.keys.customHeightKey, folderPaneHeight.toString()); + } + }, [folderPaneHeight]); + function touchMouseStart(e) { + if (e.type !== 'drag' && e.target.id !== 'file-tree-divider') + return; + e.preventDefault(); + setDividerOnMove(true); + let height = dividerRef.current.offsetTop - folderPaneRef.current.offsetTop; + setFolderPaneHeight(height); + setClientY(e.nativeEvent.clientY); + } + function touchMouseMove(e) { + if (!dividerOnMove) + return; + e.preventDefault(); + setFolderPaneHeight(folderPaneHeight + (e.nativeEvent.clientY - clientY)); + setClientY(e.nativeEvent.clientY); + } + function touchMouseEnd(e) { + if (!dividerOnMove) + return; + e.preventDefault(); + setDividerOnMove(false); + setClientY(e.nativeEvent.clientY); + } + return ( + // Register Move & End Events for All File Tree Leaf + React.createElement("div", { className: "file-tree-container", onMouseMove: (e) => touchMouseMove(e), onMouseUp: (e) => touchMouseEnd(e) }, + React.createElement("div", { className: "oz-folder-pane", ref: folderPaneRef, style: { height: folderPaneHeight ? `${folderPaneHeight}px` : heightSetting && heightSetting !== '' ? `${heightSetting}px` : '50%' } }, + React.createElement(MainFolder, { plugin: plugin })), + React.createElement("div", { id: "file-tree-divider", ref: dividerRef, onClick: (e) => e.preventDefault(), onMouseDown: (e) => touchMouseStart(e), className: dividerOnMove ? 'active-divider' : '' }), + React.createElement("div", { className: "oz-file-list-pane" }, + React.createElement(FileComponent, { plugin: plugin })))); +}; +const SingleViewHorizontal = (props) => { + let { plugin } = props; + const [dividerOnMove, setDividerOnMove] = reactExports.useState(false); + const [folderPaneWidth, setFolderPaneWidth] = reactExports.useState(null); + const [clientX, setClientX] = reactExports.useState(null); + let folderPaneRef = reactExports.useRef(); + let dividerRef = reactExports.useRef(); + let widthSetting = localStorage.getItem(plugin.keys.customWidthKey); + reactExports.useEffect(() => { + if (folderPaneWidth) { + localStorage.setItem(plugin.keys.customWidthKey, folderPaneWidth.toString()); + } + }, [folderPaneWidth]); + function touchMouseStart(e) { + if (e.type !== 'drag' && e.target.id !== 'file-tree-divider-horizontal') + return; + e.preventDefault(); + setDividerOnMove(true); + let width = dividerRef.current.offsetLeft - folderPaneRef.current.offsetLeft; + setFolderPaneWidth(width); + setClientX(e.nativeEvent.clientX); + } + function touchMouseMove(e) { + if (!dividerOnMove) + return; + e.preventDefault(); + setFolderPaneWidth(folderPaneWidth + (e.nativeEvent.clientX - clientX)); + setClientX(e.nativeEvent.clientX); + } + function touchMouseEnd(e) { + if (!dividerOnMove) + return; + e.preventDefault(); + setDividerOnMove(false); + setClientX(e.nativeEvent.clientX); + } + return ( + // Register Move & End Events for All File Tree Leaf + React.createElement("div", { className: "file-tree-container-horizontal", onMouseMove: (e) => touchMouseMove(e), onMouseUp: (e) => touchMouseEnd(e) }, + React.createElement("div", { className: "oz-folder-pane-horizontal", ref: folderPaneRef, style: { width: folderPaneWidth ? `${folderPaneWidth}px` : widthSetting && widthSetting !== '' ? `${widthSetting}px` : '50%' } }, + React.createElement(MainFolder, { plugin: plugin })), + React.createElement("div", { id: "file-tree-divider-horizontal", ref: dividerRef, onClick: (e) => e.preventDefault(), onMouseDown: (e) => touchMouseStart(e), className: dividerOnMove ? 'active-divider' : '' }), + React.createElement("div", { className: "oz-file-list-pane-horizontal" }, + React.createElement(FileComponent, { plugin: plugin })))); +}; + +function MainTreeComponent(props) { + // --> Main Variables + const { plugin } = props; + // --> Force Update Hook + const forceUpdate = useForceUpdate(); + // --> Plugin States + const [view$1, setView] = Recoil_index_22(view); + const [activeFolderPath$1, setActiveFolderPath] = Recoil_index_22(activeFolderPath); + const [ozFileList$1, setOzFileList] = Recoil_index_22(ozFileList); + const [ozPinnedFiles, setOzPinnedFiles] = Recoil_index_22(ozPinnedFileList); + const [openFolders$1, setOpenFolders] = Recoil_index_22(openFolders); + const [_folderTree, setFolderTree] = Recoil_index_22(folderTree); + const [excludedFolders$1, setExcludedFolders] = Recoil_index_22(excludedFolders); + const [_folderFileCountMap, setFolderFileCountMap] = Recoil_index_22(folderFileCountMap); + const [excludedExtensions$1, setExcludedExtensions] = Recoil_index_22(excludedExtensions); + const [_showSubFolders, setShowSubFolders] = Recoil_index_22(showSubFolders); + const [focusedFolder$1, setFocusedFolder] = Recoil_index_22(focusedFolder); + const [activeOZFile$1, setActiveOzFile] = Recoil_index_22(activeOZFile); + const setNewFileList = (folderPath) => { + let filesPath = folderPath ? folderPath : activeFolderPath$1; + setOzFileList(getFilesUnderPath({ + path: filesPath, + plugin: plugin, + excludedExtensions: excludedExtensions$1, + excludedFolders: excludedFolders$1, + })); + }; + const setInitialActiveFolderPath = () => { + if (['Horizontal', 'Vertical'].includes(plugin.settings.evernoteView)) { + let previousActiveFolder = localStorage.getItem(plugin.keys.activeFolderPathKey); + if (previousActiveFolder) { + let folder = plugin.app.vault.getAbstractFileByPath(previousActiveFolder); + if (folder && folder instanceof obsidian.TFolder) { + setActiveFolderPath(folder.path); + } + } + } + }; + // --> Create Custom Event Handlers + reactExports.useEffect(() => { + window.addEventListener(eventTypes.vaultChange, vaultChangeEvent); + window.addEventListener(eventTypes.activeFileChange, changeActiveFile); + window.addEventListener(eventTypes.refreshView, forceUpdate); + window.addEventListener(eventTypes.revealFile, handleRevealFileEvent); + window.addEventListener(eventTypes.revealFolder, handleRevealFolderEvent); + window.addEventListener(eventTypes.createNewNote, handleCreateNewNoteEvent); + return () => { + window.removeEventListener(eventTypes.vaultChange, vaultChangeEvent); + window.removeEventListener(eventTypes.activeFileChange, changeActiveFile); + window.removeEventListener(eventTypes.refreshView, forceUpdate); + window.removeEventListener(eventTypes.revealFile, handleRevealFileEvent); + window.removeEventListener(eventTypes.revealFolder, handleRevealFolderEvent); + window.removeEventListener(eventTypes.createNewNote, handleCreateNewNoteEvent); + }; + }, []); + const handleCreateNewNoteEvent = () => { + let currentActiveFolderPath = '/'; + setActiveFolderPath((activeFolderPath) => { + currentActiveFolderPath = activeFolderPath; + return activeFolderPath; + }); + createNewFile(null, currentActiveFolderPath, plugin); + }; + const vaultChangeEvent = (evt) => { + handleVaultChanges(evt.detail.file, evt.detail.changeType, evt.detail.oldPath); + }; + const changeActiveFile = (evt) => { + // @ts-ignore + let filePath = evt.detail.filePath; + let file = plugin.app.vault.getAbstractFileByPath(filePath); + if (file) + setActiveOzFile(TFile2OZFile(file)); + }; + // Initial Load + reactExports.useEffect(() => { + setInitialFocusedFolder(); + setExcludedFolders(getExcludedFolders()); + setExcludedExtensions(getExcludedExtensions()); + setOzPinnedFiles(getPinnedFilesFromSettings()); + setOpenFolders(getOpenFoldersFromSettings()); + setShowSubFolders(plugin.settings.showFilesFromSubFolders); + setInitialActiveFolderPath(); + if (plugin.settings.folderCount) + setFolderFileCountMap(getFolderNoteCountMap(plugin)); + }, []); + // Each Focused Folder Change triggers new folder tree build + reactExports.useEffect(() => { + if (focusedFolder$1) { + setFolderTree(createFolderTree({ + startFolder: focusedFolder$1, + plugin: plugin, + excludedFolders: excludedFolders$1, + })); + localStorage.setItem(plugin.keys.focusedFolder, focusedFolder$1.path); + } + }, [focusedFolder$1, excludedFolders$1]); + const setInitialFocusedFolder = () => { + let localFocusedFolder = localStorage.getItem(plugin.keys.focusedFolder); + if (localFocusedFolder) { + let folder = plugin.app.vault.getAbstractFileByPath(localFocusedFolder); + if (folder && folder instanceof obsidian.TFolder) { + setFocusedFolder(folder); + return; + } + } + setFocusedFolder(plugin.app.vault.getRoot()); + }; + // State Change Handlers + reactExports.useEffect(() => savePinnedFilesToSettings(), [ozPinnedFiles]); + reactExports.useEffect(() => saveOpenFoldersToSettings(), [openFolders$1]); + reactExports.useEffect(() => saveExcludedFoldersToSettings(), [excludedFolders$1]); + // If activeFolderPath is set, it means it should go to 'file' view + reactExports.useEffect(() => { + if (activeFolderPath$1 !== '') { + setNewFileList(activeFolderPath$1); + setView('file'); + } + localStorage.setItem(plugin.keys.activeFolderPathKey, activeFolderPath$1); + }, [activeFolderPath$1]); + // Load Excluded Extensions as State + function getExcludedExtensions() { + let extensionsString = plugin.settings.excludedExtensions; + let excludedExtensions = []; + for (let extension of extensionsString.split(',')) { + excludedExtensions.push(extension.trim()); + } + return excludedExtensions; + } + // Load Excluded Folders + function getExcludedFolders() { + let excludedString = plugin.settings.excludedFolders; + let excludedFolders = []; + if (excludedString) { + for (let excludedFolder of excludedString.split(',')) { + if (excludedFolder !== '') + excludedFolders.push(excludedFolder.trim()); + } + } + return excludedFolders; + } + // Load The String List and Set Open Folders State + function getOpenFoldersFromSettings() { + let openFolders = []; + let localStorageOpenFolders = localStorage.getItem(plugin.keys.openFoldersKey); + if (localStorageOpenFolders) { + localStorageOpenFolders = JSON.parse(localStorageOpenFolders); + for (let folder of localStorageOpenFolders) { + let openFolder = plugin.app.vault.getAbstractFileByPath(folder); + if (openFolder) + openFolders.push(openFolder.path); + } + } + return openFolders; + } + // Load The String List anad Set Pinned Files State + function getPinnedFilesFromSettings() { + let pinnedFiles = []; + let localStoragePinnedFiles = localStorage.getItem(plugin.keys.pinnedFilesKey); + if (localStoragePinnedFiles) { + localStoragePinnedFiles = JSON.parse(localStoragePinnedFiles); + for (let file of localStoragePinnedFiles) { + let pinnedFile = plugin.app.vault.getAbstractFileByPath(file); + if (pinnedFile) + pinnedFiles.push(TFile2OZFile(pinnedFile)); + } + } + return pinnedFiles; + } + // Get The Folders State and Save in Data as String Array + function saveOpenFoldersToSettings() { + let openFoldersToSave = []; + for (let folder of openFolders$1) { + openFoldersToSave.push(folder); + } + localStorage.setItem(plugin.keys.openFoldersKey, JSON.stringify(openFoldersToSave)); + } + // Get The Pinned Files State and Save in Data as String Array + function savePinnedFilesToSettings() { + let pinnedFilesToSave = []; + for (let file of ozPinnedFiles) { + pinnedFilesToSave.push(file.path); + } + localStorage.setItem(plugin.keys.pinnedFilesKey, JSON.stringify(pinnedFilesToSave)); + } + // Save Excluded Folders to Settings as String + function saveExcludedFoldersToSettings() { + plugin.settings.excludedFolders = excludedFolders$1.length > 1 ? excludedFolders$1.join(', ') : excludedFolders$1[0]; + plugin.saveSettings(); + } + // Function for Event Handlers + function handleVaultChanges(file, changeType, oldPathBeforeRename) { + // Get Current States from Setters + let currentActiveFolderPath = ''; + setActiveFolderPath((activeFolderPath) => { + currentActiveFolderPath = activeFolderPath; + return activeFolderPath; + }); + // File Event Handlers + if (file instanceof obsidian.TFile) { + // Update Pinned Files + if (['rename', 'delete'].contains(changeType)) { + let currentOzPinnedFiles = []; + setOzPinnedFiles((ozPinnedFiles) => { + currentOzPinnedFiles = ozPinnedFiles; + return ozPinnedFiles; + }); + const filteredPinnedFiles = currentOzPinnedFiles.filter((f) => f.path !== (changeType === 'rename' ? oldPathBeforeRename : file.path)); + if (filteredPinnedFiles.length !== currentOzPinnedFiles.length) { + setOzPinnedFiles([...filteredPinnedFiles, ...(changeType === 'rename' ? [TFile2OZFile(file)] : [])]); + } + } + // Update current View + let currentView = ''; + setView((view) => { + currentView = view; + return view; + }); + if (currentView === 'file') { + let currentFileList = []; + setOzFileList((fileList) => { + currentFileList = fileList; + return fileList; + }); + // Evaluate changes + if (changeType === 'rename' || changeType === 'modify' || changeType === 'delete') { + // If the file is modified but sorting is not last-update to not component update unnecessarily, return + let sortFilesBy = plugin.settings.sortFilesBy; + if (changeType === 'modify') { + if (!(sortFilesBy === 'last-update' || sortFilesBy === 'file-size')) { + return; + } + } + // If the file renamed or deleted or modified is in the current view, it will be updated + let parentFolderPath = file.path.substring(0, file.path.lastIndexOf('/')); + let fileInCurrentView = currentFileList.some((f) => { + return changeType === 'rename' ? f.path === oldPathBeforeRename : f.path === file.path; + }); + let fileInCurrentFolder = currentActiveFolderPath === parentFolderPath || + (plugin.settings.showFilesFromSubFolders && parentFolderPath.startsWith(currentActiveFolderPath)); + if (fileInCurrentView) { + if (changeType === 'delete') { + setOzFileList(currentFileList.filter((f) => { + return f.path !== file.path; + })); + } + else if (changeType === 'rename' || + (changeType === 'modify' && (sortFilesBy === 'last-update' || sortFilesBy === 'file-size'))) { + // Fix for Root Folder Path + if (currentActiveFolderPath === '/') + currentActiveFolderPath = ''; + // Set the file list + setOzFileList([ + ...currentFileList.filter((f) => { + return changeType === 'rename' ? f.path !== oldPathBeforeRename : f.path !== file.path; + }), + // Include any file that roles up to the current active folder, not only the direct ones + ...(file.parent.path.startsWith(currentActiveFolderPath) ? [TFile2OZFile(file)] : []), + ]); + // If active file is renamed, change the active file + let currentActiveOZFile = null; + setActiveOzFile((activeOZFile) => { + currentActiveOZFile = activeOZFile; + return activeOZFile; + }); + if (changeType === 'rename' && currentActiveOZFile && currentActiveOZFile.path === oldPathBeforeRename) { + setActiveOzFile(TFile2OZFile(file)); + } + } + } + // File is no in current view but parent folder is and should be included + else if (fileInCurrentFolder && !fileInCurrentView) { + setOzFileList([...currentFileList, TFile2OZFile(file)]); + } + } + else if (changeType === 'create') { + let fileIsCreatedUnderActiveFolder = file.path.match(new RegExp(currentActiveFolderPath + '.*')); + if (fileIsCreatedUnderActiveFolder) { + // If file is not already in the list, add into view + if (!currentFileList.some((f) => f.path === file.path)) { + setOzFileList([...currentFileList, TFile2OZFile(file)]); + } + } + } + } + } + // Folder Event Handlers + else if (file instanceof obsidian.TFolder) { + let currentFocusedFolder = null; + setFocusedFolder((focusedFolder) => { + currentFocusedFolder = focusedFolder; + return focusedFolder; + }); + setFolderTree(createFolderTree({ startFolder: currentFocusedFolder, plugin: plugin, excludedFolders: excludedFolders$1 })); + // if active folder is renamed, activefolderpath needs to be refreshed + if (changeType === 'rename' && oldPathBeforeRename && currentActiveFolderPath === oldPathBeforeRename) { + setActiveFolderPath(file.path); + } + } + // After Each Vault Change Folder Count Map to Be Updated + if (plugin.settings.folderCount && changeType !== 'modify') { + setFolderFileCountMap(getFolderNoteCountMap(plugin)); + } + } + // ******** REVEAL ACTIVE FILE FUNCTIONS ******** // + // --> During file list change, it will scroll to the active file element + reactExports.useEffect(() => { + if (activeOZFile$1 && ozFileList$1.length > 0) + scrollToFile(activeOZFile$1); + }, [ozFileList$1]); + // Custom Event Handler Function + function handleRevealFileEvent(evt) { + return __awaiter(this, void 0, void 0, function* () { + // @ts-ignore + const file = evt.detail.file; + if (file && file instanceof obsidian.TFile) { + yield plugin.openFileTreeLeaf(true); + revealFileInFileTree(TFile2OZFile(file)); + } + else { + new obsidian.Notice('File not found'); + } + }); + } + function handleRevealFolderEvent(evt) { + // @ts-ignore + const folder = evt.detail.folder; + if (folder && folder instanceof obsidian.TFolder) { + revealFolderInFileTree(folder); + } + else { + new obsidian.Notice('Folder not found'); + } + } + // Scrolling Functions + function scrollToFile(fileToScroll) { + const selector = `div.oz-file-tree-files div.oz-nav-file-title[data-path="${fileToScroll.path}"]`; + const fileTitleElement = document.querySelector(selector); + if (fileTitleElement) + fileTitleElement.scrollIntoView(false); + } + function scrollToFolder(folder) { + const selector = `div.oz-folder-contents div.oz-folder-element[data-path="${folder.path}"]`; + const folderElement = document.querySelector(selector); + if (folderElement) + folderElement.scrollIntoView(false); + } + // Helper for Reveal Button: Obtain all folders that needs to be opened + const getAllFoldersToOpen = (fileToReveal) => { + let foldersToOpen = []; + const recursiveFx = (folder) => { + foldersToOpen.push(folder.path); + if (folder.parent) + recursiveFx(folder.parent); + }; + recursiveFx(fileToReveal instanceof obsidian.TFile ? fileToReveal.parent : fileToReveal); + return foldersToOpen; + }; + // --> Handle Reveal Folder Button + function revealFolderInFileTree(folderToReveal) { + if (!folderToReveal) + return; + setActiveFolderPath(folderToReveal.path); + const foldersToOpen = getAllFoldersToOpen(folderToReveal); + let openFoldersSet = new Set([...openFolders$1, ...foldersToOpen]); + setOpenFolders(Array.from(openFoldersSet)); + scrollToFolder(folderToReveal); + } + // --> Handle Reveal Active File Button + function revealFileInFileTree(ozFileToReveal) { + const fileToReveal = plugin.app.vault.getAbstractFileByPath(ozFileToReveal.path); + if (!fileToReveal) + return; + // Get parent folder + const parentFolder = fileToReveal.parent; + // Focused Folder needs to be root for the reveal + if (focusedFolder$1 && focusedFolder$1.path !== '/') + setFocusedFolder(plugin.app.vault.getRoot()); + // Sanity check - Parent to be folder and set required component states + if (parentFolder instanceof obsidian.TFolder) { + // Set Active Folder - It will trigger auto file list update + setActiveFolderPath(parentFolder.path); + // Set active file to show in the list + setActiveOzFile(TFile2OZFile(fileToReveal)); + // Set openfolders to expand in the folder list + const foldersToOpen = getAllFoldersToOpen(fileToReveal); + let openFoldersSet = new Set([...openFolders$1, ...foldersToOpen]); + setOpenFolders(Array.from(openFoldersSet)); + scrollToFile(TFile2OZFile(fileToReveal)); + scrollToFolder(parentFolder); + } + } + return (React.createElement(React.Fragment, null, view$1 === 'folder' ? (React.createElement(MainFolder, { plugin: plugin })) : plugin.settings.evernoteView === 'Horizontal' ? (React.createElement(SingleViewHorizontal, { plugin: plugin })) : plugin.settings.evernoteView === 'Vertical' ? (React.createElement(SingleViewVertical, { plugin: plugin })) : (React.createElement(FileComponent, { plugin: plugin })))); +} + +class FileTreeView extends obsidian.ItemView { + constructor(leaf, plugin) { + super(leaf); + this.plugin = plugin; + } + getViewType() { + var _a; + return (_a = this.plugin) === null || _a === void 0 ? void 0 : _a.VIEW_TYPE; + } + getDisplayText() { + var _a; + return (_a = this.plugin) === null || _a === void 0 ? void 0 : _a.VIEW_DISPLAY_TEXT; + } + getIcon() { + var _a; + return (_a = this.plugin) === null || _a === void 0 ? void 0 : _a.ICON; + } + onClose() { + return __awaiter(this, void 0, void 0, function* () { + this.destroy(); + }); + } + destroy() { + if (this.root) + this.root.unmount(); + } + onOpen() { + return __awaiter(this, void 0, void 0, function* () { + this.destroy(); + this.constructFileTree(this.app.vault.getRoot().path, ''); + }); + } + constructFileTree(folderPath, vaultChange) { + this.destroy(); + this.root = createRoot(this.contentEl); + this.root.render(React.createElement("div", { className: "file-tree-plugin-view" }, + React.createElement(Recoil_index_5, null, + React.createElement(MainTreeComponent, { fileTreeView: this, plugin: this.plugin })))); + } +} + +var lib = {}; + +Object.defineProperty(lib,"__esModule",{value:true});var LocalStorageHandler_1 = lib.LocalStorageHandler=void 0;var LocalStorageHandler=/** @class */function(){/** + * @param cacheHours: Default is 24 Hours, specify if you need less or more + */function LocalStorageHandler(params){var _this=this;this.getTimeStampKey=function(key){return key+"-timestamp";};/** + * Checks the key and returns the value from LocalStorage if data saved in last cachedHours. + * If no data within last cacheHours, returns null. + * If data, returns String value from the Storage. + * @param key the key to check + * @param checkCacheHours specify if you want to check the cachehours or return the value no matter when set + * @param cacheHours specify if you want to overwrite the cacheHours of the Local Storage Handler and check with the new value + * @returns Value from Local Storage as String or null + */this.getFromLocalStorage=function(params){var key=params.key,checkCacheHours=params.checkCacheHours,cacheHours=params.cacheHours;var localData=localStorage.getItem(key);var localDataTimeStamp=localStorage.getItem(_this.getTimeStampKey(key));if(checkCacheHours!==undefined){if(!checkCacheHours)return localData;}// If Local Storage has the data less than cacheHours +if(cacheHours)_this.cacheHours=cacheHours;if(localDataTimeStamp!==null){var dt=new Date(JSON.parse(localDataTimeStamp));var hours=Math.abs(new Date().getTime()-dt.getTime())/3600000;if(hours<_this.cacheHours&&localData!==null){return localData;}}return null;};/** + * Sets the LocalStorage Value with provided key + * Sets also a timestamp in LocalStorage for the provided key + * You need to return the LocalStorage value by utilizing the getFromLocalStorage() function + * @param key + * @param value + */this.setLocalStorage=function(params){var key=params.key,value=params.value;localStorage.setItem(key,value);localStorage.setItem(_this.getTimeStampKey(key),JSON.stringify(new Date()));return 'success';};/** + * @param key - key to remove from local storage + */this.removeFromLocalStorage=function(params){var key=params.key;var localData=localStorage.getItem(key);if(!localData)return 'not-found';// Delete the key first if found +localStorage.removeItem(key);// Delete the timestamp if found +var timestampKey=_this.getTimeStampKey(key);var localTimestamp=localStorage.getItem(timestampKey);if(localTimestamp)localStorage.removeItem(timestampKey);return 'success';};var cacheHours=params.cacheHours;this.cacheHours=cacheHours?cacheHours:24;}return LocalStorageHandler;}();LocalStorageHandler_1 = lib.LocalStorageHandler=LocalStorageHandler; + +const DEFAULT_SETTINGS = { + openViewOnStart: true, + ribbonIcon: true, + showRootFolder: true, + showFilesFromSubFolders: true, + searchFunction: true, + allSearchOnlyInFocusedFolder: false, + showFilesFromSubFoldersButton: true, + revealActiveFileButton: false, + excludedExtensions: '', + excludedFolders: '', + hideAttachments: false, + attachmentsFolderName: 'attachments', + folderIcon: 'default', + folderCount: true, + folderCountOption: 'notes', + evernoteView: 'Vertical', + filePreviewOnHover: false, + iconBeforeFileName: true, + sortFilesBy: 'name', + sortReverse: false, + sortFoldersBy: 'name', + fixedHeaderInFileList: true, + createdYaml: false, + fileNameIsHeader: false, + folderNote: false, + deleteFileOption: 'trash', + showFileNameAsFullPath: false, + bookmarksEvents: false, +}; +class FileTreeAlternativePluginSettingsTab extends obsidian.PluginSettingTab { + constructor(app, plugin) { + super(app, plugin); + this.plugin = plugin; + } + refreshView() { + let evt = new CustomEvent(eventTypes.refreshView, {}); + window.dispatchEvent(evt); + } + display() { + let { containerEl } = this; + containerEl.empty(); + let lsh = new LocalStorageHandler_1({}); + /* ------------- Buy Me a Coffee ------------- */ + const coffeeDiv = containerEl.createDiv('coffee'); + coffeeDiv.addClass('oz-coffee-div'); + const coffeeLink = coffeeDiv.createEl('a', { href: 'https://ko-fi.com/L3L356V6Q' }); + const coffeeImg = coffeeLink.createEl('img', { + attr: { + src: 'https://cdn.ko-fi.com/cdn/kofi2.png?v=3', + }, + }); + coffeeImg.height = 45; + /* ------------- General Settings ------------- */ + containerEl.createEl('h2', { text: 'General' }); + new obsidian.Setting(containerEl) + .setName('Evernote View') + .setDesc('Turn on if you want to see the folders and files in a single view without switching between views. Similar experience to Evernote.') + .addDropdown((dropdown) => { + dropdown + .addOption('Disabled', 'Disabled') + .addOption('Horizontal', 'Horizontal') + .addOption('Vertical', 'Vertical') + .setValue(this.plugin.settings.evernoteView) + .onChange((value) => { + this.plugin.settings.evernoteView = value; + this.plugin.saveSettings(); + this.refreshView(); + }); + }); + new obsidian.Setting(containerEl) + .setName('Ribbon Icon') + .setDesc('Turn on if you want Ribbon Icon for activating the File Tree.') + .addToggle((toggle) => toggle.setValue(this.plugin.settings.ribbonIcon).onChange((value) => { + this.plugin.settings.ribbonIcon = value; + this.plugin.saveSettings(); + this.plugin.refreshIconRibbon(); + })); + new obsidian.Setting(containerEl) + .setName('Open on Start') + .setDesc("Turn off if you don't want file tree view to be opened automatically during vault start") + .addToggle((toggle) => toggle.setValue(this.plugin.settings.openViewOnStart).onChange((value) => { + this.plugin.settings.openViewOnStart = value; + this.plugin.saveSettings(); + })); + new obsidian.Setting(containerEl) + .setName('Bookmarks Event Listener (Shift + Click)') + .setDesc('This will enable to reveal file or folder from core bookmarks plugin.' + + 'Because there is no API yet to overwrite the default behaviour for Bookmarks plugin,' + + 'this will add an event to reveal file if you click on bookmark name using shift') + .addToggle((toggle) => toggle.setValue(this.plugin.settings.bookmarksEvents).onChange((value) => { + this.plugin.settings.bookmarksEvents = value; + if (value) { + this.plugin.bookmarksAddEventListener(); + } + else { + this.plugin.bookmarksRemoveEventListener(); + } + this.plugin.saveSettings(); + })); + /* ------------- Folder Pane Settings ------------- */ + containerEl.createEl('h2', { text: 'Folder Pane Settings' }); + new obsidian.Setting(containerEl) + .setName('Folder Icons') + .setDesc('Change the default folder icons your preferred option') + .addDropdown((dropdown) => { + dropdown + .addOption('default', 'Default') + .addOption('box-folder', 'Box Icons') + .addOption('icomoon', 'IcoMoon Icons') + .addOption('typicon', 'Typicons') + .addOption('circle-gg', 'Circle GG') + .setValue(this.plugin.settings.folderIcon) + .onChange((value) => { + this.plugin.settings.folderIcon = value; + this.plugin.saveSettings(); + this.refreshView(); + }); + }); + new obsidian.Setting(containerEl) + .setName('Show Root Folder') + .setDesc(`Turn on if you want your Root Folder "${this.plugin.app.vault.getName()}" to be visible in the file tree`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.showRootFolder).onChange((value) => { + this.plugin.settings.showRootFolder = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('Folder Count') + .setDesc('Turn on if you want see the number of notes/files under file tree.') + .addToggle((toggle) => toggle.setValue(this.plugin.settings.folderCount).onChange((value) => { + this.plugin.settings.folderCount = value; + this.plugin.saveSettings(); + this.plugin.refreshTreeLeafs(); + })); + new obsidian.Setting(containerEl) + .setName('Folder Count Details') + .setDesc('Select which files you want to be included into count') + .addDropdown((dropdown) => { + dropdown.addOption('notes', 'Notes'); + dropdown.addOption('files', 'All Files'); + dropdown.setValue(this.plugin.settings.folderCountOption); + dropdown.onChange((option) => { + this.plugin.settings.folderCountOption = option; + this.plugin.saveSettings(); + this.refreshView(); + }); + }); + new obsidian.Setting(containerEl) + .setName('Folder Note') + .setDesc(`Turn this option on if you want to create Folder Note same as Folder Note Plugin. + By default, Click will open the list of files. You need to use "Shift+Click" to open the folder note. If folder has a folder note, + you will see an arrow icon on the right side of folder. The note created as a folder note is hidden in the file list.`) + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.folderNote).onChange((value) => { + this.plugin.settings.folderNote = value; + this.plugin.saveSettings(); + this.refreshView(); + }); + }); + /* ------------- File Pane Settings ------------- */ + containerEl.createEl('h2', { text: 'File Pane Settings' }); + new obsidian.Setting(containerEl) + .setName('Include Files From Subfolders to the File List') + .setDesc(`Turn on this option if you want to see the list of files from all subfolders in addition to the selected folder`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.showFilesFromSubFolders).onChange((value) => { + this.plugin.settings.showFilesFromSubFolders = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('Toggle Button for Include Files from Subfolders') + .setDesc(`Turn on this option if you want to have an additional button on the top of the file list to toggle "Include Files From Subfolders"`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.showFilesFromSubFoldersButton).onChange((value) => { + this.plugin.settings.showFilesFromSubFoldersButton = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('Reveal Active File in File Tree Button') + .setDesc(`Turn on this option if you want to have an additional button to reveal the active file in the file tree. It will set the folder and file pane accordingly.`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.revealActiveFileButton).onChange((value) => { + this.plugin.settings.revealActiveFileButton = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('Search in File List') + .setDesc(`Turn on this option if you want to enable search function to filter files by name.`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.searchFunction).onChange((value) => { + this.plugin.settings.searchFunction = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('All & Tag Search only in Focused Folder') + .setDesc(`"all:" and "tag:" searches by default looks for all files in your vault. Turn on this option if you want search only in Focused Folder`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.allSearchOnlyInFocusedFolder).onChange((value) => { + this.plugin.settings.allSearchOnlyInFocusedFolder = value; + this.plugin.saveSettings(); + })); + new obsidian.Setting(containerEl) + .setName('Icon Before File Name') + .setDesc('Turn on if you want to file icon before the file name in the file list.') + .addToggle((toggle) => toggle.setValue(this.plugin.settings.iconBeforeFileName).onChange((value) => { + this.plugin.settings.iconBeforeFileName = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('Preview File on Hover') + .setDesc('Turn on if you want to preview the files once you hover on them within the file list holding Ctrl/Cmd button.') + .addToggle((toggle) => toggle.setValue(this.plugin.settings.filePreviewOnHover).onChange((value) => { + this.plugin.settings.filePreviewOnHover = value; + this.plugin.saveSettings(); + })); + new obsidian.Setting(containerEl) + .setName('Fixed Buttons and Header in File Pane') + .setDesc('Turn on if you want buttons and header to be not scrolled within the file list.') + .addToggle((toggle) => toggle.setValue(this.plugin.settings.fixedHeaderInFileList).onChange((value) => { + this.plugin.settings.fixedHeaderInFileList = value; + this.plugin.saveSettings(); + this.refreshView(); + })); + new obsidian.Setting(containerEl) + .setName('Show file names as full path') + .setDesc('Turn on if you want to see the full path within the file name list rather than only file name') + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.showFileNameAsFullPath).onChange((value) => { + this.plugin.settings.showFileNameAsFullPath = value; + this.plugin.saveSettings(); + this.refreshView(); + }); + }); + new obsidian.Setting(containerEl) + .setName('Deleted File Destination') + .setDesc('Select where you want files to be moved once they are deleted') + .addDropdown((dropdown) => { + dropdown.addOption('permanent', 'Delete Permanently'); + dropdown.addOption('trash', 'Move to Obsidian Trash'); + dropdown.addOption('system-trash', 'Move to System Trash'); + dropdown.setValue(this.plugin.settings.deleteFileOption); + dropdown.onChange((option) => { + this.plugin.settings.deleteFileOption = option; + this.plugin.saveSettings(); + }); + }); + /* ------------- Exclusion Settings ------------- */ + containerEl.createEl('h2', { text: 'File Creation' }); + containerEl.createEl('p', { text: 'The settings below are only applicable if the plus (+) button within the file pane of the plugin is used.' }); + new obsidian.Setting(containerEl) + .setName('Created information in YAML') + .setDesc('Turn on if you want plugin to include created YAML key with the time of creation') + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.createdYaml).onChange((value) => { + this.plugin.settings.createdYaml = value; + this.plugin.saveSettings(); + }); + }); + new obsidian.Setting(containerEl) + .setName('Set File Name as Header 1') + .setDesc('Turn on if you want plugin to add the initial file name as main header in the created file.') + .addToggle((toggle) => { + toggle.setValue(this.plugin.settings.fileNameIsHeader).onChange((value) => { + this.plugin.settings.fileNameIsHeader = value; + this.plugin.saveSettings(); + }); + }); + /* ------------- Exclusion Settings ------------- */ + containerEl.createEl('h2', { text: 'Exclude Settings' }); + new obsidian.Setting(containerEl) + .setName('Hide Attachments') + .setDesc(`It will hide "attachments" folder from the view and any file under this folder from the file list`) + .addToggle((toggle) => toggle.setValue(this.plugin.settings.hideAttachments).onChange((value) => { + this.plugin.settings.hideAttachments = value; + this.plugin.saveSettings(); + this.plugin.refreshTreeLeafs(); + })); + new obsidian.Setting(containerEl) + .setName('Excluded File Extensions') + .setDesc(`Provide extension of files, which you want to exclude from listing in file tree, divided by comma. i.e. 'png, pdf, jpeg'. + You need to reload the vault or use "Reload File Tree" button below to make changes effective.`) + .addTextArea((text) => text.setValue(this.plugin.settings.excludedExtensions).onChange((value) => { + this.plugin.settings.excludedExtensions = value; + this.plugin.saveSettings(); + })); + new obsidian.Setting(containerEl) + .setName('Excluded Folder Paths') + .setDesc(`Provide full path of folders, which you want to exclude from listing in file tree, divided by comma. i.e. 'Personal/Attachments, Work/Documents/Folders'. + All subfolders are going to be excluded, as well. You need to reload the vault or use "Reload File Tree" button below to make changes effective.`) + .addTextArea((text) => text.setValue(this.plugin.settings.excludedFolders).onChange((value) => { + this.plugin.settings.excludedFolders = value; + this.plugin.saveSettings(); + })); + new obsidian.Setting(containerEl) + .setDesc('Use this button to reload the file tree. Reloading the file tree is required for some of the settings. You can also restart your vault to have same effect.') + .addButton((button) => { + button + .setClass('reload-file-tree-button') + .setTooltip('Click here to reload the file tree') + .setButtonText('Reload File Tree') + .onClick((e) => { + this.plugin.refreshTreeLeafs(); + }); + }); + /* ------------- Clear Data ------------- */ + containerEl.createEl('h2', { text: 'Clear Data' }); + new obsidian.Setting(containerEl) + .setName('Clear All Cache Data') + .setDesc(`This button will clear the following cache data: "Last position of the divider" & "List of expanded folders in the folder pane", + & "Last active folder path". It will not touch your settings above and list of pinned files. It is recommended to do this clearing once in a while.`) + .addButton((button) => { + button + .setTooltip('Click here to clear the cache data') + .setButtonText('Click for Clearing the Cache') + .onClick(() => __awaiter(this, void 0, void 0, function* () { + lsh.removeFromLocalStorage({ key: this.plugin.keys.customHeightKey }); + lsh.removeFromLocalStorage({ key: this.plugin.keys.customWidthKey }); + lsh.removeFromLocalStorage({ key: this.plugin.keys.openFoldersKey }); + lsh.removeFromLocalStorage({ key: this.plugin.keys.activeFolderPathKey }); + lsh.removeFromLocalStorage({ key: this.plugin.keys.focusedFolder }); + this.plugin.refreshTreeLeafs(); + new obsidian.Notice('The plugin cache is cleared...'); + })); + }); + new obsidian.Setting(containerEl) + .setName('Clear Pinned Files') + .setDesc(`This button will clear the pinned files in the file list pane.`) + .addButton((button) => { + button + .setTooltip('Click here to clear the pinned files') + .setButtonText('Click for Clearing the Pinned files') + .onClick(() => __awaiter(this, void 0, void 0, function* () { + lsh.removeFromLocalStorage({ key: this.plugin.keys.pinnedFilesKey }); + this.plugin.refreshTreeLeafs(); + new obsidian.Notice('The pinned files are cleared...'); + })); + }); + } +} + +class FileTreeAlternativePlugin extends obsidian.Plugin { + constructor() { + super(...arguments); + this.ribbonIconEl = undefined; + this.keys = { + activeFolderPathKey: 'fileTreePlugin-ActiveFolderPath', + pinnedFilesKey: 'fileTreePlugin-PinnedFiles', + openFoldersKey: 'fileTreePlugin-OpenFolders', + customHeightKey: 'fileTreePlugin-CustomHeight', + customWidthKey: 'fileTreePlugin-CustomWidth', + focusedFolder: 'fileTreePlugin-FocusedFolder', + }; + // File Tree View Variables + this.VIEW_TYPE = 'file-tree-view'; + this.VIEW_DISPLAY_TEXT = 'File Tree'; + this.ICON = 'sheets-in-box'; + this.bookmarksEventHandler = (event) => { + // Find the tree-item that includes the bookmarks plugin title + let treeItem = event.target.closest('.tree-item'); + if (!treeItem) + return; + // If it exists, get the title of the bookmark + let dataPath = treeItem.getAttribute('data-path'); + if (!dataPath || dataPath === '') + return; + // Find the bookmark from the items + let bookmarkItem = getBookmarkTitle(dataPath); + // Create Custom Menu only if Shift is Used + if (event.shiftKey) { + if (!bookmarkItem) + return; + event.stopImmediatePropagation(); + if (bookmarkItem.type === 'file') { + // Dispatch Reveal File Event + let customEvent = new CustomEvent(eventTypes.revealFile, { + detail: { + file: this.app.vault.getAbstractFileByPath(bookmarkItem.path), + }, + }); + window.dispatchEvent(customEvent); + } + else if (bookmarkItem.type === 'folder') { + event.stopImmediatePropagation(); + // Dispatch Reveal Folder Event + let customEvent = new CustomEvent(eventTypes.revealFolder, { + detail: { + folder: this.app.vault.getAbstractFileByPath(bookmarkItem.path), + }, + }); + window.dispatchEvent(customEvent); + } + else { + new obsidian.Notice('Not a file or folder'); + } + } + }; + this.getBookmarksLeafElement = () => { + return document.querySelector('.workspace-leaf-content[data-type="bookmarks"]'); + }; + this.bookmarksAddEventListener = () => { + let bookmarkLeafElement = this.getBookmarksLeafElement(); + if (bookmarkLeafElement) { + bookmarkLeafElement.addEventListener('click', this.bookmarksEventHandler, true); + } + }; + this.bookmarksRemoveEventListener = () => { + let bookmarkLeafElement = this.getBookmarksLeafElement(); + if (bookmarkLeafElement) { + bookmarkLeafElement.removeEventListener('click', this.bookmarksEventHandler, true); + } + }; + this.triggerVaultChangeEvent = (file, changeType, oldPath) => { + let event = new CustomEvent(eventTypes.vaultChange, { + detail: { + file: file, + changeType: changeType, + oldPath: oldPath ? oldPath : '', + }, + }); + window.dispatchEvent(event); + }; + this.onCreate = (file) => this.triggerVaultChangeEvent(file, 'create', ''); + this.onDelete = (file) => this.triggerVaultChangeEvent(file, 'delete', ''); + this.onModify = (file) => this.triggerVaultChangeEvent(file, 'modify', ''); + this.onRename = (file, oldPath) => this.triggerVaultChangeEvent(file, 'rename', oldPath); + this.refreshIconRibbon = () => { + var _a; + (_a = this.ribbonIconEl) === null || _a === void 0 ? void 0 : _a.remove(); + if (this.settings.ribbonIcon) { + this.ribbonIconEl = this.addRibbonIcon(this.ICON, 'File Tree Alternative Plugin', () => __awaiter(this, void 0, void 0, function* () { + yield this.openFileTreeLeaf(true); + })); + } + }; + this.openFileTreeLeaf = (showAfterAttach) => __awaiter(this, void 0, void 0, function* () { + let leafs = this.app.workspace.getLeavesOfType(this.VIEW_TYPE); + if (leafs.length == 0) { + // Needs to be mounted + let leaf = this.app.workspace.getLeftLeaf(false); + yield leaf.setViewState({ type: this.VIEW_TYPE }); + if (showAfterAttach) + this.app.workspace.revealLeaf(leaf); + } + else { + // Already mounted - show if only selected showAfterAttach + if (showAfterAttach) { + leafs.forEach((leaf) => this.app.workspace.revealLeaf(leaf)); + } + } + }); + this.detachFileTreeLeafs = () => { + let leafs = this.app.workspace.getLeavesOfType(this.VIEW_TYPE); + for (let leaf of leafs) { + leaf.view.destroy(); + leaf.detach(); + } + }; + this.refreshTreeLeafs = () => { + this.detachFileTreeLeafs(); + this.openFileTreeLeaf(true); + }; + } + onload() { + return __awaiter(this, void 0, void 0, function* () { + console.log('Loading Alternative File Tree Plugin'); + obsidian.addIcon('zoomInIcon', ZoomInIcon); + obsidian.addIcon('zoomOutIcon', ZoomOutIcon); + obsidian.addIcon('zoomOutDoubleIcon', ZoomOutDoubleIcon); + obsidian.addIcon('locationIcon', LocationIcon); + obsidian.addIcon('spaceIcon', SpaceIcon); + // Load Settings + this.addSettingTab(new FileTreeAlternativePluginSettingsTab(this.app, this)); + yield this.loadSettings(); + // Register File Tree View + this.registerView(this.VIEW_TYPE, (leaf) => { + return new FileTreeView(leaf, this); + }); + // Event Listeners + this.app.workspace.onLayoutReady(() => __awaiter(this, void 0, void 0, function* () { + if (this.settings.openViewOnStart) { + yield this.openFileTreeLeaf(true); + } + })); + // Add Command to Open File Tree Leaf + this.addCommand({ + id: 'open-file-tree-view', + name: 'Open File Tree View', + callback: () => __awaiter(this, void 0, void 0, function* () { return yield this.openFileTreeLeaf(true); }), + }); + this.app.workspace.onLayoutReady(() => { + if (this.settings.bookmarksEvents) { + this.bookmarksAddEventListener(); + } + }); + // Add Command to Reveal Active File + this.addCommand({ + id: 'reveal-active-file', + name: 'Reveal Active File', + callback: () => { + // Activate file tree pane + let leafs = this.app.workspace.getLeavesOfType(this.VIEW_TYPE); + if (leafs.length === 0) + this.openFileTreeLeaf(true); + for (let leaf of leafs) { + this.app.workspace.revealLeaf(leaf); + } + // Run custom event + let event = new CustomEvent(eventTypes.revealFile, { + detail: { + file: this.app.workspace.getActiveFile(), + }, + }); + window.dispatchEvent(event); + }, + }); + // Add Command to create a new file under active folder path + this.addCommand({ + id: ' create-new-note', + name: 'Create a New Note', + callback: () => { + let event = new CustomEvent(eventTypes.createNewNote, { + detail: {}, + }); + window.dispatchEvent(event); + }, + }); + // Add event listener for vault changes + this.app.vault.on('create', this.onCreate); + this.app.vault.on('delete', this.onDelete); + this.app.vault.on('modify', this.onModify); + this.app.vault.on('rename', this.onRename); + // Ribbon Icon For Opening + this.refreshIconRibbon(); + }); + } + onunload() { + console.log('Unloading Alternative File Tree Plugin'); + this.detachFileTreeLeafs(); + // Remove event listeners + this.app.vault.off('create', this.onCreate); + this.app.vault.off('delete', this.onDelete); + this.app.vault.off('modify', this.onModify); + this.app.vault.off('rename', this.onRename); + this.bookmarksRemoveEventListener(); + } + loadSettings() { + return __awaiter(this, void 0, void 0, function* () { + this.settings = Object.assign({}, DEFAULT_SETTINGS, yield this.loadData()); + }); + } + saveSettings() { + return __awaiter(this, void 0, void 0, function* () { + yield this.saveData(this.settings); + }); + } +} + +module.exports = FileTreeAlternativePlugin; + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/file-tree-alternative/manifest.json b/.obsidian/plugins/file-tree-alternative/manifest.json new file mode 100644 index 00000000..d2584302 --- /dev/null +++ b/.obsidian/plugins/file-tree-alternative/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "file-tree-alternative", + "name": "File Tree Alternative", + "version": "2.6.0", + "minAppVersion": "0.15.0", + "description": "This plugin allows you to have an alternative file tree view.", + "author": "Ozan Tellioglu", + "authorUrl": "https://www.ozan.pl", + "fundingUrl": "https://ko-fi.com/ozante", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/file-tree-alternative/styles.css b/.obsidian/plugins/file-tree-alternative/styles.css new file mode 100644 index 00000000..d0406b8e --- /dev/null +++ b/.obsidian/plugins/file-tree-alternative/styles.css @@ -0,0 +1,535 @@ +/* @settings + +name: File Tree Alternative Plugin +id: file-tree-alternative-plugin +settings: + +# Folder Pane Styles + + - + id: oz-fta-folder-pane-heading + title: Folder Pane Styles + description: Style settings dedicated for only folder pane + type: heading + level: 1 + collapsed: true + - + id: oz-fta-folder-font-size + title: Folder Pane | Folder Name Font Size + description: Set folder pane font size in px + type: variable-number + default: 14 + format: px + - + id: oz-fta-folder-icon-color + title: Folder Pane | Collapse/Expand Icon Color + description: Set the color of folder icons + type: variable-color + format: hex + default: '#2d8ff7' + - + id: oz-fta-folder-indendation-guide-color + title: Folder Pane | Indendation Guide Color + description: Set the color of indendation guide lines + type: variable-color + format: hex + default: '#ededeb' + - + id: oz-fta-folder-pane-file-name-color + title: Folder Pane | Folder Name Color + description: Set the color of names + type: variable-color + format: hex + default: '#' + +# File Pane Styles + + - + id: oz-fta-file-pane-heading + title: File Pane Styles + description: Style settings dedicated for only file pane + type: heading + level: 1 + collapsed: true + - + id: oz-fta-file-font-size + title: File Pane | File Name Font Size + description: Set file pane font size in px + type: variable-number + default: 13 + format: px + - + id: oz-fta-file-pane-file-name-color + title: File Pane | File Name Color + description: Set the color of names + type: variable-color + format: hex + default: '#' + - + id: oz-fta-file-pane-foldername-color + title: File Pane | Header Folder Name Color + description: Set the color of folder name in the file pane + type: variable-color + format: hex + default: '#' + +# All Panes Styles + + - + id: oz-fta-all-panes-heading + title: All Panes + description: Common style settings for both folder and file panes + type: heading + level: 1 + collapsed: true + - + id: oz-fta-header-background-color + title: All Panes | Header Background Color + description: Set the background color of headers in both file and folder panes + type: variable-color + format: hex + default: '#' + - + id: oz-fta-header-icon-colors + title: All Panes | Header Action Icons Color + description: Set the color of icons in file and folder panes + type: variable-color + format: hex + alt-format: + - + id: oz-fta-header-icon-colors-accent-rgb + format: rgb + default: '#' + - + id: oz-fta-all-panes-active-text-color + title: All Panes | Active File/Folder Name Color + description: Set the color of active file and folder name + type: variable-color + format: hex + default: '#' + - + id: oz-fta-file-pane-active-file-background-color + title: File Pane | Active File Background Color + description: Set the color of active file background color + type: variable-color + format: hex + default: '#' +*/ + +.theme-light, +.theme-dark { + --oz-fta-folder-font-size: 13px; + --oz-fta-file-font-size: 12px; + --oz-fta-folder-icon-color: var(--interactive-accent); + --oz-fta-folder-indendation-guide-color: var(--text-muted); + --oz-fta-header-background-color: var(--background-secondary-alt); + --oz-fta-header-icon-colors: var(--text-muted); + --oz-fta-file-pane-foldername-color: var(--text-normal); + --oz-fta-folder-pane-file-name-color: var(--text-normal); + --oz-fta-header-icon-colors-accent-rgb: var(--interactive-accent-hover); + --oz-fta-all-panes-active-text-color: var(--text-normal); + --oz-fta-file-pane-active-file-background-color: var(--background-secondary-alt); + --oz-fta-file-pane-file-name-color: var(--text-muted); +} + +.oz-file-tree-header { + color: var(--oz-fta-file-pane-foldername-color); + background: var(--oz-fta-header-background-color); + margin-top: 3px; + font-size: 15px; + font-weight: bold; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + align-items: center; + width: fit-content; + min-width: -webkit-fill-available; + min-width: fill-available; + height: fit-content; + padding: 5px 0px 5px; + border-radius: 8px; +} + +.oz-nav-action-button { + color: var(--oz-fta-header-icon-colors); + display: inline-block; + padding: 0px 0px 0px 2px; + margin-left: 5px; + opacity: 0.5; + border-radius: 8px; + opacity: 1; +} + +.oz-nav-action-button:hover { + opacity: 0.6; +} + +.oz-nav-action-button svg { + vertical-align: middle !important; +} + +.oz-input-container { + margin-bottom: 3px !important; + margin-top: 3px !important; + height: 30px; +} + +.oz-input-container input { + width: 100%; +} + +.oz-nav-buttons-right-block { + text-align: right; + display: flex; + width: fit-content; + height: min-content; +} + +.oz-nav-file-title { + color: var(--oz-fta-file-pane-file-name-color); + font-size: var(--oz-fta-file-font-size); + width: calc(100% - 30px); + display: flex; + white-space: nowrap; + min-width: 100%; + cursor: pointer; + line-height: 19px; + border-radius: 3px; + padding: 1px 2px 0px 2px; + min-width: 100%; + border: 1px solid transparent; +} + +.oz-nav-file-title .oz-nav-file-title-content { + width: 100%; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + vertical-align: middle; + display: inline-block; +} + +.oz-nav-file { + border-bottom: 1px solid var(--divider-color); +} + +div.oz-nav-file.is-active, +div.oz-nav-file.is-active div.oz-nav-file-title, +div.oz-nav-file.is-active div.oz-nav-file-title-content { + background-color: var(--oz-fta-file-pane-active-file-background-color); + color: var(--oz-fta-all-panes-active-text-color); + font-weight: bold; +} + +.is-folder-active { + color: var(--oz-fta-all-panes-active-text-color) !important; + font-weight: bold; +} + +.oz-nav-file-tag { + /* @Consider */ + color: var(--text-muted); + background-color: var(--background-secondary-alt); + border-radius: 3px; + font-size: 9px; + font-weight: 600; + letter-spacing: 0.05em; + margin: 0px 2px 0px 4px; + text-transform: uppercase; + align-self: center; + padding: 0px 4px 0px 4px; + vertical-align: middle !important; + line-height: 13px; +} + +div.workspace-leaf-content[data-type='file-tree-view'] > div.view-content { + padding: 10px 5px 5px 5px; +} + +.oz-flex-container { + display: flex; + flex-direction: row; + justify-content: space-between; + height: min-content; + padding: 2px 2px 2px 2px; +} + +.oz-folders-action-items { + text-align: center; + padding: 3px 2px 0px 2px; +} + +.oz-folders-action-items, +.oz-flex-container { + background: var(--oz-fta-header-background-color); + border: 1px solid var(--oz-fta-header-background-color); + margin-bottom: 3px; + border-radius: 8px; + stroke-width: 2px; + -webkit-backdrop-filter: blur(8px); + backdrop-filter: blur(8px); +} + +.oz-explorer-container { + padding-left: 3px !important; + padding-right: 3px !important; +} + +.oz-file-tree-files { + padding-top: 3px !important; +} + +.drag-entered, +.oz-folder-element:hover, +.oz-nav-file:hover { + background-color: var(--background-secondary-alt); + color: var(--text-normal); +} + +.oz-nav-file { + margin-left: 3px; + padding-right: 3px; +} + +.oz-folder-contents { + will-change: transform, opacity, height; + margin-left: 6; + padding-left: 14px; + border-left: 2px solid var(--oz-fta-folder-indendation-guide-color); + margin-left: 5px !important; +} + +.oz-folder-toggle { + width: 1em; + height: 1em; + margin-right: 10px; + cursor: pointer; + vertical-align: middle; +} + +.treeview { + position: relative; + padding: 0px; + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + vertical-align: middle; +} + +.oz-folder-type { + text-transform: uppercase; + font-family: monospace; + font-size: 0.6em; + vertical-align: middle; + display: inline-block; +} + +.oz-folder-name { + color: var(--oz-fta-folder-pane-file-name-color); + font-size: var(--oz-fta-folder-font-size); + vertical-align: middle; + display: inline-block; +} + +div.oz-folder-name.is-root-folder { + font-size: calc(var(--oz-fta-folder-font-size) + 2px); +} + +.oz-icon-div { + display: inline-block; +} + +.oz-folder-line { + display: flex; + flex-flow: row; + white-space: nowrap; + min-width: 100%; +} + +.oz-folder-block { + display: flex; + flex-grow: 1; + padding-top: 2px; +} + +.oz-folder-count { + margin-left: auto; + height: 1.4em; + display: flex; + justify-content: center; +} + +.oz-folder-element { + line-height: 1.4em; + padding: 0px 0px 0px 0px; +} + +.oz-folders-tree-wrapper { + overflow: hidden; + overflow-y: auto; + padding-bottom: 5px; + padding-left: 8px; + height: 100%; +} + +.oz-input-container > input { + padding-left: 8px; + padding-right: 4px; +} + +.file-tree-container { + display: flex; + flex-direction: column; + height: 100%; + max-height: 100%; +} + +.file-tree-plugin-view { + height: 100%; +} + +.oz-folder-pane { + display: block; + width: 100%; + overflow-y: auto; + height: 50%; + resize: vertical; +} + +.oz-file-list-pane { + display: block; + width: 100%; + overflow-y: auto; + flex: 1; +} + +.oz-coffee-div { + text-align: center; + margin-top: 10px; +} + +#file-tree-divider { + height: 3.8px; + opacity: 0.3; + cursor: row-resize; + margin-bottom: 5px; + border-bottom: 3px solid var(--text-muted); +} + +div#file-tree-divider.active-divider { + background-color: var(--interactive-accent); + border-bottom: 0.5px solid var(--interactive-accent); +} + +#file-tree-divider:hover { + background-color: var(--text-muted); +} + +.file-tree-container-horizontal { + display: flex; + flex-direction: row; + height: 100%; + max-width: 100%; +} + +.oz-folder-pane-horizontal { + display: block; + width: 50%; + overflow-y: auto; + height: 100%; + resize: horizontal; +} + +.oz-file-list-pane-horizontal { + display: block; + height: 100%; + overflow-y: auto; + flex: 1; +} + +#file-tree-divider-horizontal { + margin-left: 5px; + width: 3.8px; + opacity: 0.3; + cursor: col-resize; + margin-right: 3px; + border-right: 3px solid var(--text-muted); +} + +div#file-tree-divider-horizontal.active-divider { + background-color: var(--interactive-accent); + border-bottom: 0.5px solid var(--interactive-accent); +} + +#file-tree-divider-horizontal:hover { + background-color: var(--text-muted); +} + +.file-tree-header-fixed { + position: sticky; + top: 0; + padding-left: 4px; + padding-right: 4px; + z-index: 100; +} + +.file-tree-files-fixed { + display: flex; + flex-direction: column; +} + +.file-tree-files-fixed-with-search { + display: flex; + flex-direction: column; +} + +svg.oz-folder-toggle path { + fill: var(--oz-fta-folder-icon-color) !important; +} + +/* Solution for React-Icon Center Issue */ +.oz-folder-name svg { + vertical-align: middle !important; +} + +.oz-nav-file-icon { + line-height: 1; + display: inline-block; + font-weight: normal; + font-style: normal; + font-variant: normal; + margin-right: 2px; + padding-bottom: 2.5px; + vertical-align: middle; +} + +/* Mobile Adjustments */ + +.is-mobile .oz-nav-file-title { + line-height: 21px; +} + +.is-mobile .oz-flex-container { + height: 31px; +} + +.is-mobile .oz-folder-name.is-root-folder { + font-size: calc(var(--oz-fta-folder-font-size) + 2.5px); +} + +.is-mobile .oz-folder-name { + font-size: var(--oz-fta-folder-font-size); +} + +.is-mobile div.oz-nav-file-title .nav-file-title-content { + font-size: calc(var(--oz-fta-file-font-size) + 3px); +} + +.is-mobile .oz-input-container > input { + height: 33px; +} + +.is-mobile .oz-nav-action-button svg { + transform: scale(1.2); +} diff --git a/.obsidian/plugins/obsidian-annotator/main.js b/.obsidian/plugins/obsidian-annotator/main.js new file mode 100644 index 00000000..270907e7 --- /dev/null +++ b/.obsidian/plugins/obsidian-annotator/main.js @@ -0,0 +1,36360 @@ +/* +@preserve +THIS IS A GENERATED/BUNDLED FILE BY ROLLUP +if you want to view the source visit the plugins github repository +*/ +"use strict";var e=require("obsidian");function t(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(r){if("default"!==r){var n=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(t,r,n.get?n:{enumerable:!0,get:function(){return e[r]}})}})),t.default=e,Object.freeze(t)}var r=t(require("@codemirror/state"));function n(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i0&&u[0]<4?1:+(u[0]+u[1])),!l&&z&&(!(u=z.match(/Edge\/(\d+)/))||u[1]>=74)&&(u=z.match(/Chrome\/(\d+)/))&&(l=+u[1]);var W=l,Y=h.String,$=!!Object.getOwnPropertySymbols&&!d((function(){var e=Symbol("symbol detection");return!Y(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&W&&W<41})),Z=$&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,X=Object,K=Z?function(e){return"symbol"==typeof e}:function(e){var t=U("Symbol");return M(t)&&q(t.prototype,X(e))},Q=String,J=function(e){try{return Q(e)}catch(e){return"Object"}},ee=TypeError,te=function(e){if(M(e))return e;throw new ee(J(e)+" is not a function")},re=function(e,t){var r=e[t];return I(r)?void 0:te(r)},ne=TypeError,ie=function(e,t){var r,n;if("string"===t&&M(r=e.toString)&&!P(n=g(r,e)))return n;if(M(r=e.valueOf)&&!P(n=g(r,e)))return n;if("string"!==t&&M(r=e.toString)&&!P(n=g(r,e)))return n;throw new ne("Can't convert object to primitive value")},ae=!1,oe=Object.defineProperty,se=function(e,t){try{oe(h,e,{value:t,configurable:!0,writable:!0})}catch(r){h[e]=t}return t},ue="__core-js_shared__",le=h[ue]||se(ue,{}),ce=o((function(e){(e.exports=function(e,t){return le[e]||(le[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.35.0",mode:"global",copyright:"© 2014-2023 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.35.0/LICENSE",source:"https://github.com/zloirock/core-js"})})),he=Object,de=function(e){return he(R(e))},fe=C({}.hasOwnProperty),pe=Object.hasOwn||function(e,t){return fe(de(e),t)},me=0,ge=Math.random(),ve=C(1..toString),De=function(e){return"Symbol("+(void 0===e?"":e)+")_"+ve(++me+ge,36)},ye=h.Symbol,Ee=ce("wks"),be=Z?ye.for||ye:ye&&ye.withoutSetter||De,we=function(e){return pe(Ee,e)||(Ee[e]=$&&pe(ye,e)?ye[e]:be("Symbol."+e)),Ee[e]},_e=TypeError,Te=we("toPrimitive"),Ce=function(e,t){if(!P(e)||K(e))return e;var r,n=re(e,Te);if(n){if(void 0===t&&(t="default"),r=g(n,e,t),!P(r)||K(r))return r;throw new _e("Can't convert object to primitive value")}return void 0===t&&(t="number"),ie(e,t)},Ae=function(e){var t=Ce(e,"string");return K(t)?t:t+""},Se=h.document,xe=P(Se)&&P(Se.createElement),ke=function(e){return xe?Se.createElement(e):{}},Fe=!f&&!d((function(){return 7!==Object.defineProperty(ke("div"),"a",{get:function(){return 7}}).a})),Ne=Object.getOwnPropertyDescriptor,Ie=f?Ne:function(e,t){if(e=L(e),t=Ae(t),Fe)try{return Ne(e,t)}catch(e){}if(pe(e,t))return b(!g(E.f,e,t),e[t])},Oe={f:Ie},Re=f&&d((function(){return 42!==Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Le=String,Be=TypeError,Me=function(e){if(P(e))return e;throw new Be(Le(e)+" is not an object")},Pe=TypeError,Ue=Object.defineProperty,qe=Object.getOwnPropertyDescriptor,ze="enumerable",je="configurable",He="writable",Ge=f?Re?function(e,t,r){if(Me(e),t=Ae(t),Me(r),"function"==typeof e&&"prototype"===t&&"value"in r&&He in r&&!r[He]){var n=qe(e,t);n&&n[He]&&(e[t]=r.value,r={configurable:je in r?r[je]:n[je],enumerable:ze in r?r[ze]:n[ze],writable:!1})}return Ue(e,t,r)}:Ue:function(e,t,r){if(Me(e),t=Ae(t),Me(r),Fe)try{return Ue(e,t,r)}catch(e){}if("get"in r||"set"in r)throw new Pe("Accessors not supported");return"value"in r&&(e[t]=r.value),e},Ve={f:Ge},We=f?function(e,t,r){return Ve.f(e,t,b(1,r))}:function(e,t,r){return e[t]=r,e},Ye=Function.prototype,$e=f&&Object.getOwnPropertyDescriptor,Ze=pe(Ye,"name"),Xe={EXISTS:Ze,PROPER:Ze&&"something"===function(){}.name,CONFIGURABLE:Ze&&(!f||f&&$e(Ye,"name").configurable)},Ke=C(Function.toString);M(le.inspectSource)||(le.inspectSource=function(e){return Ke(e)});var Qe,Je,et,tt=le.inspectSource,rt=h.WeakMap,nt=M(rt)&&/native code/.test(String(rt)),it=ce("keys"),at=function(e){return it[e]||(it[e]=De(e))},ot={},st="Object already initialized",ut=h.TypeError,lt=h.WeakMap;if(nt||le.state){var ct=le.state||(le.state=new lt);ct.get=ct.get,ct.has=ct.has,ct.set=ct.set,Qe=function(e,t){if(ct.has(e))throw new ut(st);return t.facade=e,ct.set(e,t),t},Je=function(e){return ct.get(e)||{}},et=function(e){return ct.has(e)}}else{var ht=at("state");ot[ht]=!0,Qe=function(e,t){if(pe(e,ht))throw new ut(st);return t.facade=e,We(e,ht,t),t},Je=function(e){return pe(e,ht)?e[ht]:{}},et=function(e){return pe(e,ht)}}var dt={set:Qe,get:Je,has:et,enforce:function(e){return et(e)?Je(e):Qe(e,{})},getterFor:function(e){return function(t){var r;if(!P(t)||(r=Je(t)).type!==e)throw new ut("Incompatible receiver, "+e+" required");return r}}},ft=o((function(e){var t=Xe.CONFIGURABLE,r=dt.enforce,n=dt.get,i=String,a=Object.defineProperty,o=C("".slice),s=C("".replace),u=C([].join),l=f&&!d((function(){return 8!==a((function(){}),"length",{value:8}).length})),c=String(String).split("String"),h=e.exports=function(e,n,h){"Symbol("===o(i(n),0,7)&&(n="["+s(i(n),/^Symbol\(([^)]*)\)/,"$1")+"]"),h&&h.getter&&(n="get "+n),h&&h.setter&&(n="set "+n),(!pe(e,"name")||t&&e.name!==n)&&(f?a(e,"name",{value:n,configurable:!0}):e.name=n),l&&h&&pe(h,"arity")&&e.length!==h.arity&&a(e,"length",{value:h.arity});try{h&&pe(h,"constructor")&&h.constructor?f&&a(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var d=r(e);return pe(d,"source")||(d.source=u(c,"string"==typeof n?n:"")),e};Function.prototype.toString=h((function(){return M(this)&&n(this).source||tt(this)}),"toString")})),pt=function(e,t,r,n){n||(n={});var i=n.enumerable,a=void 0!==n.name?n.name:t;if(M(r)&&ft(r,a,n),n.global)i?e[t]=r:se(t,r);else{try{n.unsafe?e[t]&&(i=!0):delete e[t]}catch(e){}i?e[t]=r:Ve.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},mt=Math.ceil,gt=Math.floor,vt=Math.trunc||function(e){var t=+e;return(t>0?gt:mt)(t)},Dt=function(e){var t=+e;return t!=t||0===t?0:vt(t)},yt=Math.max,Et=Math.min,bt=function(e,t){var r=Dt(e);return r<0?yt(r+t,0):Et(r,t)},wt=Math.min,_t=function(e){return e>0?wt(Dt(e),9007199254740991):0},Tt=function(e){return _t(e.length)},Ct=function(e){return function(t,r,n){var i,a=L(t),o=Tt(a),s=bt(n,o);if(e&&r!=r){for(;o>s;)if((i=a[s++])!=i)return!0}else for(;o>s;s++)if((e||s in a)&&a[s]===r)return e||s||0;return!e&&-1}},At={includes:Ct(!0),indexOf:Ct(!1)},St=At.indexOf,xt=C([].push),kt=function(e,t){var r,n=L(e),i=0,a=[];for(r in n)!pe(ot,r)&&pe(n,r)&&xt(a,r);for(;t.length>i;)pe(n,r=t[i++])&&(~St(a,r)||xt(a,r));return a},Ft=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Nt=Ft.concat("length","prototype"),It=Object.getOwnPropertyNames||function(e){return kt(e,Nt)},Ot={f:It},Rt={f:Object.getOwnPropertySymbols},Lt=C([].concat),Bt=U("Reflect","ownKeys")||function(e){var t=Ot.f(Me(e)),r=Rt.f;return r?Lt(t,r(e)):t},Mt=function(e,t,r){for(var n=Bt(t),i=Ve.f,a=Oe.f,o=0;oo;)Ve.f(e,r=i[o++],n[r]);return e},ir={f:nr},ar=U("document","documentElement"),or="prototype",sr="script",ur=at("IE_PROTO"),lr=function(){},cr=function(e){return"<"+sr+">"+e+""},hr=function(e){e.write(cr("")),e.close();var t=e.parentWindow.Object;return e=null,t},dr=function(){try{$t=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;dr="undefined"!=typeof document?document.domain&&$t?hr($t):(t=ke("iframe"),r="java"+sr+":",t.style.display="none",ar.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(cr("document.F=Object")),e.close(),e.F):hr($t);for(var n=Ft.length;n--;)delete dr[or][Ft[n]];return dr()};ot[ur]=!0;var fr=Object.create||function(e,t){var r;return null!==e?(lr[or]=Me(e),r=new lr,lr[or]=null,r[ur]=e):r=dr(),void 0===t?r:ir.f(r,t)},pr=C([].slice),mr=Ot.f,gr="object"==typeof window&&window&&Object.getOwnPropertyNames?Object.getOwnPropertyNames(window):[],vr={f:function(e){return gr&&"Window"===x(e)?function(e){try{return mr(e)}catch(e){return pr(gr)}}(e):mr(L(e))}},Dr=function(e,t,r){return r.get&&ft(r.get,t,{getter:!0}),r.set&&ft(r.set,t,{setter:!0}),Ve.f(e,t,r)},yr={f:we},Er=h,br=Ve.f,wr=function(e){var t=Er.Symbol||(Er.Symbol={});pe(t,e)||br(t,e,{value:yr.f(e)})},_r=function(){var e=U("Symbol"),t=e&&e.prototype,r=t&&t.valueOf,n=we("toPrimitive");t&&!t[n]&&pt(t,n,(function(e){return g(r,this)}),{arity:1})},Tr=Ve.f,Cr=we("toStringTag"),Ar=function(e,t,r){e&&!r&&(e=e.prototype),e&&!pe(e,Cr)&&Tr(e,Cr,{configurable:!0,value:t})},Sr=function(e){if("Function"===x(e))return C(e)},xr=Sr(Sr.bind),kr=function(e,t){return te(e),void 0===t?e:p?xr(e,t):function(){return e.apply(t,arguments)}},Fr=Array.isArray||function(e){return"Array"===x(e)},Nr=function(){},Ir=[],Or=U("Reflect","construct"),Rr=/^\s*(?:class|function)\b/,Lr=C(Rr.exec),Br=!Rr.test(Nr),Mr=function(e){if(!M(e))return!1;try{return Or(Nr,Ir,e),!0}catch(e){return!1}},Pr=function(e){if(!M(e))return!1;switch(Jt(e)){case"AsyncFunction":case"GeneratorFunction":case"AsyncGeneratorFunction":return!1}try{return Br||!!Lr(Rr,tt(e))}catch(e){return!0}};Pr.sham=!0;var Ur=!Or||d((function(){var e;return Mr(Mr.call)||!Mr(Object)||!Mr((function(){e=!0}))||e}))?Pr:Mr,qr=we("species"),zr=Array,jr=function(e,t){return new(function(e){var t;return Fr(e)&&(t=e.constructor,(Ur(t)&&(t===zr||Fr(t.prototype))||P(t)&&null===(t=t[qr]))&&(t=void 0)),void 0===t?zr:t}(e))(0===t?0:t)},Hr=C([].push),Gr=function(e){var t=1===e,r=2===e,n=3===e,i=4===e,a=6===e,o=7===e,s=5===e||a;return function(u,l,c,h){for(var d,f,p=de(u),m=N(p),g=Tt(m),v=kr(l,c),D=0,y=h||jr,E=t?y(u,g):r||o?y(u,0):void 0;g>D;D++)if((s||D in m)&&(f=v(d=m[D],D,p),e))if(t)E[D]=f;else if(f)switch(e){case 3:return!0;case 5:return d;case 6:return D;case 2:Hr(E,d)}else switch(e){case 4:return!1;case 7:Hr(E,d)}return a?-1:n||i?i:E}},Vr={forEach:Gr(0),map:Gr(1),filter:Gr(2),some:Gr(3),every:Gr(4),find:Gr(5),findIndex:Gr(6),filterReject:Gr(7)},Wr=Vr.forEach,Yr=at("hidden"),$r="Symbol",Zr="prototype",Xr=dt.set,Kr=dt.getterFor($r),Qr=Object[Zr],Jr=h.Symbol,en=Jr&&Jr[Zr],tn=h.RangeError,rn=h.TypeError,nn=h.QObject,an=Oe.f,on=Ve.f,sn=vr.f,un=E.f,ln=C([].push),cn=ce("symbols"),hn=ce("op-symbols"),dn=ce("wks"),fn=!nn||!nn[Zr]||!nn[Zr].findChild,pn=function(e,t,r){var n=an(Qr,t);n&&delete Qr[t],on(e,t,r),n&&e!==Qr&&on(Qr,t,n)},mn=f&&d((function(){return 7!==fr(on({},"a",{get:function(){return on(this,"a",{value:7}).a}})).a}))?pn:on,gn=function(e,t){var r=cn[e]=fr(en);return Xr(r,{type:$r,tag:e,description:t}),f||(r.description=t),r},vn=function(e,t,r){e===Qr&&vn(hn,t,r),Me(e);var n=Ae(t);return Me(r),pe(cn,n)?(r.enumerable?(pe(e,Yr)&&e[Yr][n]&&(e[Yr][n]=!1),r=fr(r,{enumerable:b(0,!1)})):(pe(e,Yr)||on(e,Yr,b(1,fr(null))),e[Yr][n]=!0),mn(e,n,r)):on(e,n,r)},Dn=function(e,t){Me(e);var r=L(t),n=rr(r).concat(wn(r));return Wr(n,(function(t){f&&!g(yn,r,t)||vn(e,t,r[t])})),e},yn=function(e){var t=Ae(e),r=g(un,this,t);return!(this===Qr&&pe(cn,t)&&!pe(hn,t))&&(!(r||!pe(this,t)||!pe(cn,t)||pe(this,Yr)&&this[Yr][t])||r)},En=function(e,t){var r=L(e),n=Ae(t);if(r!==Qr||!pe(cn,n)||pe(hn,n)){var i=an(r,n);return!i||!pe(cn,n)||pe(r,Yr)&&r[Yr][n]||(i.enumerable=!0),i}},bn=function(e){var t=sn(L(e)),r=[];return Wr(t,(function(e){pe(cn,e)||pe(ot,e)||ln(r,e)})),r},wn=function(e){var t=e===Qr,r=sn(t?hn:L(e)),n=[];return Wr(r,(function(e){!pe(cn,e)||t&&!pe(Qr,e)||ln(n,cn[e])})),n};$||(Jr=function(){if(q(en,this))throw new rn("Symbol is not a constructor");var e=arguments.length&&void 0!==arguments[0]?tr(arguments[0]):void 0,t=De(e),r=function(e){var n=void 0===this?h:this;n===Qr&&g(r,hn,e),pe(n,Yr)&&pe(n[Yr],t)&&(n[Yr][t]=!1);var i=b(1,e);try{mn(n,t,i)}catch(e){if(!(e instanceof tn))throw e;pn(n,t,i)}};return f&&fn&&mn(Qr,t,{configurable:!0,set:r}),gn(t,e)},en=Jr[Zr],pt(en,"toString",(function(){return Kr(this).tag})),pt(Jr,"withoutSetter",(function(e){return gn(De(e),e)})),E.f=yn,Ve.f=vn,ir.f=Dn,Oe.f=En,Ot.f=vr.f=bn,Rt.f=wn,yr.f=function(e){return gn(we(e),e)},f&&(Dr(en,"description",{configurable:!0,get:function(){return Kr(this).description}}),pt(Qr,"propertyIsEnumerable",yn,{unsafe:!0}))),Wt({global:!0,constructor:!0,wrap:!0,forced:!$,sham:!$},{Symbol:Jr}),Wr(rr(dn),(function(e){wr(e)})),Wt({target:$r,stat:!0,forced:!$},{useSetter:function(){fn=!0},useSimple:function(){fn=!1}}),Wt({target:"Object",stat:!0,forced:!$,sham:!f},{create:function(e,t){return void 0===t?fr(e):Dn(fr(e),t)},defineProperty:vn,defineProperties:Dn,getOwnPropertyDescriptor:En}),Wt({target:"Object",stat:!0,forced:!$},{getOwnPropertyNames:bn}),_r(),Ar(Jr,$r),ot[Yr]=!0;var _n=$&&!!Symbol.for&&!!Symbol.keyFor,Tn=ce("string-to-symbol-registry"),Cn=ce("symbol-to-string-registry");Wt({target:"Symbol",stat:!0,forced:!_n},{for:function(e){var t=tr(e);if(pe(Tn,t))return Tn[t];var r=U("Symbol")(t);return Tn[t]=r,Cn[r]=t,r}});var An=ce("symbol-to-string-registry");Wt({target:"Symbol",stat:!0,forced:!_n},{keyFor:function(e){if(!K(e))throw new TypeError(J(e)+" is not a symbol");if(pe(An,e))return An[e]}});var Sn=Function.prototype,xn=Sn.apply,kn=Sn.call,Fn="object"==typeof Reflect&&Reflect.apply||(p?kn.bind(xn):function(){return kn.apply(xn,arguments)}),Nn=C([].push),In=function(e){if(M(e))return e;if(Fr(e)){for(var t=e.length,r=[],n=0;na&&pi(i,arguments[a]),i}));h.prototype=l,"Error"!==s?li?li(h,c):Mt(h,c,{name:!0}):f&&i in u&&(hi(h,u,i),hi(h,u,"prepareStackTrace")),Mt(h,u);try{l.name!==s&&We(l,"name",s),l.constructor=h}catch(e){}return h}},Ci="WebAssembly",Ai=h[Ci],Si=7!==new Error("e",{cause:7}).cause,xi=function(e,t){var r={};r[e]=Ti(e,t,Si),Wt({global:!0,constructor:!0,arity:1,forced:Si},r)},ki=function(e,t){if(Ai&&Ai[e]){var r={};r[e]=Ti(Ci+"."+e,t,Si),Wt({target:Ci,stat:!0,constructor:!0,arity:1,forced:Si},r)}};xi("Error",(function(e){return function(t){return Fn(e,this,arguments)}})),xi("EvalError",(function(e){return function(t){return Fn(e,this,arguments)}})),xi("RangeError",(function(e){return function(t){return Fn(e,this,arguments)}})),xi("ReferenceError",(function(e){return function(t){return Fn(e,this,arguments)}})),xi("SyntaxError",(function(e){return function(t){return Fn(e,this,arguments)}})),xi("TypeError",(function(e){return function(t){return Fn(e,this,arguments)}})),xi("URIError",(function(e){return function(t){return Fn(e,this,arguments)}})),ki("CompileError",(function(e){return function(t){return Fn(e,this,arguments)}})),ki("LinkError",(function(e){return function(t){return Fn(e,this,arguments)}})),ki("RuntimeError",(function(e){return function(t){return Fn(e,this,arguments)}}));var Fi=Error.prototype.toString,Ni=d((function(){if(f){var e=Object.create(Object.defineProperty({},"name",{get:function(){return this===e}}));if("true"!==Fi.call(e))return!0}return"2: 1"!==Fi.call({message:1,name:2})||"Error"!==Fi.call({})}))?function(){var e=Me(this),t=fi(e.name,"Error"),r=fi(e.message);return t?r?t+": "+r:t:r}:Fi,Ii=Error.prototype;Ii.toString!==Ni&&pt(Ii,"toString",Ni);var Oi=!d((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),Ri=at("IE_PROTO"),Li=Object,Bi=Li.prototype,Mi=Oi?Li.getPrototypeOf:function(e){var t=de(e);if(pe(t,Ri))return t[Ri];var r=t.constructor;return M(r)&&t instanceof r?r.prototype:t instanceof Li?Bi:null},Pi={},Ui=we("iterator"),qi=Array.prototype,zi=function(e){return void 0!==e&&(Pi.Array===e||qi[Ui]===e)},ji=we("iterator"),Hi=function(e){if(!I(e))return re(e,ji)||re(e,"@@iterator")||Pi[Jt(e)]},Gi=TypeError,Vi=function(e,t){var r=arguments.length<2?Hi(e):t;if(te(r))return Me(g(r,e));throw new Gi(J(e)+" is not iterable")},Wi=function(e,t,r){var n,i;Me(e);try{if(!(n=re(e,"return"))){if("throw"===t)throw r;return r}n=g(n,e)}catch(e){i=!0,n=e}if("throw"===t)throw r;if(i)throw n;return Me(n),r},Yi=TypeError,$i=function(e,t){this.stopped=e,this.result=t},Zi=$i.prototype,Xi=function(e,t,r){var n,i,a,o,s,u,l,c=r&&r.that,h=!(!r||!r.AS_ENTRIES),d=!(!r||!r.IS_RECORD),f=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),m=kr(t,c),v=function(e){return n&&Wi(n,"normal",e),new $i(!0,e)},D=function(e){return h?(Me(e),p?m(e[0],e[1],v):m(e[0],e[1])):p?m(e,v):m(e)};if(d)n=e.iterator;else if(f)n=e;else{if(!(i=Hi(e)))throw new Yi(J(e)+" is not iterable");if(zi(i)){for(a=0,o=Tt(e);o>a;a++)if((s=D(e[a]))&&q(Zi,s))return s;return new $i(!1)}n=Vi(e,i)}for(u=d?e.next:n.next;!(l=g(u,n)).done;){try{s=D(l.value)}catch(e){Wi(n,"throw",e)}if("object"==typeof s&&s&&q(Zi,s))return s}return new $i(!1)},Ki=we("toStringTag"),Qi=Error,Ji=[].push,ea=function(e,t){var r,n=q(ta,this);li?r=li(new Qi,n?Mi(this):ta):(r=n?this:fr(ta),We(r,Ki,"Error")),void 0!==t&&We(r,"message",fi(t)),_i(r,ea,r.stack,1),arguments.length>2&&pi(r,arguments[2]);var i=[];return Xi(e,Ji,{that:i}),We(r,"errors",i),r};li?li(ea,Qi):Mt(ea,Qi,{name:!0});var ta=ea.prototype=fr(Qi.prototype,{constructor:b(1,ea),message:b(1,""),name:b(1,"AggregateError")});Wt({global:!0,constructor:!0,arity:2},{AggregateError:ea});var ra="AggregateError",na=U(ra),ia=!d((function(){return 1!==na([1]).errors[0]}))&&d((function(){return 7!==na([1],ra,{cause:7}).cause}));Wt({global:!0,constructor:!0,arity:2,forced:ia},{AggregateError:Ti(ra,(function(e){return function(t,r){return Fn(e,this,arguments)}}),ia,!0)});var aa=Ve.f,oa=we("unscopables"),sa=Array.prototype;void 0===sa[oa]&&aa(sa,oa,{configurable:!0,value:fr(null)});var ua=function(e){sa[oa][e]=!0};Wt({target:"Array",proto:!0},{at:function(e){var t=de(this),r=Tt(t),n=Dt(e),i=n>=0?n:r+n;return i<0||i>=r?void 0:t[i]}}),ua("at");var la=TypeError,ca=function(e){if(e>9007199254740991)throw la("Maximum allowed index exceeded");return e},ha=function(e,t,r){var n=Ae(t);n in e?Ve.f(e,n,b(0,r)):e[n]=r},da=we("species"),fa=function(e){return W>=51||!d((function(){var t=[];return(t.constructor={})[da]=function(){return{foo:1}},1!==t[e](Boolean).foo}))},pa=we("isConcatSpreadable"),ma=W>=51||!d((function(){var e=[];return e[pa]=!1,e.concat()[0]!==e})),ga=function(e){if(!P(e))return!1;var t=e[pa];return void 0!==t?!!t:Fr(e)},va=!ma||!fa("concat");Wt({target:"Array",proto:!0,arity:1,forced:va},{concat:function(e){var t,r,n,i,a,o=de(this),s=jr(o,0),u=0;for(t=-1,n=arguments.length;t2?arguments[2]:void 0,s=Ea((void 0===o?n:bt(o,n))-a,n-i),u=1;for(a0;)a in r?r[i]=r[a]:ya(r,i),i+=u,a+=u;return r};Wt({target:"Array",proto:!0},{copyWithin:ba}),ua("copyWithin");var wa=function(e,t){var r=[][e];return!!r&&d((function(){r.call(null,t||function(){return 1},1)}))},_a=Vr.every,Ta=wa("every");Wt({target:"Array",proto:!0,forced:!Ta},{every:function(e){return _a(this,e,arguments.length>1?arguments[1]:void 0)}});var Ca=function(e){for(var t=de(this),r=Tt(t),n=arguments.length,i=bt(n>1?arguments[1]:void 0,r),a=n>2?arguments[2]:void 0,o=void 0===a?r:bt(a,r);o>i;)t[i++]=e;return t};Wt({target:"Array",proto:!0},{fill:Ca}),ua("fill");var Aa=Vr.filter,Sa=fa("filter");Wt({target:"Array",proto:!0,forced:!Sa},{filter:function(e){return Aa(this,e,arguments.length>1?arguments[1]:void 0)}});var xa=Vr.find,ka="find",Fa=!0;ka in[]&&Array(1)[ka]((function(){Fa=!1})),Wt({target:"Array",proto:!0,forced:Fa},{find:function(e){return xa(this,e,arguments.length>1?arguments[1]:void 0)}}),ua(ka);var Na=Vr.findIndex,Ia="findIndex",Oa=!0;Ia in[]&&Array(1)[Ia]((function(){Oa=!1})),Wt({target:"Array",proto:!0,forced:Oa},{findIndex:function(e){return Na(this,e,arguments.length>1?arguments[1]:void 0)}}),ua(Ia);var Ra=function(e){var t=1===e;return function(r,n,i){for(var a,o=de(r),s=N(o),u=Tt(s),l=kr(n,i);u-- >0;)if(l(a=s[u],u,o))switch(e){case 0:return a;case 1:return u}return t?-1:void 0}},La={findLast:Ra(0),findLastIndex:Ra(1)},Ba=La.findLast;Wt({target:"Array",proto:!0},{findLast:function(e){return Ba(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("findLast");var Ma=La.findLastIndex;Wt({target:"Array",proto:!0},{findLastIndex:function(e){return Ma(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("findLastIndex");var Pa=function(e,t,r,n,i,a,o,s){for(var u,l,c=i,h=0,d=!!o&&kr(o,s);h0&&Fr(u)?(l=Tt(u),c=Pa(e,t,u,l,c,a-1)-1):(ca(c+1),e[c]=u),c++),h++;return c},Ua=Pa;Wt({target:"Array",proto:!0},{flat:function(){var e=arguments.length?arguments[0]:void 0,t=de(this),r=Tt(t),n=jr(t,0);return n.length=Ua(n,t,t,r,0,void 0===e?1:Dt(e)),n}}),Wt({target:"Array",proto:!0},{flatMap:function(e){var t,r=de(this),n=Tt(r);return te(e),(t=jr(r,0)).length=Ua(t,r,r,n,0,1,e,arguments.length>1?arguments[1]:void 0),t}});var qa=Vr.forEach,za=wa("forEach")?[].forEach:function(e){return qa(this,e,arguments.length>1?arguments[1]:void 0)};Wt({target:"Array",proto:!0,forced:[].forEach!==za},{forEach:za});var ja=function(e,t,r,n){try{return n?t(Me(r)[0],r[1]):t(r)}catch(t){Wi(e,"throw",t)}},Ha=Array,Ga=function(e){var t=de(e),r=Ur(this),n=arguments.length,i=n>1?arguments[1]:void 0,a=void 0!==i;a&&(i=kr(i,n>2?arguments[2]:void 0));var o,s,u,l,c,h,d=Hi(t),f=0;if(!d||this===Ha&&zi(d))for(o=Tt(t),s=r?new this(o):Ha(o);o>f;f++)h=a?i(t[f],f):t[f],ha(s,f,h);else for(c=(l=Vi(t,d)).next,s=r?new this:[];!(u=g(c,l)).done;f++)h=a?ja(l,i,[u.value,f],!0):u.value,ha(s,f,h);return s.length=f,s},Va=we("iterator"),Wa=!1;try{var Ya=0,$a={next:function(){return{done:!!Ya++}},return:function(){Wa=!0}};$a[Va]=function(){return this},Array.from($a,(function(){throw 2}))}catch(jre){}var Za=function(e,t){try{if(!t&&!Wa)return!1}catch(e){return!1}var r=!1;try{var n={};n[Va]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Xa=!Za((function(e){Array.from(e)}));Wt({target:"Array",stat:!0,forced:Xa},{from:Ga});var Ka=At.includes,Qa=d((function(){return!Array(1).includes()}));Wt({target:"Array",proto:!0,forced:Qa},{includes:function(e){return Ka(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("includes");var Ja=At.indexOf,eo=Sr([].indexOf),to=!!eo&&1/eo([1],1,-0)<0,ro=to||!wa("indexOf");Wt({target:"Array",proto:!0,forced:ro},{indexOf:function(e){var t=arguments.length>1?arguments[1]:void 0;return to?eo(this,e,t)||0:Ja(this,e,t)}}),Wt({target:"Array",stat:!0},{isArray:Fr});var no,io,ao,oo=we("iterator"),so=!1;[].keys&&("next"in(ao=[].keys())?(io=Mi(Mi(ao)))!==Object.prototype&&(no=io):so=!0);var uo=!P(no)||d((function(){var e={};return no[oo].call(e)!==e}));uo&&(no={}),M(no[oo])||pt(no,oo,(function(){return this}));var lo={IteratorPrototype:no,BUGGY_SAFARI_ITERATORS:so},co=lo.IteratorPrototype,ho=function(){return this},fo=function(e,t,r,n){var i=t+" Iterator";return e.prototype=fr(co,{next:b(+!n,r)}),Ar(e,i,!1),Pi[i]=ho,e},po=Xe.PROPER,mo=Xe.CONFIGURABLE,go=lo.IteratorPrototype,vo=lo.BUGGY_SAFARI_ITERATORS,Do=we("iterator"),yo="keys",Eo="values",bo="entries",wo=function(){return this},_o=function(e,t,r,n,i,a,o){fo(r,t,n);var s,u,l,c=function(e){if(e===i&&m)return m;if(!vo&&e&&e in f)return f[e];switch(e){case yo:case Eo:case bo:return function(){return new r(this,e)}}return function(){return new r(this)}},h=t+" Iterator",d=!1,f=e.prototype,p=f[Do]||f["@@iterator"]||i&&f[i],m=!vo&&p||c(i),v="Array"===t&&f.entries||p;if(v&&(s=Mi(v.call(new e)))!==Object.prototype&&s.next&&(Mi(s)!==go&&(li?li(s,go):M(s[Do])||pt(s,Do,wo)),Ar(s,h,!0)),po&&i===Eo&&p&&p.name!==Eo&&(mo?We(f,"name",Eo):(d=!0,m=function(){return g(p,this)})),i)if(u={values:c(Eo),keys:a?m:c(yo),entries:c(bo)},o)for(l in u)(vo||d||!(l in f))&&pt(f,l,u[l]);else Wt({target:t,proto:!0,forced:vo||d},u);return f[Do]!==m&&pt(f,Do,m,{name:i}),Pi[t]=m,u},To=function(e,t){return{value:e,done:t}},Co=Ve.f,Ao="Array Iterator",So=dt.set,xo=dt.getterFor(Ao),ko=_o(Array,"Array",(function(e,t){So(this,{type:Ao,target:L(e),index:0,kind:t})}),(function(){var e=xo(this),t=e.target,r=e.index++;if(!t||r>=t.length)return e.target=void 0,To(void 0,!0);switch(e.kind){case"keys":return To(r,!1);case"values":return To(t[r],!1)}return To([r,t[r]],!1)}),"values"),Fo=Pi.Arguments=Pi.Array;if(ua("keys"),ua("values"),ua("entries"),f&&"values"!==Fo.name)try{Co(Fo,"name",{value:"values"})}catch(Hre){}var No=C([].join),Io=N!==Object||!wa("join",",");Wt({target:"Array",proto:!0,forced:Io},{join:function(e){return No(L(this),void 0===e?",":e)}});var Oo=Math.min,Ro=[].lastIndexOf,Lo=!!Ro&&1/[1].lastIndexOf(1,-0)<0,Bo=wa("lastIndexOf"),Mo=Lo||!Bo?function(e){if(Lo)return Fn(Ro,this,arguments)||0;var t=L(this),r=Tt(t),n=r-1;for(arguments.length>1&&(n=Oo(n,Dt(arguments[1]))),n<0&&(n=r+n);n>=0;n--)if(n in t&&t[n]===e)return n||0;return-1}:Ro;Wt({target:"Array",proto:!0,forced:Mo!==[].lastIndexOf},{lastIndexOf:Mo});var Po=Vr.map,Uo=fa("map");Wt({target:"Array",proto:!0,forced:!Uo},{map:function(e){return Po(this,e,arguments.length>1?arguments[1]:void 0)}});var qo=Array,zo=d((function(){function e(){}return!(qo.of.call(e)instanceof e)}));Wt({target:"Array",stat:!0,forced:zo},{of:function(){for(var e=0,t=arguments.length,r=new(Ur(this)?this:qo)(t);t>e;)ha(r,e,arguments[e++]);return r.length=t,r}});var jo=TypeError,Ho=Object.getOwnPropertyDescriptor,Go=f&&!function(){if(void 0!==this)return!0;try{Object.defineProperty([],"length",{writable:!1}).length=1}catch(e){return e instanceof TypeError}}()?function(e,t){if(Fr(e)&&!Ho(e,"length").writable)throw new jo("Cannot set read only .length");return e.length=t}:function(e,t){return e.length=t},Vo=d((function(){return 4294967297!==[].push.call({length:4294967296},1)}))||!function(){try{Object.defineProperty([],"length",{writable:!1}).push()}catch(e){return e instanceof TypeError}}();Wt({target:"Array",proto:!0,arity:1,forced:Vo},{push:function(e){var t=de(this),r=Tt(t),n=arguments.length;ca(r+n);for(var i=0;i=0:s>u;u+=l)u in o&&(i=r(i,o[u],u,a));return i}},$o={left:Yo(!1),right:Yo(!0)},Zo="process"===x(h.process),Xo=$o.left,Ko=!Zo&&W>79&&W<83||!wa("reduce");Wt({target:"Array",proto:!0,forced:Ko},{reduce:function(e){var t=arguments.length;return Xo(this,e,t,t>1?arguments[1]:void 0)}});var Qo=$o.right,Jo=!Zo&&W>79&&W<83||!wa("reduceRight");Wt({target:"Array",proto:!0,forced:Jo},{reduceRight:function(e){return Qo(this,e,arguments.length,arguments.length>1?arguments[1]:void 0)}});var es=C([].reverse),ts=[1,2];Wt({target:"Array",proto:!0,forced:String(ts)===String(ts.reverse())},{reverse:function(){return Fr(this)&&(this.length=this.length),es(this)}});var rs=fa("slice"),ns=we("species"),is=Array,as=Math.max;Wt({target:"Array",proto:!0,forced:!rs},{slice:function(e,t){var r,n,i,a=L(this),o=Tt(a),s=bt(e,o),u=bt(void 0===t?o:t,o);if(Fr(a)&&(r=a.constructor,(Ur(r)&&(r===is||Fr(r.prototype))||P(r)&&null===(r=r[ns]))&&(r=void 0),r===is||void 0===r))return pr(a,s,u);for(n=new(void 0===r?is:r)(as(u-s,0)),i=0;s1?arguments[1]:void 0)}});var us=Math.floor,ls=function(e,t){var r=e.length;if(r<8)for(var n,i,a=1;a0;)e[i]=e[--i];i!==a++&&(e[i]=n)}else for(var o=us(r/2),s=ls(pr(e,0,o),t),u=ls(pr(e,o),t),l=s.length,c=u.length,h=0,d=0;h3)){if(fs)return!0;if(ms)return ms<603;var e,t,r,n,i="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)gs.push({k:t+n,v:r})}for(gs.sort((function(e,t){return t.v-e.v})),n=0;ntr(r)?1:-1}}(e)),r=Tt(i),n=0;nl-n+r;a--)ya(u,a-1)}else if(r>n)for(a=l-n;a>c;a--)s=a+r-1,(o=a+n-1)in u?u[s]=u[o]:ya(u,s);for(a=0;a2?r:Tt(t),a=new e(i);i>n;)a[n]=t[n++];return a},Ns=function(e,t){var r=h[e],n=r&&r.prototype;return n&&n[t]},Is=Array,Os=C(Ns("Array","sort"));Wt({target:"Array",proto:!0},{toSorted:function(e){void 0!==e&&te(e);var t=L(this),r=Fs(Is,t);return Os(r,e)}}),ua("toSorted");var Rs=Array,Ls=Math.max,Bs=Math.min;Wt({target:"Array",proto:!0},{toSpliced:function(e,t){var r,n,i,a,o=L(this),s=Tt(o),u=bt(e,s),l=arguments.length,c=0;for(0===l?r=n=0:1===l?(r=0,n=s-u):(r=l-2,n=Bs(Ls(Dt(t),0),s-u)),i=ca(s+r-n),a=Rs(i);c=i||o<0)throw new Ps("Incorrect index");for(var s=new t(i),u=0;ur||u!=u?o*(1/0):o*u},Qs=Math.fround||function(e){return Ks(e,1.1920928955078125e-7,34028234663852886e22,11754943508222875e-54)},Js=Array,eu=Math.abs,tu=Math.pow,ru=Math.floor,nu=Math.log,iu=Math.LN2,au=function(e,t,r){var n,i,a,o=Js(r),s=8*r-t-1,u=(1<>1,c=23===t?tu(2,-24)-tu(2,-77):0,h=e<0||0===e&&1/e<0?1:0,d=0;for((e=eu(e))!=e||e===1/0?(i=e!=e?1:0,n=u):(n=ru(nu(e)/iu),e*(a=tu(2,-n))<1&&(n--,a*=2),(e+=n+l>=1?c/a:c*tu(2,1-l))*a>=2&&(n++,a/=2),n+l>=u?(i=0,n=u):n+l>=1?(i=(e*a-1)*tu(2,t),n+=l):(i=e*tu(2,l-1)*tu(2,t),n=0));t>=8;)o[d++]=255&i,i/=256,t-=8;for(n=n<0;)o[d++]=255&n,n/=256,s-=8;return o[--d]|=128*h,o},ou=function(e,t){var r,n=e.length,i=8*n-t-1,a=(1<>1,s=i-7,u=n-1,l=e[u--],c=127&l;for(l>>=7;s>0;)c=256*c+e[u--],s-=8;for(r=c&(1<<-s)-1,c>>=-s,s+=t;s>0;)r=256*r+e[u--],s-=8;if(0===c)c=1-o;else{if(c===a)return r?NaN:l?-1/0:1/0;r+=tu(2,t),c-=o}return(l?-1:1)*r*tu(2,c-t)},su=Xe.PROPER,uu=Xe.CONFIGURABLE,lu="ArrayBuffer",cu="DataView",hu="prototype",du="Wrong index",fu=dt.getterFor(lu),pu=dt.getterFor(cu),mu=dt.set,gu=h[lu],vu=gu,Du=vu&&vu[hu],yu=h[cu],Eu=yu&&yu[hu],bu=Object.prototype,wu=h.Array,_u=h.RangeError,Tu=C(Ca),Cu=C([].reverse),Au=au,Su=ou,xu=function(e){return[255&e]},ku=function(e){return[255&e,e>>8&255]},Fu=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},Nu=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},Iu=function(e){return Au(Qs(e),23,4)},Ou=function(e){return Au(e,52,8)},Ru=function(e,t,r){Dr(e[hu],t,{configurable:!0,get:function(){return r(this)[t]}})},Lu=function(e,t,r,n){var i=pu(e),a=Ws(r),o=!!n;if(a+t>i.byteLength)throw new _u(du);var s=i.bytes,u=a+i.byteOffset,l=pr(s,u,u+t);return o?l:Cu(l)},Bu=function(e,t,r,n,i,a){var o=pu(e),s=Ws(r),u=n(+i),l=!!a;if(s+t>o.byteLength)throw new _u(du);for(var c=o.bytes,h=s+o.byteOffset,d=0;d>24)},setUint8:function(e,t){Uu(this,e,t<<24>>24)}},{unsafe:!0})}else vu=function(e){Gs(this,Du);var t=Ws(e);mu(this,{type:lu,bytes:Tu(wu(t),0),byteLength:t}),f||(this.byteLength=t,this.detached=!1)},Du=vu[hu],yu=function(e,t,r){Gs(this,Eu),Gs(e,Du);var n=fu(e),i=n.byteLength,a=Dt(t);if(a<0||a>i)throw new _u("Wrong offset");if(a+(r=void 0===r?i-a:_t(r))>i)throw new _u("Wrong length");mu(this,{type:cu,buffer:e,byteLength:r,byteOffset:a,bytes:n.bytes}),f||(this.buffer=e,this.byteLength=r,this.byteOffset=a)},Eu=yu[hu],f&&(Ru(vu,"byteLength",fu),Ru(yu,"buffer",pu),Ru(yu,"byteLength",pu),Ru(yu,"byteOffset",pu)),js(Eu,{getInt8:function(e){return Lu(this,1,e)[0]<<24>>24},getUint8:function(e){return Lu(this,1,e)[0]},getInt16:function(e){var t=Lu(this,2,e,arguments.length>1&&arguments[1]);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Lu(this,2,e,arguments.length>1&&arguments[1]);return t[1]<<8|t[0]},getInt32:function(e){return Nu(Lu(this,4,e,arguments.length>1&&arguments[1]))},getUint32:function(e){return Nu(Lu(this,4,e,arguments.length>1&&arguments[1]))>>>0},getFloat32:function(e){return Su(Lu(this,4,e,arguments.length>1&&arguments[1]),23)},getFloat64:function(e){return Su(Lu(this,8,e,arguments.length>1&&arguments[1]),52)},setInt8:function(e,t){Bu(this,1,e,xu,t)},setUint8:function(e,t){Bu(this,1,e,xu,t)},setInt16:function(e,t){Bu(this,2,e,ku,t,arguments.length>2&&arguments[2])},setUint16:function(e,t){Bu(this,2,e,ku,t,arguments.length>2&&arguments[2])},setInt32:function(e,t){Bu(this,4,e,Fu,t,arguments.length>2&&arguments[2])},setUint32:function(e,t){Bu(this,4,e,Fu,t,arguments.length>2&&arguments[2])},setFloat32:function(e,t){Bu(this,4,e,Iu,t,arguments.length>2&&arguments[2])},setFloat64:function(e,t){Bu(this,8,e,Ou,t,arguments.length>2&&arguments[2])}});Ar(vu,lu),Ar(yu,cu);var qu={ArrayBuffer:vu,DataView:yu},zu="ArrayBuffer",ju=qu[zu],Hu=h[zu];Wt({global:!0,constructor:!0,forced:Hu!==ju},{ArrayBuffer:ju}),Ts(zu);var Gu,Vu,Wu,Yu=dt.enforce,$u=dt.get,Zu=h.Int8Array,Xu=Zu&&Zu.prototype,Ku=h.Uint8ClampedArray,Qu=Ku&&Ku.prototype,Ju=Zu&&Mi(Zu),el=Xu&&Mi(Xu),tl=Object.prototype,rl=h.TypeError,nl=we("toStringTag"),il=De("TYPED_ARRAY_TAG"),al="TypedArrayConstructor",ol=zs&&!!li&&"Opera"!==Jt(h.opera),sl=!1,ul={Int8Array:1,Uint8Array:1,Uint8ClampedArray:1,Int16Array:2,Uint16Array:2,Int32Array:4,Uint32Array:4,Float32Array:4,Float64Array:8},ll={BigInt64Array:8,BigUint64Array:8},cl=function(e){var t=Mi(e);if(P(t)){var r=$u(t);return r&&pe(r,al)?r[al]:cl(t)}},hl=function(e){if(!P(e))return!1;var t=Jt(e);return pe(ul,t)||pe(ll,t)};for(Gu in ul)(Wu=(Vu=h[Gu])&&Vu.prototype)?Yu(Wu)[al]=Vu:ol=!1;for(Gu in ll)(Wu=(Vu=h[Gu])&&Vu.prototype)&&(Yu(Wu)[al]=Vu);if((!ol||!M(Ju)||Ju===Function.prototype)&&(Ju=function(){throw new rl("Incorrect invocation")},ol))for(Gu in ul)h[Gu]&&li(h[Gu],Ju);if((!ol||!el||el===tl)&&(el=Ju.prototype,ol))for(Gu in ul)h[Gu]&&li(h[Gu].prototype,el);if(ol&&Mi(Qu)!==el&&li(Qu,el),f&&!pe(el,nl))for(Gu in sl=!0,Dr(el,nl,{configurable:!0,get:function(){return P(this)?this[il]:void 0}}),ul)h[Gu]&&We(h[Gu],il,Gu);var dl={NATIVE_ARRAY_BUFFER_VIEWS:ol,TYPED_ARRAY_TAG:sl&&il,aTypedArray:function(e){if(hl(e))return e;throw new rl("Target is not a typed array")},aTypedArrayConstructor:function(e){if(M(e)&&(!li||q(Ju,e)))return e;throw new rl(J(e)+" is not a typed array constructor")},exportTypedArrayMethod:function(e,t,r,n){if(f){if(r)for(var i in ul){var a=h[i];if(a&&pe(a.prototype,e))try{delete a.prototype[e]}catch(r){try{a.prototype[e]=t}catch(e){}}}el[e]&&!r||pt(el,e,r?t:ol&&Xu[e]||t,n)}},exportTypedArrayStaticMethod:function(e,t,r){var n,i;if(f){if(li){if(r)for(n in ul)if((i=h[n])&&pe(i,e))try{delete i[e]}catch(e){}if(Ju[e]&&!r)return;try{return pt(Ju,e,r?t:ol&&Ju[e]||t)}catch(e){}}for(n in ul)!(i=h[n])||i[e]&&!r||pt(i,e,t)}},getTypedArrayConstructor:cl,isView:function(e){if(!P(e))return!1;var t=Jt(e);return"DataView"===t||pe(ul,t)||pe(ll,t)},isTypedArray:hl,TypedArray:Ju,TypedArrayPrototype:el};Wt({target:"ArrayBuffer",stat:!0,forced:!dl.NATIVE_ARRAY_BUFFER_VIEWS},{isView:dl.isView});var fl=TypeError,pl=function(e){if(Ur(e))return e;throw new fl(J(e)+" is not a constructor")},ml=we("species"),gl=function(e,t){var r,n=Me(e).constructor;return void 0===n||I(r=Me(n)[ml])?t:pl(r)},vl=qu.ArrayBuffer,Dl=qu.DataView,yl=Dl.prototype,El=Sr(vl.prototype.slice),bl=Sr(yl.getUint8),wl=Sr(yl.setUint8),_l=d((function(){return!new vl(2).slice(1,void 0).byteLength}));Wt({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:_l},{slice:function(e,t){if(El&&void 0===t)return El(Me(this),e);for(var r=Me(this).byteLength,n=bt(e,r),i=bt(void 0===t?r:t,r),a=new(gl(this,vl))(_t(i-n)),o=new Dl(this),s=new Dl(a),u=0;n=0&&t<=99?t+1900:t)}}),Wt({target:"Date",proto:!0},{toGMTString:Date.prototype.toUTCString});var Nl=RangeError,Il=function(e){var t=tr(R(this)),r="",n=Dt(e);if(n<0||n===1/0)throw new Nl("Wrong number of repetitions");for(;n>0;(n>>>=1)&&(t+=t))1&n&&(r+=t);return r},Ol=C(Il),Rl=C("".slice),Ll=Math.ceil,Bl=function(e){return function(t,r,n){var i,a,o=tr(R(t)),s=_t(r),u=o.length,l=void 0===n?" ":tr(n);return s<=u||""===l?o:((a=Ol(l,Ll((i=s-u)/l.length))).length>i&&(a=Rl(a,0,i)),e?o+a:a+o)}},Ml={start:Bl(!1),end:Bl(!0)},Pl=Ml.start,Ul=RangeError,ql=isFinite,zl=Math.abs,jl=Date.prototype,Hl=jl.toISOString,Gl=C(jl.getTime),Vl=C(jl.getUTCDate),Wl=C(jl.getUTCFullYear),Yl=C(jl.getUTCHours),$l=C(jl.getUTCMilliseconds),Zl=C(jl.getUTCMinutes),Xl=C(jl.getUTCMonth),Kl=C(jl.getUTCSeconds),Ql=d((function(){return"0385-07-25T07:06:39.999Z"!==Hl.call(new Date(-50000000000001))}))||!d((function(){Hl.call(new Date(NaN))}))?function(){if(!ql(Gl(this)))throw new Ul("Invalid time value");var e=this,t=Wl(e),r=$l(e),n=t<0?"-":t>9999?"+":"";return n+Pl(zl(t),n?6:4,0)+"-"+Pl(Xl(e)+1,2,0)+"-"+Pl(Vl(e),2,0)+"T"+Pl(Yl(e),2,0)+":"+Pl(Zl(e),2,0)+":"+Pl(Kl(e),2,0)+"."+Pl(r,3,0)+"Z"}:Hl;Wt({target:"Date",proto:!0,forced:Date.prototype.toISOString!==Ql},{toISOString:Ql});var Jl=d((function(){return null!==new Date(NaN).toJSON()||1!==Date.prototype.toJSON.call({toISOString:function(){return 1}})}));Wt({target:"Date",proto:!0,arity:1,forced:Jl},{toJSON:function(e){var t=de(this),r=Ce(t,"number");return"number"!=typeof r||isFinite(r)?t.toISOString():null}});var ec=TypeError,tc=we("toPrimitive"),rc=Date.prototype;pe(rc,tc)||pt(rc,tc,(function(e){if(Me(this),"string"===e||"default"===e)e="string";else if("number"!==e)throw new ec("Incorrect hint");return ie(this,e)}));var nc=Date.prototype,ic="Invalid Date",ac="toString",oc=C(nc[ac]),sc=C(nc.getTime);String(new Date(NaN))!==ic&&pt(nc,ac,(function(){var e=sc(this);return e==e?oc(this):ic}));var uc=C("".charAt),lc=C("".charCodeAt),cc=C(/./.exec),hc=C(1..toString),dc=C("".toUpperCase),fc=/[\w*+\-./@]/,pc=function(e,t){for(var r=hc(e,16);r.length1?arguments[1]:void 0);t=t?t.next:r.first;)for(n(t.value,t.key,this);t&&t.removed;)t=t.previous},has:function(e){return!!u(this,e)}}),js(a,r?{get:function(e){var t=u(this,e);return t&&t.value},set:function(e,t){return s(this,0===e?0:e,t)}}:{add:function(e){return s(this,e=0===e?0:e,e)}}),f&&Dr(a,"size",{configurable:!0,get:function(){return o(this).size}}),i},setStrong:function(e,t,r){var n=t+" Iterator",i=Lc(t),a=Lc(n);_o(e,t,(function(e,t){Rc(this,{type:n,target:e,state:i(e),kind:t,last:void 0})}),(function(){for(var e=a(this),t=e.kind,r=e.last;r&&r.removed;)r=r.previous;return e.target&&(e.last=r=r?r.next:e.state.first)?To("keys"===t?r.key:"values"===t?r.value:[r.key,r.value],!1):(e.target=void 0,To(void 0,!0))}),r?"entries":"values",!r,!0),Ts(t)}};Ic("Map",(function(e){return function(){return e(this,arguments.length?arguments[0]:void 0)}}),Bc);var Mc=Map.prototype,Pc={Map:Map,set:C(Mc.set),get:C(Mc.get),has:C(Mc.has),remove:C(Mc.delete),proto:Mc},Uc=Pc.Map,qc=Pc.has,zc=Pc.get,jc=Pc.set,Hc=C([].push);Wt({target:"Map",stat:!0,forced:ae},{groupBy:function(e,t){R(e),te(t);var r=new Uc,n=0;return Xi(e,(function(e){var i=t(e,n++);qc(r,i)?Hc(zc(r,i),e):jc(r,i,[e])})),r}});var Gc=Math.log,Vc=Math.log1p||function(e){var t=+e;return t>-1e-8&&t<1e-8?t-t*t/2:Gc(1+t)},Wc=Math.acosh,Yc=Math.log,$c=Math.sqrt,Zc=Math.LN2,Xc=!Wc||710!==Math.floor(Wc(Number.MAX_VALUE))||Wc(1/0)!==1/0;Wt({target:"Math",stat:!0,forced:Xc},{acosh:function(e){var t=+e;return t<1?NaN:t>94906265.62425156?Yc(t)+Zc:Vc(t-1+$c(t-1)*$c(t+1))}});var Kc=Math.asinh,Qc=Math.log,Jc=Math.sqrt;var eh=!(Kc&&1/Kc(0)>0);Wt({target:"Math",stat:!0,forced:eh},{asinh:function e(t){var r=+t;return isFinite(r)&&0!==r?r<0?-e(-r):Qc(r+Jc(r*r+1)):r}});var th=Math.atanh,rh=Math.log,nh=!(th&&1/th(-0)<0);Wt({target:"Math",stat:!0,forced:nh},{atanh:function(e){var t=+e;return 0===t?t:rh((1+t)/(1-t))/2}});var ih=Math.abs,ah=Math.pow;Wt({target:"Math",stat:!0},{cbrt:function(e){var t=+e;return Ys(t)*ah(ih(t),1/3)}});var oh=Math.floor,sh=Math.log,uh=Math.LOG2E;Wt({target:"Math",stat:!0},{clz32:function(e){var t=e>>>0;return t?31-oh(sh(t+.5)*uh):32}});var lh=Math.expm1,ch=Math.exp,hh=!lh||lh(10)>22025.465794806718||lh(10)<22025.465794806718||-2e-17!==lh(-2e-17)?function(e){var t=+e;return 0===t?t:t>-1e-6&&t<1e-6?t+t*t/2:ch(t)-1}:lh,dh=Math.cosh,fh=Math.abs,ph=Math.E,mh=!dh||dh(710)===1/0;Wt({target:"Math",stat:!0,forced:mh},{cosh:function(e){var t=hh(fh(e)-1)+1;return(t+1/(t*ph*ph))*(ph/2)}}),Wt({target:"Math",stat:!0,forced:hh!==Math.expm1},{expm1:hh}),Wt({target:"Math",stat:!0},{fround:Qs});var gh=Math.hypot,vh=Math.abs,Dh=Math.sqrt,yh=!!gh&&gh(1/0,NaN)!==1/0;Wt({target:"Math",stat:!0,arity:2,forced:yh},{hypot:function(e,t){for(var r,n,i=0,a=0,o=arguments.length,s=0;a0?(n=r/s)*n:r;return s===1/0?1/0:s*Dh(i)}});var Eh=Math.imul,bh=d((function(){return-5!==Eh(4294967295,5)||2!==Eh.length}));Wt({target:"Math",stat:!0,forced:bh},{imul:function(e,t){var r=65535,n=+e,i=+t,a=r&n,o=r&i;return 0|a*o+((r&n>>>16)*o+a*(r&i>>>16)<<16>>>0)}});var wh=Math.log,_h=Math.LOG10E,Th=Math.log10||function(e){return wh(e)*_h};Wt({target:"Math",stat:!0},{log10:Th}),Wt({target:"Math",stat:!0},{log1p:Vc});var Ch=Math.log,Ah=Math.LN2;Wt({target:"Math",stat:!0},{log2:function(e){return Ch(e)/Ah}}),Wt({target:"Math",stat:!0},{sign:Ys});var Sh=Math.abs,xh=Math.exp,kh=Math.E,Fh=d((function(){return-2e-17!==Math.sinh(-2e-17)}));Wt({target:"Math",stat:!0,forced:Fh},{sinh:function(e){var t=+e;return Sh(t)<1?(hh(t)-hh(-t))/2:(xh(t-1)-xh(-t-1))*(kh/2)}});var Nh=Math.exp;Wt({target:"Math",stat:!0},{tanh:function(e){var t=+e,r=hh(t),n=hh(-t);return r===1/0?1:n===1/0?-1:(r-n)/(Nh(t)+Nh(-t))}}),Ar(Math,"Math",!0),Wt({target:"Math",stat:!0},{trunc:vt});var Ih=C(1..valueOf),Oh="\t\n\v\f\r                 \u2028\u2029\ufeff",Rh=C("".replace),Lh=RegExp("^["+Oh+"]+"),Bh=RegExp("(^|[^"+Oh+"])["+Oh+"]+$"),Mh=function(e){return function(t){var r=tr(R(t));return 1&e&&(r=Rh(r,Lh,"")),2&e&&(r=Rh(r,Bh,"$1")),r}},Ph={start:Mh(1),end:Mh(2),trim:Mh(3)},Uh=Ot.f,qh=Oe.f,zh=Ve.f,jh=Ph.trim,Hh="Number",Gh=h[Hh];Er[Hh];var Vh=Gh.prototype,Wh=h.TypeError,Yh=C("".slice),$h=C("".charCodeAt),Zh=function(e){var t,r,n,i,a,o,s,u,l=Ce(e,"number");if(K(l))throw new Wh("Cannot convert a Symbol value to a number");if("string"==typeof l&&l.length>2)if(l=jh(l),43===(t=$h(l,0))||45===t){if(88===(r=$h(l,2))||120===r)return NaN}else if(48===t){switch($h(l,1)){case 66:case 98:n=2,i=49;break;case 79:case 111:n=8,i=55;break;default:return+l}for(o=(a=Yh(l,2)).length,s=0;si)return NaN;return parseInt(a,n)}return+l},Xh=Gt(Hh,!Gh(" 0o1")||!Gh("0b1")||Gh("+0x1")),Kh=function(e){var t,r=arguments.length<1?0:Gh(function(e){var t=Ce(e,"number");return"bigint"==typeof t?t:Zh(t)}(e));return q(Vh,t=this)&&d((function(){Ih(t)}))?di(Object(r),this,Kh):r};Kh.prototype=Vh,Xh&&(Vh.constructor=Kh),Wt({global:!0,constructor:!0,wrap:!0,forced:Xh},{Number:Kh});Xh&&function(e,t){for(var r,n=f?Uh(t):"MAX_VALUE,MIN_VALUE,NaN,NEGATIVE_INFINITY,POSITIVE_INFINITY,EPSILON,MAX_SAFE_INTEGER,MIN_SAFE_INTEGER,isFinite,isInteger,isNaN,isSafeInteger,parseFloat,parseInt,fromString,range".split(","),i=0;n.length>i;i++)pe(t,r=n[i])&&!pe(e,r)&&zh(e,r,qh(t,r))}(Er[Hh],Gh),Wt({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{EPSILON:Math.pow(2,-52)});var Qh=h.isFinite,Jh=Number.isFinite||function(e){return"number"==typeof e&&Qh(e)};Wt({target:"Number",stat:!0},{isFinite:Jh});var ed=Math.floor,td=Number.isInteger||function(e){return!P(e)&&isFinite(e)&&ed(e)===e};Wt({target:"Number",stat:!0},{isInteger:td}),Wt({target:"Number",stat:!0},{isNaN:function(e){return e!=e}});var rd=Math.abs;Wt({target:"Number",stat:!0},{isSafeInteger:function(e){return td(e)&&rd(e)<=9007199254740991}}),Wt({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MAX_SAFE_INTEGER:9007199254740991}),Wt({target:"Number",stat:!0,nonConfigurable:!0,nonWritable:!0},{MIN_SAFE_INTEGER:-9007199254740991});var nd=Ph.trim,id=C("".charAt),ad=h.parseFloat,od=h.Symbol,sd=od&&od.iterator,ud=1/ad(Oh+"-0")!=-1/0||sd&&!d((function(){ad(Object(sd))}))?function(e){var t=nd(tr(e)),r=ad(t);return 0===r&&"-"===id(t,0)?-0:r}:ad;Wt({target:"Number",stat:!0,forced:Number.parseFloat!==ud},{parseFloat:ud});var ld=Ph.trim,cd=h.parseInt,hd=h.Symbol,dd=hd&&hd.iterator,fd=/^[+-]?0x/i,pd=C(fd.exec),md=8!==cd(Oh+"08")||22!==cd(Oh+"0x16")||dd&&!d((function(){cd(Object(dd))}))?function(e,t){var r=ld(tr(e));return cd(r,t>>>0||(pd(fd,r)?16:10))}:cd;Wt({target:"Number",stat:!0,forced:Number.parseInt!==md},{parseInt:md});var gd=RangeError,vd=String,Dd=isFinite,yd=Math.abs,Ed=Math.floor,bd=Math.pow,wd=Math.round,_d=C(1..toExponential),Td=C(Il),Cd=C("".slice),Ad="-6.9000e-11"===_d(-69e-12,4)&&"1.25e+0"===_d(1.255,2)&&"1.235e+4"===_d(12345,3)&&"3e+1"===_d(25,0),Sd=!Ad||!(d((function(){_d(1,1/0)}))&&d((function(){_d(1,-1/0)})))||!!d((function(){_d(1/0,1/0),_d(NaN,1/0)}));Wt({target:"Number",proto:!0,forced:Sd},{toExponential:function(e){var t=Ih(this);if(void 0===e)return _d(t);var r=Dt(e);if(!Dd(t))return String(t);if(r<0||r>20)throw new gd("Incorrect fraction digits");if(Ad)return _d(t,r);var n="",i="",a=0,o="",s="";if(t<0&&(n="-",t=-t),0===t)a=0,i=Td("0",r+1);else{var u=Th(t);a=Ed(u);var l=0,c=bd(10,a-r);2*t>=(2*(l=wd(t/c))+1)*c&&(l+=1),l>=bd(10,r+1)&&(l/=10,a+=1),i=vd(l)}return 0!==r&&(i=Cd(i,0,1)+"."+Cd(i,1)),0===a?(o="+",s="0"):(o=a>0?"+":"-",s=vd(yd(a))),n+(i+="e"+o+s)}});var xd=RangeError,kd=String,Fd=Math.floor,Nd=C(Il),Id=C("".slice),Od=C(1..toFixed),Rd=function(e,t,r){return 0===t?r:t%2==1?Rd(e,t-1,r*e):Rd(e*e,t/2,r)},Ld=function(e,t,r){for(var n=-1,i=r;++n<6;)i+=t*e[n],e[n]=i%1e7,i=Fd(i/1e7)},Bd=function(e,t){for(var r=6,n=0;--r>=0;)n+=e[r],e[r]=Fd(n/t),n=n%t*1e7},Md=function(e){for(var t=6,r="";--t>=0;)if(""!==r||0===t||0!==e[t]){var n=kd(e[t]);r=""===r?n:r+Nd("0",7-n.length)+n}return r},Pd=d((function(){return"0.000"!==Od(8e-5,3)||"1"!==Od(.9,0)||"1.25"!==Od(1.255,2)||"1000000000000000128"!==Od(0xde0b6b3a7640080,0)}))||!d((function(){Od({})}));Wt({target:"Number",proto:!0,forced:Pd},{toFixed:function(e){var t,r,n,i,a=Ih(this),o=Dt(e),s=[0,0,0,0,0,0],u="",l="0";if(o<0||o>20)throw new xd("Incorrect fraction digits");if(a!=a)return"NaN";if(a<=-1e21||a>=1e21)return kd(a);if(a<0&&(u="-",a=-a),a>1e-21)if(t=function(e){for(var t=0,r=e;r>=4096;)t+=12,r/=4096;for(;r>=2;)t+=1,r/=2;return t}(a*Rd(2,69,1))-69,r=t<0?a*Rd(2,-t,1):a/Rd(2,t,1),r*=4503599627370496,(t=52-t)>0){for(Ld(s,0,r),n=o;n>=7;)Ld(s,1e7,0),n-=7;for(Ld(s,Rd(10,n,1),0),n=t-1;n>=23;)Bd(s,1<<23),n-=23;Bd(s,1<0?u+((i=l.length)<=o?"0."+Nd("0",o-i)+l:Id(l,0,i-o)+"."+Id(l,i-o)):u+l}});var Ud=C(1..toPrecision),qd=d((function(){return"1"!==Ud(1,void 0)}))||!d((function(){Ud({})}));Wt({target:"Number",proto:!0,forced:qd},{toPrecision:function(e){return void 0===e?Ud(Ih(this)):Ud(Ih(this),e)}});var zd=Object.assign,jd=Object.defineProperty,Hd=C([].concat),Gd=!zd||d((function(){if(f&&1!==zd({b:1},zd(jd({},"a",{enumerable:!0,get:function(){jd(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol("assign detection"),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!==zd({},e)[r]||rr(zd({},t)).join("")!==n}))?function(e,t){for(var r=de(e),n=arguments.length,i=1,a=Rt.f,o=E.f;n>i;)for(var s,u=N(arguments[i++]),l=a?Hd(rr(u),a(u)):rr(u),c=l.length,h=0;c>h;)s=l[h++],f&&!g(o,u,s)||(r[s]=u[s]);return r}:zd;Wt({target:"Object",stat:!0,arity:2,forced:Object.assign!==Gd},{assign:Gd}),Wt({target:"Object",stat:!0,sham:!f},{create:fr});var Vd=!d((function(){if(!(ms&&ms<535)){var e=Math.random();__defineSetter__.call(null,e,(function(){})),delete h[e]}}));f&&Wt({target:"Object",proto:!0,forced:Vd},{__defineGetter__:function(e,t){Ve.f(de(this),e,{get:te(t),enumerable:!0,configurable:!0})}});var Wd=ir.f;Wt({target:"Object",stat:!0,forced:Object.defineProperties!==Wd,sham:!f},{defineProperties:Wd});var Yd=Ve.f;Wt({target:"Object",stat:!0,forced:Object.defineProperty!==Yd,sham:!f},{defineProperty:Yd}),f&&Wt({target:"Object",proto:!0,forced:Vd},{__defineSetter__:function(e,t){Ve.f(de(this),e,{set:te(t),enumerable:!0,configurable:!0})}});var $d=E.f,Zd=C($d),Xd=C([].push),Kd=f&&d((function(){var e=Object.create(null);return e[2]=2,!Zd(e,2)})),Qd=function(e){return function(t){for(var r,n=L(t),i=rr(n),a=Kd&&null===Mi(n),o=i.length,s=0,u=[];o>s;)r=i[s++],f&&!(a?r in n:Zd(n,r))||Xd(u,e?[r,n[r]]:n[r]);return u}},Jd={entries:Qd(!0),values:Qd(!1)},ef=Jd.entries;Wt({target:"Object",stat:!0},{entries:function(e){return ef(e)}});var tf=Nc.onFreeze,rf=Object.freeze,nf=d((function(){rf(1)}));Wt({target:"Object",stat:!0,forced:nf,sham:!Fc},{freeze:function(e){return rf&&P(e)?rf(tf(e)):e}}),Wt({target:"Object",stat:!0},{fromEntries:function(e){var t={};return Xi(e,(function(e,r){ha(t,e,r)}),{AS_ENTRIES:!0}),t}});var af=Oe.f,of=!f||d((function(){af(1)}));Wt({target:"Object",stat:!0,forced:of,sham:!f},{getOwnPropertyDescriptor:function(e,t){return af(L(e),t)}}),Wt({target:"Object",stat:!0,sham:!f},{getOwnPropertyDescriptors:function(e){for(var t,r,n=L(e),i=Oe.f,a=Bt(n),o={},s=0;a.length>s;)void 0!==(r=i(n,t=a[s++]))&&ha(o,t,r);return o}});var sf=vr.f,uf=d((function(){return!Object.getOwnPropertyNames(1)}));Wt({target:"Object",stat:!0,forced:uf},{getOwnPropertyNames:sf});var lf=d((function(){Mi(1)}));Wt({target:"Object",stat:!0,forced:lf,sham:!Oi},{getPrototypeOf:function(e){return Mi(de(e))}});var cf=U("Object","create"),hf=C([].push);Wt({target:"Object",stat:!0},{groupBy:function(e,t){R(e),te(t);var r=cf(null),n=0;return Xi(e,(function(e){var i=Ae(t(e,n++));i in r?hf(r[i],e):r[i]=[e]})),r}}),Wt({target:"Object",stat:!0},{hasOwn:pe});var df=Object.is||function(e,t){return e===t?0!==e||1/e==1/t:e!=e&&t!=t};Wt({target:"Object",stat:!0},{is:df}),Wt({target:"Object",stat:!0,forced:Object.isExtensible!==kc},{isExtensible:kc});var ff=Object.isFrozen,pf=Sc||d((function(){ff(1)}));Wt({target:"Object",stat:!0,forced:pf},{isFrozen:function(e){return!P(e)||(!(!Sc||"ArrayBuffer"!==x(e))||!!ff&&ff(e))}});var mf=Object.isSealed,gf=Sc||d((function(){mf(1)}));Wt({target:"Object",stat:!0,forced:gf},{isSealed:function(e){return!P(e)||(!(!Sc||"ArrayBuffer"!==x(e))||!!mf&&mf(e))}});var vf=d((function(){rr(1)}));Wt({target:"Object",stat:!0,forced:vf},{keys:function(e){return rr(de(e))}});var Df=Oe.f;f&&Wt({target:"Object",proto:!0,forced:Vd},{__lookupGetter__:function(e){var t,r=de(this),n=Ae(e);do{if(t=Df(r,n))return t.get}while(r=Mi(r))}});var yf=Oe.f;f&&Wt({target:"Object",proto:!0,forced:Vd},{__lookupSetter__:function(e){var t,r=de(this),n=Ae(e);do{if(t=yf(r,n))return t.set}while(r=Mi(r))}});var Ef=Nc.onFreeze,bf=Object.preventExtensions,wf=d((function(){bf(1)}));Wt({target:"Object",stat:!0,forced:wf,sham:!Fc},{preventExtensions:function(e){return bf&&P(e)?bf(Ef(e)):e}});var _f=Object.getPrototypeOf,Tf=Object.setPrototypeOf,Cf=Object.prototype,Af="__proto__";if(f&&_f&&Tf&&!(Af in Cf))try{Dr(Cf,Af,{configurable:!0,get:function(){return _f(de(this))},set:function(e){var t=R(this);ai(e)&&P(t)&&Tf(t,e)}})}catch(Gre){}var Sf=Nc.onFreeze,xf=Object.seal,kf=d((function(){xf(1)}));Wt({target:"Object",stat:!0,forced:kf,sham:!Fc},{seal:function(e){return xf&&P(e)?xf(Sf(e)):e}}),Wt({target:"Object",stat:!0},{setPrototypeOf:li});var Ff=Zt?{}.toString:function(){return"[object "+Jt(this)+"]"};Zt||pt(Object.prototype,"toString",Ff,{unsafe:!0});var Nf=Jd.values;Wt({target:"Object",stat:!0},{values:function(e){return Nf(e)}}),Wt({global:!0,forced:parseFloat!==ud},{parseFloat:ud}),Wt({global:!0,forced:parseInt!==md},{parseInt:md});var If,Of,Rf,Lf,Bf=TypeError,Mf=function(e,t){if(eb)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$c")})),Gm=Ot.f,Vm=dt.enforce,Wm=we("match"),Ym=h.RegExp,$m=Ym.prototype,Zm=h.SyntaxError,Xm=C($m.exec),Km=C("".charAt),Qm=C("".replace),Jm=C("".indexOf),eg=C("".slice),tg=/^\?<[^\s\d!#%&*+<=>@^][^\s!#%&*+<=>@^]*>/,rg=/a/g,ng=/a/g,ig=new Ym(rg)!==rg,ag=Um.MISSED_STICKY,og=Um.UNSUPPORTED_Y,sg=f&&(!ig||ag||zm||Hm||d((function(){return ng[Wm]=!1,Ym(rg)!==rg||Ym(ng)===ng||"/a/i"!==String(Ym(rg,"i"))})));if(Gt("RegExp",sg)){for(var ug=function(e,t){var r,n,i,a,o,s,u=q($m,this),l=Nm(e),c=void 0===t,h=[],d=e;if(!u&&l&&c&&e.constructor===ug)return e;if((l||q($m,e))&&(e=e.source,c&&(t=Rm(d))),e=void 0===e?"":tr(e),t=void 0===t?"":tr(t),d=e,zm&&"dotAll"in rg&&(n=!!t&&Jm(t,"s")>-1)&&(t=Qm(t,/s/g,"")),r=t,ag&&"sticky"in rg&&(i=!!t&&Jm(t,"y")>-1)&&og&&(t=Qm(t,/y/g,"")),Hm&&(a=function(e){for(var t,r=e.length,n=0,i="",a=[],o=fr(null),s=!1,u=!1,l=0,c="";n<=r;n++){if("\\"===(t=Km(e,n)))t+=Km(e,++n);else if("]"===t)s=!1;else if(!s)switch(!0){case"["===t:s=!0;break;case"("===t:Xm(tg,eg(e,n+1))&&(n+=2,u=!0),i+=t,l++;continue;case">"===t&&u:if(""===c||pe(o,c))throw new Zm("Invalid capture group name");o[c]=!0,a[a.length]=[c,l],u=!1,c="";continue}u?c+=t:i+=t}return[i,a]}(e),e=a[0],h=a[1]),o=di(Ym(e,t),u?this:$m,ug),(n||i||h.length)&&(s=Vm(o),n&&(s.dotAll=!0,s.raw=ug(function(e){for(var t,r=e.length,n=0,i="",a=!1;n<=r;n++)"\\"!==(t=Km(e,n))?a||"."!==t?("["===t?a=!0:"]"===t&&(a=!1),i+=t):i+="[\\s\\S]":i+=t+Km(e,++n);return i}(e),r)),i&&(s.sticky=!0),h.length&&(s.groups=h)),e!==d)try{We(o,"source",""===d?"(?:)":d)}catch(e){}return o},lg=Gm(Ym),cg=0;lg.length>cg;)hi(ug,Ym,lg[cg++]);$m.constructor=ug,ug.prototype=$m,pt(h,"RegExp",ug,{constructor:!0})}Ts("RegExp");var hg=dt.get,dg=RegExp.prototype,fg=TypeError;f&&zm&&Dr(dg,"dotAll",{configurable:!0,get:function(){if(this!==dg){if("RegExp"===x(this))return!!hg(this).dotAll;throw new fg("Incompatible receiver, RegExp required")}}});var pg=dt.get,mg=ce("native-string-replace",String.prototype.replace),gg=RegExp.prototype.exec,vg=gg,Dg=C("".charAt),yg=C("".indexOf),Eg=C("".replace),bg=C("".slice),wg=function(){var e=/a/,t=/b*/g;return g(gg,e,"a"),g(gg,t,"a"),0!==e.lastIndex||0!==t.lastIndex}(),_g=Um.BROKEN_CARET,Tg=void 0!==/()??/.exec("")[1];(wg||Tg||_g||zm||Hm)&&(vg=function(e){var t,r,n,i,a,o,s,u=this,l=pg(u),c=tr(e),h=l.raw;if(h)return h.lastIndex=u.lastIndex,t=g(vg,h,c),u.lastIndex=h.lastIndex,t;var d=l.groups,f=_g&&u.sticky,p=g(Im,u),m=u.source,v=0,D=c;if(f&&(p=Eg(p,"y",""),-1===yg(p,"g")&&(p+="g"),D=bg(c,u.lastIndex),u.lastIndex>0&&(!u.multiline||u.multiline&&"\n"!==Dg(c,u.lastIndex-1))&&(m="(?: "+m+")",D=" "+D,v++),r=new RegExp("^(?:"+m+")",p)),Tg&&(r=new RegExp("^"+m+"$(?!\\s)",p)),wg&&(n=u.lastIndex),i=g(gg,f?r:u,D),f?i?(i.input=bg(i.input,v),i[0]=bg(i[0],v),i.index=u.lastIndex,u.lastIndex+=i[0].length):u.lastIndex=0:wg&&i&&(u.lastIndex=u.global?i.index+i[0].length:n),Tg&&i&&i.length>1&&g(mg,i[0],r,(function(){for(a=1;a=0?n:r+n;return i<0||i>=r?void 0:zg(t,i)}});var Hg=C("".charAt),Gg=C("".charCodeAt),Vg=C("".slice),Wg=function(e){return function(t,r){var n,i,a=tr(R(t)),o=Dt(r),s=a.length;return o<0||o>=s?e?"":void 0:(n=Gg(a,o))<55296||n>56319||o+1===s||(i=Gg(a,o+1))<56320||i>57343?e?Hg(a,o):n:e?Vg(a,o,o+2):i-56320+(n-55296<<10)+65536}},Yg={codeAt:Wg(!1),charAt:Wg(!0)},$g=Yg.codeAt;Wt({target:"String",proto:!0},{codePointAt:function(e){return $g(this,e)}});var Zg=TypeError,Xg=function(e){if(Nm(e))throw new Zg("The method doesn't accept regular expressions");return e},Kg=we("match"),Qg=function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[Kg]=!1,"/./"[e](t)}catch(e){}}return!1},Jg=Oe.f,ev=Sr("".slice),tv=Math.min,rv=Qg("endsWith"),nv=!rv&&!!function(){var e=Jg(String.prototype,"endsWith");return e&&!e.writable}();Wt({target:"String",proto:!0,forced:!nv&&!rv},{endsWith:function(e){var t=tr(R(this));Xg(e);var r=arguments.length>1?arguments[1]:void 0,n=t.length,i=void 0===r?n:tv(_t(r),n),a=tr(e);return ev(t,i-a.length,i)===a}});var iv=RangeError,av=String.fromCharCode,ov=String.fromCodePoint,sv=C([].join),uv=!!ov&&1!==ov.length;Wt({target:"String",stat:!0,arity:1,forced:uv},{fromCodePoint:function(e){for(var t,r=[],n=arguments.length,i=0;n>i;){if(t=+arguments[i++],bt(t,1114111)!==t)throw new iv(t+" is not a valid code point");r[i]=t<65536?av(t):av(55296+((t-=65536)>>10),t%1024+56320)}return sv(r,"")}});var lv=C("".indexOf);Wt({target:"String",proto:!0,forced:!Qg("includes")},{includes:function(e){return!!~lv(tr(R(this)),tr(Xg(e)),arguments.length>1?arguments[1]:void 0)}});var cv=C("".charCodeAt);Wt({target:"String",proto:!0},{isWellFormed:function(){for(var e=tr(R(this)),t=e.length,r=0;r=56320||++r>=t||56320!=(64512&cv(e,r))))return!1}return!0}});var hv=Yg.charAt,dv="String Iterator",fv=dt.set,pv=dt.getterFor(dv);_o(String,"String",(function(e){fv(this,{type:dv,string:tr(e),index:0})}),(function(){var e,t=pv(this),r=t.string,n=t.index;return n>=r.length?To(void 0,!0):(e=hv(r,n),t.index+=e.length,To(e,!1))}));var mv=we("species"),gv=RegExp.prototype,vv=function(e,t,r,n){var i=we(e),a=!d((function(){var t={};return t[i]=function(){return 7},7!==""[e](t)})),o=a&&!d((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[mv]=function(){return r},r.flags="",r[i]=/./[i]),r.exec=function(){return t=!0,null},r[i](""),!t}));if(!a||!o||r){var s=Sr(/./[i]),u=t(i,""[e],(function(e,t,r,n,i){var o=Sr(e),u=t.exec;return u===Cg||u===gv.exec?a&&!i?{done:!0,value:s(t,r,n)}:{done:!0,value:o(r,t,n)}:{done:!1}}));pt(String.prototype,e,u[0]),pt(gv,i,u[1])}n&&We(gv[i],"sham",!0)},Dv=Yg.charAt,yv=function(e,t,r){return t+(r?Dv(e,t).length:1)},Ev=TypeError,bv=function(e,t){var r=e.exec;if(M(r)){var n=g(r,e,t);return null!==n&&Me(n),n}if("RegExp"===x(e))return g(Cg,e,t);throw new Ev("RegExp#exec called on incompatible receiver")};vv("match",(function(e,t,r){return[function(t){var r=R(this),n=I(t)?void 0:re(t,e);return n?g(n,t,r):new RegExp(t)[e](tr(r))},function(e){var n=Me(this),i=tr(e),a=r(t,n,i);if(a.done)return a.value;if(!n.global)return bv(n,i);var o=n.unicode;n.lastIndex=0;for(var s,u=[],l=0;null!==(s=bv(n,i));){var c=tr(s[0]);u[l]=c,""===c&&(n.lastIndex=yv(i,_t(n.lastIndex),o)),l++}return 0===l?null:u}]}));var wv=we("matchAll"),_v="RegExp String",Tv=_v+" Iterator",Cv=dt.set,Av=dt.getterFor(Tv),Sv=RegExp.prototype,xv=TypeError,kv=Sr("".indexOf),Fv=Sr("".matchAll),Nv=!!Fv&&!d((function(){Fv("a",/./)})),Iv=fo((function(e,t,r,n){Cv(this,{type:Tv,regexp:e,string:t,global:r,unicode:n,done:!1})}),_v,(function(){var e=Av(this);if(e.done)return To(void 0,!0);var t=e.regexp,r=e.string,n=bv(t,r);return null===n?(e.done=!0,To(void 0,!0)):e.global?(""===tr(n[0])&&(t.lastIndex=yv(r,_t(t.lastIndex),e.unicode)),To(n,!1)):(e.done=!0,To(n,!1))})),Ov=function(e){var t,r,n,i=Me(this),a=tr(e),o=gl(i,RegExp),s=tr(Rm(i));return t=new o(o===RegExp?i.source:i,s),r=!!~kv(s,"g"),n=!!~kv(s,"u"),t.lastIndex=_t(i.lastIndex),new Iv(t,a,r,n)};Wt({target:"String",proto:!0,forced:Nv},{matchAll:function(e){var t,r,n,i=R(this);if(I(e)){if(Nv)return Fv(i,e)}else{if(Nm(e)&&(t=tr(R(Rm(e))),!~kv(t,"g")))throw new xv("`.matchAll` does not allow non-global regexes");if(Nv)return Fv(i,e);if(n=re(e,wv))return g(n,e,i)}return r=tr(i),new RegExp(e,"g")[wv](r)}}),wv in Sv||pt(Sv,wv,Ov);var Rv=/Version\/10(?:\.\d+){1,2}(?: [\w./]+)?(?: Mobile\/\w+)? Safari\//.test(z),Lv=Ml.end;Wt({target:"String",proto:!0,forced:Rv},{padEnd:function(e){return Lv(this,e,arguments.length>1?arguments[1]:void 0)}});var Bv=Ml.start;Wt({target:"String",proto:!0,forced:Rv},{padStart:function(e){return Bv(this,e,arguments.length>1?arguments[1]:void 0)}});var Mv=C([].push),Pv=C([].join);Wt({target:"String",stat:!0},{raw:function(e){var t=L(de(e).raw),r=Tt(t);if(!r)return"";for(var n=arguments.length,i=[],a=0;;){if(Mv(i,tr(t[a++])),a===r)return Pv(i,"");a]*>)/g,Gv=/\$([$&'`]|\d{1,2})/g,Vv=function(e,t,r,n,i,a){var o=r+e.length,s=n.length,u=Gv;return void 0!==i&&(i=de(i),u=Hv),zv(a,u,(function(a,u){var l;switch(qv(u,0)){case"$":return"$";case"&":return e;case"`":return jv(t,0,r);case"'":return jv(t,o);case"<":l=i[jv(u,1,-1)];break;default:var c=+u;if(0===c)return a;if(c>s){var h=Uv(c/10);return 0===h?a:h<=s?void 0===n[h-1]?qv(u,1):n[h-1]+qv(u,1):a}l=n[c-1]}return void 0===l?"":l}))},Wv=we("replace"),Yv=Math.max,$v=Math.min,Zv=C([].concat),Xv=C([].push),Kv=C("".indexOf),Qv=C("".slice),Jv="$0"==="a".replace(/./,"$0"),eD=!!/./[Wv]&&""===/./[Wv]("a","$0"),tD=!d((function(){var e=/./;return e.exec=function(){var e=[];return e.groups={a:"7"},e},"7"!=="".replace(e,"$")}));vv("replace",(function(e,t,r){var n=eD?"$":"$0";return[function(e,r){var n=R(this),i=I(e)?void 0:re(e,Wv);return i?g(i,e,n,r):g(t,tr(n),e,r)},function(e,i){var a=Me(this),o=tr(e);if("string"==typeof i&&-1===Kv(i,n)&&-1===Kv(i,"$<")){var s=r(t,a,o,i);if(s.done)return s.value}var u=M(i);u||(i=tr(i));var l,c=a.global;c&&(l=a.unicode,a.lastIndex=0);for(var h,d=[];null!==(h=bv(a,o))&&(Xv(d,h),c);){""===tr(h[0])&&(a.lastIndex=yv(o,_t(a.lastIndex),l))}for(var f,p="",m=0,g=0;g=m&&(p+=Qv(o,m,y)+v,m=y+D.length)}return p+Qv(o,m)}]}),!tD||!Jv||eD);var rD=we("replace"),nD=TypeError,iD=C("".indexOf);C("".replace);var aD=C("".slice),oD=Math.max,sD=function(e,t,r){return r>e.length?-1:""===t?r:iD(e,t,r)};Wt({target:"String",proto:!0},{replaceAll:function(e,t){var r,n,i,a,o,s,u,l,c=R(this),h=0,d=0,f="";if(!I(e)){if(Nm(e)&&(r=tr(R(Rm(e))),!~iD(r,"g")))throw new nD("`.replaceAll` does not allow non-global regexes");if(n=re(e,rD))return g(n,e,c,t)}for(i=tr(c),a=tr(e),(o=M(t))||(t=tr(t)),s=a.length,u=oD(1,s),h=sD(i,a,0);-1!==h;)l=o?tr(t(a,h,i)):Vv(a,i,h,[],void 0,t),f+=aD(i,d,h)+l,d=h+s,h=sD(i,a,h+u);return d1||"".split(/.?/).length?function(e,r){var n=tr(R(this)),i=void 0===r?lD:r>>>0;if(0===i)return[];if(void 0===e)return[n];if(!Nm(e))return g(t,n,e,i);for(var a,o,s,u=[],l=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),c=0,h=new RegExp(e.source,l+"g");(a=g(Cg,h,n))&&!((o=h.lastIndex)>c&&(fD(u,pD(n,c,a.index)),a.length>1&&a.index=i));)h.lastIndex===a.index&&h.lastIndex++;return c===n.length?!s&&dD(h,"")||fD(u,""):fD(u,pD(n,c)),u.length>i?pr(u,0,i):u}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:g(t,this,e,r)}:t,[function(t,r){var i=R(this),a=I(t)?void 0:re(t,e);return a?g(a,t,i,r):g(n,tr(i),t,r)},function(e,i){var a=Me(this),o=tr(e),s=r(n,a,o,i,n!==t);if(s.done)return s.value;var u=gl(a,RegExp),l=a.unicode,c=(a.ignoreCase?"i":"")+(a.multiline?"m":"")+(a.unicode?"u":"")+(uD?"g":"y"),h=new u(uD?"^(?:"+a.source+")":a,c),d=void 0===i?lD:i>>>0;if(0===d)return[];if(0===o.length)return null===bv(h,o)?[o]:[];for(var f=0,p=0,m=[];p1?arguments[1]:void 0,t.length)),n=tr(e);return vD(t,r,r+n.length)===n}});var bD=C("".slice),wD=Math.max,_D=Math.min,TD=!"".substr||"b"!=="ab".substr(-1);Wt({target:"String",proto:!0,forced:TD},{substr:function(e,t){var r,n,i=tr(R(this)),a=i.length,o=Dt(e);return o===1/0&&(o=0),o<0&&(o=wD(a+o,0)),(r=void 0===t?a:Dt(t))<=0||r===1/0||o>=(n=_D(o+r,a))?"":bD(i,o,n)}});var CD=Array,AD=C("".charAt),SD=C("".charCodeAt),xD=C([].join),kD="".toWellFormed,FD=kD&&d((function(){return"1"!==g(kD,1)}));Wt({target:"String",proto:!0,forced:FD},{toWellFormed:function(){var e=tr(R(this));if(FD)return g(kD,e);for(var t=e.length,r=CD(t),n=0;n=56320||n+1>=t||56320!=(64512&SD(e,n+1))?r[n]="�":(r[n]=AD(e,n),r[++n]=AD(e,n))}return xD(r,"")}});var ND=Xe.PROPER,ID=function(e){return d((function(){return!!Oh[e]()||"​…᠎"!=="​…᠎"[e]()||ND&&Oh[e].name!==e}))},OD=Ph.trim;Wt({target:"String",proto:!0,forced:ID("trim")},{trim:function(){return OD(this)}});var RD=Ph.end,LD=ID("trimEnd")?function(){return RD(this)}:"".trimEnd;Wt({target:"String",proto:!0,name:"trimEnd",forced:"".trimRight!==LD},{trimRight:LD}),Wt({target:"String",proto:!0,name:"trimEnd",forced:"".trimEnd!==LD},{trimEnd:LD});var BD=Ph.start,MD=ID("trimStart")?function(){return BD(this)}:"".trimStart;Wt({target:"String",proto:!0,name:"trimStart",forced:"".trimLeft!==MD},{trimLeft:MD}),Wt({target:"String",proto:!0,name:"trimStart",forced:"".trimStart!==MD},{trimStart:MD});var PD=/"/g,UD=C("".replace),qD=function(e,t,r,n){var i=tr(R(e)),a="<"+t;return""!==r&&(a+=" "+r+'="'+UD(tr(n),PD,""")+'"'),a+">"+i+""},zD=function(e){return d((function(){var t=""[e]('"');return t!==t.toLowerCase()||t.split('"').length>3}))};Wt({target:"String",proto:!0,forced:zD("anchor")},{anchor:function(e){return qD(this,"a","name",e)}}),Wt({target:"String",proto:!0,forced:zD("big")},{big:function(){return qD(this,"big","","")}}),Wt({target:"String",proto:!0,forced:zD("blink")},{blink:function(){return qD(this,"blink","","")}}),Wt({target:"String",proto:!0,forced:zD("bold")},{bold:function(){return qD(this,"b","","")}}),Wt({target:"String",proto:!0,forced:zD("fixed")},{fixed:function(){return qD(this,"tt","","")}}),Wt({target:"String",proto:!0,forced:zD("fontcolor")},{fontcolor:function(e){return qD(this,"font","color",e)}}),Wt({target:"String",proto:!0,forced:zD("fontsize")},{fontsize:function(e){return qD(this,"font","size",e)}}),Wt({target:"String",proto:!0,forced:zD("italics")},{italics:function(){return qD(this,"i","","")}}),Wt({target:"String",proto:!0,forced:zD("link")},{link:function(e){return qD(this,"a","href",e)}}),Wt({target:"String",proto:!0,forced:zD("small")},{small:function(){return qD(this,"small","","")}}),Wt({target:"String",proto:!0,forced:zD("strike")},{strike:function(){return qD(this,"strike","","")}}),Wt({target:"String",proto:!0,forced:zD("sub")},{sub:function(){return qD(this,"sub","","")}}),Wt({target:"String",proto:!0,forced:zD("sup")},{sup:function(){return qD(this,"sup","","")}});var jD=dl.NATIVE_ARRAY_BUFFER_VIEWS,HD=h.ArrayBuffer,GD=h.Int8Array,VD=!jD||!d((function(){GD(1)}))||!d((function(){new GD(-1)}))||!Za((function(e){new GD,new GD(null),new GD(1.5),new GD(e)}),!0)||d((function(){return 1!==new GD(new HD(2),1,void 0).length})),WD=RangeError,YD=function(e){var t=Dt(e);if(t<0)throw new WD("The argument can't be less than 0");return t},$D=RangeError,ZD=function(e,t){var r=YD(e);if(r%t)throw new $D("Wrong offset");return r},XD=Math.round,KD=function(e){var t=XD(e);return t<0?0:t>255?255:255&t},QD=function(e){var t=Jt(e);return"BigInt64Array"===t||"BigUint64Array"===t},JD=TypeError,ey=function(e){var t=Ce(e,"number");if("number"==typeof t)throw new JD("Can't convert number to bigint");return BigInt(t)},ty=dl.aTypedArrayConstructor,ry=function(e){var t,r,n,i,a,o,s,u,l=pl(this),c=de(e),h=arguments.length,d=h>1?arguments[1]:void 0,f=void 0!==d,p=Hi(c);if(p&&!zi(p))for(u=(s=Vi(c,p)).next,c=[];!(o=g(u,s)).done;)c.push(o.value);for(f&&h>2&&(d=kr(d,arguments[2])),r=Tt(c),n=new(ty(l))(r),i=QD(n),t=0;r>t;t++)a=f?d(c[t],t):c[t],n[t]=i?ey(a):+a;return n},ny=o((function(e){var t=Ot.f,r=Vr.forEach,n=dt.get,i=dt.set,a=dt.enforce,o=Ve.f,s=Oe.f,u=h.RangeError,l=qu.ArrayBuffer,c=l.prototype,d=qu.DataView,p=dl.NATIVE_ARRAY_BUFFER_VIEWS,m=dl.TYPED_ARRAY_TAG,v=dl.TypedArray,D=dl.TypedArrayPrototype,y=dl.isTypedArray,E="BYTES_PER_ELEMENT",w="Wrong length",_=function(e,t){Dr(e,t,{configurable:!0,get:function(){return n(this)[t]}})},T=function(e){var t;return q(c,e)||"ArrayBuffer"===(t=Jt(e))||"SharedArrayBuffer"===t},C=function(e,t){return y(e)&&!K(t)&&t in e&&td(+t)&&t>=0},A=function(e,t){return t=Ae(t),C(e,t)?b(2,e[t]):s(e,t)},S=function(e,t,r){return t=Ae(t),!(C(e,t)&&P(r)&&pe(r,"value"))||pe(r,"get")||pe(r,"set")||r.configurable||pe(r,"writable")&&!r.writable||pe(r,"enumerable")&&!r.enumerable?o(e,t,r):(e[t]=r.value,e)};f?(p||(Oe.f=A,Ve.f=S,_(D,"buffer"),_(D,"byteOffset"),_(D,"byteLength"),_(D,"length")),Wt({target:"Object",stat:!0,forced:!p},{getOwnPropertyDescriptor:A,defineProperty:S}),e.exports=function(e,s,c){var f=e.match(/\d+/)[0]/8,b=e+(c?"Clamped":"")+"Array",_="get"+e,C="set"+e,A=h[b],S=A,x=S&&S.prototype,k={},F=function(e,t){o(e,t,{get:function(){return function(e,t){var r=n(e);return r.view[_](t*f+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,r){var i=n(e);i.view[C](t*f+i.byteOffset,c?KD(r):r,!0)}(this,t,e)},enumerable:!0})};p?VD&&(S=s((function(e,t,r,n){return Gs(e,x),di(P(t)?T(t)?void 0!==n?new A(t,ZD(r,f),n):void 0!==r?new A(t,ZD(r,f)):new A(t):y(t)?Fs(S,t):g(ry,S,t):new A(Ws(t)),e,S)})),li&&li(S,v),r(t(A),(function(e){e in S||We(S,e,A[e])})),S.prototype=x):(S=s((function(e,t,r,n){Gs(e,x);var a,o,s,c=0,h=0;if(P(t)){if(!T(t))return y(t)?Fs(S,t):g(ry,S,t);a=t,h=ZD(r,f);var p=t.byteLength;if(void 0===n){if(p%f)throw new u(w);if((o=p-h)<0)throw new u(w)}else if((o=_t(n)*f)+h>p)throw new u(w);s=o/f}else s=Ws(t),a=new l(o=s*f);for(i(e,{buffer:a,byteOffset:h,byteLength:o,length:s,view:new d(a)});c=0?n:r+n;return i<0||i>=r?void 0:t[i]}));var ay=C(ba),oy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("copyWithin",(function(e,t){return ay(oy(this),e,t,arguments.length>2?arguments[2]:void 0)}));var sy=Vr.every,uy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("every",(function(e){return sy(uy(this),e,arguments.length>1?arguments[1]:void 0)}));var ly=dl.aTypedArray,cy=dl.exportTypedArrayMethod,hy=C("".slice);cy("fill",(function(e){var t=arguments.length;ly(this);var r="Big"===hy(Jt(this),0,3)?ey(e):+e;return g(Ca,this,r,t>1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),d((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var dy=dl.aTypedArrayConstructor,fy=dl.getTypedArrayConstructor,py=function(e){return dy(gl(e,fy(e)))},my=function(e,t){return Fs(py(e),t)},gy=Vr.filter,vy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("filter",(function(e){var t=gy(vy(this),e,arguments.length>1?arguments[1]:void 0);return my(this,t)}));var Dy=Vr.find,yy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("find",(function(e){return Dy(yy(this),e,arguments.length>1?arguments[1]:void 0)}));var Ey=Vr.findIndex,by=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("findIndex",(function(e){return Ey(by(this),e,arguments.length>1?arguments[1]:void 0)}));var wy=La.findLast,_y=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("findLast",(function(e){return wy(_y(this),e,arguments.length>1?arguments[1]:void 0)}));var Ty=La.findLastIndex,Cy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("findLastIndex",(function(e){return Ty(Cy(this),e,arguments.length>1?arguments[1]:void 0)}));var Ay=Vr.forEach,Sy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("forEach",(function(e){Ay(Sy(this),e,arguments.length>1?arguments[1]:void 0)})),(0,dl.exportTypedArrayStaticMethod)("from",ry,VD);var xy=At.includes,ky=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("includes",(function(e){return xy(ky(this),e,arguments.length>1?arguments[1]:void 0)}));var Fy=At.indexOf,Ny=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("indexOf",(function(e){return Fy(Ny(this),e,arguments.length>1?arguments[1]:void 0)}));var Iy=we("iterator"),Oy=h.Uint8Array,Ry=C(ko.values),Ly=C(ko.keys),By=C(ko.entries),My=dl.aTypedArray,Py=dl.exportTypedArrayMethod,Uy=Oy&&Oy.prototype,qy=!d((function(){Uy[Iy].call([1])})),zy=!!Uy&&Uy.values&&Uy[Iy]===Uy.values&&"values"===Uy.values.name,jy=function(){return Ry(My(this))};Py("entries",(function(){return By(My(this))}),qy),Py("keys",(function(){return Ly(My(this))}),qy),Py("values",jy,qy||!zy,{name:"values"}),Py(Iy,jy,qy||!zy,{name:"values"});var Hy=dl.aTypedArray,Gy=dl.exportTypedArrayMethod,Vy=C([].join);Gy("join",(function(e){return Vy(Hy(this),e)}));var Wy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("lastIndexOf",(function(e){var t=arguments.length;return Fn(Mo,Wy(this),t>1?[e,arguments[1]]:[e])}));var Yy=Vr.map,$y=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("map",(function(e){return Yy($y(this),e,arguments.length>1?arguments[1]:void 0,(function(e,t){return new(py(e))(t)}))}));var Zy=dl.aTypedArrayConstructor;(0,dl.exportTypedArrayStaticMethod)("of",(function(){for(var e=0,t=arguments.length,r=new(Zy(this))(t);t>e;)r[e]=arguments[e++];return r}),VD);var Xy=$o.left,Ky=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("reduce",(function(e){var t=arguments.length;return Xy(Ky(this),e,t,t>1?arguments[1]:void 0)}));var Qy=$o.right,Jy=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("reduceRight",(function(e){var t=arguments.length;return Qy(Jy(this),e,t,t>1?arguments[1]:void 0)}));var eE=dl.aTypedArray,tE=dl.exportTypedArrayMethod,rE=Math.floor;tE("reverse",(function(){for(var e,t=this,r=eE(t).length,n=rE(r/2),i=0;i1?arguments[1]:void 0,1),r=de(e);if(lE)return g(oE,this,r,t);var n=this.length,i=Tt(r),a=0;if(i+t>n)throw new nE("Wrong length");for(;ai;)o[i]=r[i++];return o}),d((function(){new Int8Array(1).slice()})));var dE=Vr.some,fE=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("some",(function(e){return dE(fE(this),e,arguments.length>1?arguments[1]:void 0)}));var pE=dl.aTypedArray,mE=dl.exportTypedArrayMethod,gE=h.Uint16Array,vE=gE&&Sr(gE.prototype.sort),DE=!(!vE||d((function(){vE(new gE(2),null)}))&&d((function(){vE(new gE(2),{})}))),yE=!!vE&&!d((function(){if(W)return W<74;if(ds)return ds<67;if(fs)return!0;if(ms)return ms<602;var e,t,r=new gE(516),n=Array(516);for(e=0;e<516;e++)t=e%4,r[e]=515-e,n[e]=e-2*t+3;for(vE(r,(function(e,t){return(e/4|0)-(t/4|0)})),e=0;e<516;e++)if(r[e]!==n[e])return!0}));mE("sort",(function(e){return void 0!==e&&te(e),yE?vE(this,e):cs(pE(this),function(e){return function(t,r){return void 0!==e?+e(t,r)||0:r!=r?-1:t!=t?1:0===t&&0===r?1/t>0&&1/r<0?1:-1:t>r}}(e))}),!yE||DE);var EE=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("subarray",(function(e,t){var r=EE(this),n=r.length,i=bt(e,n);return new(py(r))(r.buffer,r.byteOffset+i*r.BYTES_PER_ELEMENT,_t((void 0===t?n:bt(t,n))-i))}));var bE=h.Int8Array,wE=dl.aTypedArray,_E=dl.exportTypedArrayMethod,TE=[].toLocaleString,CE=!!bE&&d((function(){TE.call(new bE(1))}));_E("toLocaleString",(function(){return Fn(TE,CE?pr(wE(this)):wE(this),pr(arguments))}),d((function(){return[1,2].toLocaleString()!==new bE([1,2]).toLocaleString()}))||!d((function(){bE.prototype.toLocaleString.call([1,2])})));var AE=dl.aTypedArray,SE=dl.getTypedArrayConstructor;(0,dl.exportTypedArrayMethod)("toReversed",(function(){return xs(AE(this),SE(this))}));var xE=dl.aTypedArray,kE=dl.getTypedArrayConstructor,FE=dl.exportTypedArrayMethod,NE=C(dl.TypedArrayPrototype.sort);FE("toSorted",(function(e){void 0!==e&&te(e);var t=xE(this),r=Fs(kE(t),t);return NE(r,e)}));var IE=dl.exportTypedArrayMethod,OE=h.Uint8Array,RE=OE&&OE.prototype||{},LE=[].toString,BE=C([].join);d((function(){LE.call({})}))&&(LE=function(){return BE(this)});var ME=RE.toString!==LE;IE("toString",LE,ME);var PE=dl.aTypedArray,UE=dl.getTypedArrayConstructor,qE=dl.exportTypedArrayMethod,zE=!!function(){try{new Int8Array(1).with(2,{valueOf:function(){throw 8}})}catch(e){return 8===e}}();qE("with",{with:function(e,t){var r=PE(this),n=Dt(e),i=QD(r)?ey(t):+t;return Us(r,UE(r),n,i)}}.with,!zE);var jE=String.fromCharCode,HE=C("".charAt),GE=C(/./.exec),VE=C("".slice),WE=/^[\da-f]{2}$/i,YE=/^[\da-f]{4}$/i;Wt({global:!0},{unescape:function(e){for(var t,r,n=tr(e),i="",a=n.length,o=0;o1?arguments[1]:void 0,i=r>2?arguments[2]:void 0;return new(U("Promise"))((function(r){var a=de(e);void 0!==n&&(n=kr(n,i));var o=re(a,Wb),s=o?void 0:Hi(a)||Zb,u=Ur(t)?new t:[],l=o?function(e,t){var r=arguments.length<2?re(e,zb):t;return r?Me(g(r,e)):new Ub(qb(Vi(e)))}(a,o):new Ub(qb(Vi(a,s)));r(Vb(l,n,u))}))};Wt({target:"Array",stat:!0},{fromAsync:Kb});var Qb=Vr.filterReject;Wt({target:"Array",proto:!0,forced:!0},{filterOut:function(e){return Qb(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("filterOut");var Jb=Vr.filterReject;Wt({target:"Array",proto:!0,forced:!0},{filterReject:function(e){return Jb(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("filterReject");var ew=Array,tw=C([].push),rw=function(e,t,r,n){for(var i,a,o,s=de(e),u=N(s),l=kr(t,r),c=fr(null),h=Tt(u),d=0;h>d;d++)o=u[d],(a=Ae(l(o,d,s)))in c?tw(c[a],o):c[a]=[o];if(n&&(i=n(s))!==ew)for(a in c)c[a]=Fs(i,c[a]);return c};Wt({target:"Array",proto:!0},{group:function(e){return rw(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("group"),Wt({target:"Array",proto:!0,forced:!wa("groupBy")},{groupBy:function(e){return rw(this,e,arguments.length>1?arguments[1]:void 0)}}),ua("groupBy");var nw=Pc.Map,iw=Pc.get,aw=Pc.has,ow=Pc.set,sw=C([].push),uw=function(e){for(var t,r,n=de(this),i=N(n),a=kr(e,arguments.length>1?arguments[1]:void 0),o=new nw,s=Tt(i),u=0;s>u;u++)t=a(r=i[u],u,n),aw(o,t)?sw(iw(o,t),r):ow(o,t,[r]);return o};Wt({target:"Array",proto:!0,name:"groupToMap",forced:!wa("groupByToMap")},{groupByToMap:uw}),ua("groupByToMap"),Wt({target:"Array",proto:!0,forced:ae},{groupToMap:uw}),ua("groupToMap");var lw=Object.isFrozen,cw=function(e,t){if(!lw||!Fr(e)||!lw(e))return!1;for(var r,n=0,i=e.length;n92||Zo&&W>94||Tp&&W>97)return!1;var e=new ArrayBuffer(8),t=Ow(e,{transfer:[e]});return 0!==e.byteLength||8!==t.byteLength})),Lw=h.structuredClone,Bw=h.ArrayBuffer,Mw=h.MessageChannel,Pw=!1;if(Rw)Pw=function(e){Lw(e,{transfer:[e]})};else if(Bw)try{Mw||(xw=Iw("worker_threads"))&&(Mw=xw.MessageChannel),Mw&&(kw=new Mw,Fw=new Bw(2),Nw=function(e){kw.port1.postMessage(null,[e])},2===Fw.byteLength&&(Nw(Fw),0===Fw.byteLength&&(Pw=Nw)))}catch(Yre){}var Uw=Pw,qw=h.structuredClone,zw=h.ArrayBuffer,jw=h.DataView,Hw=h.TypeError,Gw=Math.min,Vw=zw.prototype,Ww=jw.prototype,Yw=C(Vw.slice),$w=ii(Vw,"resizable","get"),Zw=ii(Vw,"maxByteLength","get"),Xw=C(Ww.getInt8),Kw=C(Ww.setInt8),Qw=(Rw||Uw)&&function(e,t,r){var n,i=Tw(e),a=void 0===t?i:Ws(t),o=!$w||!$w(e);if(Aw(e))throw new Hw("ArrayBuffer is detached");if(Rw&&(e=qw(e,{transfer:[e]}),i===a&&(r||o)))return e;if(i>=a&&(!r||o))n=Yw(e,0,a);else{var s=r&&!o&&Zw?{maxByteLength:Zw(e)}:void 0;n=new zw(a,s);for(var u=new jw(e),l=new jw(n),c=Gw(a,i),h=0;he,u=!1;if(void 0===r)o=void 0;else if(P(r))o=r.step,u=!!r.inclusive;else{if(typeof r!=n)throw new rT(K_);o=r}if(I(o)&&(o=s?a:-a),typeof o!=n)throw new rT(K_);if(o===1/0||o===-1/0||o===i&&e!==t)throw new tT(K_);J_(this,{type:Q_,start:e,end:t,step:o,inclusive:u,hitsEnd:e!=e||t!=t||o!=o||t>e!=o>i,currentCount:i,zero:i}),f||(this.start=e,this.end=t,this.step=o,this.inclusive=u)}),Q_,(function(){var e=eT(this);if(e.hitsEnd)return To(void 0,!0);var t=e.start,r=e.end,n=t+e.step*e.currentCount++;n===r&&(e.hitsEnd=!0);var i=e.inclusive;return(r>t?i?n>r:n>=r:i?r>n:r>=n)?(e.hitsEnd=!0,To(void 0,!0)):To(n,!1)})),iT=function(e){Dr(nT.prototype,e,{get:function(){return eT(this)[e]},set:function(){},configurable:!0,enumerable:!1})};f&&(iT("start"),iT("end"),iT("inclusive"),iT("step"));var aT=nT;"function"==typeof BigInt&&Wt({target:"BigInt",stat:!0,forced:!0},{range:function(e,t,r){return new aT(e,t,r,"bigint",BigInt(0),BigInt(1))}});var oT=Object,sT=TypeError,uT=U("Map"),lT=U("WeakMap"),cT=function(){this.object=null,this.symbol=null,this.primitives=null,this.objectsByIndex=fr(null)};cT.prototype.get=function(e,t){return this[e]||(this[e]=t())},cT.prototype.next=function(e,t,r){var n=r?this.objectsByIndex[e]||(this.objectsByIndex[e]=new lT):this.primitives||(this.primitives=new uT),i=n.get(t);return i||n.set(t,i=new cT),i};var hT=new cT,dT=function(){var e,t,r=hT,n=arguments.length;for(e=0;e1&&arguments[1]);return mT([255&t,t>>8&255],10)}});var vT=C(DataView.prototype.getUint8);Wt({target:"DataView",proto:!0,forced:!0},{getUint8Clamped:function(e){return vT(this,e)}});var DT=TypeError,yT=function(e){if("DataView"===Jt(e))return e;throw new DT("Argument is not a DataView")},ET=Math.f16round||function(e){return Ks(e,.0009765625,65504,6103515625e-14)},bT=au,wT=C(DataView.prototype.setUint16);Wt({target:"DataView",proto:!0},{setFloat16:function(e,t){yT(this);var r=Ws(e),n=bT(ET(t),10,2);return wT(this,r,n[1]<<8|n[0],arguments.length>2&&arguments[2])}});var _T=C(DataView.prototype.setUint8);Wt({target:"DataView",proto:!0,forced:!0},{setUint8Clamped:function(e,t){yT(this);var r=Ws(e);return _T(this,r,KD(t))}});var TT=U("SuppressedError"),CT=ReferenceError,AT=we("dispose"),ST=we("toStringTag"),xT="DisposableStack",kT=dt.set,FT=dt.getterFor(xT),NT="sync-dispose",IT="disposed",OT=function(e){var t=FT(e);if(t.state===IT)throw new CT(xT+" already disposed");return t},RT=function(){kT(Gs(this,LT),{type:xT,state:"pending",stack:[]}),f||(this.disposed=!1)},LT=RT.prototype;js(LT,{dispose:function(){var e=FT(this);if(e.state!==IT){e.state=IT,f||(this.disposed=!0);for(var t,r=e.stack,n=r.length,i=!1;n;){var a=r[--n];r[n]=null;try{a()}catch(e){i?t=new TT(e,t):(i=!0,t=e)}}if(e.stack=null,i)throw t}},use:function(e){return n_(OT(this),e,NT),e},adopt:function(e,t){var r=OT(this);return te(t),n_(r,void 0,NT,(function(){t(e)})),e},defer:function(e){var t=OT(this);te(e),n_(t,void 0,NT,e)},move:function(){var e=OT(this),t=new RT;return FT(t).stack=e.stack,e.stack=[],e.state=IT,f||(this.disposed=!0),t}}),f&&Dr(LT,"disposed",{configurable:!0,get:function(){return FT(this).state===IT}}),pt(LT,AT,LT.dispose,{name:"dispose"}),pt(LT,ST,xT,{nonWritable:!0}),Wt({global:!0,constructor:!0},{DisposableStack:RT});var BT=function(){return C(te(this))};Wt({target:"Function",proto:!0,forced:!0},{demethodize:BT});var MT=Object.getOwnPropertyDescriptor,PT=/^\s*class\b/,UT=C(PT.exec);Wt({target:"Function",stat:!0,sham:!0,forced:!0},{isCallable:function(e){return M(e)&&!function(e){try{if(!f||!UT(PT,tt(e)))return!1}catch(e){}var t=MT(e,"prototype");return!!t&&pe(t,"writable")&&!t.writable}(e)}}),Wt({target:"Function",stat:!0,forced:!0},{isConstructor:Ur});var qT=Ve.f,zT=we("metadata"),jT=Function.prototype;void 0===jT[zT]&&qT(jT,zT,{value:null}),Wt({target:"Function",proto:!0,forced:!0,name:"demethodize"},{unThis:BT});var HT=lo.IteratorPrototype,GT="constructor",VT="Iterator",WT=we("toStringTag"),YT=TypeError,$T=h[VT],ZT=!M($T)||$T.prototype!==HT||!d((function(){$T({})})),XT=function(){if(Gs(this,HT),Mi(this)===HT)throw new YT("Abstract class Iterator not directly constructable")},KT=function(e,t){f?Dr(HT,e,{configurable:!0,get:function(){return t},set:function(t){if(Me(this),this===HT)throw new YT("You can't redefine this property");pe(this,e)?this[e]=t:ha(this,e,t)}}):HT[e]=t};pe(HT,WT)||KT(WT,VT),!ZT&&pe(HT,GT)&&HT[GT]!==Object||KT(GT,XT),XT.prototype=HT,Wt({global:!0,constructor:!0,forced:ZT},{Iterator:XT});var QT=lo.IteratorPrototype,JT=we("toStringTag"),eC="IteratorHelper",tC="WrapForValidIterator",rC=dt.set,nC=function(e){var t=dt.getterFor(e?tC:eC);return js(fr(QT),{next:function(){var r=t(this);if(e)return r.nextHandler();try{var n=r.done?void 0:r.nextHandler();return To(n,r.done)}catch(e){throw r.done=!0,e}},return:function(){var r=t(this),n=r.iterator;if(r.done=!0,e){var i=re(n,"return");return i?g(i,n):To(void 0,!0)}if(r.inner)try{Wi(r.inner.iterator,"normal")}catch(e){return Wi(n,"throw",e)}return Wi(n,"normal"),To(void 0,!0)}})},iC=nC(!0),aC=nC(!1);We(aC,JT,"Iterator Helper");var oC=function(e,t){var r=function(r,n){n?(n.iterator=r.iterator,n.next=r.next):n=r,n.type=t?tC:eC,n.nextHandler=e,n.counter=0,n.done=!1,rC(this,n)};return r.prototype=t?iC:aC,r},sC=oC((function(){var e=this.iterator,t=Me(g(this.next,e));if(!(this.done=!!t.done))return ja(e,this.mapper,[t.value,this.counter++],!0)})),uC=function(e){return Me(this),te(e),new sC(qb(this),{mapper:e})},lC=function(e,t){return[t,e]},cC=function(){return g(uC,this,lC)};Wt({target:"Iterator",name:"indexed",proto:!0,real:!0,forced:!0},{asIndexedPairs:cC});var hC=lo.IteratorPrototype,dC=we("dispose");pe(hC,dC)||pt(hC,dC,(function(){var e=re(this,"return");e&&g(e,this)}));var fC=oC((function(){for(var e,t=this.iterator,r=this.next;this.remaining;)if(this.remaining--,e=Me(g(r,t)),this.done=!!e.done)return;if(e=Me(g(r,t)),!(this.done=!!e.done))return e.value}));Wt({target:"Iterator",proto:!0,real:!0,forced:ae},{drop:function(e){Me(this);var t=YD(B_(+e));return new fC(qb(this),{remaining:t})}}),Wt({target:"Iterator",proto:!0,real:!0},{every:function(e){Me(this),te(e);var t=qb(this),r=0;return!Xi(t,(function(t,n){if(!e(t,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var pC=oC((function(){for(var e,t,r=this.iterator,n=this.predicate,i=this.next;;){if(e=Me(g(i,r)),this.done=!!e.done)return;if(t=e.value,ja(r,n,[t,this.counter++],!0))return t}}));Wt({target:"Iterator",proto:!0,real:!0,forced:ae},{filter:function(e){return Me(this),te(e),new pC(qb(this),{predicate:e})}}),Wt({target:"Iterator",proto:!0,real:!0},{find:function(e){Me(this),te(e);var t=qb(this),r=0;return Xi(t,(function(t,n){if(e(t,r++))return n(t)}),{IS_RECORD:!0,INTERRUPTED:!0}).result}});var mC=function(e,t){t&&"string"==typeof e||Me(e);var r=Hi(e);return qb(Me(void 0!==r?g(r,e):e))},gC=oC((function(){for(var e,t,r=this.iterator,n=this.mapper;;){if(t=this.inner)try{if(!(e=Me(g(t.next,t.iterator))).done)return e.value;this.inner=null}catch(e){Wi(r,"throw",e)}if(e=Me(g(this.next,r)),this.done=!!e.done)return;try{this.inner=mC(n(e.value,this.counter++),!1)}catch(e){Wi(r,"throw",e)}}}));Wt({target:"Iterator",proto:!0,real:!0,forced:ae},{flatMap:function(e){return Me(this),te(e),new gC(qb(this),{mapper:e,inner:null})}}),Wt({target:"Iterator",proto:!0,real:!0},{forEach:function(e){Me(this),te(e);var t=qb(this),r=0;Xi(t,(function(t){e(t,r++)}),{IS_RECORD:!0})}});var vC=lo.IteratorPrototype,DC=oC((function(){return g(this.next,this.iterator)}),!0);Wt({target:"Iterator",stat:!0,forced:ae},{from:function(e){var t=mC("string"==typeof e?de(e):e,!0);return q(vC,t.iterator)?t.iterator:new DC(t)}}),Wt({target:"Iterator",proto:!0,real:!0,forced:!0},{indexed:cC}),Wt({target:"Iterator",proto:!0,real:!0,forced:ae},{map:uC});var yC=TypeError;Wt({target:"Iterator",stat:!0,forced:!0},{range:function(e,t,r){if("number"==typeof e)return new aT(e,t,r,"number",0,1);if("bigint"==typeof e)return new aT(e,t,r,"bigint",BigInt(0),BigInt(1));throw new yC("Incorrect Iterator.range arguments")}});var EC=TypeError;Wt({target:"Iterator",proto:!0,real:!0},{reduce:function(e){Me(this),te(e);var t=qb(this),r=arguments.length<2,n=r?void 0:arguments[1],i=0;if(Xi(t,(function(t){r?(r=!1,n=t):n=e(n,t,i),i++}),{IS_RECORD:!0}),r)throw new EC("Reduce of empty iterator with no initial value");return n}}),Wt({target:"Iterator",proto:!0,real:!0},{some:function(e){Me(this),te(e);var t=qb(this),r=0;return Xi(t,(function(t,n){if(e(t,r++))return n()}),{IS_RECORD:!0,INTERRUPTED:!0}).stopped}});var bC=oC((function(){var e=this.iterator;if(!this.remaining--)return this.done=!0,Wi(e,"normal",void 0);var t=Me(g(this.next,e));return(this.done=!!t.done)?void 0:t.value}));Wt({target:"Iterator",proto:!0,real:!0,forced:ae},{take:function(e){Me(this);var t=YD(B_(+e));return new bC(qb(this),{remaining:t})}});var wC=[].push;Wt({target:"Iterator",proto:!0,real:!0},{toArray:function(){var e=[];return Xi(qb(Me(this)),wC,{that:e,IS_RECORD:!0}),e}}),Wt({target:"Iterator",proto:!0,real:!0,forced:ae},{toAsync:function(){return new V_(qb(new Ub(qb(Me(this)))))}});var _C=!d((function(){var e="9007199254740993",t=JSON.rawJSON(e);return!JSON.isRawJSON(t)||JSON.stringify(t)!==e})),TC=dt.get,CC=function(e){if(!P(e))return!1;var t=TC(e);return!!t&&"RawJSON"===t.type};Wt({target:"JSON",stat:!0,forced:!_C},{isRawJSON:CC});var AC=SyntaxError,SC=parseInt,xC=String.fromCharCode,kC=C("".charAt),FC=C("".slice),NC=C(/./.exec),IC={'\\"':'"',"\\\\":"\\","\\/":"/","\\b":"\b","\\f":"\f","\\n":"\n","\\r":"\r","\\t":"\t"},OC=/^[\da-f]{4}$/i,RC=/^[\u0000-\u001F]$/,LC=function(e,t){for(var r=!0,n="";t1?arguments[1]:void 0);return!1!==vw(t,(function(e,n){if(!r(e,n,t))return!1}),!0)}});var _A=Pc.Map,TA=Pc.set;Wt({target:"Map",proto:!0,real:!0,forced:!0},{filter:function(e){var t=DA(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=new _A;return vw(t,(function(e,i){r(e,i,t)&&TA(n,i,e)})),n}}),Wt({target:"Map",proto:!0,real:!0,forced:!0},{find:function(e){var t=DA(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=vw(t,(function(e,n){if(r(e,n,t))return{value:e}}),!0);return n&&n.value}}),Wt({target:"Map",proto:!0,real:!0,forced:!0},{findKey:function(e){var t=DA(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=vw(t,(function(e,n){if(r(e,n,t))return{key:n}}),!0);return n&&n.key}});var CA=function(e,t,r){return function(n){var i=de(n),a=arguments.length,o=a>1?arguments[1]:void 0,s=void 0!==o,u=s?kr(o,a>2?arguments[2]:void 0):void 0,l=new e,c=0;return Xi(i,(function(e){var n=s?u(e,c++):e;r?t(l,Me(n)[0],n[1]):t(l,n)})),l}};Wt({target:"Map",stat:!0,forced:!0},{from:CA(Pc.Map,Pc.set,!0)});Wt({target:"Map",proto:!0,real:!0,forced:!0},{includes:function(e){return!0===vw(DA(this),(function(t){if(function(e,t){return e===t||e!=e&&t!=t}(t,e))return!0}),!0)}});var AA=Pc.Map;Wt({target:"Map",stat:!0,forced:!0},{keyBy:function(e,t){var r=new(M(this)?this:AA);te(t);var n=te(r.set);return Xi(e,(function(e){g(n,r,t(e),e)})),r}}),Wt({target:"Map",proto:!0,real:!0,forced:!0},{keyOf:function(e){var t=vw(DA(this),(function(t,r){if(t===e)return{key:r}}),!0);return t&&t.key}});var SA=Pc.Map,xA=Pc.set;Wt({target:"Map",proto:!0,real:!0,forced:!0},{mapKeys:function(e){var t=DA(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=new SA;return vw(t,(function(e,i){xA(n,r(e,i,t),e)})),n}});var kA=Pc.Map,FA=Pc.set;Wt({target:"Map",proto:!0,real:!0,forced:!0},{mapValues:function(e){var t=DA(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=new kA;return vw(t,(function(e,i){FA(n,i,r(e,i,t))})),n}});var NA=Pc.set;Wt({target:"Map",proto:!0,real:!0,arity:1,forced:!0},{merge:function(e){for(var t=DA(this),r=arguments.length,n=0;n1?arguments[1]:void 0);return!0===vw(t,(function(e,n){if(r(e,n,t))return!0}),!0)}});var RA=TypeError,LA=Pc.get,BA=Pc.has,MA=Pc.set;Wt({target:"Map",proto:!0,real:!0,forced:!0},{update:function(e,t){var r=DA(this),n=arguments.length;te(t);var i=BA(r,e);if(!i&&n<3)throw new RA("Updating absent value");var a=i?LA(r,e):te(n>2?arguments[2]:void 0)(e,r);return MA(r,e,t(a,e,r)),r}});var PA=TypeError,UA=function(e,t){var r,n=Me(this),i=te(n.get),a=te(n.has),o=te(n.set),s=arguments.length>2?arguments[2]:void 0;if(!M(t)&&!M(s))throw new PA("At least one callback required");return g(a,n,e)?(r=g(i,n,e),M(t)&&(r=t(r),g(o,n,e,r))):M(s)&&(r=s(),g(o,n,e,r)),r};Wt({target:"Map",proto:!0,real:!0,name:"upsert",forced:!0},{updateOrInsert:UA}),Wt({target:"Map",proto:!0,real:!0,forced:!0},{upsert:UA});var qA=Math.min,zA=Math.max;Wt({target:"Math",stat:!0,forced:!0},{clamp:function(e,t,r){return qA(r,zA(t,e))}}),Wt({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{DEG_PER_RAD:Math.PI/180});var jA=180/Math.PI;Wt({target:"Math",stat:!0,forced:!0},{degrees:function(e){return e*jA}});var HA=Math.scale||function(e,t,r,n,i){var a=+e,o=+t,s=+r,u=+n,l=+i;return a!=a||o!=o||s!=s||u!=u||l!=l?NaN:a===1/0||a===-1/0?a:(a-o)*(l-u)/(s-o)+u};Wt({target:"Math",stat:!0,forced:!0},{fscale:function(e,t,r,n,i){return Qs(HA(e,t,r,n,i))}}),Wt({target:"Math",stat:!0},{f16round:ET}),Wt({target:"Math",stat:!0,forced:!0},{iaddh:function(e,t,r,n){var i=e>>>0,a=r>>>0;return(t>>>0)+(n>>>0)+((i&a|(i|a)&~(i+a>>>0))>>>31)|0}}),Wt({target:"Math",stat:!0,forced:!0},{imulh:function(e,t){var r=65535,n=+e,i=+t,a=n&r,o=i&r,s=n>>16,u=i>>16,l=(s*o>>>0)+(a*o>>>16);return s*u+(l>>16)+((a*u>>>0)+(l&r)>>16)}}),Wt({target:"Math",stat:!0,forced:!0},{isubh:function(e,t,r,n){var i=e>>>0,a=r>>>0;return(t>>>0)-(n>>>0)-((~i&a|~(i^a)&i-a>>>0)>>>31)|0}}),Wt({target:"Math",stat:!0,nonConfigurable:!0,nonWritable:!0},{RAD_PER_DEG:180/Math.PI});var GA=Math.PI/180;Wt({target:"Math",stat:!0,forced:!0},{radians:function(e){return e*GA}}),Wt({target:"Math",stat:!0,forced:!0},{scale:HA});var VA="Seeded Random",WA=VA+" Generator",YA=dt.set,$A=dt.getterFor(WA),ZA=TypeError,XA=fo((function(e){YA(this,{type:WA,seed:e%2147483647})}),VA,(function(){var e=$A(this),t=e.seed=(1103515245*e.seed+12345)%2147483647;return To((1073741823&t)/1073741823,!1)}));Wt({target:"Math",stat:!0,forced:!0},{seededPRNG:function(e){var t=Me(e).seed;if(!Jh(t))throw new ZA('Math.seededPRNG() argument should have a "seed" field with a finite value.');return new XA(t)}}),Wt({target:"Math",stat:!0,forced:!0},{signbit:function(e){var t=+e;return t==t&&0===t?1/t==-1/0:t<0}}),Wt({target:"Math",stat:!0,forced:!0},{umulh:function(e,t){var r=65535,n=+e,i=+t,a=n&r,o=i&r,s=n>>>16,u=i>>>16,l=(s*o>>>0)+(a*o>>>16);return s*u+(l>>>16)+((a*u>>>0)+(l&r)>>>16)}});var KA="Invalid number representation",QA=RangeError,JA=SyntaxError,eS=TypeError,tS=parseInt,rS=Math.pow,nS=/^[\d.a-z]+$/,iS=C("".charAt),aS=C(nS.exec),oS=C(1..toString),sS=C("".slice),uS=C("".split);Wt({target:"Number",stat:!0,forced:!0},{fromString:function(e,t){var r=1;if("string"!=typeof e)throw new eS(KA);if(!e.length)throw new JA(KA);if("-"===iS(e,0)&&(r=-1,!(e=sS(e,1)).length))throw new JA(KA);var n=void 0===t?10:Dt(t);if(n<2||n>36)throw new QA("Invalid radix");if(!aS(nS,e))throw new JA(KA);var i=uS(e,"."),a=tS(i[0],n);if(i.length>1&&(a+=tS(i[1],n)/rS(n,i[1].length)),10===n&&oS(a,n)!==e)throw new JA(KA);return r*a}}),Wt({target:"Number",stat:!0,forced:!0},{range:function(e,t,r){return new aT(e,t,r,"number",0,1)}});var lS="Object Iterator",cS=dt.set,hS=dt.getterFor(lS),dS=fo((function(e,t){var r=de(e);cS(this,{type:lS,mode:t,object:r,keys:rr(r),index:0})}),"Object",(function(){for(var e=hS(this),t=e.keys;;){if(null===t||e.index>=t.length)return e.object=e.keys=null,To(void 0,!0);var r=t[e.index++],n=e.object;if(pe(n,r)){switch(e.mode){case"keys":return To(r,!1);case"values":return To(n[r],!1)}return To([r,n[r]],!1)}}}));Wt({target:"Object",stat:!0,forced:!0},{iterateEntries:function(e){return new dS(e,"entries")}}),Wt({target:"Object",stat:!0,forced:!0},{iterateKeys:function(e){return new dS(e,"keys")}}),Wt({target:"Object",stat:!0,forced:!0},{iterateValues:function(e){return new dS(e,"values")}});var fS=we("observable"),pS="Observable",mS="Subscription",gS="SubscriptionObserver",vS=dt.getterFor,DS=dt.set,yS=vS(pS),ES=vS(mS),bS=vS(gS),wS=function(e){this.observer=Me(e),this.cleanup=void 0,this.subscriptionObserver=void 0};wS.prototype={type:mS,clean:function(){var e=this.cleanup;if(e){this.cleanup=void 0;try{e()}catch(e){Ep(e)}}},close:function(){if(!f){var e=this.facade,t=this.subscriptionObserver;e.closed=!0,t&&(t.closed=!0)}this.observer=void 0},isClosed:function(){return void 0===this.observer}};var _S=function(e,t){var r,n=DS(this,new wS(e));f||(this.closed=!1);try{(r=re(e,"start"))&&g(r,e,this)}catch(e){Ep(e)}if(!n.isClosed()){var i=n.subscriptionObserver=new TS(n);try{var a=t(i),o=a;I(a)||(n.cleanup=M(a.unsubscribe)?function(){o.unsubscribe()}:te(a))}catch(e){return void i.error(e)}n.isClosed()&&n.clean()}};_S.prototype=js({},{unsubscribe:function(){var e=ES(this);e.isClosed()||(e.close(),e.clean())}}),f&&Dr(_S.prototype,"closed",{configurable:!0,get:function(){return ES(this).isClosed()}});var TS=function(e){DS(this,{type:gS,subscriptionState:e}),f||(this.closed=!1)};TS.prototype=js({},{next:function(e){var t=bS(this).subscriptionState;if(!t.isClosed()){var r=t.observer;try{var n=re(r,"next");n&&g(n,r,e)}catch(e){Ep(e)}}},error:function(e){var t=bS(this).subscriptionState;if(!t.isClosed()){var r=t.observer;t.close();try{var n=re(r,"error");n?g(n,r,e):Ep(e)}catch(e){Ep(e)}t.clean()}},complete:function(){var e=bS(this).subscriptionState;if(!e.isClosed()){var t=e.observer;e.close();try{var r=re(t,"complete");r&&g(r,t)}catch(e){Ep(e)}e.clean()}}}),f&&Dr(TS.prototype,"closed",{configurable:!0,get:function(){return bS(this).subscriptionState.isClosed()}});var CS=function(e){Gs(this,AS),DS(this,{type:pS,subscriber:te(e)})},AS=CS.prototype;js(AS,{subscribe:function(e){var t=arguments.length;return new _S(M(e)?{next:e,error:t>1?arguments[1]:void 0,complete:t>2?arguments[2]:void 0}:P(e)?e:{},yS(this).subscriber)}}),pt(AS,fS,(function(){return this})),Wt({global:!0,constructor:!0,forced:!0},{Observable:CS}),Ts(pS);var SS=we("observable");Wt({target:"Observable",stat:!0,forced:!0},{from:function(e){var t=Ur(this)?this:U("Observable"),r=re(Me(e),SS);if(r){var n=Me(g(r,e));return n.constructor===t?n:new t((function(e){return n.subscribe(e)}))}var i=Vi(e);return new t((function(e){Xi(i,(function(t,r){if(e.next(t),e.closed)return r()}),{IS_ITERATOR:!0,INTERRUPTED:!0}),e.complete()}))}});var xS=U("Array");Wt({target:"Observable",stat:!0,forced:!0},{of:function(){for(var e=Ur(this)?this:U("Observable"),t=arguments.length,r=xS(t),n=0;n?@[\\\\\\]^`{|}~"+Oh+"]","g");Wt({target:"RegExp",stat:!0,forced:!0},{escape:function(e){var t=tr(e),r=sx(t,0);return(r>47&&r<58?"\\x3":"")+ux(t,lx,"\\$&")}});var cx=Set.prototype,hx={Set:Set,add:C(cx.add),has:C(cx.has),remove:C(cx.delete),proto:cx},dx=hx.has,fx=function(e){return dx(e),e},px=hx.add;Wt({target:"Set",proto:!0,real:!0,forced:!0},{addAll:function(){for(var e=fx(this),t=0,r=arguments.length;t1?arguments[1]:void 0);return!1!==bx(t,(function(e){if(!r(e,e,t))return!1}),!0)}});var zx=hx.Set,jx=hx.add;Wt({target:"Set",proto:!0,real:!0,forced:!0},{filter:function(e){var t=fx(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=new zx;return bx(t,(function(e){r(e,e,t)&&jx(n,e)})),n}}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{find:function(e){var t=fx(this),r=kr(e,arguments.length>1?arguments[1]:void 0),n=bx(t,(function(e){if(r(e,e,t))return{value:e}}),!0);return n&&n.value}}),Wt({target:"Set",stat:!0,forced:!0},{from:CA(hx.Set,hx.add,!1)});var Hx=hx.Set,Gx=hx.add,Vx=hx.has,Wx=function(e){var t=fx(this),r=Nx(e),n=new Hx;return Cx(t)>r.size?hw(r.getIterator(),(function(e){Vx(t,e)&&Gx(n,e)})):bx(t,(function(e){r.includes(e)&&Gx(n,e)})),n},Yx=!Bx("intersection")||d((function(){return"3,2"!==Array.from(new Set([1,2,3]).intersection(new Set([3,2])))}));Wt({target:"Set",proto:!0,real:!0,forced:Yx},{intersection:Wx}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{intersection:function(e){return g(Wx,this,qx(e))}});var $x=hx.has,Zx=function(e){var t=fx(this),r=Nx(e);if(Cx(t)<=r.size)return!1!==bx(t,(function(e){if(r.includes(e))return!1}),!0);var n=r.getIterator();return!1!==hw(n,(function(e){if($x(t,e))return Wi(n,"normal",!1)}))};Wt({target:"Set",proto:!0,real:!0,forced:!Bx("isDisjointFrom")},{isDisjointFrom:Zx}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{isDisjointFrom:function(e){return g(Zx,this,qx(e))}});var Xx=function(e){var t=fx(this),r=Nx(e);return!(Cx(t)>r.size)&&!1!==bx(t,(function(e){if(!r.includes(e))return!1}),!0)};Wt({target:"Set",proto:!0,real:!0,forced:!Bx("isSubsetOf")},{isSubsetOf:Xx}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{isSubsetOf:function(e){return g(Xx,this,qx(e))}});var Kx=hx.has,Qx=function(e){var t=fx(this),r=Nx(e);if(Cx(t)1?arguments[1]:void 0),n=new tk;return bx(t,(function(e){rk(n,r(e,e,t))})),n}}),Wt({target:"Set",stat:!0,forced:!0},{of:IA(hx.Set,hx.add,!1)});var nk=TypeError;Wt({target:"Set",proto:!0,real:!0,forced:!0},{reduce:function(e){var t=fx(this),r=arguments.length<2,n=r?void 0:arguments[1];if(te(e),bx(t,(function(i){r?(r=!1,n=i):n=e(n,i,i,t)})),r)throw new nk("Reduce of empty set with no initial value");return n}}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{some:function(e){var t=fx(this),r=kr(e,arguments.length>1?arguments[1]:void 0);return!0===bx(t,(function(e){if(r(e,e,t))return!0}),!0)}});var ik=hx.add,ak=hx.has,ok=hx.remove,sk=function(e){var t=fx(this),r=Nx(e).getIterator(),n=Tx(t);return hw(r,(function(e){ak(t,e)?ok(n,e):ik(n,e)})),n};Wt({target:"Set",proto:!0,real:!0,forced:!Bx("symmetricDifference")},{symmetricDifference:sk}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{symmetricDifference:function(e){return g(sk,this,qx(e))}});var uk=hx.add,lk=function(e){var t=fx(this),r=Nx(e).getIterator(),n=Tx(t);return hw(r,(function(e){uk(n,e)})),n};Wt({target:"Set",proto:!0,real:!0,forced:!Bx("union")},{union:lk}),Wt({target:"Set",proto:!0,real:!0,forced:!0},{union:function(e){return g(lk,this,qx(e))}});var ck=Yg.charAt;Wt({target:"String",proto:!0,forced:!0},{at:function(e){var t=tr(R(this)),r=t.length,n=Dt(e),i=n>=0?n:r+n;return i<0||i>=r?void 0:ck(t,i)}});var hk=TypeError,dk=C([].push),fk=C([].join),pk=function(e){var t=L(e),r=Tt(t);if(!r)return"";for(var n=arguments.length,i=[],a=0;;){var o=t[a++];if(void 0===o)throw new hk("Incorrect template");if(dk(i,tr(o)),a===r)return fk(i,"");a=r.length?To(void 0,!0):(e=gk(r,n),t.index+=e.length,To({codePoint:mk(e,0),position:n},!1))}));Wt({target:"String",proto:!0,forced:!0},{codePoints:function(){return new Ek(tr(R(this)))}});var bk=WeakMap.prototype,wk={WeakMap:WeakMap,set:C(bk.set),get:C(bk.get),has:C(bk.has),remove:C(bk.delete)},_k=String.fromCharCode,Tk=U("String","fromCodePoint"),Ck=C("".charAt),Ak=C("".charCodeAt),Sk=C("".indexOf),xk=C("".slice),kk=function(e,t){var r=Ak(e,t);return r>=48&&r<=57},Fk=function(e,t,r){if(r>=e.length)return-1;for(var n=0;t=48&&e<=57?e-48:e>=97&&e<=102?e-97+10:e>=65&&e<=70?e-65+10:-1},Ik=function(e){for(var t,r="",n=0,i=0;(i=Sk(e,"\\",i))>-1;){if(r+=xk(e,n,i),++i===e.length)return;var a=Ck(e,i++);switch(a){case"b":r+="\b";break;case"t":r+="\t";break;case"n":r+="\n";break;case"v":r+="\v";break;case"f":r+="\f";break;case"r":r+="\r";break;case"\r":i1114111)return;r+=Tk(t);break;default:if(kk(a,0))return;r+=a}n=i}return r+xk(e,n)},Ok=Ve.f,Rk=new wk.WeakMap,Lk=wk.get,Bk=wk.has,Mk=wk.set,Pk=Array,Uk=TypeError,qk=Object.freeze||Object,zk=Object.isFrozen,jk=Math.min,Hk=C("".charAt),Gk=C("".slice),Vk=C("".split),Wk=C(/./.exec),Yk=/([\n\u2028\u2029]|\r\n?)/g,$k=RegExp("^["+Oh+"]*"),Zk=RegExp("[^"+Oh+"]"),Xk="Invalid tag",Kk=function(e){var t,r,n,i,a=de(e),o=Tt(a),s=Pk(o),u=Pk(o),l=0;if(!o)throw new Uk(Xk);for(;l0)throw new Uk("Invalid opening line");t[1]=""}if(h){if(1===t.length||Wk(Zk,t[t.length-1]))throw new Uk("Invalid closing line");t[t.length-2]="",t[t.length-1]=""}for(var d=2;d1?arguments[1]:void 0,i=r>2?arguments[2]:void 0;return new(U("Promise"))((function(r){pl(t),r(Kb(e,n,i))})).then((function(e){return Fs(TF(t),e)}))}),!0);var CF=Vr.filterReject,AF=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("filterOut",(function(e){var t=CF(AF(this),e,arguments.length>1?arguments[1]:void 0);return my(this,t)}),!0);var SF=Vr.filterReject,xF=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("filterReject",(function(e){var t=SF(xF(this),e,arguments.length>1?arguments[1]:void 0);return my(this,t)}),!0);var kF=dl.aTypedArray;(0,dl.exportTypedArrayMethod)("groupBy",(function(e){var t=arguments.length>1?arguments[1]:void 0;return rw(kF(this),e,t,py)}),!0);var FF=dl.aTypedArray,NF=dl.getTypedArrayConstructor,IF=dl.exportTypedArrayMethod,OF=Math.max,RF=Math.min;IF("toSpliced",(function(e,t){var r,n,i,a,o,s,u,l=FF(this),c=NF(l),h=Tt(l),d=bt(e,h),f=arguments.length,p=0;if(0===f)r=n=0;else if(1===f)r=0,n=h-d;else if(n=RF(OF(Dt(t),0),h-d),r=f-2){a=new c(r),i=QD(a);for(var m=2;m1?zF(arguments[1]):void 0,r="base64"===XF(t)?KF:QF,n=!!t&&!!t.strict,i=n?e:rN(e,aN,"");if(i.length%4==0)"=="===nN(i,-2)?i=nN(i,0,-2):"="===nN(i,-1)&&(i=nN(i,0,-1));else if(n)throw new eN("Input is not correctly padded");var a=i.length%4;switch(a){case 1:throw new eN("Bad input length");case 2:i+="AA";break;case 3:i+="A"}for(var o=[],s=0,u=i.length,l=function(e){var t=tN(i,s+e);if(!pe(r,t))throw new eN('Bad char in input: "'+t+'"');return r[t]<<18-6*e};s>16&255,c>>8&255,255&c)}var h=o.length;if(2===a){if(n&&0!==o[h-2])throw new eN(oN);h-=2}else if(3===a){if(n&&0!==o[h-1])throw new eN(oN);h--}return Fs(JF,o,h)}});var sN=h.Uint8Array,uN=h.SyntaxError,lN=h.parseInt,cN=/[^\da-f]/i,hN=C(cN.exec),dN=C("".slice);sN&&Wt({target:"Uint8Array",stat:!0,forced:!0},{fromHex:function(e){HF(e);var t=e.length;if(t%2)throw new uN("String should have an even number of characters");if(hN(cN,e))throw new uN("String should only contain hex characters");for(var r=new sN(t/2),n=0;n>6*t&63)};a+2>(-2*s&6)));return a}});var YN=$F.i2c,$N=U("btoa"),ZN=C("".charAt),XN=C("".charCodeAt),KN=!!$N&&!d((function(){return"aGk="!==$N("hi")})),QN=KN&&!d((function(){$N()})),JN=KN&&d((function(){return"bnVsbA=="!==$N(null)})),eI=KN&&1!==$N.length;Wt({global:!0,bind:!0,enumerable:!0,forced:!KN||QN||JN||eI},{btoa:function(e){if(Mf(arguments.length,1),KN)return g($N,h,tr(e));for(var t,r,n=tr(e),i="",a=0,o=YN;ZN(n,a)||(o="=",a%1);){if((r=XN(n,a+=3/4))>255)throw new(U("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");i+=ZN(o,63&(t=t<<8|r)>>8-a%1*8)}return i}});var tI={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},rI=ke("span").classList,nI=rI&&rI.constructor&&rI.constructor.prototype,iI=nI===Object.prototype?void 0:nI,aI=function(e){if(e&&e.forEach!==za)try{We(e,"forEach",za)}catch(t){e.forEach=za}};for(var oI in tI)tI[oI]&&aI(h[oI]&&h[oI].prototype);aI(iI);var sI=we("iterator"),uI=ko.values,lI=function(e,t){if(e){if(e[sI]!==uI)try{We(e,sI,uI)}catch(t){e[sI]=uI}if(Ar(e,t,!0),tI[t])for(var r in ko)if(e[r]!==ko[r])try{We(e,r,ko[r])}catch(t){e[r]=ko[r]}}};for(var cI in tI)lI(h[cI]&&h[cI].prototype,cI);lI(iI,"DOMTokenList");var hI={IndexSizeError:{s:"INDEX_SIZE_ERR",c:1,m:1},DOMStringSizeError:{s:"DOMSTRING_SIZE_ERR",c:2,m:0},HierarchyRequestError:{s:"HIERARCHY_REQUEST_ERR",c:3,m:1},WrongDocumentError:{s:"WRONG_DOCUMENT_ERR",c:4,m:1},InvalidCharacterError:{s:"INVALID_CHARACTER_ERR",c:5,m:1},NoDataAllowedError:{s:"NO_DATA_ALLOWED_ERR",c:6,m:0},NoModificationAllowedError:{s:"NO_MODIFICATION_ALLOWED_ERR",c:7,m:1},NotFoundError:{s:"NOT_FOUND_ERR",c:8,m:1},NotSupportedError:{s:"NOT_SUPPORTED_ERR",c:9,m:1},InUseAttributeError:{s:"INUSE_ATTRIBUTE_ERR",c:10,m:1},InvalidStateError:{s:"INVALID_STATE_ERR",c:11,m:1},SyntaxError:{s:"SYNTAX_ERR",c:12,m:1},InvalidModificationError:{s:"INVALID_MODIFICATION_ERR",c:13,m:1},NamespaceError:{s:"NAMESPACE_ERR",c:14,m:1},InvalidAccessError:{s:"INVALID_ACCESS_ERR",c:15,m:1},ValidationError:{s:"VALIDATION_ERR",c:16,m:0},TypeMismatchError:{s:"TYPE_MISMATCH_ERR",c:17,m:1},SecurityError:{s:"SECURITY_ERR",c:18,m:1},NetworkError:{s:"NETWORK_ERR",c:19,m:1},AbortError:{s:"ABORT_ERR",c:20,m:1},URLMismatchError:{s:"URL_MISMATCH_ERR",c:21,m:1},QuotaExceededError:{s:"QUOTA_EXCEEDED_ERR",c:22,m:1},TimeoutError:{s:"TIMEOUT_ERR",c:23,m:1},InvalidNodeTypeError:{s:"INVALID_NODE_TYPE_ERR",c:24,m:1},DataCloneError:{s:"DATA_CLONE_ERR",c:25,m:1}},dI=Ve.f,fI="DOMException",pI="DATA_CLONE_ERR",mI=U("Error"),gI=U(fI)||function(){try{(new(U("MessageChannel")||Iw("worker_threads").MessageChannel)).port1.postMessage(new WeakMap)}catch(e){if(e.name===pI&&25===e.code)return e.constructor}}(),vI=gI&&gI.prototype,DI=mI.prototype,yI=dt.set,EI=dt.getterFor(fI),bI="stack"in new mI(fI),wI=function(e){return pe(hI,e)&&hI[e].m?hI[e].c:0},_I=function(){Gs(this,TI);var e=arguments.length,t=fi(e<1?void 0:arguments[0]),r=fi(e<2?void 0:arguments[1],"Error"),n=wI(r);if(yI(this,{type:fI,name:r,message:t,code:n}),f||(this.name=r,this.message=t,this.code=n),bI){var i=new mI(t);i.name=fI,dI(this,"stack",b(1,Ei(i.stack,1)))}},TI=_I.prototype=fr(DI),CI=function(e){return{enumerable:!0,configurable:!0,get:e}},AI=function(e){return CI((function(){return EI(this)[e]}))};f&&(Dr(TI,"code",AI("code")),Dr(TI,"message",AI("message")),Dr(TI,"name",AI("name"))),dI(TI,"constructor",b(1,_I));var SI=d((function(){return!(new gI instanceof mI)})),xI=SI||d((function(){return DI.toString!==Ni||"2: 1"!==String(new gI(1,2))})),kI=SI||d((function(){return 25!==new gI(1,"DataCloneError").code}));SI||25!==gI[pI]||vI[pI];Wt({global:!0,constructor:!0,forced:SI},{DOMException:SI?_I:gI});var FI=U(fI),NI=FI.prototype;for(var II in xI&&gI===FI&&pt(NI,"toString",Ni),kI&&f&&gI===FI&&Dr(NI,"code",CI((function(){return wI(Me(this).name)}))),hI)if(pe(hI,II)){var OI=hI[II],RI=OI.s,LI=b(6,OI.c);pe(FI,RI)||dI(FI,RI,LI),pe(NI,RI)||dI(NI,RI,LI)}var BI=Ve.f,MI="DOMException",PI=U("Error"),UI=U(MI),qI=function(){Gs(this,zI);var e=arguments.length,t=fi(e<1?void 0:arguments[0]),r=fi(e<2?void 0:arguments[1],"Error"),n=new UI(t,r),i=new PI(t);return i.name=MI,BI(n,"stack",b(1,Ei(i.stack,1))),di(n,this,qI),n},zI=qI.prototype=UI.prototype,jI="stack"in new PI(MI),HI="stack"in new UI(1,2),GI=UI&&f&&Object.getOwnPropertyDescriptor(h,MI),VI=!(!GI||GI.writable&&GI.configurable),WI=jI&&!VI&&!HI;Wt({global:!0,constructor:!0,forced:WI},{DOMException:WI?qI:UI});var YI=U(MI),$I=YI.prototype;if($I.constructor!==YI)for(var ZI in BI($I,"constructor",b(1,YI)),hI)if(pe(hI,ZI)){var XI=hI[ZI],KI=XI.s;pe(YI,KI)||BI(YI,KI,b(6,XI.c))}var QI="DOMException";Ar(U(QI),QI);var JI=Jf.clear;Wt({global:!0,bind:!0,enumerable:!0,forced:h.clearImmediate!==JI},{clearImmediate:JI});var eO="function"==typeof Bun&&Bun&&"string"==typeof Bun.version,tO=h.Function,rO=/MSIE .\./.test(z)||eO&&function(){var e=h.Bun.version.split(".");return e.length<3||"0"===e[0]&&(e[1]<3||"3"===e[1]&&"0"===e[2])}(),nO=function(e,t){var r=t?2:1;return rO?function(n,i){var a=Mf(arguments.length,1)>r,o=M(n)?n:tO(n),s=a?pr(arguments,r):[],u=a?function(){Fn(o,this,s)}:o;return t?e(u,i):e(u)}:e},iO=Jf.set,aO=h.setImmediate?nO(iO,!1):iO;Wt({global:!0,bind:!0,enumerable:!0,forced:h.setImmediate!==aO},{setImmediate:aO}),Wt({global:!0,enumerable:!0,dontCallGetSet:!0},{queueMicrotask:function(e){Mf(arguments.length,1),yp(te(e))}});var oO=TypeError,sO=Object.defineProperty,uO=h.self!==h;try{if(f){var lO=Object.getOwnPropertyDescriptor(h,"self");!uO&&lO&&lO.get&&lO.enumerable||Dr(h,"self",{get:function(){return h},set:function(e){if(this!==h)throw new oO("Illegal invocation");sO(h,"self",{value:e,writable:!0,configurable:!0,enumerable:!0})},configurable:!0,enumerable:!0})}else Wt({global:!0,simple:!0,forced:uO},{self:h})}catch(Zre){}var cO,hO=h.Object,dO=h.Array,fO=h.Date,pO=h.Error,mO=h.TypeError,gO=h.PerformanceMark,vO=U("DOMException"),DO=Pc.Map,yO=Pc.has,EO=Pc.get,bO=Pc.set,wO=hx.Set,_O=hx.add,TO=hx.has,CO=U("Object","keys"),AO=C([].push),SO=C((!0).valueOf),xO=C(1..valueOf),kO=C("".valueOf),FO=C(fO.prototype.getTime),NO=De("structuredClone"),IO="DataCloneError",OO="Transferring",RO=function(e){return!d((function(){var t=new h.Set([7]),r=e(t),n=e(hO(7));return r===t||!r.has(7)||!P(n)||7!=+n}))&&e},LO=function(e,t){return!d((function(){var r=new t,n=e({a:r,b:r});return!(n&&n.a===n.b&&n.a instanceof t&&n.a.stack===r.stack)}))},BO=h.structuredClone,MO=!LO(BO,pO)||!LO(BO,vO)||(cO=BO,!!d((function(){var e=cO(new h.AggregateError([1],NO,{cause:3}));return"AggregateError"!==e.name||1!==e.errors[0]||e.message!==NO||3!==e.cause}))),PO=!BO&&RO((function(e){return new gO(NO,{detail:e}).detail})),UO=RO(BO)||PO,qO=function(e){throw new vO("Uncloneable type: "+e,IO)},zO=function(e,t){throw new vO((t||"Cloning")+" of "+e+" cannot be properly polyfilled in this engine",IO)},jO=function(e,t){return UO||zO(t),UO(e)},HO=function(e,t,r){if(yO(t,e))return EO(t,e);var n,i,a,o,s,u;if("SharedArrayBuffer"===(r||Jt(e)))n=UO?UO(e):e;else{var l=h.DataView;l||M(e.slice)||zO("ArrayBuffer");try{if(M(e.slice)&&!e.resizable)n=e.slice(0);else{i=e.byteLength,a="maxByteLength"in e?{maxByteLength:e.maxByteLength}:void 0,n=new ArrayBuffer(i,a),o=new l(e),s=new l(n);for(u=0;u1&&!I(arguments[1])?Me(arguments[1]):void 0,i=n?n.transfer:void 0;void 0!==i&&(r=function(e,t){if(!P(e))throw new mO("Transfer option cannot be converted to a sequence");var r=[];Xi(e,(function(e){AO(r,Me(e))}));for(var n,i,a,o,s,u=0,l=Tt(r),c=new wO;u>1,e+=tR(e/t);e>455;)e=tR(e/35),n+=36;return tR(n+36*e/(e+38))},hR=function(e){var t=[];e=function(e){for(var t=[],r=0,n=e.length;r=55296&&i<=56319&&r=a&&ntR((ZO-o)/h))throw new JO(QO);for(o+=(c-a)*h,a=c,r=0;rZO)throw new JO(QO);if(n===a){for(var d=o,f=36;;){var p=f<=s?1:f>=s+26?26:f-s;if(d=t.length)return e.target=void 0,To(void 0,!0);var n=t[r];switch(e.kind){case"keys":return To(n.key,!1);case"values":return To(n.value,!1)}return To([n.key,n.value],!1)}),!0),VR=function(e){this.entries=[],this.url=null,void 0!==e&&(P(e)?this.parseObject(e):this.parseQuery("string"==typeof e?"?"===SR(e,0)?RR(e,1):e:tr(e)))};VR.prototype={type:fR,bindURL:function(e){this.url=e,this.update()},parseObject:function(e){var t,r,n,i,a,o,s,u=this.entries,l=Hi(e);if(l)for(r=(t=Vi(e,l)).next;!(n=g(r,t)).done;){if(a=(i=Vi(Me(n.value))).next,(o=g(a,i)).done||(s=g(a,i)).done||!g(a,i).done)throw new TR("Expected sequence with length 2");kR(u,{key:tr(o.value),value:tr(s.value)})}else for(var c in e)pe(e,c)&&kR(u,{key:c,value:tr(e[c])})},parseQuery:function(e){if(e)for(var t,r,n=this.entries,i=OR(e,"&"),a=0;a0?arguments[0]:void 0));f||(this.size=e.entries.length)},YR=WR.prototype;if(js(YR,{append:function(e,t){var r=gR(this);Mf(arguments.length,2),kR(r.entries,{key:tr(e),value:tr(t)}),f||this.length++,r.updateURL()},delete:function(e){for(var t=gR(this),r=Mf(arguments.length,1),n=t.entries,i=tr(e),a=r<2?void 0:arguments[1],o=void 0===a?a:tr(a),s=0;st.key?1:-1})),e.updateURL()},forEach:function(e){for(var t,r=gR(this).entries,n=kr(e,arguments.length>1?arguments[1]:void 0),i=0;i1?XR(arguments[1]):{})}}),M(yR)){var KR=function(e){return Gs(this,bR),new yR(e,arguments.length>1?XR(arguments[1]):{})};bR.constructor=KR,KR.prototype=bR,Wt({global:!0,constructor:!0,dontCallGetSet:!0,forced:!0},{Request:KR})}}var QR,JR={URLSearchParams:WR,getState:gR},eL=Yg.codeAt,tL=dt.set,rL=dt.getterFor("URL"),nL=JR.URLSearchParams,iL=JR.getState,aL=h.URL,oL=h.TypeError,sL=h.parseInt,uL=Math.floor,lL=Math.pow,cL=C("".charAt),hL=C(/./.exec),dL=C([].join),fL=C(1..toString),pL=C([].pop),mL=C([].push),gL=C("".replace),vL=C([].shift),DL=C("".split),yL=C("".slice),EL=C("".toLowerCase),bL=C([].unshift),wL="Invalid scheme",_L="Invalid host",TL="Invalid port",CL=/[a-z]/i,AL=/[\d+-.a-z]/i,SL=/\d/,xL=/^0x/i,kL=/^[0-7]+$/,FL=/^\d+$/,NL=/^[\da-f]+$/i,IL=/[\0\t\n\r #%/:<>?@[\\\]^|]/,OL=/[\0\t\n\r #/:<>?@[\\\]^|]/,RL=/^[\u0000-\u0020]+/,LL=/(^|[^\u0000-\u0020])[\u0000-\u0020]+$/,BL=/[\t\n\r]/g,ML=function(e){var t,r,n,i;if("number"==typeof e){for(t=[],r=0;r<4;r++)bL(t,e%256),e=uL(e/256);return dL(t,".")}if("object"==typeof e){for(t="",n=function(e){for(var t=null,r=1,n=null,i=0,a=0;a<8;a++)0!==e[a]?(i>r&&(t=n,r=i),n=null,i=0):(null===n&&(n=a),++i);return i>r&&(t=n,r=i),t}(e),r=0;r<8;r++)i&&0===e[r]||(i&&(i=!1),n===r?(t+=r?":":"::",i=!0):(t+=fL(e[r],16),r<7&&(t+=":")));return"["+t+"]"}return e},PL={},UL=Gd({},PL,{" ":1,'"':1,"<":1,">":1,"`":1}),qL=Gd({},UL,{"#":1,"?":1,"{":1,"}":1}),zL=Gd({},qL,{"/":1,":":1,";":1,"=":1,"@":1,"[":1,"\\":1,"]":1,"^":1,"|":1}),jL=function(e,t){var r=eL(e,0);return r>32&&r<127&&!pe(t,e)?e:encodeURIComponent(e)},HL={ftp:21,file:null,http:80,https:443,ws:80,wss:443},GL=function(e,t){var r;return 2===e.length&&hL(CL,cL(e,0))&&(":"===(r=cL(e,1))||!t&&"|"===r)},VL=function(e){var t;return e.length>1&&GL(yL(e,0,2))&&(2===e.length||"/"===(t=cL(e,2))||"\\"===t||"?"===t||"#"===t)},WL=function(e){return"."===e||"%2e"===EL(e)},YL={},$L={},ZL={},XL={},KL={},QL={},JL={},eB={},tB={},rB={},nB={},iB={},aB={},oB={},sB={},uB={},lB={},cB={},hB={},dB={},fB={},pB=function(e,t,r){var n,i,a,o=tr(e);if(t){if(i=this.parse(o))throw new oL(i);this.searchParams=null}else{if(void 0!==r&&(n=new pB(r,!0)),i=this.parse(o,null,n))throw new oL(i);(a=iL(new nL)).bindURL(this),this.searchParams=a}};pB.prototype={type:"URL",parse:function(e,t,r){var n,i,a,o,s,u=this,l=t||YL,c=0,h="",d=!1,f=!1,p=!1;for(e=tr(e),t||(u.scheme="",u.username="",u.password="",u.host=null,u.port=null,u.path=[],u.query=null,u.fragment=null,u.cannotBeABaseURL=!1,e=gL(e,RL,""),e=gL(e,LL,"$1")),e=gL(e,BL,""),n=Ga(e);c<=n.length;){switch(i=n[c],l){case YL:if(!i||!hL(CL,i)){if(t)return wL;l=ZL;continue}h+=EL(i),l=$L;break;case $L:if(i&&(hL(AL,i)||"+"===i||"-"===i||"."===i))h+=EL(i);else{if(":"!==i){if(t)return wL;h="",l=ZL,c=0;continue}if(t&&(u.isSpecial()!==pe(HL,h)||"file"===h&&(u.includesCredentials()||null!==u.port)||"file"===u.scheme&&!u.host))return;if(u.scheme=h,t)return void(u.isSpecial()&&HL[u.scheme]===u.port&&(u.port=null));h="","file"===u.scheme?l=oB:u.isSpecial()&&r&&r.scheme===u.scheme?l=XL:u.isSpecial()?l=eB:"/"===n[c+1]?(l=KL,c++):(u.cannotBeABaseURL=!0,mL(u.path,""),l=hB)}break;case ZL:if(!r||r.cannotBeABaseURL&&"#"!==i)return wL;if(r.cannotBeABaseURL&&"#"===i){u.scheme=r.scheme,u.path=pr(r.path),u.query=r.query,u.fragment="",u.cannotBeABaseURL=!0,l=fB;break}l="file"===r.scheme?oB:QL;continue;case XL:if("/"!==i||"/"!==n[c+1]){l=QL;continue}l=tB,c++;break;case KL:if("/"===i){l=rB;break}l=cB;continue;case QL:if(u.scheme=r.scheme,i===QR)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=pr(r.path),u.query=r.query;else if("/"===i||"\\"===i&&u.isSpecial())l=JL;else if("?"===i)u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=pr(r.path),u.query="",l=dB;else{if("#"!==i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=pr(r.path),u.path.length--,l=cB;continue}u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,u.path=pr(r.path),u.query=r.query,u.fragment="",l=fB}break;case JL:if(!u.isSpecial()||"/"!==i&&"\\"!==i){if("/"!==i){u.username=r.username,u.password=r.password,u.host=r.host,u.port=r.port,l=cB;continue}l=rB}else l=tB;break;case eB:if(l=tB,"/"!==i||"/"!==cL(h,c+1))continue;c++;break;case tB:if("/"!==i&&"\\"!==i){l=rB;continue}break;case rB:if("@"===i){d&&(h="%40"+h),d=!0,a=Ga(h);for(var m=0;m65535)return TL;u.port=u.isSpecial()&&D===HL[u.scheme]?null:D,h=""}if(t)return;l=lB;continue}return TL}h+=i;break;case oB:if(u.scheme="file","/"===i||"\\"===i)l=sB;else{if(!r||"file"!==r.scheme){l=cB;continue}switch(i){case QR:u.host=r.host,u.path=pr(r.path),u.query=r.query;break;case"?":u.host=r.host,u.path=pr(r.path),u.query="",l=dB;break;case"#":u.host=r.host,u.path=pr(r.path),u.query=r.query,u.fragment="",l=fB;break;default:VL(dL(pr(n,c),""))||(u.host=r.host,u.path=pr(r.path),u.shortenPath()),l=cB;continue}}break;case sB:if("/"===i||"\\"===i){l=uB;break}r&&"file"===r.scheme&&!VL(dL(pr(n,c),""))&&(GL(r.path[0],!0)?mL(u.path,r.path[0]):u.host=r.host),l=cB;continue;case uB:if(i===QR||"/"===i||"\\"===i||"?"===i||"#"===i){if(!t&&GL(h))l=cB;else if(""===h){if(u.host="",t)return;l=lB}else{if(o=u.parseHost(h))return o;if("localhost"===u.host&&(u.host=""),t)return;h="",l=lB}continue}h+=i;break;case lB:if(u.isSpecial()){if(l=cB,"/"!==i&&"\\"!==i)continue}else if(t||"?"!==i)if(t||"#"!==i){if(i!==QR&&(l=cB,"/"!==i))continue}else u.fragment="",l=fB;else u.query="",l=dB;break;case cB:if(i===QR||"/"===i||"\\"===i&&u.isSpecial()||!t&&("?"===i||"#"===i)){if(".."===(s=EL(s=h))||"%2e."===s||".%2e"===s||"%2e%2e"===s?(u.shortenPath(),"/"===i||"\\"===i&&u.isSpecial()||mL(u.path,"")):WL(h)?"/"===i||"\\"===i&&u.isSpecial()||mL(u.path,""):("file"===u.scheme&&!u.path.length&&GL(h)&&(u.host&&(u.host=""),h=cL(h,0)+":"),mL(u.path,h)),h="","file"===u.scheme&&(i===QR||"?"===i||"#"===i))for(;u.path.length>1&&""===u.path[0];)vL(u.path);"?"===i?(u.query="",l=dB):"#"===i&&(u.fragment="",l=fB)}else h+=jL(i,qL);break;case hB:"?"===i?(u.query="",l=dB):"#"===i?(u.fragment="",l=fB):i!==QR&&(u.path[0]+=jL(i,PL));break;case dB:t||"#"!==i?i!==QR&&("'"===i&&u.isSpecial()?u.query+="%27":u.query+="#"===i?"%23":jL(i,PL)):(u.fragment="",l=fB);break;case fB:i!==QR&&(u.fragment+=jL(i,UL))}c++}},parseHost:function(e){var t,r,n;if("["===cL(e,0)){if("]"!==cL(e,e.length-1))return _L;if(t=function(e){var t,r,n,i,a,o,s,u=[0,0,0,0,0,0,0,0],l=0,c=null,h=0,d=function(){return cL(e,h)};if(":"===d()){if(":"!==cL(e,1))return;h+=2,c=++l}for(;d();){if(8===l)return;if(":"!==d()){for(t=r=0;r<4&&hL(NL,d());)t=16*t+sL(d(),16),h++,r++;if("."===d()){if(0===r)return;if(h-=r,l>6)return;for(n=0;d();){if(i=null,n>0){if(!("."===d()&&n<4))return;h++}if(!hL(SL,d()))return;for(;hL(SL,d());){if(a=sL(d(),10),null===i)i=a;else{if(0===i)return;i=10*i+a}if(i>255)return;h++}u[l]=256*u[l]+i,2!=++n&&4!==n||l++}if(4!==n)return;break}if(":"===d()){if(h++,!d())return}else if(d())return;u[l++]=t}else{if(null!==c)return;h++,c=++l}}if(null!==c)for(o=l-c,l=7;0!==l&&o>0;)s=u[l],u[l--]=u[c+o-1],u[c+--o]=s;else if(8!==l)return;return u}(yL(e,1,-1)),!t)return _L;this.host=t}else if(this.isSpecial()){if(e=function(e){var t,r,n=[],i=sR(oR(uR(e),KO,"."),".");for(t=0;t4)return e;for(r=[],n=0;n1&&"0"===cL(i,0)&&(a=hL(xL,i)?16:8,i=yL(i,8===a?1:2)),""===i)o=0;else{if(!hL(10===a?FL:8===a?kL:NL,i))return e;o=sL(i,a)}mL(r,o)}for(n=0;n=lL(256,5-t))return null}else if(o>255)return null;for(s=pL(r),n=0;n1?arguments[1]:void 0,n=tL(t,new pB(e,!1,r));f||(t.href=n.serialize(),t.origin=n.getOrigin(),t.protocol=n.getProtocol(),t.username=n.getUsername(),t.password=n.getPassword(),t.host=n.getHost(),t.hostname=n.getHostname(),t.port=n.getPort(),t.pathname=n.getPathname(),t.search=n.getSearch(),t.searchParams=n.getSearchParams(),t.hash=n.getHash())},gB=mB.prototype,vB=function(e,t){return{get:function(){return rL(this)[e]()},set:t&&function(e){return rL(this)[t](e)},configurable:!0,enumerable:!0}};if(f&&(Dr(gB,"href",vB("serialize","setHref")),Dr(gB,"origin",vB("getOrigin")),Dr(gB,"protocol",vB("getProtocol","setProtocol")),Dr(gB,"username",vB("getUsername","setUsername")),Dr(gB,"password",vB("getPassword","setPassword")),Dr(gB,"host",vB("getHost","setHost")),Dr(gB,"hostname",vB("getHostname","setHostname")),Dr(gB,"port",vB("getPort","setPort")),Dr(gB,"pathname",vB("getPathname","setPathname")),Dr(gB,"search",vB("getSearch","setSearch")),Dr(gB,"searchParams",vB("getSearchParams")),Dr(gB,"hash",vB("getHash","setHash"))),pt(gB,"toJSON",(function(){return rL(this).serialize()}),{enumerable:!0}),pt(gB,"toString",(function(){return rL(this).serialize()}),{enumerable:!0}),aL){var DB=aL.createObjectURL,yB=aL.revokeObjectURL;DB&&pt(mB,"createObjectURL",kr(DB,aL)),yB&&pt(mB,"revokeObjectURL",kr(yB,aL))}Ar(mB,"URL"),Wt({global:!0,constructor:!0,forced:!$O,sham:!f},{URL:mB});var EB=U("URL"),bB=$O&&d((function(){EB.canParse()}));Wt({target:"URL",stat:!0,forced:!bB},{canParse:function(e){var t=Mf(arguments.length,1),r=tr(e),n=t<2||void 0===arguments[1]?void 0:tr(arguments[1]);try{return!!new EB(r,n)}catch(e){return!1}}}),Wt({target:"URL",proto:!0,enumerable:!0},{toJSON:function(){return g(URL.prototype.toString,this)}});var wB=URLSearchParams,_B=wB.prototype,TB=C(_B.append),CB=C(_B.delete),AB=C(_B.forEach),SB=C([].push),xB=new wB("a=1&a=2&b=3");xB.delete("a",1),xB.delete("b",void 0),xB+""!="a=2"&&pt(_B,"delete",(function(e){var t=arguments.length,r=t<2?void 0:arguments[1];if(t&&void 0===r)return CB(this,e);var n=[];AB(this,(function(e,t){SB(n,{key:t,value:e})})),Mf(t,1);for(var i,a=tr(e),o=tr(r),s=0,u=0,l=!1,c=n.length;s{const e=[...top.document.getElementsByTagName("style")].flatMap((e=>[...e.sheet.rules].map((e=>e.cssText)))).join("\n");if(e!=this.style){this.style=e;for(const t of this.listerners)t(e)}}),250)}listen(e){this.listerners.add(e),e(this.style)}remove(e){this.listerners.delete(e)}unwatch(){clearInterval(this.interval)}}var MB=void 0!==MB?MB:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{},PB=[],UB=[],qB="undefined"!=typeof Uint8Array?Uint8Array:Array,zB=!1;function jB(){zB=!0;for(var e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",t=0;t<64;++t)PB[t]=e[t],UB[e.charCodeAt(t)]=t;UB["-".charCodeAt(0)]=62,UB["_".charCodeAt(0)]=63}function HB(e,t,r){for(var n,i,a=[],o=t;o>18&63]+PB[i>>12&63]+PB[i>>6&63]+PB[63&i]);return a.join("")}function GB(e){var t;zB||jB();for(var r=e.length,n=r%3,i="",a=[],o=16383,s=0,u=r-n;su?u:s+o));return 1===n?(t=e[r-1],i+=PB[t>>2],i+=PB[t<<4&63],i+="=="):2===n&&(t=(e[r-2]<<8)+e[r-1],i+=PB[t>>10],i+=PB[t>>4&63],i+=PB[t<<2&63],i+="="),a.push(i),a.join("")}function VB(e,t,r,n,i){var a,o,s=8*i-n-1,u=(1<>1,c=-7,h=r?i-1:0,d=r?-1:1,f=e[t+h];for(h+=d,a=f&(1<<-c)-1,f>>=-c,c+=s;c>0;a=256*a+e[t+h],h+=d,c-=8);for(o=a&(1<<-c)-1,a>>=-c,c+=n;c>0;o=256*o+e[t+h],h+=d,c-=8);if(0===a)a=1-l;else{if(a===u)return o?NaN:1/0*(f?-1:1);o+=Math.pow(2,n),a-=l}return(f?-1:1)*o*Math.pow(2,a-n)}function WB(e,t,r,n,i,a){var o,s,u,l=8*a-i-1,c=(1<>1,d=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,f=n?0:a-1,p=n?1:-1,m=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=c):(o=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-o))<1&&(o--,u*=2),(t+=o+h>=1?d/u:d*Math.pow(2,1-h))*u>=2&&(o++,u/=2),o+h>=c?(s=0,o=c):o+h>=1?(s=(t*u-1)*Math.pow(2,i),o+=h):(s=t*Math.pow(2,h-1)*Math.pow(2,i),o=0));i>=8;e[r+f]=255&s,f+=p,s/=256,i-=8);for(o=o<0;e[r+f]=255&o,f+=p,o/=256,l-=8);e[r+f-p]|=128*m}var YB={}.toString,$B=Array.isArray||function(e){return"[object Array]"==YB.call(e)};function ZB(){return KB.TYPED_ARRAY_SUPPORT?2147483647:1073741823}function XB(e,t){if(ZB()=ZB())throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+ZB().toString(16)+" bytes");return 0|e}function nM(e){return!(null==e||!e._isBuffer)}function iM(e,t){if(nM(e))return e.length;if("undefined"!=typeof ArrayBuffer&&"function"==typeof ArrayBuffer.isView&&(ArrayBuffer.isView(e)||e instanceof ArrayBuffer))return e.byteLength;"string"!=typeof e&&(e=""+e);var r=e.length;if(0===r)return 0;for(var n=!1;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":case void 0:return NM(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return IM(e).length;default:if(n)return NM(e).length;t=(""+t).toLowerCase(),n=!0}}function aM(e,t,r){var n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return EM(this,t,r);case"utf8":case"utf-8":return gM(this,t,r);case"ascii":return DM(this,t,r);case"latin1":case"binary":return yM(this,t,r);case"base64":return mM(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return bM(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function oM(e,t,r){var n=e[t];e[t]=e[r],e[r]=n}function sM(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),r=+r,isNaN(r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=KB.from(t,n)),nM(t))return 0===t.length?-1:uM(e,t,r,n,i);if("number"==typeof t)return t&=255,KB.TYPED_ARRAY_SUPPORT&&"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):uM(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function uM(e,t,r,n,i){var a,o=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;o=2,s/=2,u/=2,r/=2}function l(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var c=-1;for(a=r;as&&(r=s-u),a=r;a>=0;a--){for(var h=!0,d=0;di&&(n=i):n=i;var a=t.length;if(a%2!=0)throw new TypeError("Invalid hex string");n>a/2&&(n=a/2);for(var o=0;o>8,i=r%256,a.push(i),a.push(n);return a}(t,e.length-r),e,r,n)}function mM(e,t,r){return 0===t&&r===e.length?GB(e):GB(e.slice(t,r))}function gM(e,t,r){r=Math.min(e.length,r);for(var n=[],i=t;i239?4:l>223?3:l>191?2:1;if(i+h<=r)switch(h){case 1:l<128&&(c=l);break;case 2:128==(192&(a=e[i+1]))&&(u=(31&l)<<6|63&a)>127&&(c=u);break;case 3:a=e[i+1],o=e[i+2],128==(192&a)&&128==(192&o)&&(u=(15&l)<<12|(63&a)<<6|63&o)>2047&&(u<55296||u>57343)&&(c=u);break;case 4:a=e[i+1],o=e[i+2],s=e[i+3],128==(192&a)&&128==(192&o)&&128==(192&s)&&(u=(15&l)<<18|(63&a)<<12|(63&o)<<6|63&s)>65535&&u<1114112&&(c=u)}null===c?(c=65533,h=1):c>65535&&(c-=65536,n.push(c>>>10&1023|55296),c=56320|1023&c),n.push(c),i+=h}return function(e){var t=e.length;if(t<=vM)return String.fromCharCode.apply(String,e);var r="",n=0;for(;n0&&(e=this.toString("hex",0,50).match(/.{2}/g).join(" "),this.length>50&&(e+=" ... ")),""},KB.prototype.compare=function(e,t,r,n,i){if(!nM(e))throw new TypeError("Argument must be a Buffer");if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;for(var a=(i>>>=0)-(n>>>=0),o=(r>>>=0)-(t>>>=0),s=Math.min(a,o),u=this.slice(n,i),l=e.slice(t,r),c=0;ci)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");for(var a=!1;;)switch(n){case"hex":return lM(this,e,t,r);case"utf8":case"utf-8":return cM(this,e,t,r);case"ascii":return hM(this,e,t,r);case"latin1":case"binary":return dM(this,e,t,r);case"base64":return fM(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return pM(this,e,t,r);default:if(a)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),a=!0}},KB.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var vM=4096;function DM(e,t,r){var n="";r=Math.min(e.length,r);for(var i=t;in)&&(r=n);for(var i="",a=t;ar)throw new RangeError("Trying to access beyond buffer length")}function _M(e,t,r,n,i,a){if(!nM(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||te.length)throw new RangeError("Index out of range")}function TM(e,t,r,n){t<0&&(t=65535+t+1);for(var i=0,a=Math.min(e.length-r,2);i>>8*(n?i:1-i)}function CM(e,t,r,n){t<0&&(t=4294967295+t+1);for(var i=0,a=Math.min(e.length-r,4);i>>8*(n?i:3-i)&255}function AM(e,t,r,n,i,a){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function SM(e,t,r,n,i){return i||AM(e,0,r,4),WB(e,t,r,n,23,4),r+4}function xM(e,t,r,n,i){return i||AM(e,0,r,8),WB(e,t,r,n,52,8),r+8}KB.prototype.slice=function(e,t){var r,n=this.length;if((e=~~e)<0?(e+=n)<0&&(e=0):e>n&&(e=n),(t=void 0===t?n:~~t)<0?(t+=n)<0&&(t=0):t>n&&(t=n),t0&&(i*=256);)n+=this[e+--t]*i;return n},KB.prototype.readUInt8=function(e,t){return t||wM(e,1,this.length),this[e]},KB.prototype.readUInt16LE=function(e,t){return t||wM(e,2,this.length),this[e]|this[e+1]<<8},KB.prototype.readUInt16BE=function(e,t){return t||wM(e,2,this.length),this[e]<<8|this[e+1]},KB.prototype.readUInt32LE=function(e,t){return t||wM(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},KB.prototype.readUInt32BE=function(e,t){return t||wM(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},KB.prototype.readIntLE=function(e,t,r){e|=0,t|=0,r||wM(e,t,this.length);for(var n=this[e],i=1,a=0;++a=(i*=128)&&(n-=Math.pow(2,8*t)),n},KB.prototype.readIntBE=function(e,t,r){e|=0,t|=0,r||wM(e,t,this.length);for(var n=t,i=1,a=this[e+--n];n>0&&(i*=256);)a+=this[e+--n]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},KB.prototype.readInt8=function(e,t){return t||wM(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},KB.prototype.readInt16LE=function(e,t){t||wM(e,2,this.length);var r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},KB.prototype.readInt16BE=function(e,t){t||wM(e,2,this.length);var r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},KB.prototype.readInt32LE=function(e,t){return t||wM(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},KB.prototype.readInt32BE=function(e,t){return t||wM(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},KB.prototype.readFloatLE=function(e,t){return t||wM(e,4,this.length),VB(this,e,!0,23,4)},KB.prototype.readFloatBE=function(e,t){return t||wM(e,4,this.length),VB(this,e,!1,23,4)},KB.prototype.readDoubleLE=function(e,t){return t||wM(e,8,this.length),VB(this,e,!0,52,8)},KB.prototype.readDoubleBE=function(e,t){return t||wM(e,8,this.length),VB(this,e,!1,52,8)},KB.prototype.writeUIntLE=function(e,t,r,n){(e=+e,t|=0,r|=0,n)||_M(this,e,t,r,Math.pow(2,8*r)-1,0);var i=1,a=0;for(this[t]=255&e;++a=0&&(a*=256);)this[t+i]=e/a&255;return t+r},KB.prototype.writeUInt8=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,1,255,0),KB.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),this[t]=255&e,t+1},KB.prototype.writeUInt16LE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,2,65535,0),KB.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):TM(this,e,t,!0),t+2},KB.prototype.writeUInt16BE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,2,65535,0),KB.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):TM(this,e,t,!1),t+2},KB.prototype.writeUInt32LE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,4,4294967295,0),KB.TYPED_ARRAY_SUPPORT?(this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e):CM(this,e,t,!0),t+4},KB.prototype.writeUInt32BE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,4,4294967295,0),KB.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):CM(this,e,t,!1),t+4},KB.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);_M(this,e,t,r,i-1,-i)}var a=0,o=1,s=0;for(this[t]=255&e;++a>0)-s&255;return t+r},KB.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t|=0,!n){var i=Math.pow(2,8*r-1);_M(this,e,t,r,i-1,-i)}var a=r-1,o=1,s=0;for(this[t+a]=255&e;--a>=0&&(o*=256);)e<0&&0===s&&0!==this[t+a+1]&&(s=1),this[t+a]=(e/o>>0)-s&255;return t+r},KB.prototype.writeInt8=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,1,127,-128),KB.TYPED_ARRAY_SUPPORT||(e=Math.floor(e)),e<0&&(e=255+e+1),this[t]=255&e,t+1},KB.prototype.writeInt16LE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,2,32767,-32768),KB.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8):TM(this,e,t,!0),t+2},KB.prototype.writeInt16BE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,2,32767,-32768),KB.TYPED_ARRAY_SUPPORT?(this[t]=e>>>8,this[t+1]=255&e):TM(this,e,t,!1),t+2},KB.prototype.writeInt32LE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,4,2147483647,-2147483648),KB.TYPED_ARRAY_SUPPORT?(this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24):CM(this,e,t,!0),t+4},KB.prototype.writeInt32BE=function(e,t,r){return e=+e,t|=0,r||_M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),KB.TYPED_ARRAY_SUPPORT?(this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e):CM(this,e,t,!1),t+4},KB.prototype.writeFloatLE=function(e,t,r){return SM(this,e,t,!0,r)},KB.prototype.writeFloatBE=function(e,t,r){return SM(this,e,t,!1,r)},KB.prototype.writeDoubleLE=function(e,t,r){return xM(this,e,t,!0,r)},KB.prototype.writeDoubleBE=function(e,t,r){return xM(this,e,t,!1,r)},KB.prototype.copy=function(e,t,r,n){if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n=this.length)throw new RangeError("sourceStart out of bounds");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t=0;--i)e[i+t]=this[i+r];else if(a<1e3||!KB.TYPED_ARRAY_SUPPORT)for(i=0;i>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(a=t;a55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&a.push(239,191,189);continue}if(o+1===n){(t-=3)>-1&&a.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&a.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&a.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;a.push(r)}else if(r<2048){if((t-=2)<0)break;a.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;a.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;a.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return a}function IM(e){return function(e){var t,r,n,i,a,o;zB||jB();var s=e.length;if(s%4>0)throw new Error("Invalid string. Length must be a multiple of 4");a="="===e[s-2]?2:"="===e[s-1]?1:0,o=new qB(3*s/4-a),n=a>0?s-4:s;var u=0;for(t=0,r=0;t>16&255,o[u++]=i>>8&255,o[u++]=255&i;return 2===a?(i=UB[e.charCodeAt(t)]<<2|UB[e.charCodeAt(t+1)]>>4,o[u++]=255&i):1===a&&(i=UB[e.charCodeAt(t)]<<10|UB[e.charCodeAt(t+1)]<<4|UB[e.charCodeAt(t+2)]>>2,o[u++]=i>>8&255,o[u++]=255&i),o}(function(e){if((e=function(e){return e.trim?e.trim():e.replace(/^\s+|\s+$/g,"")}(e).replace(kM,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function OM(e,t,r,n){for(var i=0;i=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function RM(e){return!!e.constructor&&"function"==typeof e.constructor.isBuffer&&e.constructor.isBuffer(e)}class LM extends Error{}class BM extends LM{constructor(e){super(`Invalid DateTime: ${e.toMessage()}`)}}class MM extends LM{constructor(e){super(`Invalid Interval: ${e.toMessage()}`)}}class PM extends LM{constructor(e){super(`Invalid Duration: ${e.toMessage()}`)}}class UM extends LM{}class qM extends LM{constructor(e){super(`Invalid unit ${e}`)}}class zM extends LM{}class jM extends LM{constructor(){super("Zone is an abstract class")}}const HM="numeric",GM="short",VM="long",WM={year:HM,month:HM,day:HM},YM={year:HM,month:GM,day:HM},$M={year:HM,month:GM,day:HM,weekday:GM},ZM={year:HM,month:VM,day:HM},XM={year:HM,month:VM,day:HM,weekday:VM},KM={hour:HM,minute:HM},QM={hour:HM,minute:HM,second:HM},JM={hour:HM,minute:HM,second:HM,timeZoneName:GM},eP={hour:HM,minute:HM,second:HM,timeZoneName:VM},tP={hour:HM,minute:HM,hourCycle:"h23"},rP={hour:HM,minute:HM,second:HM,hourCycle:"h23"},nP={hour:HM,minute:HM,second:HM,hourCycle:"h23",timeZoneName:GM},iP={hour:HM,minute:HM,second:HM,hourCycle:"h23",timeZoneName:VM},aP={year:HM,month:HM,day:HM,hour:HM,minute:HM},oP={year:HM,month:HM,day:HM,hour:HM,minute:HM,second:HM},sP={year:HM,month:GM,day:HM,hour:HM,minute:HM},uP={year:HM,month:GM,day:HM,hour:HM,minute:HM,second:HM},lP={year:HM,month:GM,day:HM,weekday:GM,hour:HM,minute:HM},cP={year:HM,month:VM,day:HM,hour:HM,minute:HM,timeZoneName:GM},hP={year:HM,month:VM,day:HM,hour:HM,minute:HM,second:HM,timeZoneName:GM},dP={year:HM,month:VM,day:HM,weekday:VM,hour:HM,minute:HM,timeZoneName:VM},fP={year:HM,month:VM,day:HM,weekday:VM,hour:HM,minute:HM,second:HM,timeZoneName:VM};class pP{get type(){throw new jM}get name(){throw new jM}get ianaName(){return this.name}get isUniversal(){throw new jM}offsetName(e,t){throw new jM}formatOffset(e,t){throw new jM}offset(e){throw new jM}equals(e){throw new jM}get isValid(){throw new jM}}let mP=null;class gP extends pP{static get instance(){return null===mP&&(mP=new gP),mP}get type(){return"system"}get name(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return uU(e,t,r)}formatOffset(e,t){return dU(this.offset(e),t)}offset(e){return-new Date(e).getTimezoneOffset()}equals(e){return"system"===e.type}get isValid(){return!0}}let vP={};const DP={year:0,month:1,day:2,era:3,hour:4,minute:5,second:6};let yP={};class EP extends pP{static create(e){return yP[e]||(yP[e]=new EP(e)),yP[e]}static resetCache(){yP={},vP={}}static isValidSpecifier(e){return this.isValidZone(e)}static isValidZone(e){if(!e)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:e}).format(),!0}catch(e){return!1}}constructor(e){super(),this.zoneName=e,this.valid=EP.isValidZone(e)}get type(){return"iana"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(e,{format:t,locale:r}){return uU(e,t,r,this.name)}formatOffset(e,t){return dU(this.offset(e),t)}offset(e){const t=new Date(e);if(isNaN(t))return NaN;const r=(n=this.name,vP[n]||(vP[n]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:n,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit",era:"short"})),vP[n]);var n;let[i,a,o,s,u,l,c]=r.formatToParts?function(e,t){const r=e.formatToParts(t),n=[];for(let e=0;e=0?d:1e3+d,(aU({year:i,month:a,day:o,hour:24===u?0:u,minute:l,second:c,millisecond:0})-h)/6e4}equals(e){return"iana"===e.type&&e.name===this.name}get isValid(){return this.valid}}let bP={};let wP={};function _P(e,t={}){const r=JSON.stringify([e,t]);let n=wP[r];return n||(n=new Intl.DateTimeFormat(e,t),wP[r]=n),n}let TP={};let CP={};let AP=null;function SP(e,t,r,n){const i=e.listingMode();return"error"===i?null:"en"===i?r(t):n(t)}class xP{constructor(e,t,r){this.padTo=r.padTo||0,this.floor=r.floor||!1;const{padTo:n,floor:i,...a}=r;if(!t||Object.keys(a).length>0){const t={useGrouping:!1,...r};r.padTo>0&&(t.minimumIntegerDigits=r.padTo),this.inf=function(e,t={}){const r=JSON.stringify([e,t]);let n=TP[r];return n||(n=new Intl.NumberFormat(e,t),TP[r]=n),n}(e,t)}}format(e){if(this.inf){const t=this.floor?Math.floor(e):e;return this.inf.format(t)}return KP(this.floor?Math.floor(e):tU(e,3),this.padTo)}}class kP{constructor(e,t,r){let n;if(this.opts=r,this.originalZone=void 0,this.opts.timeZone)this.dt=e;else if("fixed"===e.zone.type){const t=e.offset/60*-1,r=t>=0?`Etc/GMT+${t}`:`Etc/GMT${t}`;0!==e.offset&&EP.create(r).valid?(n=r,this.dt=e):(n="UTC",this.dt=0===e.offset?e:e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone)}else"system"===e.zone.type?this.dt=e:"iana"===e.zone.type?(this.dt=e,n=e.zone.name):(n="UTC",this.dt=e.setZone("UTC").plus({minutes:e.offset}),this.originalZone=e.zone);const i={...this.opts};i.timeZone=i.timeZone||n,this.dtf=_P(t,i)}format(){return this.originalZone?this.formatToParts().map((({value:e})=>e)).join(""):this.dtf.format(this.dt.toJSDate())}formatToParts(){const e=this.dtf.formatToParts(this.dt.toJSDate());return this.originalZone?e.map((e=>{if("timeZoneName"===e.type){const t=this.originalZone.offsetName(this.dt.ts,{locale:this.dt.locale,format:this.opts.timeZoneName});return{...e,value:t}}return e})):e}resolvedOptions(){return this.dtf.resolvedOptions()}}class FP{constructor(e,t,r){this.opts={style:"long",...r},!t&&YP()&&(this.rtf=function(e,t={}){const{base:r,...n}=t,i=JSON.stringify([e,n]);let a=CP[i];return a||(a=new Intl.RelativeTimeFormat(e,t),CP[i]=a),a}(e,r))}format(e,t){return this.rtf?this.rtf.format(e,t):function(e,t,r="always",n=!1){const i={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},a=-1===["hours","minutes","seconds"].indexOf(e);if("auto"===r&&a){const r="days"===e;switch(t){case 1:return r?"tomorrow":`next ${i[e][0]}`;case-1:return r?"yesterday":`last ${i[e][0]}`;case 0:return r?"today":`this ${i[e][0]}`}}const o=Object.is(t,-0)||t<0,s=Math.abs(t),u=1===s,l=i[e],c=n?u?l[1]:l[2]||l[1]:u?i[e][0]:e;return o?`${s} ${c} ago`:`in ${s} ${c}`}(t,e,this.opts.numeric,"long"!==this.opts.style)}formatToParts(e,t){return this.rtf?this.rtf.formatToParts(e,t):[]}}class NP{static fromOpts(e){return NP.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)}static create(e,t,r,n=!1){const i=e||HP.defaultLocale,a=i||(n?"en-US":AP||(AP=(new Intl.DateTimeFormat).resolvedOptions().locale,AP)),o=t||HP.defaultNumberingSystem,s=r||HP.defaultOutputCalendar;return new NP(a,o,s,i)}static resetCache(){AP=null,wP={},TP={},CP={}}static fromObject({locale:e,numberingSystem:t,outputCalendar:r}={}){return NP.create(e,t,r)}constructor(e,t,r,n){const[i,a,o]=function(e){const t=e.indexOf("-x-");-1!==t&&(e=e.substring(0,t));const r=e.indexOf("-u-");if(-1===r)return[e];{let t,n;try{t=_P(e).resolvedOptions(),n=e}catch(i){const a=e.substring(0,r);t=_P(a).resolvedOptions(),n=a}const{numberingSystem:i,calendar:a}=t;return[n,i,a]}}(e);this.locale=i,this.numberingSystem=t||a||null,this.outputCalendar=r||o||null,this.intl=function(e,t,r){return r||t?(e.includes("-u-")||(e+="-u"),r&&(e+=`-ca-${r}`),t&&(e+=`-nu-${t}`),e):e}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=n,this.fastNumbersCached=null}get fastNumbers(){var e;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(e=this).numberingSystem||"latn"===e.numberingSystem)&&("latn"===e.numberingSystem||!e.locale||e.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(e.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}listingMode(){const e=this.isEnglish(),t=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return e&&t?"en":"intl"}clone(e){return e&&0!==Object.getOwnPropertyNames(e).length?NP.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this}redefaultToEN(e={}){return this.clone({...e,defaultToEN:!0})}redefaultToSystem(e={}){return this.clone({...e,defaultToEN:!1})}months(e,t=!1){return SP(this,e,vU,(()=>{const r=t?{month:e,day:"numeric"}:{month:e},n=t?"format":"standalone";return this.monthsCache[n][e]||(this.monthsCache[n][e]=function(e){const t=[];for(let r=1;r<=12;r++){const n=Rz.utc(2009,r,1);t.push(e(n))}return t}((e=>this.extract(e,r,"month")))),this.monthsCache[n][e]}))}weekdays(e,t=!1){return SP(this,e,bU,(()=>{const r=t?{weekday:e,year:"numeric",month:"long",day:"numeric"}:{weekday:e},n=t?"format":"standalone";return this.weekdaysCache[n][e]||(this.weekdaysCache[n][e]=function(e){const t=[];for(let r=1;r<=7;r++){const n=Rz.utc(2016,11,13+r);t.push(e(n))}return t}((e=>this.extract(e,r,"weekday")))),this.weekdaysCache[n][e]}))}meridiems(){return SP(this,void 0,(()=>wU),(()=>{if(!this.meridiemCache){const e={hour:"numeric",hourCycle:"h12"};this.meridiemCache=[Rz.utc(2016,11,13,9),Rz.utc(2016,11,13,19)].map((t=>this.extract(t,e,"dayperiod")))}return this.meridiemCache}))}eras(e){return SP(this,e,AU,(()=>{const t={era:e};return this.eraCache[e]||(this.eraCache[e]=[Rz.utc(-40,1,1),Rz.utc(2017,1,1)].map((e=>this.extract(e,t,"era")))),this.eraCache[e]}))}extract(e,t,r){const n=this.dtFormatter(e,t).formatToParts().find((e=>e.type.toLowerCase()===r));return n?n.value:null}numberFormatter(e={}){return new xP(this.intl,e.forceSimple||this.fastNumbers,e)}dtFormatter(e,t={}){return new kP(e,this.intl,t)}relFormatter(e={}){return new FP(this.intl,this.isEnglish(),e)}listFormatter(e={}){return function(e,t={}){const r=JSON.stringify([e,t]);let n=bP[r];return n||(n=new Intl.ListFormat(e,t),bP[r]=n),n}(this.intl,e)}isEnglish(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")}equals(e){return this.locale===e.locale&&this.numberingSystem===e.numberingSystem&&this.outputCalendar===e.outputCalendar}}let IP=null;class OP extends pP{static get utcInstance(){return null===IP&&(IP=new OP(0)),IP}static instance(e){return 0===e?OP.utcInstance:new OP(e)}static parseSpecifier(e){if(e){const t=e.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(t)return new OP(lU(t[1],t[2]))}return null}constructor(e){super(),this.fixed=e}get type(){return"fixed"}get name(){return 0===this.fixed?"UTC":`UTC${dU(this.fixed,"narrow")}`}get ianaName(){return 0===this.fixed?"Etc/UTC":`Etc/GMT${dU(-this.fixed,"narrow")}`}offsetName(){return this.name}formatOffset(e,t){return dU(this.fixed,t)}get isUniversal(){return!0}offset(){return this.fixed}equals(e){return"fixed"===e.type&&e.fixed===this.fixed}get isValid(){return!0}}class RP extends pP{constructor(e){super(),this.zoneName=e}get type(){return"invalid"}get name(){return this.zoneName}get isUniversal(){return!1}offsetName(){return null}formatOffset(){return""}offset(){return NaN}equals(){return!1}get isValid(){return!1}}function LP(e,t){if(GP(e)||null===e)return t;if(e instanceof pP)return e;if("string"==typeof e){const r=e.toLowerCase();return"default"===r?t:"local"===r||"system"===r?gP.instance:"utc"===r||"gmt"===r?OP.utcInstance:OP.parseSpecifier(r)||EP.create(e)}return VP(e)?OP.instance(e):"object"==typeof e&&"offset"in e&&"function"==typeof e.offset?e:new RP(e)}let BP,MP=()=>Date.now(),PP="system",UP=null,qP=null,zP=null,jP=60;class HP{static get now(){return MP}static set now(e){MP=e}static set defaultZone(e){PP=e}static get defaultZone(){return LP(PP,gP.instance)}static get defaultLocale(){return UP}static set defaultLocale(e){UP=e}static get defaultNumberingSystem(){return qP}static set defaultNumberingSystem(e){qP=e}static get defaultOutputCalendar(){return zP}static set defaultOutputCalendar(e){zP=e}static get twoDigitCutoffYear(){return jP}static set twoDigitCutoffYear(e){jP=e%100}static get throwOnInvalid(){return BP}static set throwOnInvalid(e){BP=e}static resetCaches(){NP.resetCache(),EP.resetCache()}}function GP(e){return void 0===e}function VP(e){return"number"==typeof e}function WP(e){return"number"==typeof e&&e%1==0}function YP(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(e){return!1}}function $P(e,t,r){if(0!==e.length)return e.reduce(((e,n)=>{const i=[t(n),n];return e&&r(e[0],i[0])===e[0]?e:i}),null)[1]}function ZP(e,t){return Object.prototype.hasOwnProperty.call(e,t)}function XP(e,t,r){return WP(e)&&e>=t&&e<=r}function KP(e,t=2){let r;return r=e<0?"-"+(""+-e).padStart(t,"0"):(""+e).padStart(t,"0"),r}function QP(e){return GP(e)||null===e||""===e?void 0:parseInt(e,10)}function JP(e){return GP(e)||null===e||""===e?void 0:parseFloat(e)}function eU(e){if(!GP(e)&&null!==e&&""!==e){const t=1e3*parseFloat("0."+e);return Math.floor(t)}}function tU(e,t,r=!1){const n=10**t;return(r?Math.trunc:Math.round)(e*n)/n}function rU(e){return e%4==0&&(e%100!=0||e%400==0)}function nU(e){return rU(e)?366:365}function iU(e,t){const r=function(e,t){return e-t*Math.floor(e/t)}(t-1,12)+1;return 2===r?rU(e+(t-r)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][r-1]}function aU(e){let t=Date.UTC(e.year,e.month-1,e.day,e.hour,e.minute,e.second,e.millisecond);return e.year<100&&e.year>=0&&(t=new Date(t),t.setUTCFullYear(e.year,e.month-1,e.day)),+t}function oU(e){const t=(e+Math.floor(e/4)-Math.floor(e/100)+Math.floor(e/400))%7,r=e-1,n=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===t||3===n?53:52}function sU(e){return e>99?e:e>HP.twoDigitCutoffYear?1900+e:2e3+e}function uU(e,t,r,n=null){const i=new Date(e),a={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};n&&(a.timeZone=n);const o={timeZoneName:t,...a},s=new Intl.DateTimeFormat(r,o).formatToParts(i).find((e=>"timezonename"===e.type.toLowerCase()));return s?s.value:null}function lU(e,t){let r=parseInt(e,10);Number.isNaN(r)&&(r=0);const n=parseInt(t,10)||0;return 60*r+(r<0||Object.is(r,-0)?-n:n)}function cU(e){const t=Number(e);if("boolean"==typeof e||""===e||Number.isNaN(t))throw new zM(`Invalid unit value ${e}`);return t}function hU(e,t){const r={};for(const n in e)if(ZP(e,n)){const i=e[n];if(null==i)continue;r[t(n)]=cU(i)}return r}function dU(e,t){const r=Math.trunc(Math.abs(e/60)),n=Math.trunc(Math.abs(e%60)),i=e>=0?"+":"-";switch(t){case"short":return`${i}${KP(r,2)}:${KP(n,2)}`;case"narrow":return`${i}${r}${n>0?`:${n}`:""}`;case"techie":return`${i}${KP(r,2)}${KP(n,2)}`;default:throw new RangeError(`Value format ${t} is out of range for property format`)}}function fU(e){return function(e,t){return t.reduce(((t,r)=>(t[r]=e[r],t)),{})}(e,["hour","minute","second","millisecond"])}const pU=["January","February","March","April","May","June","July","August","September","October","November","December"],mU=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],gU=["J","F","M","A","M","J","J","A","S","O","N","D"];function vU(e){switch(e){case"narrow":return[...gU];case"short":return[...mU];case"long":return[...pU];case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}const DU=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],yU=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],EU=["M","T","W","T","F","S","S"];function bU(e){switch(e){case"narrow":return[...EU];case"short":return[...yU];case"long":return[...DU];case"numeric":return["1","2","3","4","5","6","7"];default:return null}}const wU=["AM","PM"],_U=["Before Christ","Anno Domini"],TU=["BC","AD"],CU=["B","A"];function AU(e){switch(e){case"narrow":return[...CU];case"short":return[...TU];case"long":return[..._U];default:return null}}function SU(e,t){let r="";for(const n of e)n.literal?r+=n.val:r+=t(n.val);return r}const xU={D:WM,DD:YM,DDD:ZM,DDDD:XM,t:KM,tt:QM,ttt:JM,tttt:eP,T:tP,TT:rP,TTT:nP,TTTT:iP,f:aP,ff:sP,fff:cP,ffff:dP,F:oP,FF:uP,FFF:hP,FFFF:fP};class kU{static create(e,t={}){return new kU(e,t)}static parseFormat(e){let t=null,r="",n=!1;const i=[];for(let a=0;a0&&i.push({literal:n||/^\s+$/.test(r),val:r}),t=null,r="",n=!n):n||o===t?r+=o:(r.length>0&&i.push({literal:/^\s+$/.test(r),val:r}),r=o,t=o)}return r.length>0&&i.push({literal:n||/^\s+$/.test(r),val:r}),i}static macroTokenToFormatOpts(e){return xU[e]}constructor(e,t){this.opts=t,this.loc=e,this.systemLoc=null}formatWithSystemDefault(e,t){null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem());return this.systemLoc.dtFormatter(e,{...this.opts,...t}).format()}dtFormatter(e,t={}){return this.loc.dtFormatter(e,{...this.opts,...t})}formatDateTime(e,t){return this.dtFormatter(e,t).format()}formatDateTimeParts(e,t){return this.dtFormatter(e,t).formatToParts()}formatInterval(e,t){return this.dtFormatter(e.start,t).dtf.formatRange(e.start.toJSDate(),e.end.toJSDate())}resolvedOptions(e,t){return this.dtFormatter(e,t).resolvedOptions()}num(e,t=0){if(this.opts.forceSimple)return KP(e,t);const r={...this.opts};return t>0&&(r.padTo=t),this.loc.numberFormatter(r).format(e)}formatDateTimeFromString(e,t){const r="en"===this.loc.listingMode(),n=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,i=(t,r)=>this.loc.extract(e,t,r),a=t=>e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):"",o=()=>r?function(e){return wU[e.hour<12?0:1]}(e):i({hour:"numeric",hourCycle:"h12"},"dayperiod"),s=(t,n)=>r?function(e,t){return vU(t)[e.month-1]}(e,t):i(n?{month:t}:{month:t,day:"numeric"},"month"),u=(t,n)=>r?function(e,t){return bU(t)[e.weekday-1]}(e,t):i(n?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday"),l=t=>{const r=kU.macroTokenToFormatOpts(t);return r?this.formatWithSystemDefault(e,r):t},c=t=>r?function(e,t){return AU(t)[e.year<0?0:1]}(e,t):i({era:t},"era");return SU(kU.parseFormat(t),(t=>{switch(t){case"S":return this.num(e.millisecond);case"u":case"SSS":return this.num(e.millisecond,3);case"s":return this.num(e.second);case"ss":return this.num(e.second,2);case"uu":return this.num(Math.floor(e.millisecond/10),2);case"uuu":return this.num(Math.floor(e.millisecond/100));case"m":return this.num(e.minute);case"mm":return this.num(e.minute,2);case"h":return this.num(e.hour%12==0?12:e.hour%12);case"hh":return this.num(e.hour%12==0?12:e.hour%12,2);case"H":return this.num(e.hour);case"HH":return this.num(e.hour,2);case"Z":return a({format:"narrow",allowZ:this.opts.allowZ});case"ZZ":return a({format:"short",allowZ:this.opts.allowZ});case"ZZZ":return a({format:"techie",allowZ:this.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:this.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:this.loc.locale});case"z":return e.zoneName;case"a":return o();case"d":return n?i({day:"numeric"},"day"):this.num(e.day);case"dd":return n?i({day:"2-digit"},"day"):this.num(e.day,2);case"c":case"E":return this.num(e.weekday);case"ccc":return u("short",!0);case"cccc":return u("long",!0);case"ccccc":return u("narrow",!0);case"EEE":return u("short",!1);case"EEEE":return u("long",!1);case"EEEEE":return u("narrow",!1);case"L":return n?i({month:"numeric",day:"numeric"},"month"):this.num(e.month);case"LL":return n?i({month:"2-digit",day:"numeric"},"month"):this.num(e.month,2);case"LLL":return s("short",!0);case"LLLL":return s("long",!0);case"LLLLL":return s("narrow",!0);case"M":return n?i({month:"numeric"},"month"):this.num(e.month);case"MM":return n?i({month:"2-digit"},"month"):this.num(e.month,2);case"MMM":return s("short",!1);case"MMMM":return s("long",!1);case"MMMMM":return s("narrow",!1);case"y":return n?i({year:"numeric"},"year"):this.num(e.year);case"yy":return n?i({year:"2-digit"},"year"):this.num(e.year.toString().slice(-2),2);case"yyyy":return n?i({year:"numeric"},"year"):this.num(e.year,4);case"yyyyyy":return n?i({year:"numeric"},"year"):this.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return this.num(e.weekYear.toString().slice(-2),2);case"kkkk":return this.num(e.weekYear,4);case"W":return this.num(e.weekNumber);case"WW":return this.num(e.weekNumber,2);case"o":return this.num(e.ordinal);case"ooo":return this.num(e.ordinal,3);case"q":return this.num(e.quarter);case"qq":return this.num(e.quarter,2);case"X":return this.num(Math.floor(e.ts/1e3));case"x":return this.num(e.ts);default:return l(t)}}))}formatDurationFromString(e,t){const r=e=>{switch(e[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"w":return"week";case"M":return"month";case"y":return"year";default:return null}},n=kU.parseFormat(t),i=n.reduce(((e,{literal:t,val:r})=>t?e:e.concat(r)),[]);return SU(n,(e=>t=>{const n=r(t);return n?this.num(e.get(n),t.length):t})(e.shiftTo(...i.map(r).filter((e=>e)))))}}class FU{constructor(e,t){this.reason=e,this.explanation=t}toMessage(){return this.explanation?`${this.reason}: ${this.explanation}`:this.reason}}const NU=/[A-Za-z_+-]{1,256}(?::?\/[A-Za-z0-9_+-]{1,256}(?:\/[A-Za-z0-9_+-]{1,256})?)?/;function IU(...e){const t=e.reduce(((e,t)=>e+t.source),"");return RegExp(`^${t}$`)}function OU(...e){return t=>e.reduce((([e,r,n],i)=>{const[a,o,s]=i(t,n);return[{...e,...a},o||r,s]}),[{},null,1]).slice(0,2)}function RU(e,...t){if(null==e)return[null,null];for(const[r,n]of t){const t=r.exec(e);if(t)return n(t)}return[null,null]}function LU(...e){return(t,r)=>{const n={};let i;for(i=0;ivoid 0!==e&&(t||e&&c)?-e:e;return[{years:d(JP(r)),months:d(JP(n)),weeks:d(JP(i)),days:d(JP(a)),hours:d(JP(o)),minutes:d(JP(s)),seconds:d(JP(u),"-0"===u),milliseconds:d(eU(l),h)}]}const KU={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function QU(e,t,r,n,i,a,o){const s={year:2===t.length?sU(QP(t)):QP(t),month:mU.indexOf(r)+1,day:QP(n),hour:QP(i),minute:QP(a)};return o&&(s.second=QP(o)),e&&(s.weekday=e.length>3?DU.indexOf(e)+1:yU.indexOf(e)+1),s}const JU=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function eq(e){const[,t,r,n,i,a,o,s,u,l,c,h]=e,d=QU(t,i,n,r,a,o,s);let f;return f=u?KU[u]:l?0:lU(c,h),[d,new OP(f)]}const tq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,rq=/^(Monday|Tuesday|Wednesday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,nq=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function iq(e){const[,t,r,n,i,a,o,s]=e;return[QU(t,i,n,r,a,o,s),OP.utcInstance]}function aq(e){const[,t,r,n,i,a,o,s]=e;return[QU(t,s,r,n,i,a,o),OP.utcInstance]}const oq=IU(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,UU),sq=IU(/(\d{4})-?W(\d\d)(?:-?(\d))?/,UU),uq=IU(/(\d{4})-?(\d{3})/,UU),lq=IU(PU),cq=OU((function(e,t){return[{year:GU(e,t),month:GU(e,t+1,1),day:GU(e,t+2,1)},null,t+3]}),VU,WU,YU),hq=OU(qU,VU,WU,YU),dq=OU(zU,VU,WU,YU),fq=OU(VU,WU,YU);const pq=OU(VU);const mq=IU(/(\d{4})-(\d\d)-(\d\d)/,HU),gq=IU(jU),vq=OU(VU,WU,YU);const Dq="Invalid Duration",yq={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},Eq={years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6},...yq},bq=365.2425,wq=30.436875,_q={years:{quarters:4,months:12,weeks:52.1775,days:bq,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:wq,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3},...yq},Tq=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Cq=Tq.slice(0).reverse();function Aq(e,t,r=!1){const n={values:r?t.values:{...e.values,...t.values||{}},loc:e.loc.clone(t.loc),conversionAccuracy:t.conversionAccuracy||e.conversionAccuracy,matrix:t.matrix||e.matrix};return new kq(n)}function Sq(e,t){let r=t.milliseconds??0;for(const n of Cq.slice(1))t[n]&&(r+=t[n]*e[n].milliseconds);return r}function xq(e,t){const r=Sq(e,t)<0?-1:1;Tq.reduceRight(((n,i)=>{if(GP(t[i]))return n;if(n){const a=t[n]*r,o=e[i][n],s=Math.floor(a/o);t[i]+=s*r,t[n]-=s*o*r}return i}),null),Tq.reduce(((r,n)=>{if(GP(t[n]))return r;if(r){const i=t[r]%1;t[r]-=i,t[n]+=i*e[r][n]}return n}),null)}class kq{constructor(e){const t="longterm"===e.conversionAccuracy||!1;let r=t?_q:Eq;e.matrix&&(r=e.matrix),this.values=e.values,this.loc=e.loc||NP.create(),this.conversionAccuracy=t?"longterm":"casual",this.invalid=e.invalid||null,this.matrix=r,this.isLuxonDuration=!0}static fromMillis(e,t){return kq.fromObject({milliseconds:e},t)}static fromObject(e,t={}){if(null==e||"object"!=typeof e)throw new zM("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new kq({values:hU(e,kq.normalizeUnit),loc:NP.fromObject(t),conversionAccuracy:t.conversionAccuracy,matrix:t.matrix})}static fromDurationLike(e){if(VP(e))return kq.fromMillis(e);if(kq.isDuration(e))return e;if("object"==typeof e)return kq.fromObject(e);throw new zM(`Unknown duration argument ${e} of type ${typeof e}`)}static fromISO(e,t){const[r]=function(e){return RU(e,[ZU,XU])}(e);return r?kq.fromObject(r,t):kq.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static fromISOTime(e,t){const[r]=function(e){return RU(e,[$U,pq])}(e);return r?kq.fromObject(r,t):kq.invalid("unparsable",`the input "${e}" can't be parsed as ISO 8601`)}static invalid(e,t=null){if(!e)throw new zM("need to specify a reason the Duration is invalid");const r=e instanceof FU?e:new FU(e,t);if(HP.throwOnInvalid)throw new PM(r);return new kq({invalid:r})}static normalizeUnit(e){const t={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[e?e.toLowerCase():e];if(!t)throw new qM(e);return t}static isDuration(e){return e&&e.isLuxonDuration||!1}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}toFormat(e,t={}){const r={...t,floor:!1!==t.round&&!1!==t.floor};return this.isValid?kU.create(this.loc,r).formatDurationFromString(this,e):Dq}toHuman(e={}){if(!this.isValid)return Dq;const t=Tq.map((t=>{const r=this.values[t];return GP(r)?null:this.loc.numberFormatter({style:"unit",unitDisplay:"long",...e,unit:t.slice(0,-1)}).format(r)})).filter((e=>e));return this.loc.listFormatter({type:"conjunction",style:e.listStyle||"narrow",...e}).format(t)}toObject(){return this.isValid?{...this.values}:{}}toISO(){if(!this.isValid)return null;let e="P";return 0!==this.years&&(e+=this.years+"Y"),0===this.months&&0===this.quarters||(e+=this.months+3*this.quarters+"M"),0!==this.weeks&&(e+=this.weeks+"W"),0!==this.days&&(e+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(e+="T"),0!==this.hours&&(e+=this.hours+"H"),0!==this.minutes&&(e+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(e+=tU(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===e&&(e+="T0S"),e}toISOTime(e={}){if(!this.isValid)return null;const t=this.toMillis();if(t<0||t>=864e5)return null;e={suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended",...e,includeOffset:!1};return Rz.fromMillis(t,{zone:"UTC"}).toISOTime(e)}toJSON(){return this.toISO()}toString(){return this.toISO()}toMillis(){return this.isValid?Sq(this.matrix,this.values):NaN}valueOf(){return this.toMillis()}plus(e){if(!this.isValid)return this;const t=kq.fromDurationLike(e),r={};for(const e of Tq)(ZP(t.values,e)||ZP(this.values,e))&&(r[e]=t.get(e)+this.get(e));return Aq(this,{values:r},!0)}minus(e){if(!this.isValid)return this;const t=kq.fromDurationLike(e);return this.plus(t.negate())}mapUnits(e){if(!this.isValid)return this;const t={};for(const r of Object.keys(this.values))t[r]=cU(e(this.values[r],r));return Aq(this,{values:t},!0)}get(e){return this[kq.normalizeUnit(e)]}set(e){if(!this.isValid)return this;return Aq(this,{values:{...this.values,...hU(e,kq.normalizeUnit)}})}reconfigure({locale:e,numberingSystem:t,conversionAccuracy:r,matrix:n}={}){return Aq(this,{loc:this.loc.clone({locale:e,numberingSystem:t}),matrix:n,conversionAccuracy:r})}as(e){return this.isValid?this.shiftTo(e).get(e):NaN}normalize(){if(!this.isValid)return this;const e=this.toObject();return xq(this.matrix,e),Aq(this,{values:e},!0)}rescale(){if(!this.isValid)return this;const e=function(e){const t={};for(const[r,n]of Object.entries(e))0!==n&&(t[r]=n);return t}(this.normalize().shiftToAll().toObject());return Aq(this,{values:e},!0)}shiftTo(...e){if(!this.isValid)return this;if(0===e.length)return this;e=e.map((e=>kq.normalizeUnit(e)));const t={},r={},n=this.toObject();let i;for(const a of Tq)if(e.indexOf(a)>=0){i=a;let e=0;for(const t in r)e+=this.matrix[t][a]*r[t],r[t]=0;VP(n[a])&&(e+=n[a]);const o=Math.trunc(e);t[a]=o,r[a]=(1e3*e-1e3*o)/1e3}else VP(n[a])&&(r[a]=n[a]);for(const e in r)0!==r[e]&&(t[i]+=e===i?r[e]:r[e]/this.matrix[i][e]);return xq(this.matrix,t),Aq(this,{values:t},!0)}shiftToAll(){return this.isValid?this.shiftTo("years","months","weeks","days","hours","minutes","seconds","milliseconds"):this}negate(){if(!this.isValid)return this;const e={};for(const t of Object.keys(this.values))e[t]=0===this.values[t]?0:-this.values[t];return Aq(this,{values:e},!0)}get years(){return this.isValid?this.values.years||0:NaN}get quarters(){return this.isValid?this.values.quarters||0:NaN}get months(){return this.isValid?this.values.months||0:NaN}get weeks(){return this.isValid?this.values.weeks||0:NaN}get days(){return this.isValid?this.values.days||0:NaN}get hours(){return this.isValid?this.values.hours||0:NaN}get minutes(){return this.isValid?this.values.minutes||0:NaN}get seconds(){return this.isValid?this.values.seconds||0:NaN}get milliseconds(){return this.isValid?this.values.milliseconds||0:NaN}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}equals(e){if(!this.isValid||!e.isValid)return!1;if(!this.loc.equals(e.loc))return!1;for(const n of Tq)if(t=this.values[n],r=e.values[n],!(void 0===t||0===t?void 0===r||0===r:t===r))return!1;var t,r;return!0}}const Fq="Invalid Interval";class Nq{constructor(e){this.s=e.start,this.e=e.end,this.invalid=e.invalid||null,this.isLuxonInterval=!0}static invalid(e,t=null){if(!e)throw new zM("need to specify a reason the Interval is invalid");const r=e instanceof FU?e:new FU(e,t);if(HP.throwOnInvalid)throw new MM(r);return new Nq({invalid:r})}static fromDateTimes(e,t){const r=Lz(e),n=Lz(t),i=function(e,t){return e&&e.isValid?t&&t.isValid?te}isBefore(e){return!!this.isValid&&this.e<=e}contains(e){return!!this.isValid&&(this.s<=e&&this.e>e)}set({start:e,end:t}={}){return this.isValid?Nq.fromDateTimes(e||this.s,t||this.e):this}splitAt(...e){if(!this.isValid)return[];const t=e.map(Lz).filter((e=>this.contains(e))).sort(),r=[];let{s:n}=this,i=0;for(;n+this.e?this.e:e;r.push(Nq.fromDateTimes(n,a)),n=a,i+=1}return r}splitBy(e){const t=kq.fromDurationLike(e);if(!this.isValid||!t.isValid||0===t.as("milliseconds"))return[];let r,{s:n}=this,i=1;const a=[];for(;ne*i)));r=+e>+this.e?this.e:e,a.push(Nq.fromDateTimes(n,r)),n=r,i+=1}return a}divideEqually(e){return this.isValid?this.splitBy(this.length()/e).slice(0,e):[]}overlaps(e){return this.e>e.s&&this.s=e.e)}equals(e){return!(!this.isValid||!e.isValid)&&(this.s.equals(e.s)&&this.e.equals(e.e))}intersection(e){if(!this.isValid)return this;const t=this.s>e.s?this.s:e.s,r=this.e=r?null:Nq.fromDateTimes(t,r)}union(e){if(!this.isValid)return this;const t=this.se.e?this.e:e.e;return Nq.fromDateTimes(t,r)}static merge(e){const[t,r]=e.sort(((e,t)=>e.s-t.s)).reduce((([e,t],r)=>t?t.overlaps(r)||t.abutsStart(r)?[e,t.union(r)]:[e.concat([t]),r]:[e,r]),[[],null]);return r&&t.push(r),t}static xor(e){let t=null,r=0;const n=[],i=e.map((e=>[{time:e.s,type:"s"},{time:e.e,type:"e"}])),a=Array.prototype.concat(...i).sort(((e,t)=>e.time-t.time));for(const e of a)r+="s"===e.type?1:-1,1===r?t=e.time:(t&&+t!=+e.time&&n.push(Nq.fromDateTimes(t,e.time)),t=null);return Nq.merge(n)}difference(...e){return Nq.xor([this].concat(e)).map((e=>this.intersection(e))).filter((e=>e&&!e.isEmpty()))}toString(){return this.isValid?`[${this.s.toISO()} – ${this.e.toISO()})`:Fq}toLocaleString(e=WM,t={}){return this.isValid?kU.create(this.s.loc.clone(t),e).formatInterval(this):Fq}toISO(e){return this.isValid?`${this.s.toISO(e)}/${this.e.toISO(e)}`:Fq}toISODate(){return this.isValid?`${this.s.toISODate()}/${this.e.toISODate()}`:Fq}toISOTime(e){return this.isValid?`${this.s.toISOTime(e)}/${this.e.toISOTime(e)}`:Fq}toFormat(e,{separator:t=" – "}={}){return this.isValid?`${this.s.toFormat(e)}${t}${this.e.toFormat(e)}`:Fq}toDuration(e,t){return this.isValid?this.e.diff(this.s,e,t):kq.invalid(this.invalidReason)}mapEndpoints(e){return Nq.fromDateTimes(e(this.s),e(this.e))}}class Iq{static hasDST(e=HP.defaultZone){const t=Rz.now().setZone(e).set({month:12});return!e.isUniversal&&t.offset!==t.set({month:6}).offset}static isValidIANAZone(e){return EP.isValidZone(e)}static normalizeZone(e){return LP(e,HP.defaultZone)}static months(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||NP.create(t,r,i)).months(e)}static monthsFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null,outputCalendar:i="gregory"}={}){return(n||NP.create(t,r,i)).months(e,!0)}static weekdays(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||NP.create(t,r,null)).weekdays(e)}static weekdaysFormat(e="long",{locale:t=null,numberingSystem:r=null,locObj:n=null}={}){return(n||NP.create(t,r,null)).weekdays(e,!0)}static meridiems({locale:e=null}={}){return NP.create(e).meridiems()}static eras(e="short",{locale:t=null}={}){return NP.create(t,null,"gregory").eras(e)}static features(){return{relative:YP()}}}function Oq(e,t){const r=e=>e.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf(),n=r(t)-r(e);return Math.floor(kq.fromMillis(n).as("days"))}function Rq(e,t,r,n){let[i,a,o,s]=function(e,t,r){const n=[["years",(e,t)=>t.year-e.year],["quarters",(e,t)=>t.quarter-e.quarter+4*(t.year-e.year)],["months",(e,t)=>t.month-e.month+12*(t.year-e.year)],["weeks",(e,t)=>{const r=Oq(e,t);return(r-r%7)/7}],["days",Oq]],i={},a=e;let o,s;for(const[u,l]of n)r.indexOf(u)>=0&&(o=u,i[u]=l(e,t),s=a.plus(i),s>t?(i[u]--,(e=a.plus(i))>t&&(s=e,i[u]--,e=a.plus(i))):e=s);return[e,i,s,o]}(e,t,r);const u=t-i,l=r.filter((e=>["hours","minutes","seconds","milliseconds"].indexOf(e)>=0));0===l.length&&(o0?kq.fromMillis(u,n).shiftTo(...l).plus(c):c}const Lq={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},Bq={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},Mq=Lq.hanidec.replace(/[\[|\]]/g,"").split("");function Pq({numberingSystem:e},t=""){return new RegExp(`${Lq[e||"latn"]}${t}`)}const Uq="missing Intl.DateTimeFormat.formatToParts support";function qq(e,t=(e=>e)){return{regex:e,deser:([e])=>t(function(e){let t=parseInt(e,10);if(isNaN(t)){t="";for(let r=0;r=r&&n<=i&&(t+=n-r)}}return parseInt(t,10)}return t}(e))}}const zq=`[ ${String.fromCharCode(160)}]`,jq=new RegExp(zq,"g");function Hq(e){return e.replace(/\./g,"\\.?").replace(jq,zq)}function Gq(e){return e.replace(/\./g,"").replace(jq," ").toLowerCase()}function Vq(e,t){return null===e?null:{regex:RegExp(e.map(Hq).join("|")),deser:([r])=>e.findIndex((e=>Gq(r)===Gq(e)))+t}}function Wq(e,t){return{regex:e,deser:([,e,t])=>lU(e,t),groups:t}}function Yq(e){return{regex:e,deser:([e])=>e}}const $q={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour12:{numeric:"h","2-digit":"hh"},hour24:{numeric:"H","2-digit":"HH"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"},timeZoneName:{long:"ZZZZZ",short:"ZZZ"}};let Zq=null;function Xq(e,t){return Array.prototype.concat(...e.map((e=>function(e,t){if(e.literal)return e;const r=Qq(kU.macroTokenToFormatOpts(e.val),t);return null==r||r.includes(void 0)?e:r}(e,t))))}function Kq(e,t,r){const n=Xq(kU.parseFormat(r),e),i=n.map((t=>function(e,t){const r=Pq(t),n=Pq(t,"{2}"),i=Pq(t,"{3}"),a=Pq(t,"{4}"),o=Pq(t,"{6}"),s=Pq(t,"{1,2}"),u=Pq(t,"{1,3}"),l=Pq(t,"{1,6}"),c=Pq(t,"{1,9}"),h=Pq(t,"{2,4}"),d=Pq(t,"{4,6}"),f=e=>{return{regex:RegExp((t=e.val,t.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:([e])=>e,literal:!0};var t},p=(p=>{if(e.literal)return f(p);switch(p.val){case"G":return Vq(t.eras("short"),0);case"GG":return Vq(t.eras("long"),0);case"y":return qq(l);case"yy":case"kk":return qq(h,sU);case"yyyy":case"kkkk":return qq(a);case"yyyyy":return qq(d);case"yyyyyy":return qq(o);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return qq(s);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return qq(n);case"MMM":return Vq(t.months("short",!0),1);case"MMMM":return Vq(t.months("long",!0),1);case"LLL":return Vq(t.months("short",!1),1);case"LLLL":return Vq(t.months("long",!1),1);case"o":case"S":return qq(u);case"ooo":case"SSS":return qq(i);case"u":return Yq(c);case"uu":return Yq(s);case"uuu":case"E":case"c":return qq(r);case"a":return Vq(t.meridiems(),0);case"EEE":return Vq(t.weekdays("short",!1),1);case"EEEE":return Vq(t.weekdays("long",!1),1);case"ccc":return Vq(t.weekdays("short",!0),1);case"cccc":return Vq(t.weekdays("long",!0),1);case"Z":case"ZZ":return Wq(new RegExp(`([+-]${s.source})(?::(${n.source}))?`),2);case"ZZZ":return Wq(new RegExp(`([+-]${s.source})(${n.source})?`),2);case"z":return Yq(/[a-z_+-/]{1,256}?/i);case" ":return Yq(/[^\S\n\r]/);default:return f(p)}})(e)||{invalidReason:Uq};return p.token=e,p}(t,e))),a=i.find((e=>e.invalidReason));if(a)return{input:t,tokens:n,invalidReason:a.invalidReason};{const[e,r]=function(e){const t=e.map((e=>e.regex)).reduce(((e,t)=>`${e}(${t.source})`),"");return[`^${t}$`,e]}(i),a=RegExp(e,"i"),[o,s]=function(e,t,r){const n=e.match(t);if(n){const e={};let t=1;for(const i in r)if(ZP(r,i)){const a=r[i],o=a.groups?a.groups+1:1;!a.literal&&a.token&&(e[a.token.val[0]]=a.deser(n.slice(t,t+o))),t+=o}return[n,e]}return[n,{}]}(t,a,r),[u,l,c]=s?function(e){let t,r=null;GP(e.z)||(r=EP.create(e.z)),GP(e.Z)||(r||(r=new OP(e.Z)),t=e.Z),GP(e.q)||(e.M=3*(e.q-1)+1),GP(e.h)||(e.h<12&&1===e.a?e.h+=12:12===e.h&&0===e.a&&(e.h=0)),0===e.G&&e.y&&(e.y=-e.y),GP(e.u)||(e.S=eU(e.u));const n=Object.keys(e).reduce(((t,r)=>{const n=(e=>{switch(e){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}})(r);return n&&(t[n]=e[r]),t}),{});return[n,r,t]}(s):[null,null,void 0];if(ZP(s,"a")&&ZP(s,"H"))throw new UM("Can't include meridiem when specifying 24-hour format");return{input:t,tokens:n,regex:a,rawMatches:o,matches:s,result:u,zone:l,specificOffset:c}}}function Qq(e,t){if(!e)return null;const r=kU.create(t,e).dtFormatter((Zq||(Zq=Rz.fromMillis(1555555555555)),Zq)),n=r.formatToParts(),i=r.resolvedOptions();return n.map((t=>function(e,t,r){const{type:n,value:i}=e;if("literal"===n){const e=/^\s+$/.test(i);return{literal:!e,val:e?" ":i}}const a=t[n];let o=n;"hour"===n&&(o=null!=t.hour12?t.hour12?"hour12":"hour24":null!=t.hourCycle?"h11"===t.hourCycle||"h12"===t.hourCycle?"hour12":"hour24":r.hour12?"hour12":"hour24");let s=$q[o];if("object"==typeof s&&(s=s[a]),s)return{literal:!1,val:s}}(t,e,i)))}const Jq=[0,31,59,90,120,151,181,212,243,273,304,334],ez=[0,31,60,91,121,152,182,213,244,274,305,335];function tz(e,t){return new FU("unit out of range",`you specified ${t} (of type ${typeof t}) as a ${e}, which is invalid`)}function rz(e,t,r){const n=new Date(Date.UTC(e,t-1,r));e<100&&e>=0&&n.setUTCFullYear(n.getUTCFullYear()-1900);const i=n.getUTCDay();return 0===i?7:i}function nz(e,t,r){return r+(rU(e)?ez:Jq)[t-1]}function iz(e,t){const r=rU(e)?ez:Jq,n=r.findIndex((e=>eoU(t)?(o=t+1,s=1):o=t,{weekYear:o,weekNumber:s,weekday:a,...fU(e)}}function oz(e){const{weekYear:t,weekNumber:r,weekday:n}=e,i=rz(t,1,4),a=nU(t);let o,s=7*r+n-i-3;s<1?(o=t-1,s+=nU(o)):s>a?(o=t+1,s-=nU(t)):o=t;const{month:u,day:l}=iz(o,s);return{year:o,month:u,day:l,...fU(e)}}function sz(e){const{year:t,month:r,day:n}=e;return{year:t,ordinal:nz(t,r,n),...fU(e)}}function uz(e){const{year:t,ordinal:r}=e,{month:n,day:i}=iz(t,r);return{year:t,month:n,day:i,...fU(e)}}function lz(e){const t=WP(e.year),r=XP(e.month,1,12),n=XP(e.day,1,iU(e.year,e.month));return t?r?!n&&tz("day",e.day):tz("month",e.month):tz("year",e.year)}function cz(e){const{hour:t,minute:r,second:n,millisecond:i}=e,a=XP(t,0,23)||24===t&&0===r&&0===n&&0===i,o=XP(r,0,59),s=XP(n,0,59),u=XP(i,0,999);return a?o?s?!u&&tz("millisecond",i):tz("second",n):tz("minute",r):tz("hour",t)}const hz="Invalid DateTime",dz=864e13;function fz(e){return new FU("unsupported zone",`the zone "${e.name}" is not supported`)}function pz(e){return null===e.weekData&&(e.weekData=az(e.c)),e.weekData}function mz(e,t){const r={ts:e.ts,zone:e.zone,c:e.c,o:e.o,loc:e.loc,invalid:e.invalid};return new Rz({...r,...t,old:r})}function gz(e,t,r){let n=e-60*t*1e3;const i=r.offset(n);if(t===i)return[n,t];n-=60*(i-t)*1e3;const a=r.offset(n);return i===a?[n,i]:[e-60*Math.min(i,a)*1e3,Math.max(i,a)]}function vz(e,t){const r=new Date(e+=60*t*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Dz(e,t,r){return gz(aU(e),t,r)}function yz(e,t){const r=e.o,n=e.c.year+Math.trunc(t.years),i=e.c.month+Math.trunc(t.months)+3*Math.trunc(t.quarters),a={...e.c,year:n,month:i,day:Math.min(e.c.day,iU(n,i))+Math.trunc(t.days)+7*Math.trunc(t.weeks)},o=kq.fromObject({years:t.years-Math.trunc(t.years),quarters:t.quarters-Math.trunc(t.quarters),months:t.months-Math.trunc(t.months),weeks:t.weeks-Math.trunc(t.weeks),days:t.days-Math.trunc(t.days),hours:t.hours,minutes:t.minutes,seconds:t.seconds,milliseconds:t.milliseconds}).as("milliseconds"),s=aU(a);let[u,l]=gz(s,r,e.zone);return 0!==o&&(u+=o,l=e.zone.offset(u)),{ts:u,o:l}}function Ez(e,t,r,n,i,a){const{setZone:o,zone:s}=r;if(e&&0!==Object.keys(e).length||t){const n=t||s,i=Rz.fromObject(e,{...r,zone:n,specificOffset:a});return o?i:i.setZone(s)}return Rz.invalid(new FU("unparsable",`the input "${i}" can't be parsed as ${n}`))}function bz(e,t,r=!0){return e.isValid?kU.create(NP.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(e,t):null}function wz(e,t){const r=e.c.year>9999||e.c.year<0;let n="";return r&&e.c.year>=0&&(n+="+"),n+=KP(e.c.year,r?6:4),t?(n+="-",n+=KP(e.c.month),n+="-",n+=KP(e.c.day)):(n+=KP(e.c.month),n+=KP(e.c.day)),n}function _z(e,t,r,n,i,a){let o=KP(e.c.hour);return t?(o+=":",o+=KP(e.c.minute),0===e.c.millisecond&&0===e.c.second&&r||(o+=":")):o+=KP(e.c.minute),0===e.c.millisecond&&0===e.c.second&&r||(o+=KP(e.c.second),0===e.c.millisecond&&n||(o+=".",o+=KP(e.c.millisecond,3))),i&&(e.isOffsetFixed&&0===e.offset&&!a?o+="Z":e.o<0?(o+="-",o+=KP(Math.trunc(-e.o/60)),o+=":",o+=KP(Math.trunc(-e.o%60))):(o+="+",o+=KP(Math.trunc(e.o/60)),o+=":",o+=KP(Math.trunc(e.o%60)))),a&&(o+="["+e.zone.ianaName+"]"),o}const Tz={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},Cz={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},Az={ordinal:1,hour:0,minute:0,second:0,millisecond:0},Sz=["year","month","day","hour","minute","second","millisecond"],xz=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],kz=["year","ordinal","hour","minute","second","millisecond"];function Fz(e){const t={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[e.toLowerCase()];if(!t)throw new qM(e);return t}function Nz(e,t){const r=LP(t.zone,HP.defaultZone),n=NP.fromObject(t),i=HP.now();let a,o;if(GP(e.year))a=i;else{for(const t of Sz)GP(e[t])&&(e[t]=Tz[t]);const t=lz(e)||cz(e);if(t)return Rz.invalid(t);const n=r.offset(i);[a,o]=Dz(e,n,r)}return new Rz({ts:a,zone:r,loc:n,o:o})}function Iz(e,t,r){const n=!!GP(r.round)||r.round,i=(e,i)=>{e=tU(e,n||r.calendary?0:2,!0);return t.loc.clone(r).relFormatter(r).format(e,i)},a=n=>r.calendary?t.hasSame(e,n)?0:t.startOf(n).diff(e.startOf(n),n).get(n):t.diff(e,n).get(n);if(r.unit)return i(a(r.unit),r.unit);for(const e of r.units){const t=a(e);if(Math.abs(t)>=1)return i(t,e)}return i(e>t?-0:0,r.units[r.units.length-1])}function Oz(e){let t,r={};return e.length>0&&"object"==typeof e[e.length-1]?(r=e[e.length-1],t=Array.from(e).slice(0,e.length-1)):t=Array.from(e),[r,t]}class Rz{constructor(e){const t=e.zone||HP.defaultZone;let r=e.invalid||(Number.isNaN(e.ts)?new FU("invalid input"):null)||(t.isValid?null:fz(t));this.ts=GP(e.ts)?HP.now():e.ts;let n=null,i=null;if(!r){if(e.old&&e.old.ts===this.ts&&e.old.zone.equals(t))[n,i]=[e.old.c,e.old.o];else{const e=t.offset(this.ts);n=vz(this.ts,e),r=Number.isNaN(n.year)?new FU("invalid input"):null,n=r?null:n,i=r?null:e}}this._zone=t,this.loc=e.loc||NP.create(),this.invalid=r,this.weekData=null,this.c=n,this.o=i,this.isLuxonDateTime=!0}static now(){return new Rz({})}static local(){const[e,t]=Oz(arguments),[r,n,i,a,o,s,u]=t;return Nz({year:r,month:n,day:i,hour:a,minute:o,second:s,millisecond:u},e)}static utc(){const[e,t]=Oz(arguments),[r,n,i,a,o,s,u]=t;return e.zone=OP.utcInstance,Nz({year:r,month:n,day:i,hour:a,minute:o,second:s,millisecond:u},e)}static fromJSDate(e,t={}){const r=(n=e,"[object Date]"===Object.prototype.toString.call(n)?e.valueOf():NaN);var n;if(Number.isNaN(r))return Rz.invalid("invalid input");const i=LP(t.zone,HP.defaultZone);return i.isValid?new Rz({ts:r,zone:i,loc:NP.fromObject(t)}):Rz.invalid(fz(i))}static fromMillis(e,t={}){if(VP(e))return e<-dz||e>dz?Rz.invalid("Timestamp out of range"):new Rz({ts:e,zone:LP(t.zone,HP.defaultZone),loc:NP.fromObject(t)});throw new zM(`fromMillis requires a numerical input, but received a ${typeof e} with value ${e}`)}static fromSeconds(e,t={}){if(VP(e))return new Rz({ts:1e3*e,zone:LP(t.zone,HP.defaultZone),loc:NP.fromObject(t)});throw new zM("fromSeconds requires a numerical input")}static fromObject(e,t={}){e=e||{};const r=LP(t.zone,HP.defaultZone);if(!r.isValid)return Rz.invalid(fz(r));const n=HP.now(),i=GP(t.specificOffset)?r.offset(n):t.specificOffset,a=hU(e,Fz),o=!GP(a.ordinal),s=!GP(a.year),u=!GP(a.month)||!GP(a.day),l=s||u,c=a.weekYear||a.weekNumber,h=NP.fromObject(t);if((l||o)&&c)throw new UM("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(u&&o)throw new UM("Can't mix ordinal dates with month/day");const d=c||a.weekday&&!l;let f,p,m=vz(n,i);d?(f=xz,p=Cz,m=az(m)):o?(f=kz,p=Az,m=sz(m)):(f=Sz,p=Tz);let g=!1;for(const e of f){GP(a[e])?a[e]=g?p[e]:m[e]:g=!0}const v=d?function(e){const t=WP(e.weekYear),r=XP(e.weekNumber,1,oU(e.weekYear)),n=XP(e.weekday,1,7);return t?r?!n&&tz("weekday",e.weekday):tz("week",e.week):tz("weekYear",e.weekYear)}(a):o?function(e){const t=WP(e.year),r=XP(e.ordinal,1,nU(e.year));return t?!r&&tz("ordinal",e.ordinal):tz("year",e.year)}(a):lz(a),D=v||cz(a);if(D)return Rz.invalid(D);const y=d?oz(a):o?uz(a):a,[E,b]=Dz(y,i,r),w=new Rz({ts:E,zone:r,o:b,loc:h});return a.weekday&&l&&e.weekday!==w.weekday?Rz.invalid("mismatched weekday",`you can't specify both a weekday of ${a.weekday} and a date of ${w.toISO()}`):w}static fromISO(e,t={}){const[r,n]=function(e){return RU(e,[oq,cq],[sq,hq],[uq,dq],[lq,fq])}(e);return Ez(r,n,t,"ISO 8601",e)}static fromRFC2822(e,t={}){const[r,n]=function(e){return RU(function(e){return e.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(e),[JU,eq])}(e);return Ez(r,n,t,"RFC 2822",e)}static fromHTTP(e,t={}){const[r,n]=function(e){return RU(e,[tq,iq],[rq,iq],[nq,aq])}(e);return Ez(r,n,t,"HTTP",t)}static fromFormat(e,t,r={}){if(GP(e)||GP(t))throw new zM("fromFormat requires an input string and a format");const{locale:n=null,numberingSystem:i=null}=r,a=NP.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0}),[o,s,u,l]=function(e,t,r){const{result:n,zone:i,specificOffset:a,invalidReason:o}=Kq(e,t,r);return[n,i,a,o]}(a,e,t);return l?Rz.invalid(l):Ez(o,s,r,`format ${t}`,e,u)}static fromString(e,t,r={}){return Rz.fromFormat(e,t,r)}static fromSQL(e,t={}){const[r,n]=function(e){return RU(e,[mq,cq],[gq,vq])}(e);return Ez(r,n,t,"SQL",e)}static invalid(e,t=null){if(!e)throw new zM("need to specify a reason the DateTime is invalid");const r=e instanceof FU?e:new FU(e,t);if(HP.throwOnInvalid)throw new BM(r);return new Rz({invalid:r})}static isDateTime(e){return e&&e.isLuxonDateTime||!1}static parseFormatForOpts(e,t={}){const r=Qq(e,NP.fromObject(t));return r?r.map((e=>e?e.val:null)).join(""):null}static expandFormat(e,t={}){return Xq(kU.parseFormat(e),NP.fromObject(t)).map((e=>e.val)).join("")}get(e){return this[e]}get isValid(){return null===this.invalid}get invalidReason(){return this.invalid?this.invalid.reason:null}get invalidExplanation(){return this.invalid?this.invalid.explanation:null}get locale(){return this.isValid?this.loc.locale:null}get numberingSystem(){return this.isValid?this.loc.numberingSystem:null}get outputCalendar(){return this.isValid?this.loc.outputCalendar:null}get zone(){return this._zone}get zoneName(){return this.isValid?this.zone.name:null}get year(){return this.isValid?this.c.year:NaN}get quarter(){return this.isValid?Math.ceil(this.c.month/3):NaN}get month(){return this.isValid?this.c.month:NaN}get day(){return this.isValid?this.c.day:NaN}get hour(){return this.isValid?this.c.hour:NaN}get minute(){return this.isValid?this.c.minute:NaN}get second(){return this.isValid?this.c.second:NaN}get millisecond(){return this.isValid?this.c.millisecond:NaN}get weekYear(){return this.isValid?pz(this).weekYear:NaN}get weekNumber(){return this.isValid?pz(this).weekNumber:NaN}get weekday(){return this.isValid?pz(this).weekday:NaN}get ordinal(){return this.isValid?sz(this.c).ordinal:NaN}get monthShort(){return this.isValid?Iq.months("short",{locObj:this.loc})[this.month-1]:null}get monthLong(){return this.isValid?Iq.months("long",{locObj:this.loc})[this.month-1]:null}get weekdayShort(){return this.isValid?Iq.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}get weekdayLong(){return this.isValid?Iq.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}get offset(){return this.isValid?+this.o:NaN}get offsetNameShort(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}get offsetNameLong(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}get isOffsetFixed(){return this.isValid?this.zone.isUniversal:null}get isInDST(){return!this.isOffsetFixed&&(this.offset>this.set({month:1,day:1}).offset||this.offset>this.set({month:5}).offset)}getPossibleOffsets(){if(!this.isValid||this.isOffsetFixed)return[this];const e=864e5,t=6e4,r=aU(this.c),n=this.zone.offset(r-e),i=this.zone.offset(r+e),a=this.zone.offset(r-n*t),o=this.zone.offset(r-i*t);if(a===o)return[this];const s=r-a*t,u=r-o*t,l=vz(s,a),c=vz(u,o);return l.hour===c.hour&&l.minute===c.minute&&l.second===c.second&&l.millisecond===c.millisecond?[mz(this,{ts:s}),mz(this,{ts:u})]:[this]}get isInLeapYear(){return rU(this.year)}get daysInMonth(){return iU(this.year,this.month)}get daysInYear(){return this.isValid?nU(this.year):NaN}get weeksInWeekYear(){return this.isValid?oU(this.weekYear):NaN}resolvedLocaleOptions(e={}){const{locale:t,numberingSystem:r,calendar:n}=kU.create(this.loc.clone(e),e).resolvedOptions(this);return{locale:t,numberingSystem:r,outputCalendar:n}}toUTC(e=0,t={}){return this.setZone(OP.instance(e),t)}toLocal(){return this.setZone(HP.defaultZone)}setZone(e,{keepLocalTime:t=!1,keepCalendarTime:r=!1}={}){if((e=LP(e,HP.defaultZone)).equals(this.zone))return this;if(e.isValid){let n=this.ts;if(t||r){const t=e.offset(this.ts),r=this.toObject();[n]=Dz(r,t,e)}return mz(this,{ts:n,zone:e})}return Rz.invalid(fz(e))}reconfigure({locale:e,numberingSystem:t,outputCalendar:r}={}){return mz(this,{loc:this.loc.clone({locale:e,numberingSystem:t,outputCalendar:r})})}setLocale(e){return this.reconfigure({locale:e})}set(e){if(!this.isValid)return this;const t=hU(e,Fz),r=!GP(t.weekYear)||!GP(t.weekNumber)||!GP(t.weekday),n=!GP(t.ordinal),i=!GP(t.year),a=!GP(t.month)||!GP(t.day),o=i||a,s=t.weekYear||t.weekNumber;if((o||n)&&s)throw new UM("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(a&&n)throw new UM("Can't mix ordinal dates with month/day");let u;r?u=oz({...az(this.c),...t}):GP(t.ordinal)?(u={...this.toObject(),...t},GP(t.day)&&(u.day=Math.min(iU(u.year,u.month),u.day))):u=uz({...sz(this.c),...t});const[l,c]=Dz(u,this.o,this.zone);return mz(this,{ts:l,o:c})}plus(e){if(!this.isValid)return this;return mz(this,yz(this,kq.fromDurationLike(e)))}minus(e){if(!this.isValid)return this;return mz(this,yz(this,kq.fromDurationLike(e).negate()))}startOf(e){if(!this.isValid)return this;const t={},r=kq.normalizeUnit(e);switch(r){case"years":t.month=1;case"quarters":case"months":t.day=1;case"weeks":case"days":t.hour=0;case"hours":t.minute=0;case"minutes":t.second=0;case"seconds":t.millisecond=0}if("weeks"===r&&(t.weekday=1),"quarters"===r){const e=Math.ceil(this.month/3);t.month=3*(e-1)+1}return this.set(t)}endOf(e){return this.isValid?this.plus({[e]:1}).startOf(e).minus(1):this}toFormat(e,t={}){return this.isValid?kU.create(this.loc.redefaultToEN(t)).formatDateTimeFromString(this,e):hz}toLocaleString(e=WM,t={}){return this.isValid?kU.create(this.loc.clone(t),e).formatDateTime(this):hz}toLocaleParts(e={}){return this.isValid?kU.create(this.loc.clone(e),e).formatDateTimeParts(this):[]}toISO({format:e="extended",suppressSeconds:t=!1,suppressMilliseconds:r=!1,includeOffset:n=!0,extendedZone:i=!1}={}){if(!this.isValid)return null;const a="extended"===e;let o=wz(this,a);return o+="T",o+=_z(this,a,t,r,n,i),o}toISODate({format:e="extended"}={}){return this.isValid?wz(this,"extended"===e):null}toISOWeekDate(){return bz(this,"kkkk-'W'WW-c")}toISOTime({suppressMilliseconds:e=!1,suppressSeconds:t=!1,includeOffset:r=!0,includePrefix:n=!1,extendedZone:i=!1,format:a="extended"}={}){if(!this.isValid)return null;return(n?"T":"")+_z(this,"extended"===a,t,e,r,i)}toRFC2822(){return bz(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)}toHTTP(){return bz(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")}toSQLDate(){return this.isValid?wz(this,!0):null}toSQLTime({includeOffset:e=!0,includeZone:t=!1,includeOffsetSpace:r=!0}={}){let n="HH:mm:ss.SSS";return(t||e)&&(r&&(n+=" "),t?n+="z":e&&(n+="ZZ")),bz(this,n,!0)}toSQL(e={}){return this.isValid?`${this.toSQLDate()} ${this.toSQLTime(e)}`:null}toString(){return this.isValid?this.toISO():hz}valueOf(){return this.toMillis()}toMillis(){return this.isValid?this.ts:NaN}toSeconds(){return this.isValid?this.ts/1e3:NaN}toUnixInteger(){return this.isValid?Math.floor(this.ts/1e3):NaN}toJSON(){return this.toISO()}toBSON(){return this.toJSDate()}toObject(e={}){if(!this.isValid)return{};const t={...this.c};return e.includeConfig&&(t.outputCalendar=this.outputCalendar,t.numberingSystem=this.loc.numberingSystem,t.locale=this.loc.locale),t}toJSDate(){return new Date(this.isValid?this.ts:NaN)}diff(e,t="milliseconds",r={}){if(!this.isValid||!e.isValid)return kq.invalid("created by diffing an invalid DateTime");const n={locale:this.locale,numberingSystem:this.numberingSystem,...r},i=(s=t,Array.isArray(s)?s:[s]).map(kq.normalizeUnit),a=e.valueOf()>this.valueOf(),o=Rq(a?this:e,a?e:this,i,n);var s;return a?o.negate():o}diffNow(e="milliseconds",t={}){return this.diff(Rz.now(),e,t)}until(e){return this.isValid?Nq.fromDateTimes(this,e):this}hasSame(e,t){if(!this.isValid)return!1;const r=e.valueOf(),n=this.setZone(e.zone,{keepLocalTime:!0});return n.startOf(t)<=r&&r<=n.endOf(t)}equals(e){return this.isValid&&e.isValid&&this.valueOf()===e.valueOf()&&this.zone.equals(e.zone)&&this.loc.equals(e.loc)}toRelative(e={}){if(!this.isValid)return null;const t=e.base||Rz.fromObject({},{zone:this.zone}),r=e.padding?thise.valueOf()),Math.min)}static max(...e){if(!e.every(Rz.isDateTime))throw new zM("max requires all arguments be DateTimes");return $P(e,(e=>e.valueOf()),Math.max)}static fromFormatExplain(e,t,r={}){const{locale:n=null,numberingSystem:i=null}=r;return Kq(NP.fromOpts({locale:n,numberingSystem:i,defaultToEN:!0}),e,t)}static fromStringExplain(e,t,r={}){return Rz.fromFormatExplain(e,t,r)}static get DATE_SHORT(){return WM}static get DATE_MED(){return YM}static get DATE_MED_WITH_WEEKDAY(){return $M}static get DATE_FULL(){return ZM}static get DATE_HUGE(){return XM}static get TIME_SIMPLE(){return KM}static get TIME_WITH_SECONDS(){return QM}static get TIME_WITH_SHORT_OFFSET(){return JM}static get TIME_WITH_LONG_OFFSET(){return eP}static get TIME_24_SIMPLE(){return tP}static get TIME_24_WITH_SECONDS(){return rP}static get TIME_24_WITH_SHORT_OFFSET(){return nP}static get TIME_24_WITH_LONG_OFFSET(){return iP}static get DATETIME_SHORT(){return aP}static get DATETIME_SHORT_WITH_SECONDS(){return oP}static get DATETIME_MED(){return sP}static get DATETIME_MED_WITH_SECONDS(){return uP}static get DATETIME_MED_WITH_WEEKDAY(){return lP}static get DATETIME_FULL(){return cP}static get DATETIME_FULL_WITH_SECONDS(){return hP}static get DATETIME_HUGE(){return dP}static get DATETIME_HUGE_WITH_SECONDS(){return fP}}function Lz(e){if(Rz.isDateTime(e))return e;if(e&&e.valueOf&&VP(e.valueOf()))return Rz.fromJSDate(e);if(e&&"object"==typeof e)return Rz.fromObject(e);throw new zM(`Unknown datetime argument: ${e}, of type ${typeof e}`)}const Bz={renderNullAs:"\\-",taskCompletionTracking:!1,taskCompletionUseEmojiShorthand:!1,taskCompletionText:"completion",taskCompletionDateFormat:"yyyy-MM-dd",recursiveSubTaskCompletion:!1,warnOnEmptyResult:!0,refreshEnabled:!0,refreshInterval:2500,defaultDateFormat:"MMMM dd, yyyy",defaultDateTimeFormat:"h:mm a - MMMM dd, yyyy",maxRecursiveRenderDepth:4,tableIdColumnName:"File",tableGroupColumnName:"Group",showResultCount:!0};class Mz{constructor(e){this.value=e,this.successful=!0}map(e){return new Mz(e(this.value))}flatMap(e){return e(this.value)}mapErr(e){return this}bimap(e,t){return this.map(e)}orElse(e){return this.value}cast(){return this}orElseThrow(e){return this.value}}class Pz{constructor(e){this.error=e,this.successful=!1}map(e){return this}flatMap(e){return this}mapErr(e){return new Pz(e(this.error))}bimap(e,t){return this.mapErr(t)}orElse(e){return e}cast(){return this}orElseThrow(e){throw e?new Error(e(this.error)):new Error(""+this.error)}}var Uz;!function(e){function t(e){return new Mz(e)}function r(e){return new Pz(e)}function n(e,t,n){return e.successful?t.successful?n(e.value,t.value):r(t.error):r(e.error)}e.success=t,e.failure=r,e.flatMap2=n,e.map2=function(e,r,i){return n(e,r,((e,r)=>t(i(e,r))))}}(Uz||(Uz={}));"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==a||"undefined"!=typeof self&&self;var qz={exports:{}};"undefined"!=typeof self&&self,qz.exports=function(e){var t={};function r(n){if(t[n])return t[n].exports;var i=t[n]={i:n,l:!1,exports:{}};return e[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}return r.m=e,r.c=t,r.d=function(e,t,n){r.o(e,t)||Object.defineProperty(e,t,{configurable:!1,enumerable:!0,get:n})},r.r=function(e){Object.defineProperty(e,"__esModule",{value:!0})},r.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return r.d(t,"a",t),t},r.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},r.p="",r(r.s=0)}([function(e,t,r){function n(e){if(!(this instanceof n))return new n(e);this._=e}var i=n.prototype;function a(e,t){for(var r=0;r>7),buf:function(e){var t=o((function(e,t,r,n){return e.concat(r===n.length-1?KB.from([t,0]).readUInt16BE(0):n.readUInt16BE(r))}),[],e);return KB.from(s((function(e){return(e<<1&65535)>>8}),t))}(r.buf)}})),r}function l(){return void 0!==KB}function c(){if(!l())throw new Error("Buffer global does not exist; please use webpack if you need to parse Buffers in the browser.")}function h(e){c();var t=o((function(e,t){return e+t}),0,e);if(t%8!=0)throw new Error("The bits ["+e.join(", ")+"] add up to "+t+" which is not an even number of bytes; the total should be divisible by 8");var r,i=t/8,a=(r=function(e){return e>48},o((function(e,t){return e||(r(t)?t:e)}),null,e));if(a)throw new Error(a+" bit range requested exceeds 48 bit (6 byte) Number max.");return new n((function(t,r){var n=i+r;return n>t.length?w(r,i.toString()+" bytes"):b(n,o((function(e,t){var r=u(t,e.buf);return{coll:e.coll.concat(r.v),buf:r.buf}}),{coll:[],buf:t.slice(r,n)},e).coll)}))}function d(e,t){return new n((function(r,n){return c(),n+t>r.length?w(n,t+" bytes for "+e):b(n+t,r.slice(n,n+t))}))}function f(e,t){if("number"!=typeof(r=t)||Math.floor(r)!==r||t<0||t>6)throw new Error(e+" requires integer length in range [0, 6].");var r}function p(e){return f("uintBE",e),d("uintBE("+e+")",e).map((function(t){return t.readUIntBE(0,e)}))}function m(e){return f("uintLE",e),d("uintLE("+e+")",e).map((function(t){return t.readUIntLE(0,e)}))}function g(e){return f("intBE",e),d("intBE("+e+")",e).map((function(t){return t.readIntBE(0,e)}))}function v(e){return f("intLE",e),d("intLE("+e+")",e).map((function(t){return t.readIntLE(0,e)}))}function D(e){return e instanceof n}function y(e){return"[object Array]"==={}.toString.call(e)}function E(e){return l()&&KB.isBuffer(e)}function b(e,t){return{status:!0,index:e,value:t,furthest:-1,expected:[]}}function w(e,t){return y(t)||(t=[t]),{status:!1,index:-1,value:null,furthest:e,expected:t}}function _(e,t){if(!t)return e;if(e.furthest>t.furthest)return e;var r=e.furthest===t.furthest?function(e,t){if(function(){if(void 0!==n._supportsSet)return n._supportsSet;var e="undefined"!=typeof Set;return n._supportsSet=e,e}()&&Array.from){for(var r=new Set(e),i=0;i=0;){if(o in r){n=r[o].line,0===a&&(a=r[o].lineStart);break}("\n"===e.charAt(o)||"\r"===e.charAt(o)&&"\n"!==e.charAt(o+1))&&(i++,0===a&&(a=o+1)),o--}var s=n+i,u=t-a;return r[t]={line:s,lineStart:a},{offset:t,line:s+1,column:u+1}}function A(e){if(!D(e))throw new Error("not a parser: "+e)}function S(e,t){return"string"==typeof e?e.charAt(t):e[t]}function x(e){if("number"!=typeof e)throw new Error("not a number: "+e)}function k(e){if("function"!=typeof e)throw new Error("not a function: "+e)}function F(e){if("string"!=typeof e)throw new Error("not a string: "+e)}var N=2,I=3,O=8,R=5*O,L=4*O,B=" ";function M(e,t){return new Array(t+1).join(e)}function P(e,t,r){var n=t-e.length;return n<=0?e:M(r,n)+e}function U(e,t,r,n){return{from:e-t>0?e-t:0,to:e+r>n?n:e+r}}function q(e,t){var r,n,i,a,u,l=t.index,c=l.offset,h=1;if(c===e.length)return"Got the end of the input";if(E(e)){var d=c-c%O,f=c-d,p=U(d,R,L+O,e.length),m=s((function(e){return s((function(e){return P(e.toString(16),2,"0")}),e)}),function(e,t){var r=e.length,n=[],i=0;if(r<=t)return[e.slice()];for(var a=0;a=4&&(r+=1),h=2,i=s((function(e){return e.length<=4?e.join(" "):e.slice(0,4).join(" ")+" "+e.slice(4).join(" ")}),m),(u=(8*(a.to>0?a.to-1:a.to)).toString(16).length)<2&&(u=2)}else{var g=e.split(/\r\n|[\n\r\u2028\u2029]/);r=l.column-1,n=l.line-1,a=U(n,N,I,g.length),i=g.slice(a.from,a.to),u=a.to.toString().length}var v=n-a.from;return E(e)&&(u=(8*(a.to>0?a.to-1:a.to)).toString(16).length)<2&&(u=2),o((function(t,n,i){var o,s=i===v,l=s?"> ":B;return o=E(e)?P((8*(a.from+i)).toString(16),u,"0"):P((a.from+i+1).toString(),u," "),[].concat(t,[l+o+" | "+n],s?[B+M(" ",u)+" | "+P("",r," ")+M("^",h)]:[])}),[],i).join("\n")}function z(e,t){return["\n","-- PARSING FAILED "+M("-",50),"\n\n",q(e,t),"\n\n",(r=t.expected,1===r.length?"Expected:\n\n"+r[0]:"Expected one of the following: \n\n"+r.join(", ")),"\n"].join("");var r}function j(e){return void 0!==e.flags?e.flags:[e.global?"g":"",e.ignoreCase?"i":"",e.multiline?"m":"",e.unicode?"u":"",e.sticky?"y":""].join("")}function H(){for(var e=[].slice.call(arguments),t=e.length,r=0;r=2?x(t):t=0;var r=function(e){return RegExp("^(?:"+e.source+")",j(e))}(e),i=""+e;return n((function(e,n){var a=r.exec(e.slice(n));if(a){if(0<=t&&t<=a.length){var o=a[0],s=a[t];return b(n+o.length,s)}return w(n,"valid match group (0 to "+a.length+") in "+i)}return w(n,i)}))}function X(e){return n((function(t,r){return b(r,e)}))}function K(e){return n((function(t,r){return w(r,e)}))}function Q(e){if(D(e))return n((function(t,r){var n=e._(t,r);return n.index=r,n.value="",n}));if("string"==typeof e)return Q($(e));if(e instanceof RegExp)return Q(Z(e));throw new Error("not a string, regexp, or parser: "+e)}function J(e){return A(e),n((function(t,r){var n=e._(t,r),i=t.slice(r,n.index);return n.status?w(r,'not "'+i+'"'):b(r,null)}))}function ee(e){return k(e),n((function(t,r){var n=S(t,r);return r=e.length?w(t,"any character/byte"):b(t+1,S(e,t))})),ae=n((function(e,t){return b(e.length,e.slice(t))})),oe=n((function(e,t){return t=0})).desc(t)},n.optWhitespace=he,n.Parser=n,n.range=function(e,t){return ee((function(r){return e<=r&&r<=t})).desc(e+"-"+t)},n.regex=Z,n.regexp=Z,n.sepBy=W,n.sepBy1=Y,n.seq=H,n.seqMap=G,n.seqObj=function(){for(var e,t={},r=0,i=(e=arguments,Array.prototype.slice.call(e)),a=i.length,o=0;o255)throw new Error("Value specified to byte constructor ("+e+"=0x"+e.toString(16)+") is larger in value than a single byte.");var t=(e>15?"0x":"0x0")+e.toString(16);return n((function(r,n){var i=S(r,n);return i===e?b(n+1,i):w(n,t)}))},buffer:function(e){return d("buffer",e).map((function(e){return KB.from(e)}))},encodedString:function(e,t){return d("string",t).map((function(t){return t.toString(e)}))},uintBE:p,uint8BE:p(1),uint16BE:p(2),uint32BE:p(4),uintLE:m,uint8LE:m(1),uint16LE:m(2),uint32LE:m(4),intBE:g,int8BE:g(1),int16BE:g(2),int32BE:g(4),intLE:v,int8LE:v(1),int16LE:v(2),int32LE:v(4),floatBE:d("floatBE",4).map((function(e){return e.readFloatBE(0)})),floatLE:d("floatLE",4).map((function(e){return e.readFloatLE(0)})),doubleBE:d("doubleBE",8).map((function(e){return e.readDoubleBE(0)})),doubleLE:d("doubleLE",8).map((function(e){return e.readDoubleLE(0)}))},e.exports=n}]);var zz=qz.exports;function jz(e){return null==e?e:e.shiftToAll().normalize()}function Hz(e){return e.includes("/")&&(e=e.substring(e.lastIndexOf("/")+1)),e.endsWith(".md")&&(e=e.substring(0,e.length-3)),e}zz.alt(zz.regex(new RegExp(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,"")),zz.regex(/[0-9\p{Letter}_-]+/u).map((e=>e.toLocaleLowerCase())),zz.whitespace.map((e=>"-")),zz.any.map((e=>""))).many().map((e=>e.join("")));const Gz=zz.alt(zz.regex(new RegExp(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,"")),zz.regex(/[0-9\p{Letter}_-]+/u),zz.whitespace.map((e=>" ")),zz.any.map((e=>" "))).many().map((e=>e.join("").split(/\s+/).join(" ").trim()));function Vz(e){return Gz.tryParse(e)}var Wz,Yz,$z,Zz,Xz;!function(e){function t(e){return o(e)?{type:"null",value:e}:n(e)?{type:"number",value:e}:r(e)?{type:"string",value:e}:u(e)?{type:"boolean",value:e}:a(e)?{type:"duration",value:e}:i(e)?{type:"date",value:e}:c(e)?{type:"widget",value:e}:s(e)?{type:"array",value:e}:l(e)?{type:"link",value:e}:f(e)?{type:"function",value:e}:h(e)?{type:"html",value:e}:d(e)?{type:"object",value:e}:void 0}function r(e){return"string"==typeof e}function n(e){return"number"==typeof e}function i(e){return e instanceof Rz}function a(e){return e instanceof kq}function o(e){return null==e}function s(e){return Array.isArray(e)}function u(e){return"boolean"==typeof e}function l(e){return e instanceof Kz}function c(e){return e instanceof Qz}function h(e){return"undefined"!=typeof HTMLElement&&e instanceof HTMLElement}function d(e){return!("object"!=typeof e||h(e)||c(e)||s(e)||a(e)||i(e)||l(e)||void 0===e||o(e))}function f(e){return"function"==typeof e}e.toString=function e(r,n=Bz,i=!1){let a=t(r);if(!a)return n.renderNullAs;switch(a.type){case"null":return n.renderNullAs;case"string":return a.value;case"number":case"boolean":return""+a.value;case"html":return a.value.outerHTML;case"widget":case"link":return a.value.markdown();case"function":return"";case"array":let t="";return i&&(t+="["),t+=a.value.map((t=>e(t,n,!0))).join(", "),i&&(t+="]"),t;case"object":return"{ "+Object.entries(a.value).map((t=>t[0]+": "+e(t[1],n,!0))).join(", ")+" }";case"date":return 0==a.value.second&&0==a.value.hour&&0==a.value.minute?a.value.toFormat(n.defaultDateFormat):a.value.toFormat(n.defaultDateTimeFormat);case"duration":return o=jz(o=a.value),(o=kq.fromObject(Object.fromEntries(Object.entries(o.toObject()).filter((([,e])=>0!=e))))).toHuman()}var o},e.wrapValue=t,e.mapLeaves=function e(t,r){if(d(t)){let n={};for(let[i,a]of Object.entries(t))n[i]=e(a,r);return n}if(s(t)){let n=[];for(let i of t)n.push(e(i,r));return n}return r(t)},e.compareValue=function e(r,n,i){var a,o;if(void 0===r&&(r=null),void 0===n&&(n=null),null===r&&null===n)return 0;if(null===r)return-1;if(null===n)return 1;let s=t(r),u=t(n);if(void 0===s&&void 0===u)return 0;if(void 0===s)return-1;if(void 0===u)return 1;if(s.type!=u.type)return s.type.localeCompare(u.type);if(s.value===u.value)return 0;switch(s.type){case"string":return s.value.localeCompare(u.value);case"number":return s.valuee,l=n(t.path).localeCompare(n(r.path));if(0!=l)return l;let c=t.type.localeCompare(r.type);return 0!=c?c:t.subpath&&!r.subpath?1:!t.subpath&&r.subpath?-1:t.subpath||r.subpath?(null!==(a=t.subpath)&&void 0!==a?a:"").localeCompare(null!==(o=r.subpath)&&void 0!==o?o:""):0;case"date":case"duration":return s.value0;case"boolean":return r.value;case"link":return!!r.value.path;case"date":return 0!=r.value.toMillis();case"duration":return 0!=r.value.as("seconds");case"object":return Object.keys(r.value).length>0;case"null":return!1;case"html":case"widget":case"function":return!0}},e.deepCopy=function t(r){if(null==r)return r;if(e.isArray(r))return[].concat(r.map((e=>t(e))));if(e.isObject(r)){let e={};for(let[n,i]of Object.entries(r))e[n]=t(i);return e}return r},e.isString=r,e.isNumber=n,e.isDate=i,e.isDuration=a,e.isNull=o,e.isArray=s,e.isBoolean=u,e.isLink=l,e.isWidget=c,e.isHtml=h,e.isObject=d,e.isFunction=f}(Wz||(Wz={})),function(e){function t(e){return Wz.isObject(e)&&2==Object.keys(e).length&&"key"in e&&"rows"in e}function r(e){for(let r of e)if(!t(r))return!1;return!0}e.isElementGroup=t,e.isGrouping=r,e.count=function e(t){if(r(t)){let r=0;for(let n of t)r+=e(n.rows);return r}return t.length}}(Yz||(Yz={}));class Kz{static file(e,t=!1,r){return new Kz({path:e,embed:t,display:r,subpath:void 0,type:"file"})}static infer(e,t=!1,r){if(e.includes("#^")){let n=e.split("#^");return Kz.block(n[0],n[1],t,r)}if(e.includes("#")){let n=e.split("#");return Kz.header(n[0],n[1],t,r)}return Kz.file(e,t,r)}static header(e,t,r,n){return new Kz({path:e,embed:r,display:n,subpath:Vz(t),type:"header"})}static block(e,t,r,n){return new Kz({path:e,embed:r,display:n,subpath:t,type:"block"})}static fromObject(e){return new Kz(e)}constructor(e){Object.assign(this,e)}equals(e){return null!=e&&null!=e&&(this.path==e.path&&this.type==e.type&&this.subpath==e.subpath)}toString(){return this.markdown()}toObject(){return{path:this.path,type:this.type,subpath:this.subpath,display:this.display,embed:this.embed}}withPath(e){return new Kz(Object.assign({},this,{path:e}))}withDisplay(e){return new Kz(Object.assign({},this,{display:e}))}withHeader(e){return Kz.header(this.path,e,this.embed,this.display)}toFile(){return Kz.file(this.path,this.embed,this.display)}toEmbed(){if(this.embed)return this;{let e=new Kz(this);return e.embed=!0,e}}fromEmbed(){if(this.embed){let e=new Kz(this);return e.embed=!1,e}return this}markdown(){let e=(this.embed?"!":"")+"[["+this.obsidianLink();return this.display?e+="|"+this.display:(e+="|"+Hz(this.path),"header"!=this.type&&"block"!=this.type||(e+=" > "+this.subpath)),e+="]]",e}obsidianLink(){var e,t;const r=this.path.replace("|","\\|");return"header"==this.type?r+"#"+(null===(e=this.subpath)||void 0===e?void 0:e.replace("|","\\|")):"block"==this.type?r+"#^"+(null===(t=this.subpath)||void 0===t?void 0:t.replace("|","\\|")):r}fileName(){return Hz(this.path).replace(".md","")}}class Qz{constructor(e){this.$widget=e}}class Jz extends Qz{constructor(e,t){super("dataview:list-pair"),this.key=e,this.value=t}markdown(){return`${Wz.toString(this.key)}: ${Wz.toString(this.value)}`}}class ej extends Qz{constructor(e,t){super("dataview:external-link"),this.url=e,this.display=t}markdown(){var e;return`[${null!==(e=this.display)&&void 0!==e?e:this.url}](${this.url})`}}!function(e){function t(e){return"dataview:list-pair"===e.$widget}function r(e){return"dataview:external-link"===e.$widget}e.listPair=function(e,t){return new Jz(e,t)},e.externalLink=function(e,t){return new ej(e,t)},e.isListPair=t,e.isExternalLink=r,e.isBuiltin=function(e){return t(e)||r(e)}}($z||($z={})),function(e){e.variable=function(e){return{type:"variable",name:e}},e.literal=function(e){return{type:"literal",value:e}},e.binaryOp=function(e,t,r){return{type:"binaryop",left:e,op:t,right:r}},e.index=function(e,t){return{type:"index",object:e,index:t}},e.indexVariable=function(t){let r=t.split("."),n=e.variable(r[0]);for(let t=1;t"==e||">="==e||"!="==e||"="==e},e.NULL=e.literal(null)}(Zz||(Zz={})),function(e){e.tag=function(e){return{type:"tag",tag:e}},e.csv=function(e){return{type:"csv",path:e}},e.folder=function(e){return{type:"folder",folder:e}},e.link=function(e,t){return{type:"link",file:e,direction:t?"incoming":"outgoing"}},e.binaryOp=function(e,t,r){return{type:"binaryop",left:e,op:t,right:r}},e.and=function(e,t){return{type:"binaryop",left:e,op:"&",right:t}},e.or=function(e,t){return{type:"binaryop",left:e,op:"|",right:t}},e.negate=function(e){return{type:"negate",child:e}},e.empty=function(){return{type:"empty"}}}(Xz||(Xz={}));const tj=new RegExp(/[#*0-9]\uFE0F?\u20E3|[\xA9\xAE\u203C\u2049\u2122\u2139\u2194-\u2199\u21A9\u21AA\u231A\u231B\u2328\u23CF\u23ED-\u23EF\u23F1\u23F2\u23F8-\u23FA\u24C2\u25AA\u25AB\u25B6\u25C0\u25FB\u25FC\u25FE\u2600-\u2604\u260E\u2611\u2614\u2615\u2618\u2620\u2622\u2623\u2626\u262A\u262E\u262F\u2638-\u263A\u2640\u2642\u2648-\u2653\u265F\u2660\u2663\u2665\u2666\u2668\u267B\u267E\u267F\u2692\u2694-\u2697\u2699\u269B\u269C\u26A0\u26A7\u26AA\u26B0\u26B1\u26BD\u26BE\u26C4\u26C8\u26CF\u26D1\u26D3\u26E9\u26F0-\u26F5\u26F7\u26F8\u26FA\u2702\u2708\u2709\u270F\u2712\u2714\u2716\u271D\u2721\u2733\u2734\u2744\u2747\u2757\u2763\u27A1\u2934\u2935\u2B05-\u2B07\u2B1B\u2B1C\u2B55\u3030\u303D\u3297\u3299]\uFE0F?|[\u261D\u270C\u270D](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\u270A\u270B](?:\uD83C[\uDFFB-\uDFFF])?|[\u23E9-\u23EC\u23F0\u23F3\u25FD\u2693\u26A1\u26AB\u26C5\u26CE\u26D4\u26EA\u26FD\u2705\u2728\u274C\u274E\u2753-\u2755\u2795-\u2797\u27B0\u27BF\u2B50]|\u26F9(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\u2764\uFE0F?(?:\u200D(?:\uD83D\uDD25|\uD83E\uDE79))?|\uD83C(?:[\uDC04\uDD70\uDD71\uDD7E\uDD7F\uDE02\uDE37\uDF21\uDF24-\uDF2C\uDF36\uDF7D\uDF96\uDF97\uDF99-\uDF9B\uDF9E\uDF9F\uDFCD\uDFCE\uDFD4-\uDFDF\uDFF5\uDFF7]\uFE0F?|[\uDF85\uDFC2\uDFC7](?:\uD83C[\uDFFB-\uDFFF])?|[\uDFC3\uDFC4\uDFCA](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDFCB\uDFCC](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDCCF\uDD8E\uDD91-\uDD9A\uDE01\uDE1A\uDE2F\uDE32-\uDE36\uDE38-\uDE3A\uDE50\uDE51\uDF00-\uDF20\uDF2D-\uDF35\uDF37-\uDF7C\uDF7E-\uDF84\uDF86-\uDF93\uDFA0-\uDFC1\uDFC5\uDFC6\uDFC8\uDFC9\uDFCF-\uDFD3\uDFE0-\uDFF0\uDFF8-\uDFFF]|\uDDE6\uD83C[\uDDE8-\uDDEC\uDDEE\uDDF1\uDDF2\uDDF4\uDDF6-\uDDFA\uDDFC\uDDFD\uDDFF]|\uDDE7\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEF\uDDF1-\uDDF4\uDDF6-\uDDF9\uDDFB\uDDFC\uDDFE\uDDFF]|\uDDE8\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDEE\uDDF0-\uDDF5\uDDF7\uDDFA-\uDDFF]|\uDDE9\uD83C[\uDDEA\uDDEC\uDDEF\uDDF0\uDDF2\uDDF4\uDDFF]|\uDDEA\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDED\uDDF7-\uDDFA]|\uDDEB\uD83C[\uDDEE-\uDDF0\uDDF2\uDDF4\uDDF7]|\uDDEC\uD83C[\uDDE6\uDDE7\uDDE9-\uDDEE\uDDF1-\uDDF3\uDDF5-\uDDFA\uDDFC\uDDFE]|\uDDED\uD83C[\uDDF0\uDDF2\uDDF3\uDDF7\uDDF9\uDDFA]|\uDDEE\uD83C[\uDDE8-\uDDEA\uDDF1-\uDDF4\uDDF6-\uDDF9]|\uDDEF\uD83C[\uDDEA\uDDF2\uDDF4\uDDF5]|\uDDF0\uD83C[\uDDEA\uDDEC-\uDDEE\uDDF2\uDDF3\uDDF5\uDDF7\uDDFC\uDDFE\uDDFF]|\uDDF1\uD83C[\uDDE6-\uDDE8\uDDEE\uDDF0\uDDF7-\uDDFB\uDDFE]|\uDDF2\uD83C[\uDDE6\uDDE8-\uDDED\uDDF0-\uDDFF]|\uDDF3\uD83C[\uDDE6\uDDE8\uDDEA-\uDDEC\uDDEE\uDDF1\uDDF4\uDDF5\uDDF7\uDDFA\uDDFF]|\uDDF4\uD83C\uDDF2|\uDDF5\uD83C[\uDDE6\uDDEA-\uDDED\uDDF0-\uDDF3\uDDF7-\uDDF9\uDDFC\uDDFE]|\uDDF6\uD83C\uDDE6|\uDDF7\uD83C[\uDDEA\uDDF4\uDDF8\uDDFA\uDDFC]|\uDDF8\uD83C[\uDDE6-\uDDEA\uDDEC-\uDDF4\uDDF7-\uDDF9\uDDFB\uDDFD-\uDDFF]|\uDDF9\uD83C[\uDDE6\uDDE8\uDDE9\uDDEB-\uDDED\uDDEF-\uDDF4\uDDF7\uDDF9\uDDFB\uDDFC\uDDFF]|\uDDFA\uD83C[\uDDE6\uDDEC\uDDF2\uDDF3\uDDF8\uDDFE\uDDFF]|\uDDFB\uD83C[\uDDE6\uDDE8\uDDEA\uDDEC\uDDEE\uDDF3\uDDFA]|\uDDFC\uD83C[\uDDEB\uDDF8]|\uDDFD\uD83C\uDDF0|\uDDFE\uD83C[\uDDEA\uDDF9]|\uDDFF\uD83C[\uDDE6\uDDF2\uDDFC]|\uDFF3\uFE0F?(?:\u200D(?:\u26A7\uFE0F?|\uD83C\uDF08))?|\uDFF4(?:\u200D\u2620\uFE0F?|\uDB40\uDC67\uDB40\uDC62\uDB40(?:\uDC65\uDB40\uDC6E\uDB40\uDC67|\uDC73\uDB40\uDC63\uDB40\uDC74|\uDC77\uDB40\uDC6C\uDB40\uDC73)\uDB40\uDC7F)?)|\uD83D(?:[\uDC08\uDC26](?:\u200D\u2B1B)?|[\uDC3F\uDCFD\uDD49\uDD4A\uDD6F\uDD70\uDD73\uDD76-\uDD79\uDD87\uDD8A-\uDD8D\uDDA5\uDDA8\uDDB1\uDDB2\uDDBC\uDDC2-\uDDC4\uDDD1-\uDDD3\uDDDC-\uDDDE\uDDE1\uDDE3\uDDE8\uDDEF\uDDF3\uDDFA\uDECB\uDECD-\uDECF\uDEE0-\uDEE5\uDEE9\uDEF0\uDEF3]\uFE0F?|[\uDC42\uDC43\uDC46-\uDC50\uDC66\uDC67\uDC6B-\uDC6D\uDC72\uDC74-\uDC76\uDC78\uDC7C\uDC83\uDC85\uDC8F\uDC91\uDCAA\uDD7A\uDD95\uDD96\uDE4C\uDE4F\uDEC0\uDECC](?:\uD83C[\uDFFB-\uDFFF])?|[\uDC6E\uDC70\uDC71\uDC73\uDC77\uDC81\uDC82\uDC86\uDC87\uDE45-\uDE47\uDE4B\uDE4D\uDE4E\uDEA3\uDEB4-\uDEB6](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD74\uDD90](?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?|[\uDC00-\uDC07\uDC09-\uDC14\uDC16-\uDC25\uDC27-\uDC3A\uDC3C-\uDC3E\uDC40\uDC44\uDC45\uDC51-\uDC65\uDC6A\uDC79-\uDC7B\uDC7D-\uDC80\uDC84\uDC88-\uDC8E\uDC90\uDC92-\uDCA9\uDCAB-\uDCFC\uDCFF-\uDD3D\uDD4B-\uDD4E\uDD50-\uDD67\uDDA4\uDDFB-\uDE2D\uDE2F-\uDE34\uDE37-\uDE44\uDE48-\uDE4A\uDE80-\uDEA2\uDEA4-\uDEB3\uDEB7-\uDEBF\uDEC1-\uDEC5\uDED0-\uDED2\uDED5-\uDED7\uDEDC-\uDEDF\uDEEB\uDEEC\uDEF4-\uDEFC\uDFE0-\uDFEB\uDFF0]|\uDC15(?:\u200D\uD83E\uDDBA)?|\uDC3B(?:\u200D\u2744\uFE0F?)?|\uDC41\uFE0F?(?:\u200D\uD83D\uDDE8\uFE0F?)?|\uDC68(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDC68\uDC69]\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?)|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?\uDC68\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D\uDC68\uD83C[\uDFFB-\uDFFE])))?))?|\uDC69(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:\uDC8B\u200D\uD83D)?[\uDC68\uDC69]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D(?:[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?|\uDC69\u200D\uD83D(?:\uDC66(?:\u200D\uD83D\uDC66)?|\uDC67(?:\u200D\uD83D[\uDC66\uDC67])?))|\uD83E[\uDDAF-\uDDB3\uDDBC\uDDBD])|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFC-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFD-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFD\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D\uD83D(?:[\uDC68\uDC69]|\uDC8B\u200D\uD83D[\uDC68\uDC69])\uD83C[\uDFFB-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83D[\uDC68\uDC69]\uD83C[\uDFFB-\uDFFE])))?))?|\uDC6F(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDD75(?:\uFE0F|\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|\uDE2E(?:\u200D\uD83D\uDCA8)?|\uDE35(?:\u200D\uD83D\uDCAB)?|\uDE36(?:\u200D\uD83C\uDF2B\uFE0F?)?)|\uD83E(?:[\uDD0C\uDD0F\uDD18-\uDD1F\uDD30-\uDD34\uDD36\uDD77\uDDB5\uDDB6\uDDBB\uDDD2\uDDD3\uDDD5\uDEC3-\uDEC5\uDEF0\uDEF2-\uDEF8](?:\uD83C[\uDFFB-\uDFFF])?|[\uDD26\uDD35\uDD37-\uDD39\uDD3D\uDD3E\uDDB8\uDDB9\uDDCD-\uDDCF\uDDD4\uDDD6-\uDDDD](?:\uD83C[\uDFFB-\uDFFF])?(?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDDDE\uDDDF](?:\u200D[\u2640\u2642]\uFE0F?)?|[\uDD0D\uDD0E\uDD10-\uDD17\uDD20-\uDD25\uDD27-\uDD2F\uDD3A\uDD3F-\uDD45\uDD47-\uDD76\uDD78-\uDDB4\uDDB7\uDDBA\uDDBC-\uDDCC\uDDD0\uDDE0-\uDDFF\uDE70-\uDE7C\uDE80-\uDE88\uDE90-\uDEBD\uDEBF-\uDEC2\uDECE-\uDEDB\uDEE0-\uDEE8]|\uDD3C(?:\u200D[\u2640\u2642]\uFE0F?|\uD83C[\uDFFB-\uDFFF])?|\uDDD1(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1))|\uD83C(?:\uDFFB(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFC-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFC(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFD-\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFD(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFE(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFD\uDFFF]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?|\uDFFF(?:\u200D(?:[\u2695\u2696\u2708]\uFE0F?|\u2764\uFE0F?\u200D(?:\uD83D\uDC8B\u200D)?\uD83E\uDDD1\uD83C[\uDFFB-\uDFFE]|\uD83C[\uDF3E\uDF73\uDF7C\uDF84\uDF93\uDFA4\uDFA8\uDFEB\uDFED]|\uD83D[\uDCBB\uDCBC\uDD27\uDD2C\uDE80\uDE92]|\uD83E(?:[\uDDAF-\uDDB3\uDDBC\uDDBD]|\uDD1D\u200D\uD83E\uDDD1\uD83C[\uDFFB-\uDFFF])))?))?|\uDEF1(?:\uD83C(?:\uDFFB(?:\u200D\uD83E\uDEF2\uD83C[\uDFFC-\uDFFF])?|\uDFFC(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFD-\uDFFF])?|\uDFFD(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB\uDFFC\uDFFE\uDFFF])?|\uDFFE(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFD\uDFFF])?|\uDFFF(?:\u200D\uD83E\uDEF2\uD83C[\uDFFB-\uDFFE])?))?)/g,""),rj={year:kq.fromObject({years:1}),years:kq.fromObject({years:1}),yr:kq.fromObject({years:1}),yrs:kq.fromObject({years:1}),month:kq.fromObject({months:1}),months:kq.fromObject({months:1}),mo:kq.fromObject({months:1}),mos:kq.fromObject({months:1}),week:kq.fromObject({weeks:1}),weeks:kq.fromObject({weeks:1}),wk:kq.fromObject({weeks:1}),wks:kq.fromObject({weeks:1}),w:kq.fromObject({weeks:1}),day:kq.fromObject({days:1}),days:kq.fromObject({days:1}),d:kq.fromObject({days:1}),hour:kq.fromObject({hours:1}),hours:kq.fromObject({hours:1}),hr:kq.fromObject({hours:1}),hrs:kq.fromObject({hours:1}),h:kq.fromObject({hours:1}),minute:kq.fromObject({minutes:1}),minutes:kq.fromObject({minutes:1}),min:kq.fromObject({minutes:1}),mins:kq.fromObject({minutes:1}),m:kq.fromObject({minutes:1}),second:kq.fromObject({seconds:1}),seconds:kq.fromObject({seconds:1}),sec:kq.fromObject({seconds:1}),secs:kq.fromObject({seconds:1}),s:kq.fromObject({seconds:1})},nj={now:()=>Rz.local(),today:()=>Rz.local().startOf("day"),yesterday:()=>Rz.local().startOf("day").minus(kq.fromObject({days:1})),tomorrow:()=>Rz.local().startOf("day").plus(kq.fromObject({days:1})),sow:()=>Rz.local().startOf("week"),"start-of-week":()=>Rz.local().startOf("week"),eow:()=>Rz.local().endOf("week"),"end-of-week":()=>Rz.local().endOf("week"),soy:()=>Rz.local().startOf("year"),"start-of-year":()=>Rz.local().startOf("year"),eoy:()=>Rz.local().endOf("year"),"end-of-year":()=>Rz.local().endOf("year"),som:()=>Rz.local().startOf("month"),"start-of-month":()=>Rz.local().startOf("month"),eom:()=>Rz.local().endOf("month"),"end-of-month":()=>Rz.local().endOf("month")},ij=["FROM","WHERE","LIMIT","GROUP","FLATTEN"];function aj(e,t,r){return zz.seqMap(e,zz.seq(zz.optWhitespace,t,zz.optWhitespace,e).many(),((e,t)=>{if(0==t.length)return e;let n=r(e,t[0][1],t[0][3]);for(let e=1;ezz.regexp(/-?[0-9]+(\.[0-9]+)?/).map((e=>Number.parseFloat(e))).desc("number"),string:e=>zz.string('"').then(zz.alt(e.escapeCharacter,zz.noneOf('"\\')).atLeast(0).map((e=>e.join("")))).skip(zz.string('"')).desc("string"),escapeCharacter:e=>zz.string("\\").then(zz.any).map((e=>'"'===e?'"':"\\"===e?"\\":"\\"+e)),bool:e=>zz.regexp(/true|false|True|False/).map((e=>"true"==e.toLowerCase())).desc("boolean ('true' or 'false')"),tag:e=>zz.seqMap(zz.string("#"),zz.alt(zz.regexp(/[^\u2000-\u206F\u2E00-\u2E7F'!"#$%&()*+,.:;<=>?@^`{|}~\[\]\\\s]/).desc("text")).many(),((e,t)=>e+t.join(""))).desc("tag ('#hello/stuff')"),identifier:e=>zz.seqMap(zz.alt(zz.regexp(/\p{Letter}/u),zz.regexp(tj).desc("text")),zz.alt(zz.regexp(/[0-9\p{Letter}_-]/u),zz.regexp(tj).desc("text")).many(),((e,t)=>e+t.join(""))).desc("variable identifier"),link:e=>zz.regexp(/\[\[([^\[\]]*?)\]\]/u,1).map((e=>function(e){let[t,r]=function(e){let t=-1;for(;(t=e.indexOf("|",t+1))>=0;)if(!(t>0&&"\\"==e[t-1]))return[e.substring(0,t).replace(/\\\|/g,"|"),e.substring(t+1)];return[e.replace(/\\\|/g,"|"),void 0]}(e);return Kz.infer(t,!1,r)}(e))).desc("file link"),embedLink:e=>zz.seqMap(zz.string("!").atMost(1),e.link,((e,t)=>(e.length>0&&(t.embed=!0),t))).desc("file link"),binaryPlusMinus:e=>zz.regexp(/\+|-/).map((e=>e)).desc("'+' or '-'"),binaryMulDiv:e=>zz.regexp(/\*|\/|%/).map((e=>e)).desc("'*' or '/' or '%'"),binaryCompareOp:e=>zz.regexp(/>=|<=|!=|>|<|=/).map((e=>e)).desc("'>=' or '<=' or '!=' or '=' or '>' or '<'"),binaryBooleanOp:e=>zz.regexp(/and|or|&|\|/i).map((e=>"and"==e.toLowerCase()?"&":"or"==e.toLowerCase()?"|":e)).desc("'and' or 'or'"),rootDate:e=>zz.seqMap(zz.regexp(/\d{4}/),zz.string("-"),zz.regexp(/\d{2}/),((e,t,r)=>Rz.fromObject({year:Number.parseInt(e),month:Number.parseInt(r)}))).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),dateShorthand:e=>zz.alt(...Object.keys(nj).sort(((e,t)=>t.length-e.length)).map(zz.string)),date:e=>function(e,...t){return zz.custom(((r,n)=>(r,n)=>{let i=e._(r,n);if(!i.status)return i;for(let e of t){let t=e(i.value)._(r,i.index);if(!t.status)return i;i=t}return i}))}(e.rootDate,(e=>zz.seqMap(zz.string("-"),zz.regexp(/\d{2}/),((t,r)=>e.set({day:Number.parseInt(r)})))),(e=>zz.seqMap(zz.string("T"),zz.regexp(/\d{2}/),((t,r)=>e.set({hour:Number.parseInt(r)})))),(e=>zz.seqMap(zz.string(":"),zz.regexp(/\d{2}/),((t,r)=>e.set({minute:Number.parseInt(r)})))),(e=>zz.seqMap(zz.string(":"),zz.regexp(/\d{2}/),((t,r)=>e.set({second:Number.parseInt(r)})))),(e=>zz.alt(zz.seqMap(zz.string("."),zz.regexp(/\d{3}/),((t,r)=>e.set({millisecond:Number.parseInt(r)}))),zz.succeed(e))),(e=>zz.alt(zz.seqMap(zz.string("+").or(zz.string("-")),zz.regexp(/\d{1,2}(:\d{2})?/),((t,r)=>e.setZone("UTC"+t+r,{keepLocalTime:!0}))),zz.seqMap(zz.string("Z"),(()=>e.setZone("utc",{keepLocalTime:!0}))),zz.seqMap(zz.string("["),zz.regexp(/[0-9A-Za-z+-\/]+/u),zz.string("]"),((t,r,n)=>e.setZone(r,{keepLocalTime:!0})))))).assert((e=>e.isValid),"valid date").desc("date in format YYYY-MM[-DDTHH-MM-SS.MS]"),datePlus:e=>zz.alt(e.dateShorthand.map((e=>nj[e]())),e.date).desc("date in format YYYY-MM[-DDTHH-MM-SS.MS] or in shorthand"),durationType:e=>zz.alt(...Object.keys(rj).sort(((e,t)=>t.length-e.length)).map(zz.string)),duration:e=>zz.seqMap(e.number,zz.optWhitespace,e.durationType,((e,t,r)=>rj[r].mapUnits((t=>t*e)))).sepBy1(zz.string(",").trim(zz.optWhitespace).or(zz.optWhitespace)).map((e=>e.reduce(((e,t)=>e.plus(t))))).desc("duration like 4hr2min"),rawNull:e=>zz.string("null"),tagSource:e=>e.tag.map((e=>Xz.tag(e))),csvSource:e=>zz.seqMap(zz.string("csv(").skip(zz.optWhitespace),e.string,zz.string(")"),((e,t,r)=>Xz.csv(t))),linkIncomingSource:e=>e.link.map((e=>Xz.link(e.path,!0))),linkOutgoingSource:e=>zz.seqMap(zz.string("outgoing(").skip(zz.optWhitespace),e.link,zz.string(")"),((e,t,r)=>Xz.link(t.path,!1))),folderSource:e=>e.string.map((e=>Xz.folder(e))),parensSource:e=>zz.seqMap(zz.string("("),zz.optWhitespace,e.source,zz.optWhitespace,zz.string(")"),((e,t,r,n,i)=>r)),negateSource:e=>zz.seqMap(zz.alt(zz.string("-"),zz.string("!")),e.atomSource,((e,t)=>Xz.negate(t))),atomSource:e=>zz.alt(e.parensSource,e.negateSource,e.linkOutgoingSource,e.linkIncomingSource,e.folderSource,e.tagSource,e.csvSource),binaryOpSource:e=>aj(e.atomSource,e.binaryBooleanOp.map((e=>e)),Xz.binaryOp),source:e=>e.binaryOpSource,variableField:e=>e.identifier.chain((e=>ij.includes(e.toUpperCase())?zz.fail("Variable fields cannot be a keyword ("+ij.join(" or ")+")"):zz.succeed(Zz.variable(e)))).desc("variable"),numberField:e=>e.number.map((e=>Zz.literal(e))).desc("number"),stringField:e=>e.string.map((e=>Zz.literal(e))).desc("string"),boolField:e=>e.bool.map((e=>Zz.literal(e))).desc("boolean"),dateField:e=>zz.seqMap(zz.string("date("),zz.optWhitespace,e.datePlus,zz.optWhitespace,zz.string(")"),((e,t,r,n,i)=>Zz.literal(r))).desc("date"),durationField:e=>zz.seqMap(zz.string("dur("),zz.optWhitespace,e.duration,zz.optWhitespace,zz.string(")"),((e,t,r,n,i)=>Zz.literal(r))).desc("duration"),nullField:e=>e.rawNull.map((e=>Zz.NULL)),linkField:e=>e.link.map((e=>Zz.literal(e))),listField:e=>e.field.sepBy(zz.string(",").trim(zz.optWhitespace)).wrap(zz.string("[").skip(zz.optWhitespace),zz.optWhitespace.then(zz.string("]"))).map((e=>Zz.list(e))).desc("list ('[1, 2, 3]')"),objectField:e=>zz.seqMap(e.identifier.or(e.string),zz.string(":").trim(zz.optWhitespace),e.field,((e,t,r)=>({name:e,value:r}))).sepBy(zz.string(",").trim(zz.optWhitespace)).wrap(zz.string("{").skip(zz.optWhitespace),zz.optWhitespace.then(zz.string("}"))).map((e=>{let t={};for(let r of e)t[r.name]=r.value;return Zz.object(t)})).desc("object ('{ a: 1, b: 2 }')"),atomInlineField:e=>zz.alt(e.date,e.duration.map((e=>jz(e))),e.string,e.tag,e.embedLink,e.bool,e.number,e.rawNull),inlineFieldList:e=>e.atomInlineField.sepBy(zz.string(",").trim(zz.optWhitespace).lookahead(e.atomInlineField)),inlineField:e=>zz.alt(zz.seqMap(e.atomInlineField,zz.string(",").trim(zz.optWhitespace),e.inlineFieldList,((e,t,r)=>[e].concat(r))),e.atomInlineField),atomField:e=>zz.alt(e.embedLink.map((e=>Zz.literal(e))),e.negatedField,e.linkField,e.listField,e.objectField,e.lambdaField,e.parensField,e.boolField,e.numberField,e.stringField,e.dateField,e.durationField,e.nullField,e.variableField),indexField:e=>zz.seqMap(e.atomField,zz.alt(e.dotPostfix,e.indexPostfix,e.functionPostfix).many(),((e,t)=>{let r=e;for(let e of t)switch(e.type){case"dot":r=Zz.index(r,Zz.literal(e.field));break;case"index":r=Zz.index(r,e.field);break;case"function":r=Zz.func(r,e.fields)}return r})),negatedField:e=>zz.seqMap(zz.string("!"),e.indexField,((e,t)=>Zz.negate(t))).desc("negated field"),parensField:e=>zz.seqMap(zz.string("("),zz.optWhitespace,e.field,zz.optWhitespace,zz.string(")"),((e,t,r,n,i)=>r)),lambdaField:e=>zz.seqMap(e.identifier.sepBy(zz.string(",").trim(zz.optWhitespace)).wrap(zz.string("(").trim(zz.optWhitespace),zz.string(")").trim(zz.optWhitespace)),zz.string("=>").trim(zz.optWhitespace),e.field,((e,t,r)=>({type:"lambda",arguments:e,value:r}))),dotPostfix:e=>zz.seqMap(zz.string("."),e.identifier,((e,t)=>({type:"dot",field:t}))),indexPostfix:e=>zz.seqMap(zz.string("["),zz.optWhitespace,e.field,zz.optWhitespace,zz.string("]"),((e,t,r,n,i)=>({type:"index",field:r}))),functionPostfix:e=>zz.seqMap(zz.string("("),zz.optWhitespace,e.field.sepBy(zz.string(",").trim(zz.optWhitespace)),zz.optWhitespace,zz.string(")"),((e,t,r,n,i)=>({type:"function",fields:r}))),binaryMulDivField:e=>aj(e.indexField,e.binaryMulDiv,Zz.binaryOp),binaryPlusMinusField:e=>aj(e.binaryMulDivField,e.binaryPlusMinus,Zz.binaryOp),binaryCompareField:e=>aj(e.binaryPlusMinusField,e.binaryCompareOp,Zz.binaryOp),binaryBooleanField:e=>aj(e.binaryCompareField,e.binaryBooleanOp,Zz.binaryOp),binaryOpField:e=>e.binaryBooleanField,field:e=>e.binaryOpField});var sj;function uj(e,t){return zz.eof.map(e).or(zz.whitespace.then(t))}!function(e){e.named=function(e,t){return{name:e,field:t}},e.sortBy=function(e,t){return{field:e,direction:t}}}(sj||(sj={})),zz.createLanguage({queryType:e=>zz.alt(zz.regexp(/TABLE|LIST|TASK|CALENDAR/i)).map((e=>e.toLowerCase())).desc("query type ('TABLE', 'LIST', 'TASK', or 'CALENDAR')"),explicitNamedField:e=>zz.seqMap(oj.field.skip(zz.whitespace),zz.regexp(/AS/i).skip(zz.whitespace),oj.identifier.or(oj.string),((e,t,r)=>sj.named(r,e))),namedField:e=>zz.alt(e.explicitNamedField,function(e){return zz.custom(((t,r)=>(t,r)=>{let n=e._(t,r);return n.status?Object.assign({},n,{value:[n.value,t.substring(r,n.index)]}):n}))}(oj.field).map((([e,t])=>sj.named(function(e){return e.split(/[\r\n]+/).map((e=>e.trim())).join("")}(t),e)))),sortField:e=>zz.seqMap(oj.field.skip(zz.optWhitespace),zz.regexp(/ASCENDING|DESCENDING|ASC|DESC/i).atMost(1),((e,t)=>{let r=0==t.length?"ascending":t[0].toLowerCase();return"desc"==r&&(r="descending"),"asc"==r&&(r="ascending"),{field:e,direction:r}})),headerClause:e=>e.queryType.chain((t=>{switch(t){case"table":return uj((()=>({type:t,fields:[],showId:!0})),zz.seqMap(zz.regexp(/WITHOUT\s+ID/i).skip(zz.optWhitespace).atMost(1),zz.sepBy(e.namedField,zz.string(",").trim(zz.optWhitespace)),((e,r)=>({type:t,fields:r,showId:0==e.length}))));case"list":return uj((()=>({type:t,format:void 0,showId:!0})),zz.seqMap(zz.regexp(/WITHOUT\s+ID/i).skip(zz.optWhitespace).atMost(1),oj.field.atMost(1),((e,r)=>({type:t,format:1==r.length?r[0]:void 0,showId:0==e.length}))));case"task":return zz.succeed({type:t});case"calendar":return zz.whitespace.then(zz.seqMap(e.namedField,(e=>({type:t,showId:!0,field:e}))));default:return zz.fail(`Unrecognized query type '${t}'`)}})).desc("TABLE or LIST or TASK or CALENDAR"),fromClause:e=>zz.seqMap(zz.regexp(/FROM/i),zz.whitespace,oj.source,((e,t,r)=>r)),whereClause:e=>zz.seqMap(zz.regexp(/WHERE/i),zz.whitespace,oj.field,((e,t,r)=>({type:"where",clause:r}))).desc("WHERE "),sortByClause:e=>zz.seqMap(zz.regexp(/SORT/i),zz.whitespace,e.sortField.sepBy1(zz.string(",").trim(zz.optWhitespace)),((e,t,r)=>({type:"sort",fields:r}))).desc("SORT field [ASC/DESC]"),limitClause:e=>zz.seqMap(zz.regexp(/LIMIT/i),zz.whitespace,oj.field,((e,t,r)=>({type:"limit",amount:r}))).desc("LIMIT "),flattenClause:e=>zz.seqMap(zz.regexp(/FLATTEN/i).skip(zz.whitespace),e.namedField,((e,t)=>({type:"flatten",field:t}))).desc("FLATTEN [AS ]"),groupByClause:e=>zz.seqMap(zz.regexp(/GROUP BY/i).skip(zz.whitespace),e.namedField,((e,t)=>({type:"group",field:t}))).desc("GROUP BY [AS ]"),clause:e=>zz.alt(e.fromClause,e.whereClause,e.sortByClause,e.limitClause,e.groupByClause,e.flattenClause),query:e=>zz.seqMap(e.headerClause.trim(zz.optWhitespace),e.fromClause.trim(zz.optWhitespace).atMost(1),e.clause.trim(zz.optWhitespace).many(),((e,t,r)=>({header:e,source:0==t.length?Xz.folder(""):t[0],operations:r,settings:Bz})))});var lj=e=>{var t;return e?null===(t=e.plugins.plugins.dataview)||void 0===t?void 0:t.api:window.DataviewAPI};const cj="pdf-annotator",hj="annotation-target",dj="annotation-target-type",fj="https://arxiv.org/pdf/1702.08734.pdf",pj="https://cdn.hypothes.is/demos/epub/content/moby-dick/book.epub";function mj(){throw new Error("setTimeout has not been defined")}function gj(){throw new Error("clearTimeout has not been defined")}var vj=mj,Dj=gj;function yj(e){if(vj===setTimeout)return setTimeout(e,0);if((vj===mj||!vj)&&setTimeout)return vj=setTimeout,setTimeout(e,0);try{return vj(e,0)}catch(t){try{return vj.call(null,e,0)}catch(t){return vj.call(this,e,0)}}}"function"==typeof MB.setTimeout&&(vj=setTimeout),"function"==typeof MB.clearTimeout&&(Dj=clearTimeout);var Ej,bj=[],wj=!1,_j=-1;function Tj(){wj&&Ej&&(wj=!1,Ej.length?bj=Ej.concat(bj):_j=-1,bj.length&&Cj())}function Cj(){if(!wj){var e=yj(Tj);wj=!0;for(var t=bj.length;t;){for(Ej=bj,bj=[];++_j1)for(var r=1;r{t(e)||r.push(e)})),r}function yH(e,t){const r=[];return e.forEach((e=>{t(e)&&r.push(e)})),r}function EH(){return"undefined"!=typeof window?window:"object"==typeof Uj&&"function"==typeof require&&"object"==typeof MB?MB:this}var bH=new class{constructor(){this.urlMap={}}attachWebSocket(e,t){const r=this.urlMap[t];if(r&&r.server&&-1===r.websockets.indexOf(e))return r.websockets.push(e),r.server}attachServer(e,t){if(!this.urlMap[t])return this.urlMap[t]={server:e,websockets:[]},e}serverLookup(e){const t=this.urlMap[e];return t?t.server:void 0}websocketsLookup(e){const t=this.urlMap[e];return t?t.websockets:[]}removeServer(e){delete this.urlMap[e]}removeWebSocket(e,t){const r=this.urlMap[t];r&&(r.websockets=DH(r.websockets,(t=>t===e)))}};class wH{constructor(){this.listeners={}}addEventListener(e,t,r){"function"==typeof t&&(Array.isArray(this.listeners[e])||(this.listeners[e]=[]),0===yH(this.listeners[e],(e=>e===t)).length&&this.listeners[e].push(t))}removeEventListener(e,t,r){const n=this.listeners[e];this.listeners[e]=DH(n,(e=>e===t))}dispatchEvent(e,...t){const r=e.type,n=this.listeners[r];return!!Array.isArray(n)&&(n.forEach((r=>{t.length>0?r.apply(this,t):r.call(this,e)})),!0)}}function _H(e,t){setImmediate((t=>e.call(t)),t)}function TH(e){void 0!==Uj&&console.error(e)}class CH extends wH{constructor(e,t=""){if(super(),this.binaryType="blob",this.CLOSED=CH.CLOSED,this.CLOSING=CH.CLOSING,this.CONNECTING=CH.CONNECTING,this.OPEN=CH.OPEN,this._bufferedAmount=0,this._extensions="",this._protocol="",this._readyState=CH.CONNECTING,this._url="",this._onclose=null,this._onerror=null,this._onmessage=null,this._onopen=null,!e)throw new TypeError(`${hH} 1 argument required, but only 0 present.`);const r=new lH(e);if("ws:"!==r.protocol&&"wss:"!==r.protocol)throw new Error("SyntaxError: url scheme incorrect");if(r.hash)throw new Error("SyntaxError: url fragment exists");r.pathname||r.set("pathname","/"),this._url=r.toString();let n=[];"string"==typeof t?(this._protocol=t,n=[t]):Array.isArray(t)&&t.length>0&&(this._protocol=t[0],n=[...t]);const i=bH.attachWebSocket(this,this.url);if(i)if("function"!=typeof i.options.verifyClient||i.options.verifyClient()){if("function"==typeof i.options.selectProtocol){const e=i.options.selectProtocol(n),t=""!==e,r=-1!==n.indexOf(e);if(t&&!r)return void _H((function(){this._readyState=CH.CLOSED,bH.removeWebSocket(this,this.url),this.dispatchEvent(gH({type:"error",target:this})),this.dispatchEvent(vH({type:"close",target:this,code:cH})),TH(`WebSocket connection to '${this.url}' failed: Invalid Sub-Protocol`)}),this);this._protocol=e}_H((function(){this._readyState=CH.OPEN,this.dispatchEvent(gH({type:"open",target:this})),i.dispatchSocketEvent("connection",this)}),this)}else _H((function(){this._readyState=CH.CLOSED,bH.removeWebSocket(this,this.url),this.dispatchEvent(gH({type:"error",target:this})),this.dispatchEvent(vH({type:"close",target:this,code:cH})),TH(`WebSocket connection to '${this.url}' failed: HTTP Authentication failed; no valid credentials available`)}),this);else _H((function(){this._readyState=CH.CLOSED,this.dispatchEvent(gH({type:"error",target:this})),this.dispatchEvent(vH({type:"close",target:this,code:cH})),TH(`WebSocket connection to '${this.url}' failed`)}),this)}get bufferedAmount(){return this._bufferedAmount}get extensions(){return this._extensions}get protocol(){return this._protocol}get readyState(){return this._readyState}get url(){return this._url}get onclose(){return this._onclose}set onclose(e){this._onclose&&(this.removeEventListener("close",this._onclose),this._onclose=null),e&&(this._onclose=e,this.addEventListener("close",e))}get onerror(){return this._onerror}set onerror(e){this._onerror&&(this.removeEventListener("error",this._onerror),this._onerror=null),e&&(this._onerror=e,this.addEventListener("error",e))}get onmessage(){return this._onmessage}set onmessage(e){this._onmessage&&(this.removeEventListener("message",this._onmessage),this._onmessage=null),e&&(this._onmessage=e,this.addEventListener("message",e))}get onopen(){return this._onopen}set onopen(e){this._onopen&&(this.removeEventListener("open",this._onopen),this._onopen=null),e&&(this._onopen=e,this.addEventListener("open",e))}send(e){if(this.readyState===CH.CONNECTING)throw bH.removeWebSocket(this,this.url),new Error("InvalidStateError");if(this.readyState===CH.CLOSING||this.readyState===CH.CLOSED)return void(this._bufferedAmount+=e.length);const t=bH.serverLookup(this.url);t&&_H((()=>{t.dispatchSocketEvent("message",this,e)}),t)}close(e,t){if(e&&!(1e3===e||e>=3e3&&e<5e3))throw new Error("InvalidAccessError: close code out of user configurable range");this.readyState!==CH.CLOSING&&this.readyState!==CH.CLOSED&&(this._readyState=CH.CLOSING,_H((function(){e||(e=1e3),this._readyState=CH.CLOSED,bH.removeWebSocket(this,this.url);const r=vH({type:"close",target:this,code:e,reason:t});this.dispatchEvent(r);const n=bH.serverLookup(this.url);n&&n.dispatchSocketEvent("close",this)}),this))}_moveToState(e){this._readyState=e}}CH.CONNECTING=0,CH.OPEN=1,CH.CLOSING=2,CH.CLOSED=3;class AH{constructor(e,t={}){this.listeners=new Map;const r=new lH(e);r.pathname||r.set("pathname","/"),this.url=r.toString(),this.originalWebSocket=null;bH.attachServer(this,this.url)||this.dispatchError(new Error("A mock server is already listening on this url")),void 0===t.mockGlobal&&(t.mockGlobal=!0),this.options=t,this.start()}start(){if(!this.options.mockGlobal)return;const e=EH();e.WebSocket&&(this.originalWebSocket=e.WebSocket),e.WebSocket=CH}stop(e){if(this.options.mockGlobal){const e=EH();this.originalWebSocket?e.WebSocket=this.originalWebSocket:delete e.WebSocket,this.originalWebSocket=null}bH.removeServer(this.url),"function"==typeof e&&e()}on(e,t){if("function"!=typeof t)return;const r=this.listeners.get(e)||[];0===yH(r,(e=>e===t)).length&&(r.push(t),this.listeners.set(e,r))}dispatchError(e){const t=this.listeners.get("error");if(t)for(const r of t){r(e)}}dispatchSocketEvent(e,t,r){const n=this.listeners.get(e);if(n)for(const i of n)switch(e){case"close":i(t);break;case"connection":{const e=i;if(!t)throw new Error("no socket");e(t);break}case"message":{const e=i;if(!t)throw new Error("no socket");if(!r)throw new Error("no data");e(t,r);break}}}send(e,t={}){this.emit("message",e,t)}emit(e,t,r={}){let n=r.websockets;n||(n=bH.websocketsLookup(this.url)),("object"!=typeof r||arguments.length>3)&&(t=Array.prototype.slice.call(arguments,1,arguments.length)),n.forEach((r=>{r.dispatchEvent(function(e){const{type:t,origin:r,data:n,target:i}=e,a=new mH(t,{data:n,origin:r});return i&&a._setTarget(i),a}({data:t,origin:this.url,target:r,type:e}))}))}close(e={}){const{code:t,reason:r,wasClean:n}=e,i=bH.websocketsLookup(this.url);bH.removeServer(this.url),i.forEach((e=>{e._moveToState(CH.CLOSED),e.dispatchEvent(vH({code:t||cH,reason:r||"",target:e,type:"close",wasClean:n}))})),this.dispatchSocketEvent("close")}clients(){return bH.websocketsLookup(this.url)}simulate(e){const t=bH.websocketsLookup(this.url);"error"===e&&t.forEach((e=>{e._moveToState(CH.CLOSED),e.dispatchEvent(gH({type:"error"}))}))}}function SH(...e){return e.reduce(((e,t)=>new URL(t,e)))}var xH=({fetch:e,getUrl:t})=>r=>{var n;const i=(t,r)=>e(t,r);let a=[];null===(n=r.webSocketSetup)||void 0===n||n.call(r,(e=>{const t=new AH(e,{mockGlobal:!1});return a.push(t),t}));const o=Vj.useRef(null),s=new WeakSet,u=new WeakMap;function l(e,r){const n=SH(r,e);return t(n)}function c(e,t){return Wj(this,void 0,void 0,(function*(){const r=(new DOMParser).parseFromString(e,"text/html");return t=SH(t,r.baseURI.startsWith(window.location.origin)?t:r.baseURI),function(e,t){for(const r of e.getElementsByTagName("img")){const e=r.getAttribute("src");e&&r.setAttribute("src",l(e,t))}}(r,t),function(e,t){for(const r of e.getElementsByTagName("style"))r.innerHTML=h(r.innerHTML,t)}(r,t),yield function(e,t){return Wj(this,void 0,void 0,(function*(){const r=[...e.getElementsByTagName("link")];for(const e of r)yield f(e,t)}))}(r,t),function(e,t){for(const r of e.getElementsByTagName("script")){const e=r.getAttribute("src");e&&(r.setAttribute("src",l(e,t)),r.setAttribute("patched-src",e))}}(r,t),function(e){for(const t of e.getElementsByTagName("iframe")){const e=t.getAttribute("src");e&&(t.removeAttribute("src"),t.setAttribute("patched-src",e))}}(r),{html:`${r.documentElement.outerHTML}`,context:t.href||t}}))}function h(e,t){return e.replaceAll(/url\(["']?(.*?)["']?\)/gm,((e,r)=>`url("${l(r,t)}")`))}function d(e){if(!e)return null;const t=e.getAttribute("patched-src");return t||d(function(e){const t=(e.defaultView||e.parentWindow).parent.document.getElementsByTagName("iframe");for(let r=t.length;r-- >0;){const n=t[r];try{if((n.contentDocument||n.contentWindow.document)===e)return n}catch(e){}}}(e.ownerDocument))}function f(e,t){return Wj(this,void 0,void 0,(function*(){if("stylesheet"===e.getAttribute("rel")){const r=e.getAttribute("href"),n=SH(t,r);try{const t=yield(yield i(n.href,{headers:{Accept:"text/css,*/*;q=0.1","Accept-Encoding":"gzip, deflate, br"}})).text();e.outerHTML=``}catch(e){}}else{const r=e.getAttribute("href");r&&(e.setAttribute("href",l(r,t)),e.setAttribute("patched-href",r))}}))}function p(e,t){if(null!=e)return Object.hasOwnProperty.call(e,t)?Object.getOwnPropertyDescriptor(e,t):p(Object.getPrototypeOf(e),t)}function m(e,t,r){const{get:n,set:i}=p(t,e);Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get(){return n.call(this)},set(n){i.call(this,l(n,r)),t.setAttribute(`patched-${e}`,n)}});const a=t.setAttribute.bind(t);t.setAttribute=(t,n)=>{t.toLowerCase()==e.toLowerCase()?(a(t,l(n,r)),a(`patched-${t}`,n)):a(t,n)};const o=t.setAttributeNS.bind(t);t.setAttributeNS=(t,n,i)=>{n.toLowerCase()==e.toLowerCase()?(o(t,n,l(i,r)),o(t,`patched-${n}`,i)):o(t,n,i)};const s=t.setAttributeNode.bind(t);t.setAttributeNode=n=>{if(n.name.toLowerCase()==e.toLowerCase()){const e=t.ownerDocument.createAttribute(`patched-${n.name}`);e.value=n.value;const i=t.ownerDocument.createAttribute(n.name);return i.value=l(n.value,r),s(e),s(i)}return s(n)};const u=t.setAttributeNodeNS.bind(t);t.setAttributeNodeNS=n=>{if(n.name.toLowerCase()==e.toLowerCase()){const e=t.ownerDocument.createAttributeNS(n.namespaceURI,`patched-${n.name}`);e.value=n.value;const i=t.ownerDocument.createAttributeNS(n.namespaceURI,n.name);return i.value=l(n.value,r),u(e),u(i)}return u(n)}}function g(t,r){return class extends Worker{constructor(n,i){const a=l(n,r),o=(()=>Wj(this,void 0,void 0,(function*(){const r=yield e(a),n=function(e){return new Worker("data:application/javascript,"+encodeURIComponent(e))}(`\n fetchCallbacks = {};\n fetch=async (resource, init)=>{\n const id = \`\${Math.random()}\`.substr(2);\n const promise = new Promise(res=>{fetchCallbacks[id]=res;});\n self.postMessage({isFetch:true, id, resource, init});\n return await promise;\n };\n self.addEventListener("message", function(event) {\n if(event.data.isFetchResult) {\n fetchCallbacks[event.data.id](new Response(event.data.blob, event.data.init));\n fetchCallbacks[event.data.id] = null;\n }\n });\n ${yield r.text()}`);return n.addEventListener("message",(function(e){return Wj(this,void 0,void 0,(function*(){if(e.data.isFetch){const r=yield t.contentWindow.fetch(e.data.resource,e.data.init),i=yield r.blob();n.postMessage({isFetchResult:!0,id:e.data.id,blob:i,init:{status:r.status,statusText:r.statusText,headers:r.headers}})}}))})),n})))();return super(a,i),new Proxy(this,{get(e,t,r){const n=e[t];return"function"!=typeof n?n:function(...e){return Wj(this,void 0,void 0,(function*(){return(yield o)[t](...e)}))}}})}}}function v(e,t){const n=(e,r)=>i("string"==typeof e?SH(t,e).href:Object.assign(Object.assign({},e),{url:SH(t,e.url).href}),r);let a=n;r.fetchProxy&&(a=(e,i)=>r.fetchProxy({requestInfo:e,init:i,contextUrl:t,base:n}));const o=function(){function e(){this.object=new window.XMLHttpRequest;const e=this;this.object.onabort=function(t){"function"==typeof e.onabort&&e.onabort(t)},this.object.onerror=function(t){"function"==typeof e.onerror&&e.onerror(t)},this.object.onload=function(t){"function"==typeof e.onload&&e.onload(t)},this.object.onloadend=function(t){"function"==typeof e.onloadend&&e.onloadend(t)},this.object.onloadstart=function(t){"function"==typeof e.onloadstart&&e.onloadstart(t)},this.object.onprogress=function(t){"function"==typeof e.onprogress&&e.onprogress(t)},this.object.ontimeout=function(t){"function"==typeof e.ontimeout&&e.ontimeout(t)},this.object.onreadystatechange=function(t){e.readyState=e.object.readyState,e.status=e.object.status,e.statusText=e.object.statusText,e.response=e.object.response,""===e.responseType&&(e.responseText=e.object.responseText,e.responseXML=e.object.responseXML),e.responseURL=e.object.responseURL,"function"==typeof e.onreadystatechange&&e.onreadystatechange(t)},this.onabort=null,this.onerror=null,this.onload=null,this.onloadend=null,this.onloadstart=null,this.onprogress=null,this.onreadystatechange=null,this.ontimeout=null,this.readyState=XMLHttpRequest.UNSENT,this.responseHeaders={},this.response="",this.responseText="",this.responseType="",this.responseURL="",this.responseXML="",this.status=0,this.statusText="",this.timeout=0,this.upload=null,this.withCredentials=!1}return e.prototype={method:"",url:"",addEventListener:function(e,t){return this[`on${e}`]=t},open:function(e,t,r,n,i){this.method=e,this.url=t,this.object.responseType=this.responseType,this.object.open(e,t,"boolean"!=typeof r||r,void 0===n?null:n,void 0===i?null:i)},send:function(t){this.object.responseType=this.responseType;let r=!1;const n=this;e.handlers.forEach((function(e){if(("string"==typeof e.url&&e.url===n.url||e.url instanceof RegExp&&e.url.test(n.url))&&("string"!=typeof e.method||e.method.toUpperCase()===n.method.toUpperCase())){r=!0;const i=function(){return Wj(this,void 0,void 0,(function*(){"function"==typeof n.onloadstart&&n.onloadstart();let r=[];e.url instanceof RegExp?(r=e.url.exec(n.url),r.push(t)):r=[n.url,t];let i=null;if("function"==typeof e.headers?i=yield e.headers.apply(null,[n,...r]):"object"==typeof e.headers&&(i=e.headers),i&&"object"==typeof i)for(const e in i)i.hasOwnProperty(e)&&(n.responseHeaders[e.toLowerCase()]=i[e]);if(n.status=e.status,n.statusText=e.statusText,n.readyState=XMLHttpRequest.HEADERS_RECEIVED,"function"==typeof n.onreadystatechange&&n.onreadystatechange(),n.readyState=XMLHttpRequest.LOADING,"function"==typeof n.onreadystatechange&&n.onreadystatechange(),"string"==typeof e.response||"function"==typeof e.response){let t="";t="string"==typeof e.response?e.response:yield e.response.apply(null,[n,...r]),n.response=t,""!==n.responseType&&"text"!==n.responseType||(n.responseText=n.response),"document"===n.responseType&&(n.responseXML=n.response),n.readyState=XMLHttpRequest.DONE;const i={target:n};"function"==typeof n.onreadystatechange&&n.onreadystatechange(i),"function"==typeof n.onload&&n.onload(i),"function"==typeof n.onloadend&&n.onloadend(i)}else if("string"==typeof e.proxy||"function"==typeof e.proxy){let t="";if(t="string"==typeof e.proxy?e.proxy:yield e.proxy.apply(null,r),"string"==typeof t&&t.length>0){const r=new XMLHttpRequest;r.onreadystatechange=function(){r.readyState===XMLHttpRequest.DONE&&200===r.status&&(n.status=e.status,n.statusText=e.statusText,n.response=r.response,n.readyState=XMLHttpRequest.DONE,""!==n.responseType&&"text"!==n.responseType||(n.responseText=r.response),"document"===n.responseType&&(n.responseXML=r.response),n.readyState=XMLHttpRequest.DONE,"function"==typeof n.onreadystatechange&&n.onreadystatechange(),"function"==typeof n.onload&&n.onload(),"function"==typeof n.onloadend&&n.onloadend())},r.open("GET",t),r.send()}}}))};"number"==typeof e.responseTime?setTimeout(i,e.responseTime):"object"==typeof e.responseTime&&2===e.responseTime.length?setTimeout(i,Math.random()*(e.responseTime[1]-e.responseTime[0])+e.responseTime[0]):i()}})),r||this.object.send(t)},abort:function(){this.object.abort()},setRequestHeader:function(e,t){this.object.setRequestHeader(e,t)},getResponseHeader:function(e){return this.responseHeaders.hasOwnProperty(e.toLowerCase())?this.responseHeaders[e.toLowerCase()]:this.object.getResponseHeader(e)},getAllResponseHeaders:function(){return Object.entries(this.responseHeaders).map((e=>e.join(": "))).join("\n")},overrideMimeType:function(e){this.object.overrideMimeType(e)}},e.prototype.constructor=e,e.handlers=[],e.addHandler=function(t){e.handlers.push(t)},e.UNSENT=XMLHttpRequest.UNSENT,e.OPENED=XMLHttpRequest.OPENED,e.LOADING=XMLHttpRequest.LOADING,e.HEADERS_RECEIVED=XMLHttpRequest.HEADERS_RECEIVED,e.DONE=XMLHttpRequest.DONE,e}();o.addHandler({url:/.*/,headers:function(e,t,r){return Wj(this,void 0,void 0,(function*(){const n=yield a(t,Object.assign({method:e.method},r?{body:r}:{}));return e._tmp=e._tmp||{},"arraybuffer"==e.responseType?e._tmp.response=yield n.arrayBuffer():e._tmp.response=yield n.text(),Object.fromEntries(n.headers.entries())}))},status:200,statusText:"OK",response:function(e,t,r){var n;return Wj(this,void 0,void 0,(function*(){return null===(n=null==e?void 0:e._tmp)||void 0===n?void 0:n.response}))}}),e.contentWindow.XMLHttpRequest=o}function D(e){return Wj(this,void 0,void 0,(function*(){s.has(e)||(s.add(e),function(e){if(!e.shadowRoot)return;const t=e.shadowRoot.getRootNode();if(!T.has(t)){const e=new MutationObserver(_);e.observe(t,{childList:!0,subtree:!0,attributes:!0}),T.set(t,e)}E(t.querySelectorAll("iframe")),b([...t.querySelectorAll("*")].filter((e=>e.shadowRoot)))}(e))}))}function y(e){return Wj(this,void 0,void 0,(function*(){if(!s.has(e)||e.getAttribute("srcDoc")&&e.getAttribute("srcDoc")!=u.get(e)){s.add(e);const t=e.getAttribute("src")||e.getAttribute("patched-src");function n(t){return Wj(this,void 0,void 0,(function*(){let n,a;t?(e.setAttribute("patched-src",t),e.removeAttribute("src"),n=function(e){const t=new URL(e).href;return r.proxy(t)}(t),a=yield(yield i(n,{headers:{Accept:"text/html,application/xhtml+xml,application/xml;q=0.9,image/avif,image/webp,*/*;q=0.8","Accept-Encoding":"gzip, deflate, br"}})).text()):(t=d(e),a=e.getAttribute("srcDoc"),u.set(e,a));const{html:o,context:s}=yield c(a,t);!function(e,t){if(r.tagPatchStrategy){if("function"==typeof r.tagPatchStrategy)return r.tagPatchStrategy(e,t);if("createEl"==r.tagPatchStrategy){if(!e.contentWindow)return;const n=e.contentWindow.document,i=n.createElement.bind(n),a=n.createElementNS.bind(n),o=(e,r)=>{switch(e.toLowerCase()){case"img":case"script":m("src",r,t);break;case"link":m("href",r,t)}return r};n.createElement=e=>{const t=i(e);return o(e,t)},n.createElementNS=(e,t)=>{const r=a(e,t);return o(t,r)}}if("prototype"==r.tagPatchStrategy){function s(e,n){const i=Symbol();e[i]=e.getAttribute,e.getAttribute=function(e){return n.has(e.toLowerCase())&&this[i](`patched-${e}`)||this[i](e)};const a=Symbol();e[a]=e.getAttributeNS,e.getAttributeNS=function(e,t){return n.has(e.toLowerCase())&&this[a](`patched-${e}`,t)||this[a](e,t)};const o=Symbol();e[o]=e.getAttributeNode,e.getAttributeNode=function(e){return n.has(e.toLowerCase())&&this[o](`patched-${e}`)||this[o](e)};const s=Symbol();e[s]=e.getAttributeNodeNS,e.getAttributeNodeNS=function(e,t){return n.has(e.toLowerCase())&&this[s](`patched-${e}`,t)||this[s](e,t)};const u=Symbol();e[u]=e.setAttribute,e.setAttribute=function(e,i){var a;if(n.has(e.toLowerCase())){const n=l(i,t);null===(a=r.onAttributeSet)||void 0===a||a.call(r,this,e,i,n),this[u](e,n),this[u](`patched-${e}`,i)}else this[u](e,i)};const c=Symbol();e[c]=e.setAttributeNS,e.setAttributeNS=function(e,i,a){var o;if(n.has(i.toLowerCase())){const n=l(a,t);null===(o=r.onAttributeSet)||void 0===o||o.call(r,this,i,a,n),this[c](e,i,n),this[c](e,`patched-${i}`,a)}else this[c](e,i,a)};const h=Symbol();e[h]=e.setAttributeNode,e.setAttributeNode=function(e){var i;if(n.has(e.name.toLowerCase())){const n=l(e.value,t);null===(i=r.onAttributeSet)||void 0===i||i.call(r,this,e.name,e.value,n);const a=this.ownerDocument.createAttribute(`patched-${e.name}`);a.value=e.value;const o=this.ownerDocument.createAttribute(e.name);return o.value=n,this[h](a),this[h](o)}return this[h](e)};const d=Symbol();e[d]=e.setAttributeNodeNS,e.setAttributeNodeNS=function(e){var i;if(n.has(e.name.toLowerCase())){const n=l(e.value,t);null===(i=r.onAttributeSet)||void 0===i||i.call(r,this,e.name,e.value,n);const a=this.ownerDocument.createAttributeNS(e.namespaceURI,`patched-${e.name}`);a.value=e.value;const o=this.ownerDocument.createAttributeNS(e.namespaceURI,e.name);return o.value=n,this[d](a),this[d](o)}return this[d](e)};for(const t of n)Object.defineProperty(e,t,{configurable:!0,enumerable:!0,get(){return this.getAttribute(t)},set(e){return this.setAttribute(t,e)}})}const u=e.contentWindow;s(u.HTMLLinkElement.prototype,new Set(["href"])),s(u.HTMLScriptElement.prototype,new Set(["src"])),s(u.HTMLImageElement.prototype,new Set(["src"]))}}}(e,s),function(e,t){if(r.onMessagePatchStrategy){if("function"==typeof r.onMessagePatchStrategy)return r.onMessagePatchStrategy(e,t);if("patchedOriginClone"==r.onMessagePatchStrategy){const r=e.contentWindow.EventTarget.prototype,n=new WeakMap,i=r.addEventListener;r.addEventListener=function(e,r,a){if("message"==e){const o=e=>{if(null==r)return;let n=e.origin;try{n=new URL(t).origin}catch(e){}return e=new e.constructor(e.type,new Proxy(e,{get:(e,t)=>"origin"==t?n:e[t]})),"handleEvent"in r?r.handleEvent(e):r(e)};return n.set(r,o),i.apply(this,[e,o,a])}return i.apply(this,[e,r,a])};const a=r.removeEventListener;r.removeEventListener=function(e,t,r){if("message"==e){const i=n.get(t);return a.apply(this,[e,i,r])}return a.apply(this,[e,t,r])}}}}(e,s),function(e){e.contentWindow.ArrayBuffer=ArrayBuffer}(e),function(e){if(!r.postMessagePatchStrategy)return;if(!e.contentWindow)return;const t=e.contentWindow;if("function"==typeof r.postMessagePatchStrategy)return r.postMessagePatchStrategy(e);if("target"==r.postMessagePatchStrategy)return t.eval('\n const _postMessage = window.postMessage;\n window.postMessage = function(message, targetOrigin, transfer) {\n return _postMessage.apply(this, [message, "*", transfer]);\n }\n ');if("top"==r.postMessagePatchStrategy){const e=t.postMessage.bind(t);t.postMessage=function(...t){return t[1]="*",e(...t)}}}(e),function(e,t){const n=(e,r)=>i("string"==typeof e?SH(t,e).href:Object.assign(Object.assign({},e),{url:SH(t,e.url).href}),r);r.fetchProxy?e.contentWindow.fetch=(e,i)=>r.fetchProxy({requestInfo:e,init:i,contextUrl:t,base:n}):e.contentWindow.fetch=n}(e,s),function(e){e.contentWindow.console=new Proxy({},{get:()=>()=>null})}(e),function(e,t){e.contentWindow.Worker=g(e,t)}(e,s),v(e,s),function(e){e.contentWindow.WebSocket=CH}(e),A(e,o),w(e),e.setAttribute("patched","true"),yield r.onIframePatch(e)}))}yield n(t);const a=e.setAttribute.bind(e);e.setAttribute=(e,t)=>{"src"==e?n(t):a(e,t)};const o=e.setAttributeNS.bind(e);e.setAttributeNS=(e,t,r)=>{"src"==t?n(r):o(e,t,r)}}}))}function E(e){[...e].forEach(y)}function b(e){[...e].forEach(D)}function w(e){e.addEventListener("load",(function(e){C(e)})),C(e)}function _(e){const t=e.map((e=>e.target)).filter((e=>"IFRAME"==e.tagName));t.length>0&&E(t);const r=e.map((e=>e.target)).concat(e.flatMap((e=>[...e.addedNodes]))),n=r.filter((e=>e.shadowRoot));n.length>0&&b(n);const i=r.filter((e=>"LINK"==e.tagName));if(i>0){const e=d(i[0]);i.forEach((t=>f(t,e)))}}const T=new WeakMap;function C(e){if(!e.contentWindow)return;const t=e.getAttribute("patched-src");if(t){const r=new URL(t);e.contentWindow.location.hash=r.hash}const r=e.contentWindow.document.documentElement;if(function(e){const t=e.contentWindow.document,r=t.querySelector.bind(t);t.querySelector=e=>r(e.replaceAll("href","patched-href").replaceAll("src","patched-src"))}(e),!T.has(r)){const e=new MutationObserver(_);e.observe(r,{childList:!0,subtree:!0,attributes:!0}),T.set(r,e)}E(r.getElementsByTagName("iframe")),b([...r.getElementsByTagName("*")].filter((e=>e.shadowRoot)))}function A(e,t){const n=e.contentWindow.document;r.htmlPostProcessFunction&&(t=r.htmlPostProcessFunction(t)),n.open("text/html","replace"),n.write(t),n.close()}return Vj.useEffect((()=>{const e=o.current;if(o.current)return function(e,t){A(e,t),w(e)}(e,` + Buy Me a Coffee at ko-fi.com + `,by(this.plugin,Or,r),r.createEl("hr"),vy(this.plugin,Or,r),r.createEl("hr"),xy(this.plugin,Or,r),r.createEl("hr"),wy(this.plugin,Or,r,this.display),r.createEl("hr"),Cy(this.plugin,Or,r),r.createEl("hr"),Ny(this.plugin,Or,r),r.createEl("hr"),new kc.Setting(r).setName("Debugging").setHeading(),new kc.Setting(r).setName("Enable verbose logging").setDesc('Adds a LOT of logs for debugging purposes. You also need to enable "Verbose" logging in the console to see these logs.').addToggle(a=>a.setValue(Or.verboseLogging).onChange(async o=>{Or.verboseLogging=o,wm(o),await ke(this.plugin)}))}}});function i0(e){var t=g6();we(e,t)}var g6,ky=v(()=>{Wn();yi();Pn();g6=Le('')});function Rc(e,t){let r=ze(t,"id",8),n=ze(t,"selected",8,!1),i=ze(t,"glyph",8,!1),a=ze(t,"cssClass",8,"");var o=_6();let l;var d=xe(o);{var p=E=>{i0(E,{})};tt(d,E=>{i()&&E(p)})}var g=Ye(d,2);zi(g,t,"default",{},null),Te(o),rr(E=>{Ki(o,"data-result-id",r()),l=Yi(o,1,`suggestion-item omnisearch-result ${a()??""}`,null,l,E)},[()=>({"is-selected":n()})],Br),pr("mousemove",o,function(E){Jr.call(this,t,E)}),pr("click",o,function(E){Jr.call(this,t,E)}),pr("keypress",o,function(E){Jr.call(this,t,E)}),pr("auxclick",o,function(E){Jr.call(this,t,E)}),we(e,o)}var _6,a0=v(()=>{Wn();yi();Pn();ky();_6=Le("

")});function ad(e){return e.replaceAll("&","&").replaceAll("<","<").replaceAll(">",">").replaceAll('"',""").replaceAll("'","'")}var Ry,id,s0=v(()=>{en();Nr();Ry=require("obsidian");Oc();id=class{constructor(t){this.plugin=t}highlightText(t,r){let n=`suggestion-highlight omnisearch-highlight ${this.plugin.settings.highlight?"omnisearch-default-highlight":""}`;if(!r.length)return t;try{return t.replace(new RegExp(`(${r.map(i=>Nc(i.match)).join("|")})`,"giu"),`$1`)}catch(i){return console.error("Omnisearch - Error in highlightText()",i),t}}stringsToRegex(t){if(!t.length)return/^$/g;t.sort((n,i)=>i.length-n.length);let r=`(${t.map(n=>`\\b${Nc(n)}\\b|${Nc(n)}`).join("|")})`;return new RegExp(`${r}`,"gui")}getMatches(t,r,n){r=r.map(ad);let i=this.stringsToRegex(r),a=t;this.plugin.settings.ignoreDiacritics&&(t=Wi(t,this.plugin.settings.ignoreArabicDiacritics));let o=new Date().getTime(),l=null,d=[],p=0;for(;(l=i.exec(t))!==null;){if(++p>=100||new Date().getTime()-o>50){Gi("Stopped getMatches at",p,"results");break}let g=l.index,E=g+l[0].length,_=a.substring(g,E).trim();_&&l.index>=0&&d.push({match:_,offset:l.index})}if(n&&(n.query.text.length>1||n.getExactTerms().length>0)){let g=t.indexOf(n.getBestStringForExcerpt());g>-1&&d.find(E=>E.offset===g)&&d.unshift({offset:g,match:n.getBestStringForExcerpt()})}return d}makeExcerpt(t,r){let n=this.plugin.settings;try{let i=r??-1,a=Math.max(0,i-iv),o=Math.min(t.length,i+uc);if(i>-1?t=(a>0?"\u2026":"")+t.slice(a,o).trim()+(op).join(` +`);let d=t.lastIndexOf(` +`,i-a);d>0&&(t=t.slice(d))}return t=ad(t),n.renderLineReturnInExcerpts&&(t=t.trim().replaceAll(` +`,"
")),t}catch(i){return new Ry.Notice("Omnisearch - Error while creating excerpt, see developer console"),console.error("Omnisearch - Error while creating excerpt"),console.error(i),""}}}});async function Ly(e){let t=e.app;if(!t.plugins.getPlugin("obsidian-icon-folder"))return{};let n=`${t.vault.configDir}/plugins/obsidian-icon-folder/data.json`;try{let i=await t.vault.adapter.read(n),a=JSON.parse(i),o={};for(let l in a){let d=(0,Vo.normalizePath)(l);o[d]=a[l]}return o}catch(i){return Gi("Failed to read data.json:",i),{}}}async function Py(e){let t={Li:"lucide-icons"},r="icons",n=e.app,i=n.plugins.getPlugin("obsidian-icon-folder");if(i){r=i.settings?.iconPacksPath||"icons";let o=`${n.vault.configDir}/${r}`;try{let l=await n.vault.adapter.list(o);if(l.folders&&l.folders.length>0)for(let d of l.folders){let p=d.split("/"),g=p[p.length-1],E=b6(g);t[E]=g}}catch(l){Gi("Failed to list icon packs:",l)}}return{prefixToIconPack:t,iconsPath:r}}function b6(e){if(e.includes("-")){let t=e.split("-"),r=t[0].charAt(0).toUpperCase();for(let n=1;n${ad(o)}`;let l=n[a];if(!l)return Gi(`No icon pack found for prefix: ${a}`),null;if(l==="lucide-icons"){let d=o.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),p=(0,Vo.getIcon)(d);return p?p.outerHTML:(Gi(`Lucide icon not found: ${d}`),null)}else{if(!r)return Gi("Icons path is not set. Cannot load icon SVG."),null;let d=`${t.app.vault.configDir}/${r}/${l}/${o}.svg`;try{return await t.app.vault.adapter.read(d)}catch(p){return Gi(`Failed to load icon SVG for ${e} at ${d}:`,p),null}}}function c0(e,t){let r="file";Mn(e)?r="image":ti(e)?r="file-text":(Ai(e)||fc(e))&&(r="layout-dashboard");let n=(0,Vo.getIcon)(r);return n?n.outerHTML:""}var Vo,My=v(()=>{Vo=require("obsidian");Nr();s0()});function l0(e,t){dr(t,!1);let[r,n]=oc(),i=()=>sc(Fa,"$showExcerpt",r),a=ft(),o=ft(),l=ft(),d=ft(),p=ze(t,"selected",8,!1),g=ze(t,"note",8),E=ze(t,"plugin",8),_=ft(null),y=ft(""),C=ft(""),k={},P=ft(null),N=ft(null),L={},H,R=ft(!1);As(async()=>{k=await Ly(E());let qe=await Py(E());L=qe.prefixToIconPack,H=qe.iconsPath,oe(R,!0)});async function B(){let qe=o0(q(C),k);qe?oe(P,await u0(qe,E(),H,L)):oe(P,c0("folder",E()));let St=o0(g().path,k);St?oe(N,await u0(St,E(),H,L)):oe(N,c0(g().path,E()))}function V(qe,St){return qe.innerHTML=St,{update(Dt){qe.innerHTML=Dt},destroy(){qe.innerHTML=""}}}let X=null,ce=null,ve=ft(null);Qt(()=>(vt(g()),q(R),lc),()=>{g()&&g().path&&q(R)&&(async()=>(oe(y,g().displayTitle||g().basename),oe(C,lc(g().path)),await B()))()}),Qt(()=>(Mn,vt(g()),vt(E()),oi.TFile),()=>{if(oe(_,null),Mn(g().path)){let qe=E().app.vault.getAbstractFileByPath(g().path);qe instanceof oi.TFile&&oe(_,E().app.vault.getResourcePath(qe))}}),Qt(()=>(vt(g()),lc,oi.setIcon,Mn,ti,Ai,fc,q(ve)),()=>{oe(y,g().displayTitle||g().basename),oe(C,lc(g().path)),X&&(0,oi.setIcon)(X,"folder-open"),ce&&(Mn(g().path)?(0,oi.setIcon)(ce,"image"):ti(g().path)?(0,oi.setIcon)(ce,"file-text"):Ai(g().path)||fc(g().path)?(0,oi.setIcon)(ce,"layout-dashboard"):(0,oi.setIcon)(ce,"file")),q(ve)&&(0,oi.setIcon)(q(ve),"corner-down-right")}),Qt(()=>(vt(E()),q(y),vt(g())),()=>{oe(a,E().textProcessor.getMatches(q(y),g().foundWords))}),Qt(()=>(vt(E()),q(C),vt(g())),()=>{oe(o,E().textProcessor.getMatches(q(C),g().foundWords))}),Qt(()=>(vt(E()),vt(g())),()=>{oe(l,E().textProcessor.makeExcerpt(g().content,g().matches[0]?.offset??-1))}),Qt(()=>{},()=>{oe(d,!1)}),Jn(),En();let Re=Br(()=>g().isEmbed?"omnisearch-result__embed":"");Rc(e,{get glyph(){return q(d)},get id(){return g().path},get cssClass(){return` ${q(Re)??""}`},get selected(){return p()},$$events:{auxclick(qe){Jr.call(this,t,qe)},click(qe){Jr.call(this,t,qe)},mousemove(qe){Jr.call(this,t,qe)}},children:(qe,St)=>{var Dt=N6(),Se=xe(Dt),et=xe(Se),je=xe(et);{var lt=rt=>{var ct=v6();ys(ct,Xt=>oe(ve,Xt),()=>q(ve)),we(rt,ct)},F=rt=>{var ct=qi(),Xt=Sr(ct);{var Er=Pr=>{var zr=T6();wa(zr,(Ct,$t)=>V?.(Ct,$t),()=>q(N)),we(Pr,zr)};tt(Xt,Pr=>{q(N)&&Pr(Er)})}we(rt,ct)};tt(je,rt=>{g().isEmbed?rt(lt):rt(F,!1)})}var K=Ye(je,2),te=xe(K);Ts(te,()=>E().textProcessor.highlightText(q(y),q(a)),!1,!1),Te(K);var fe=Ye(K,2);{var Fe=rt=>{var ct=x6(),Xt=xe(ct);Te(ct),rr(Er=>ir(Xt,`.${Er??""}`),[()=>Cs(g().path)],Br),we(rt,ct)};tt(fe,rt=>{g().displayTitle||rt(Fe)})}var Je=Ye(fe,2);{var Ue=rt=>{var ct=y6(),Xt=xe(ct);Te(ct),rr(()=>ir(Xt,`${g().matches.length??""}\xA0${(g().matches.length>1?"matches":"match")??""}`)),we(rt,ct)};tt(Je,rt=>{g().matches.length>0&&rt(Ue)})}Te(et),Te(Se);var ot=Ye(Se,2);{var ut=rt=>{var ct=w6(),Xt=xe(ct);{var Er=Ct=>{var $t=A6();wa($t,(Di,me)=>V?.(Di,me),()=>q(P)),we(Ct,$t)};tt(Xt,Ct=>{q(P)&&Ct(Er)})}var Pr=Ye(Xt,2),zr=xe(Pr);Ts(zr,()=>E().textProcessor.highlightText(q(C),q(o)),!1,!1),Te(Pr),Te(ct),we(rt,ct)};tt(ot,rt=>{q(C)&&rt(ut)})}var _t=Ye(ot,2);{var qr=rt=>{var ct=I6(),Xt=xe(ct);{var Er=Ct=>{var $t=S6(),Di=xe($t);Ts(Di,()=>E().textProcessor.highlightText(q(l),g().matches),!1,!1),Te($t),we(Ct,$t)};tt(Xt,Ct=>{i()&&Ct(Er)})}var Pr=Ye(Xt,2);{var zr=Ct=>{var $t=C6(),Di=xe($t);Te($t),rr(()=>Ki(Di,"src",q(_))),we(Ct,$t)};tt(Pr,Ct=>{q(_)&&Ct(zr)})}Te(ct),we(rt,ct)};tt(_t,rt=>{g().isEmbed||rt(qr)})}Te(Dt),we(qe,Dt)},$$slots:{default:!0}}),hr(),n()}var oi,v6,T6,x6,y6,A6,w6,S6,C6,I6,N6,Fy=v(()=>{Wn();yi();Pn();Ao();Nr();a0();oi=require("obsidian");ws();My();v6=Le(''),T6=Le(''),x6=Le(' '),y6=Le(' '),A6=Le(''),w6=Le('
'),S6=Le('
'),C6=Le('
'),I6=Le('
'),N6=Le('
')});var By=Pi(sd=>{sd.parse=function(e,t){if(t?t.offsets=typeof t.offsets>"u"?!0:t.offsets:t={offsets:!0},e||(e=""),e.indexOf(":")===-1&&!t.tokenize)return e;if(!t.keywords&&!t.ranges&&!t.tokenize)return e;var r={text:[]};t.offsets&&(r.offsets=[]);for(var n={},i=[],a=/(\S+:'(?:[^'\\]|\\.)*')|(\S+:"(?:[^"\\]|\\.)*")|(-?"(?:[^"\\]|\\.)*")|(-?'(?:[^'\\]|\\.)*')|\S+|\S+:\S+/g,o;(o=a.exec(e))!==null;){var _=o[0],l=_.indexOf(":");if(l!==-1){var d=_.split(":"),p=_.slice(0,l),g=_.slice(l+1);g=g.replace(/^\"|\"$|^\'|\'$/g,""),g=(g+"").replace(/\\(.?)/g,function(V,X){switch(X){case"\\":return"\\";case"0":return"\0";case"":return"";default:return X}}),i.push({keyword:p,value:g,offsetStart:o.index,offsetEnd:o.index+_.length})}else{var E=!1;_[0]==="-"&&(E=!0,_=_.slice(1)),_=_.replace(/^\"|\"$|^\'|\'$/g,""),_=(_+"").replace(/\\(.?)/g,function(V,X){switch(X){case"\\":return"\\";case"0":return"\0";case"":return"";default:return X}}),E?n.text?(n.text instanceof Array||(n.text=[n.text]),n.text.push(_)):n.text=_:i.push({text:_,offsetStart:o.index,offsetEnd:o.index+_.length})}}i.reverse();for(var _;_=i.pop();)if(_.text)r.text.push(_.text),t.offsets&&r.offsets.push(_);else{var p=_.keyword;t.keywords=t.keywords||[];var y=!1,C=!1;if(!/^-/.test(p))y=t.keywords.indexOf(p)!==-1;else if(p[0]==="-"){var k=p.slice(1);y=t.keywords.indexOf(k)!==-1,y&&(p=k,C=!0)}t.ranges=t.ranges||[];var P=t.ranges.indexOf(p)!==-1;if(y){t.offsets&&r.offsets.push({keyword:p,value:_.value,offsetStart:C?_.offsetStart+1:_.offsetStart,offsetEnd:_.offsetEnd});var N=_.value;if(N.length){var L=N.split(",");C?n[p]?n[p]instanceof Array?L.length>1?n[p]=n[p].concat(L):n[p].push(N):(n[p]=[n[p]],n[p].push(N)):L.length>1?n[p]=L:t.alwaysArray?n[p]=[N]:n[p]=N:r[p]?r[p]instanceof Array?L.length>1?r[p]=r[p].concat(L):r[p].push(N):(r[p]=[r[p]],r[p].push(N)):L.length>1?r[p]=L:t.alwaysArray?r[p]=[N]:r[p]=N}}else if(P){t.offsets&&r.offsets.push(_);var N=_.value,H=N.split("-");r[p]={},H.length===2?(r[p].from=H[0],r[p].to=H[1]):!H.length%2||(r[p].from=N)}else{var R=_.keyword+":"+_.value;r.text.push(R),t.offsets&&r.offsets.push({text:R,offsetStart:_.offsetStart,offsetEnd:_.offsetEnd})}}return r.text.length?t.tokenize||(r.text=r.text.join(" ").trim()):delete r.text,r.exclude=n,r};sd.stringify=function(e,t,r){if(t||(t={offsets:!0}),!e)return"";if(typeof e=="string")return e;if(Array.isArray(e))return e.join(" ");if(!Object.keys(e).length)return"";if(Object.keys(e).length===3&&e.text&&e.offsets&&e.exclude&&typeof e.text=="string")return e.text;r||(r="");var n=function(l){return l.indexOf(" ")>-1?JSON.stringify(l):l},i=function(l){return r+l},a=[];if(e.text){var o=[];typeof e.text=="string"?o.push(e.text):o.push.apply(o,e.text),o.length>0&&a.push(o.map(n).map(i).join(" "))}return t.keywords&&t.keywords.forEach(function(l){if(e[l]){var d=[];typeof e[l]=="string"?d.push(e[l]):d.push.apply(d,e[l]),d.length>0&&a.push(i(l+":"+d.map(n).join(",")))}}),t.ranges&&t.ranges.forEach(function(l){if(e[l]){var d=e[l].from,p=e[l].to;p&&(d=d+"-"+p),d&&a.push(i(l+":"+d))}}),e.exclude&&Object.keys(e.exclude).length>0&&a.push(sd.stringify(e.exclude,t,"-")),a.join(" ")}});var Hy=Pi((Jee,$y)=>{$y.exports=By()});var Uy,f0,ea,od=v(()=>{Nr();Uy=ln(Hy()),f0=["ext","path"],ea=class{#e;constructor(t="",r){r.ignoreDiacritics&&(t=Wi(t,r.ignoreArabicDiacritics));let n=(0,Uy.parse)(t.toLowerCase(),{tokenize:!0,keywords:f0});n.text=n.text??[],n.exclude=n.exclude??{},n.exclude.text=n.exclude.text??[],Array.isArray(n.exclude.text)||(n.exclude.text=[n.exclude.text]),n.exclude.text=n.exclude.text.filter(a=>a.length);for(let a of f0){let o=n[a];o&&(n[a]=Array.isArray(o)?o:[o]);let l=n.exclude[a];l&&(n.exclude[a]=Array.isArray(l)?l:[l])}this.query=n;let i=this.query.text.filter(a=>a.startsWith(".")).map(a=>a.slice(1));this.query.ext=[...new Set([...i,...this.query.ext??[]])],this.query.text=this.query.text.filter(a=>!a.startsWith(".")),this.#e=t.match(/"([^"]+)"/g)?.map(a=>a.replace(/"/g,""))??[]}isEmpty(){for(let t of f0)if(this.query[t]?.length||this.query.text.length)return!1;return!0}segmentsToStr(){return this.query.text.join(" ")}getTags(){return this.query.text.filter(t=>t.startsWith("#"))}getTagsWithoutHashtag(){return this.getTags().map(t=>t.replace(/^#/,""))}getExactTerms(){return[...new Set([...this.query.text.filter(t=>t.split(" ").length>1),...this.#e].map(t=>t.toLowerCase()))]}getBestStringForExcerpt(){return this.#e.length?this.#e.sort((t,r)=>r.length-t.length)[0]??"":this.segmentsToStr()}}});var Vy=Pi(ud=>{function d0(e){"@babel/helpers - typeof";return d0=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},d0(e)}(function(e,t){if(typeof define=="function"&&define.amd)define(["exports"],t);else if(typeof ud<"u")t(ud);else{var r={exports:{}};t(r.exports),e.CancelablePromise=r.exports}})(typeof globalThis<"u"?globalThis:typeof self<"u"?self:ud,function(e){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.CancelablePromise=void 0,e.cancelable=St,e.default=void 0,e.isCancelablePromise=Dt;function t(F,K){if(typeof K!="function"&&K!==null)throw new TypeError("Super expression must either be null or a function");F.prototype=Object.create(K&&K.prototype,{constructor:{value:F,writable:!0,configurable:!0}}),Object.defineProperty(F,"prototype",{writable:!1}),K&&r(F,K)}function r(F,K){return r=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(fe,Fe){return fe.__proto__=Fe,fe},r(F,K)}function n(F){var K=o();return function(){var fe=l(F),Fe;if(K){var Je=l(this).constructor;Fe=Reflect.construct(fe,arguments,Je)}else Fe=fe.apply(this,arguments);return i(this,Fe)}}function i(F,K){if(K&&(d0(K)==="object"||typeof K=="function"))return K;if(K!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return a(F)}function a(F){if(F===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return F}function o(){if(typeof Reflect>"u"||!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 l(F){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(te){return te.__proto__||Object.getPrototypeOf(te)},l(F)}function d(F,K){var te=typeof Symbol<"u"&&F[Symbol.iterator]||F["@@iterator"];if(!te){if(Array.isArray(F)||(te=p(F))||K&&F&&typeof F.length=="number"){te&&(F=te);var fe=0,Fe=function(){};return{s:Fe,n:function(){return fe>=F.length?{done:!0}:{done:!1,value:F[fe++]}},e:function(_t){throw _t},f:Fe}}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 Je=!0,Ue=!1,ot;return{s:function(){te=te.call(F)},n:function(){var _t=te.next();return Je=_t.done,_t},e:function(_t){Ue=!0,ot=_t},f:function(){try{!Je&&te.return!=null&&te.return()}finally{if(Ue)throw ot}}}}function p(F,K){if(F){if(typeof F=="string")return g(F,K);var te=Object.prototype.toString.call(F).slice(8,-1);if(te==="Object"&&F.constructor&&(te=F.constructor.name),te==="Map"||te==="Set")return Array.from(F);if(te==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(te))return g(F,K)}}function g(F,K){(K==null||K>F.length)&&(K=F.length);for(var te=0,fe=new Array(K);te`opacity: ${a*i}`}}var O6,zy=v(()=>{mt();Wr();O6=e=>e});function cd(e,t){dr(t,!1);let r=ze(t,"placeholder",8,null),n=ze(t,"placeholderProps",8,null),i="svelte-lazy-placeholder";En();var a=qi(),o=Sr(a);{var l=d=>{var p=k6();Yi(p,1,xs(i));var g=xe(p);{var E=y=>{var C=D6(),k=xe(C,!0);Te(C),rr(()=>ir(k,r())),we(y,C)},_=(y,C)=>{{var k=P=>{var N=qi(),L=Sr(N);Gp(L,r,(H,R)=>{R(H,mm(n))}),we(P,N)};tt(y,P=>{["function","object"].includes(typeof r())&&P(k)},C)}};tt(g,y=>{typeof r()=="string"?y(E):y(_,!1)})}Te(p),we(d,p)};tt(o,d=>{r()&&d(l)})}we(e,a),hr()}var D6,k6,Yy=v(()=>{Wn();yi();Pn();D6=Le("
"),k6=Le("
")});function h0(e,t){dr(t,!1);let r=ft(),n=ze(t,"keep",8,!1),i=ze(t,"height",8,0),a=ze(t,"offset",8,150),o=ze(t,"fadeOption",24,()=>({delay:0,duration:400})),l=ze(t,"resetHeightDelay",8,0),d=ze(t,"onload",8,null),p=ze(t,"placeholder",8,null),g=ze(t,"placeholderProps",8,null),E=ze(t,"class",8,""),_="svelte-lazy"+(E()?" "+E():""),y="svelte-lazy-content",C=ce(),k=ft(!1),P=ft(!0);function N(F){ve(F);let K=L(F);V(K),setTimeout(()=>{K()});let te=H(F,K);return{destroy:()=>{X(K),te.unobserve(F)}}}function L(F){return Dt(te=>{let fe=F.getBoundingClientRect().top,Fe=F.getBoundingClientRect().bottom,Je=St(te)+a();fe<=Je&&Fe>0?B(F):n()||R(F)},200)}function H(F,K){let te=new IntersectionObserver(fe=>{fe[0].isIntersecting&&B(F)});return te.observe(F),te}function R(F){ve(F),oe(k,!1)}function B(F,K){q(k)||(oe(k,!0),Re(F),d()&&d()(F))}function V(F){document.addEventListener("scroll",F,!0),window.addEventListener("resize",F)}function X(F){document.removeEventListener("scroll",F,!0),window.removeEventListener("resize",F)}function ce(){return typeof i()=="number"?i()+"px":i()}function ve(F){i()&&(F.style.height=ce())}function Re(F){setTimeout(()=>{qe(F)||(F.style.height="auto")},l())}function qe(F){let K=F.querySelector("img");return K?K.complete?K.naturalHeight===0:(oe(P,!1),F.addEventListener("load",()=>{oe(P,!0),F.style.height="auto"},{capture:!0,once:!0}),F.addEventListener("error",()=>{oe(P,!0)},{capture:!0,once:!0}),!0):!1}function St(F){return F?.target?.getBoundingClientRect?F.target.getBoundingClientRect().bottom:window.innerHeight}function Dt(F,K,te){let fe,Fe,Je,Ue=null,ot=0;te||(te={});let ut=function(){ot=te.leading===!1?0:new Date,Ue=null,Je=F.apply(fe,Fe),Ue||(fe=Fe=null)};return function(_t){let qr=new Date;!ot&&te.leading===!1&&(ot=qr);let rt=K-(qr-ot);return fe=this,Fe=arguments,rt<=0||rt>K?(Ue&&(clearTimeout(Ue),Ue=null),ot=qr,Je=F.apply(fe,Fe),Ue||(fe=Fe=null)):!Ue&&te.trailing!==!1&&(Ue=setTimeout(ut,rt)),Je}}Qt(()=>q(P),()=>{oe(r,q(P)?"":"display: none")}),Jn(),En();var Se=L6();Yi(Se,1,xs(_)),ic(Se,`height: ${C??""}`);var et=xe(Se);{var je=F=>{var K=R6(),te=Sr(K);Yi(te,1,xs(y));var fe=xe(te);zi(fe,t,"default",{},Ue=>{var ot=Ju("Lazy load content");we(Ue,ot)}),Te(te);var Fe=Ye(te,2);{var Je=Ue=>{cd(Ue,{get placeholder(){return p()},get placeholderProps(){return g()}})};tt(Fe,Ue=>{!q(P)&&p()&&Ue(Je)})}rr(()=>ic(te,q(r))),im(1,te,()=>qy,()=>o()||{}),we(F,K)},lt=(F,K)=>{{var te=fe=>{cd(fe,{get placeholder(){return p()},get placeholderProps(){return g()}})};tt(F,fe=>{p()&&fe(te)},K)}};tt(et,F=>{q(k)?F(je):F(lt,!1)})}Te(Se),wa(Se,F=>N?.(F)),we(e,Se),hr()}var R6,L6,Ky=v(()=>{Wn();yi();Pn();zy();Yy();R6=Le("
",1),L6=Le("
")});function p0(e,t){dr(t,!0);let[r,n]=oc(),i=()=>sc(Ca,"$indexingStep",r),a=Xn(0),o=0,l=Xn(er(t.previousQuery??"")),d=Xn(er([])),p,g=Xn(""),E=Xn(!0),_,y=Xn(""),C=Xn(""),k=Xn(""),P=Xn(""),N=`${vn()} ${Sf()} \u21B5`,L=kn(()=>q(d)[q(a)]);vi(()=>{t.plugin.settings.openInNewPane?(oe(y,"\u21B5"),oe(C,vn()+" \u21B5"),oe(k,"Shift \u21B5"),oe(P,vn()+" Shift \u21B5")):(oe(y,vn()+" \u21B5"),oe(C,"\u21B5"),oe(k,vn()+" Shift \u21B5"),oe(P,"Shift \u21B5"))}),vi(()=>{q(l)?X():(oe(E,!1),oe(d,er([])))}),vi(()=>{switch(i()){case 1:oe(g,"Loading cache...");break;case 2:oe(g,"Reading files...");break;case 3:oe(g,"Indexing files...");break;case 4:X(),oe(g,"Updating cache...");break;default:X(),oe(g,"");break}}),As(async()=>{Me.enable("vault"),Me.on("vault","enter",ve),Me.on("vault","open-in-background",Re),Me.on("vault","create-note",je),Me.on("vault","open-in-new-pane",qe),Me.on("vault","insert-link",lt),Me.on("vault","tab",F),Me.on("vault","arrow-up",()=>K(-1)),Me.on("vault","arrow-down",()=>K(1)),Me.on("vault","prev-search-history",H),Me.on("vault","next-search-history",R),Me.on("vault","open-in-new-leaf",St),await t.plugin.notesIndexer.refreshIndex(),await X()}),mf(()=>{Me.disable("vault")});async function H(){let Ne=(await t.plugin.searchHistory.getHistory()).filter(kt=>kt);++o>=Ne.length&&(o=0),oe(l,er(Ne[o])),_?.setInputValue(q(l)??"")}async function R(){let Ne=(await t.plugin.searchHistory.getHistory()).filter(kt=>kt);--o<0&&(o=Ne.length?Ne.length-1:0),oe(l,er(Ne[o])),_?.setInputValue(q(l)??"")}let B=null;async function V(){oe(E,!0),B&&(B.cancel(),B=null),p=new ea(q(l),{ignoreDiacritics:t.plugin.settings.ignoreDiacritics,ignoreArabicDiacritics:t.plugin.settings.ignoreArabicDiacritics}),B=(0,Wy.cancelable)(new Promise(Ne=>{Ne(t.plugin.searchEngine.getSuggestions(p))})),oe(d,er(await B)),oe(a,0),await te(),oe(E,!1)}let X=Ic(V,0);function ce(Ne){q(L)&&(Ne?.ctrlKey?qe():ve(),t.modal.close())}function ve(){q(L)&&(Se(q(L)),t.modal.close())}function Re(){q(L)&&Se(q(L),!0)}function qe(){q(L)&&(Se(q(L),!0),t.modal.close())}function St(){q(L)&&(Se(q(L),!0,!0),t.modal.close())}function Dt(){q(l)&&t.plugin.searchHistory.addToHistory(q(l))}function Se(Ne,kt=!1,Rt=!1){Dt();let ur=Ne.matches?.[0]?.offset??0;Cf(t.plugin.app,Ne,ur,kt,Rt)}async function et(Ne){await je()}async function je(Ne){if(q(l)){try{await mv(t.plugin.app,q(l),Ne?.newLeaf)}catch(kt){new Si.Notice(kt.message);return}t.modal.close()}}function lt(){if(!q(L))return;let Ne=t.plugin.app.vault.getMarkdownFiles().find(ki=>ki.path===q(L).path),kt=t.plugin.app.workspace.getActiveFile(),Rt=t.plugin.app.workspace.getActiveViewOfType(Si.MarkdownView);if(!Rt?.editor){new Si.Notice("Omnisearch - Error - No active editor",3e3);return}let ur;if(Ne&&kt)ur=t.plugin.app.fileManager.generateMarkdownLink(Ne,kt.path,"",q(L).displayTitle);else{let ki=q(L).displayTitle===""?"":`|${q(L).displayTitle}`;ur=`[[${q(L).basename}.${Cs(q(L).path)}${ki}]]`}let Sn=Rt.editor.getCursor();Rt.editor.replaceRange(ur,Sn,Sn),Sn.ch+=ur.length,Rt.editor.setCursor(Sn),t.modal.close()}function F(){if(!(q(L)&&(ti(q(L)?.path)||!q(L)?.matches.length)))if(Dt(),t.modal.close(),q(L)){let Ne=t.plugin.app.vault.getAbstractFileByPath(q(L).path);Ne&&Ne instanceof Si.TFile&&new ks(t.plugin,Ne,q(l)).open()}else{let Ne=t.plugin.app.workspace.getActiveViewOfType(Si.MarkdownView);Ne?.file&&new ks(t.plugin,Ne.file,q(l)).open()}}function K(Ne){oe(a,er(wf(q(a)+Ne,q(d).length))),te()}async function te(){await Ei(),q(L)&&activeWindow.document.querySelector(`[data-result-id="${q(L).path}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}var fe=q6(),Fe=Sr(fe);ys(mc(Fe,{get plugin(){return t.plugin},get initialValue(){return q(l)},placeholder:"Omnisearch - Vault",$$events:{input:Ne=>oe(l,er(Ne.detail))},children:(Ne,kt)=>{var Rt=B6(),ur=xe(Rt);{var Sn=cr=>{var Zt=M6();pr("click",Zt,et),we(cr,Zt)};tt(ur,cr=>{t.plugin.settings.showCreateButton&&cr(Sn)})}var ki=Ye(ur,2);{var Eu=cr=>{var Zt=F6();pr("click",Zt,F),we(cr,Zt)};tt(ki,cr=>{Si.Platform.isMobile&&cr(Eu)})}Te(Rt),we(Ne,Rt)},$$slots:{default:!0}}),Ne=>_=Ne,()=>_);var Je=Ye(Fe,2);{var Ue=Ne=>{var kt=$6(),Rt=xe(kt);Te(kt),rr(()=>ir(Rt,`\u23F3 Work in progress: ${q(g)??""}`)),we(Ne,kt)};tt(Je,Ne=>{q(g)&&Ne(Ue)})}var ot=Ye(Je,2);gc(ot,{children:(Ne,kt)=>{var Rt=V6(),ur=Sr(Rt);rc(ur,17,()=>q(d),tc,(Zt,la,Cn)=>{h0(Zt,{height:100,offset:500,keep:!0,fadeOption:{delay:0,duration:0},children:(Yn,Kn)=>{let un=kn(()=>Cn===q(a));l0(Yn,{get plugin(){return t.plugin},get selected(){return q(un)},get note(){return q(la)},$$events:{mousemove:Xa=>oe(a,er(Cn)),click:ce,auxclick:Xa=>{Xa.button==1&&qe()}}})},$$slots:{default:!0}})});var Sn=Ye(ur,2),ki=xe(Sn);{var Eu=Zt=>{var la=U6(),Cn=Ye(Sr(la));{var Yn=Kn=>{var un=H6();wr(2),we(Kn,un)};tt(Cn,Kn=>{t.plugin.settings.simpleSearch&&q(l).split(yf).some(un=>un.length<3)&&Kn(Yn)})}we(Zt,la)},cr=(Zt,la)=>{{var Cn=Yn=>{var Kn=Ju("Searching...");we(Yn,Kn)};tt(Zt,Yn=>{q(E)&&Yn(Cn)},la)}};tt(ki,Zt=>{!q(d).length&&q(l)&&!q(E)?Zt(Eu):Zt(cr,!1)})}Te(Sn),we(Ne,Rt)},$$slots:{default:!0}});var ut=Ye(ot,2),_t=Ye(xe(ut),2),qr=xe(_t),rt=xe(qr);Te(qr),wr(2),Te(_t);var ct=Ye(_t,2),Xt=xe(ct),Er=xe(Xt,!0);Te(Xt),wr(2),Te(ct);var Pr=Ye(ct,4),zr=xe(Pr),Ct=xe(zr,!0);Te(zr),wr(2),Te(Pr);var $t=Ye(Pr,2),Di=xe($t);Di.textContent=N,wr(2),Te($t);var me=Ye($t,2),gu=xe(me),Ih=xe(gu);Te(gu),wr(2),Te(me);var ca=Ye(me,2),nt=xe(ca),Qa=xe(nt,!0);Te(nt),wr(2),Te(ca);var _u=Ye(ca,2),fi=xe(_u),Nh=xe(fi,!0);Te(fi),wr(2),Te(_u);var bu=Ye(_u,2),bl=xe(bu),Oh=xe(bl);Te(bl),wr(2),Te(bu);var Ks=Ye(bu,2),on=xe(Ks),El=xe(on);Te(on),wr(2),Te(Ks),wr(2),Te(ut),rr((Ne,kt,Rt,ur)=>{ir(rt,`${Ne??""} \u2191\u2193`),ir(Er,q(C)),ir(Ct,q(y)),ir(Ih,`${kt??""} o`),ir(Qa,q(P)),ir(Nh,q(k)),ir(Oh,`${Rt??""} \u21B5`),ir(El,`${ur??""} g`)},[Sf,vn,Sf,vn]),we(e,fe),hr(),n()}var Si,Wy,M6,F6,B6,$6,H6,U6,V6,q6,Gy=v(()=>{Wn();Pn();Si=require("obsidian");ws();Sm();Cm();en();_c();Nr();Lc();Fy();od();Wy=ln(Vy());Oc();Ky();M6=Le(""),F6=Le(""),B6=Le('
'),$6=Le('
'),H6=Le(`
You have enabled "Simpler Search" in the settings, try to type more + characters.`,1),U6=Le("We found 0 results for your search here. ",1),V6=Le('
',1),q6=Le('
\u2191\u2193to navigate
to cycle history
to open
Tab to switch to In-File Search
to open in a new pane
to open in a new split
to open in the background
to create
to create in a new pane
to insert a link
to toggle excerpts
Escto close
',1)});function m0(e,t){dr(t,!1);let r=ft(),n=ze(t,"plugin",8),i=ze(t,"offset",8),a=ze(t,"note",8),o=ze(t,"index",8,0),l=ze(t,"selected",8,!1);Qt(()=>(vt(n()),vt(a()),vt(i())),()=>{oe(r,n().textProcessor.makeExcerpt(a()?.content??"",i()))}),Jn(),En();let d=Br(()=>o().toString());Rc(e,{get id(){return q(d)},get selected(){return l()},$$events:{auxclick(p){Jr.call(this,t,p)},click(p){Jr.call(this,t,p)},mousemove(p){Jr.call(this,t,p)}},children:(p,g)=>{var E=z6(),_=xe(E);Ts(_,()=>n().textProcessor.highlightText(q(r),a().matches),!1,!1),Te(E),we(p,E)},$$slots:{default:!0}}),hr()}var z6,Qy=v(()=>{Wn();yi();Pn();a0();z6=Le('
')});function g0(e,t){dr(t,!1);let r=ze(t,"plugin",8),n=ze(t,"modal",8),i=ze(t,"parent",8,null),a=ze(t,"singleFilePath",8,""),o=ze(t,"previousQuery",8),l=ft(),d=ft([]),p=ft(0),g=ft(),E=ft();As(()=>{Me.enable("infile"),Me.on("infile","enter",N),Me.on("infile","open-in-new-pane",P),Me.on("infile","arrow-up",()=>C(-1)),Me.on("infile","arrow-down",()=>C(1)),Me.on("infile","tab",L)}),mf(()=>{Me.disable("infile")});function _(Se){let et=[],je=-1,lt=0;for(;++lt<100;){let F=y(Se,je,uc);if(!F.length)break;je=F.last().offset,et.push(F)}return et}function y(Se,et,je){let lt=Se.find(F=>F.offset>et);return lt?Se.filter(F=>F.offset>et&&F.offset<=lt.offset+je):[]}function C(Se){oe(p,wf(q(p)+Se,q(d).length)),k()}async function k(){await Ei(),document.querySelector(`[data-result-id="${q(p)}"]`)?.scrollIntoView({behavior:"auto",block:"nearest"})}async function P(){return N(!0)}async function N(Se=!1){if(q(g)){n().close(),i()&&i().close();let et=r().textProcessor.stringsToRegex(q(g).foundWords);et.exec(q(g).content),await Cf(r().app,q(g),et.lastIndex,Se);let je=r().app.workspace.getActiveViewOfType(ld.MarkdownView);if(!je)return;let lt=q(d)[q(p)]??0,F=je.editor.offsetToPos(lt);F.ch=0,je.editor.setCursor(F),je.editor.scrollIntoView({from:{line:F.line-10,ch:0},to:{line:F.line+10,ch:0}})}}function L(){new ta(r(),q(l)??o()).open(),n().close()}Qt(()=>vt(o()),()=>{oe(l,o()??"")}),Qt(()=>(q(l),q(E),ea,vt(r()),vt(a())),()=>{(async()=>(q(l)&&(oe(E,new ea(q(l),{ignoreDiacritics:r().settings.ignoreDiacritics,ignoreArabicDiacritics:r().settings.ignoreArabicDiacritics})),oe(g,(await r().searchEngine.getSuggestions(q(E),{singleFilePath:a()}))[0]??null)),oe(p,0),await k()))()}),Qt(()=>(q(g),q(E)),()=>{if(q(g)){let Se=_(q(g).matches),et=q(E).getExactTerms();et.length&&(Se=Se.filter(je=>et.every(lt=>je.some(F=>F.match.includes(lt))))),oe(d,Se.map(je=>Math.round(je.first().offset)))}}),Jn(),En();var H=Q6(),R=Sr(H);mc(R,{get plugin(){return r()},placeholder:"Omnisearch - File",get initialValue(){return o()},$$events:{input:Se=>oe(l,Se.detail)},children:(Se,et)=>{var je=K6(),lt=xe(je);{var F=K=>{var te=Y6();pr("click",te,L),we(K,te)};tt(lt,K=>{ld.Platform.isMobile&&K(F)})}Te(je),we(Se,je)},$$slots:{default:!0}});var B=Ye(R,2);gc(B,{children:(Se,et)=>{var je=qi(),lt=Sr(je);{var F=te=>{var fe=qi(),Fe=Sr(fe);rc(Fe,1,()=>q(d),tc,(Je,Ue,ot)=>{let ut=Br(()=>ot===q(p));m0(Je,{get plugin(){return r()},get offset(){return q(Ue)},get note(){return q(g)},index:ot,get selected(){return q(ut)},$$events:{mousemove:_t=>oe(p,ot),click:_t=>N(_t.ctrlKey),auxclick:_t=>{_t.button==1&&N(!0)}}})}),we(te,fe)},K=te=>{var fe=j6();we(te,fe)};tt(lt,te=>{q(d).length&&q(g)?te(F):te(K,!1)})}we(Se,je)},$$slots:{default:!0}});var V=Ye(B,2),X=Ye(xe(V),6),ce=Ye(xe(X),2);{var ve=Se=>{var et=W6();we(Se,et)},Re=Se=>{var et=G6();we(Se,et)};tt(ce,Se=>{i()?Se(ve):Se(Re,!1)})}Te(X);var qe=Ye(X,2),St=xe(qe),Dt=xe(St);Te(St),wr(2),Te(qe),Te(V),rr(Se=>ir(Dt,`${Se??""} \u21B5`),[vn],Br),we(e,H),hr()}var ld,Y6,K6,j6,W6,G6,Q6,Xy=v(()=>{Wn();yi();Pn();Sm();en();Nr();ws();ld=require("obsidian");Cm();Lc();Qy();od();_c();Y6=Le(""),K6=Le('
'),j6=Le('
We found 0 results for your search here.
'),W6=Le("to go back to Vault Search"),G6=Le("to close"),Q6=Le('
\u2191\u2193to navigate
\u21B5to open
tab to switch to Vault Search
esc
to open in a new pane
',1)});var dd,fd,ta,ks,Lc=v(()=>{dd=require("obsidian");Gy();Xy();en();ws();fd=class extends dd.Modal{constructor(t){super(t.app);let r=t.settings;this.modalEl.replaceChildren(),this.modalEl.addClass("omnisearch-modal","prompt"),this.modalEl.removeClass("modal"),this.modalEl.tabIndex=-1,this.scope.register([],"ArrowDown",d=>{d.preventDefault(),Me.emit("arrow-down")}),this.scope.register([],"ArrowUp",d=>{d.preventDefault(),Me.emit("arrow-up")});for(let d of[{k:"J",dir:"down"},{k:"K",dir:"up"}])for(let p of["Ctrl","Mod"])this.scope.register([p],d.k,g=>{r.vimLikeNavigationShortcut&&Me.emit("arrow-"+d.dir)});for(let d of[{k:"N",dir:"down"},{k:"P",dir:"up"}])for(let p of["Ctrl","Mod"])this.scope.register([p],d.k,g=>{r.vimLikeNavigationShortcut&&Me.emit("arrow-"+d.dir)});let n,i,a,o,l=["Mod","Alt"];r.openInNewPane?(n=["Mod"],i=[],a=["Mod","Shift"],o=["Shift"]):(n=[],i=["Mod"],a=["Shift"],o=["Mod","Shift"]),this.scope.register(i,"Enter",d=>{d.preventDefault(),Me.emit("open-in-new-pane")}),this.scope.register(l,"Enter",d=>{d.preventDefault(),Me.emit("open-in-new-leaf")}),this.scope.register(["Alt"],"Enter",d=>{d.preventDefault(),Me.emit("insert-link")}),this.scope.register(a,"Enter",d=>{d.preventDefault(),Me.emit("create-note")}),this.scope.register(o,"Enter",d=>{d.preventDefault(),Me.emit("create-note",{newLeaf:!0})}),this.scope.register(n,"Enter",d=>{vm()||(d.preventDefault(),Me.emit("enter"))}),this.scope.register(["Mod"],"O",d=>{vm()||(d.preventDefault(),Me.emit("open-in-background"))}),this.scope.register([],"Tab",d=>{d.preventDefault(),Me.emit("tab")}),this.scope.register(["Alt"],"ArrowDown",d=>{d.preventDefault(),Me.emit("next-search-history")}),this.scope.register(["Alt"],"ArrowUp",d=>{d.preventDefault(),Me.emit("prev-search-history")}),this.scope.register(["Mod"],"G",d=>{Me.emit(xf.ToggleExcerpts)})}},ta=class extends fd{constructor(t,r){super(t);let n=t.app.workspace.getActiveViewOfType(dd.MarkdownView)?.editor.getSelection();t.searchHistory.getHistory().then(i=>{let a=t.settings.showPreviousQueryResults?i[0]:null,o=Es(p0,{target:this.modalEl,props:{plugin:t,modal:this,previousQuery:r||n||a||""}});this.onClose=()=>{Eo(o)}})}},ks=class extends fd{constructor(t,r,n="",i){super(t);let a=Es(g0,{target:this.modalEl,props:{plugin:t,modal:this,singleFilePath:r.path,parent:i,previousQuery:n}});i&&i.containerEl.toggleVisibility(!1),this.onClose=()=>{i&&i.containerEl.toggleVisibility(!0),Eo(a)}}}});function X6(e,t){return t.map(r=>{let{score:n,path:i,basename:a,foundWords:o,matches:l,content:d}=r,p=e.textProcessor.makeExcerpt(d,l[0]?.offset??-1);return{score:n,vault:e.app.vault.getName(),path:i,basename:a,foundWords:o,matches:l.map(E=>({match:E.match,offset:E.offset})),excerpt:p}})}function eA(){Jy=!0,hd.forEach(e=>e())}function tA(e){if(Zy)return;Zy=!0,e.registerObsidianProtocolHandler("omnisearch",r=>{new ta(e,r.query).open()});let t=_0(e);globalThis.omnisearch=t,e.app.plugins.plugins.omnisearch.api=t}function _0(e){return{async search(t){let r=new ea(t,{ignoreDiacritics:e.settings.ignoreDiacritics,ignoreArabicDiacritics:e.settings.ignoreArabicDiacritics}),n=await e.searchEngine.getSuggestions(r);return X6(e,n)},registerOnIndexed(t){hd.push(t),Jy&&t()},unregisterOnIndexed(t){hd=hd.filter(r=>r!==t)},refreshIndex:e.notesIndexer.refreshIndex}}var Jy,hd,Zy,b0=v(()=>{od();Lc();Jy=!1,hd=[];Zy=!1});var rA=Pi((E0,v0)=>{(function(e,t){typeof E0=="object"&&typeof v0<"u"?v0.exports=t():typeof define=="function"&&define.amd?define(t):(e=typeof globalThis<"u"?globalThis:e||self,e.Dexie=t())})(E0,function(){"use strict";var e=function(s,u){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(f,h){f.__proto__=h}||function(f,h){for(var m in h)Object.prototype.hasOwnProperty.call(h,m)&&(f[m]=h[m])},e(s,u)};function t(s,u){if(typeof u!="function"&&u!==null)throw new TypeError("Class extends value "+String(u)+" is not a constructor or null");e(s,u);function f(){this.constructor=s}s.prototype=u===null?Object.create(u):(f.prototype=u.prototype,new f)}var r=function(){return r=Object.assign||function(u){for(var f,h=1,m=arguments.length;h"u"?a:Reflect.ownKeys)(u).forEach(function(f){y(s,f,u[f])})}var _=Object.defineProperty;function y(s,u,f,h){_(s,u,l(f&&g(f,"get")&&typeof f.get=="function"?{get:f.get,set:f.set,configurable:!0}:{value:f,configurable:!0,writable:!0},h))}function C(s){return{from:function(u){return s.prototype=Object.create(u.prototype),y(s.prototype,"constructor",s),{extend:E.bind(null,s.prototype)}}}}var k=Object.getOwnPropertyDescriptor;function P(s,u){var f=k(s,u),h;return f||(h=d(s))&&P(h,u)}var N=[].slice;function L(s,u,f){return N.call(s,u,f)}function H(s,u){return u(s)}function R(s){if(!s)throw new Error("Assertion Failed")}function B(s){i.setImmediate?setImmediate(s):setTimeout(s,0)}function V(s,u){return s.reduce(function(f,h,m){var b=u(h,m);return b&&(f[b[0]]=b[1]),f},{})}function X(s,u){if(typeof u=="string"&&g(s,u))return s[u];if(!u)return s;if(typeof u!="string"){for(var f=[],h=0,m=u.length;h=0&&s.splice(f,1),f>=0}var ot={};function ut(s){var u,f,h,m;if(arguments.length===1){if(o(s))return s.slice();if(this===ot&&typeof s=="string")return[s];if(m=Je(s)){for(f=[];h=m.next(),!h.done;)f.push(h.value);return f}if(s==null)return[s];if(u=s.length,typeof u=="number"){for(f=new Array(u);u--;)f[u]=s[u];return f}return[s]}for(u=arguments.length,f=new Array(u);u--;)f[u]=arguments[u];return f}var _t=typeof Symbol<"u"?function(s){return s[Symbol.toStringTag]==="AsyncFunction"}:function(){return!1},qr=["Modify","Bulk","OpenFailed","VersionChange","Schema","Upgrade","InvalidTable","MissingAPI","NoSuchDatabase","InvalidArgument","SubTransaction","Unsupported","Internal","DatabaseClosed","PrematureCommit","ForeignAwait"],rt=["Unknown","Constraint","Data","TransactionInactive","ReadOnly","Version","NotFound","InvalidState","InvalidAccess","Abort","Timeout","QuotaExceeded","Syntax","DataClone"],ct=qr.concat(rt),Xt={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 Er(s,u){this.name=s,this.message=u}C(Er).from(Error).extend({toString:function(){return this.name+": "+this.message}});function Pr(s,u){return s+". Errors: "+Object.keys(u).map(function(f){return u[f].toString()}).filter(function(f,h,m){return m.indexOf(f)===h}).join(` +`)}function zr(s,u,f,h){this.failures=u,this.failedKeys=h,this.successCount=f,this.message=Pr(s,u)}C(zr).from(Er);function Ct(s,u){this.name="BulkError",this.failures=Object.keys(u).map(function(f){return u[f]}),this.failuresByPos=u,this.message=Pr(s,this.failures)}C(Ct).from(Er);var $t=ct.reduce(function(s,u){return s[u]=u+"Error",s},{}),Di=Er,me=ct.reduce(function(s,u){var f=u+"Error";function h(m,b){this.name=f,m?typeof m=="string"?(this.message="".concat(m).concat(b?` + `+b:""),this.inner=b||null):typeof m=="object"&&(this.message="".concat(m.name," ").concat(m.message),this.inner=m):(this.message=Xt[u]||f,this.inner=null)}return C(h).from(Di),s[u]=h,s},{});me.Syntax=SyntaxError,me.Type=TypeError,me.Range=RangeError;var gu=rt.reduce(function(s,u){return s[u+"Error"]=me[u],s},{});function Ih(s,u){if(!s||s instanceof Er||s instanceof TypeError||s instanceof SyntaxError||!s.name||!gu[s.name])return s;var f=new gu[s.name](u||s.message,s);return"stack"in s&&y(f,"stack",{get:function(){return this.inner.stack}}),f}var ca=ct.reduce(function(s,u){return["Syntax","Type","Range"].indexOf(u)===-1&&(s[u+"Error"]=me[u]),s},{});ca.ModifyError=zr,ca.DexieError=Er,ca.BulkError=Ct;function nt(){}function Qa(s){return s}function _u(s,u){return s==null||s===Qa?u:function(f){return u(s(f))}}function fi(s,u){return function(){s.apply(this,arguments),u.apply(this,arguments)}}function Nh(s,u){return s===nt?u:function(){var f=s.apply(this,arguments);f!==void 0&&(arguments[0]=f);var h=this.onsuccess,m=this.onerror;this.onsuccess=null,this.onerror=null;var b=u.apply(this,arguments);return h&&(this.onsuccess=this.onsuccess?fi(h,this.onsuccess):h),m&&(this.onerror=this.onerror?fi(m,this.onerror):m),b!==void 0?b:f}}function bu(s,u){return s===nt?u:function(){s.apply(this,arguments);var f=this.onsuccess,h=this.onerror;this.onsuccess=this.onerror=null,u.apply(this,arguments),f&&(this.onsuccess=this.onsuccess?fi(f,this.onsuccess):f),h&&(this.onerror=this.onerror?fi(h,this.onerror):h)}}function bl(s,u){return s===nt?u:function(f){var h=s.apply(this,arguments);l(f,h);var m=this.onsuccess,b=this.onerror;this.onsuccess=null,this.onerror=null;var T=u.apply(this,arguments);return m&&(this.onsuccess=this.onsuccess?fi(m,this.onsuccess):m),b&&(this.onerror=this.onerror?fi(b,this.onerror):b),h===void 0?T===void 0?void 0:T:l(h,T)}}function Oh(s,u){return s===nt?u:function(){return u.apply(this,arguments)===!1?!1:s.apply(this,arguments)}}function Ks(s,u){return s===nt?u:function(){var f=s.apply(this,arguments);if(f&&typeof f.then=="function"){for(var h=this,m=arguments.length,b=new Array(m);m--;)b[m]=arguments[m];return f.then(function(){return u.apply(h,b)})}return u.apply(this,arguments)}}var on=typeof location<"u"&&/^(http|https):\/\/(localhost|127\.0\.0\.1)/.test(location.href);function El(s,u){on=s}var Ne={},kt=100,Rt=typeof Promise>"u"?[]:function(){var s=Promise.resolve();if(typeof crypto>"u"||!crypto.subtle)return[s,d(s),s];var u=crypto.subtle.digest("SHA-512",new Uint8Array([0]));return[u,d(u),s]}(),ur=Rt[0],Sn=Rt[1],ki=Rt[2],Eu=Sn&&Sn.then,cr=ur&&ur.constructor,Zt=!!ki;function la(){queueMicrotask(jS)}var Cn=function(s,u){vu.push([s,u]),Kn&&(la(),Kn=!1)},Yn=!0,Kn=!0,un=[],Xa=[],Dh=Qa,fa={id:"global",global:!0,ref:0,unhandleds:[],onunhandled:nt,pgp:!1,env:{},finalize:nt},be=fa,vu=[],Za=0,vl=[];function de(s){if(typeof this!="object")throw new TypeError("Promises must be constructed via new");this._listeners=[],this._lib=!1;var u=this._PSD=be;if(typeof s!="function"){if(s!==Ne)throw new TypeError("Not a function");this._state=arguments[1],this._value=arguments[2],this._state===!1&&Rh(this,this._value);return}this._state=null,this._value=null,++u.ref,s_(this,s)}var kh={get:function(){var s=be,u=Al;function f(h,m){var b=this,T=!s.global&&(s!==be||u!==Al),A=T&&!ha(),S=new de(function(O,$){Lh(b,new a_(c_(h,s,T,A),c_(m,s,T,A),O,$,s))});return this._consoleTask&&(S._consoleTask=this._consoleTask),S}return f.prototype=Ne,f},set:function(s){y(this,"then",s&&s.prototype===Ne?kh:{get:function(){return s},set:kh.set})}};E(de.prototype,{then:kh,_then:function(s,u){Lh(this,new a_(null,null,s,u,be))},catch:function(s){if(arguments.length===1)return this.then(null,s);var u=arguments[0],f=arguments[1];return typeof u=="function"?this.then(null,function(h){return h instanceof u?f(h):Tl(h)}):this.then(null,function(h){return h&&h.name===u?f(h):Tl(h)})},finally:function(s){return this.then(function(u){return de.resolve(s()).then(function(){return u})},function(u){return de.resolve(s()).then(function(){return Tl(u)})})},timeout:function(s,u){var f=this;return s<1/0?new de(function(h,m){var b=setTimeout(function(){return m(new me.Timeout(u))},s);f.then(h,m).finally(clearTimeout.bind(null,b))}):this}}),typeof Symbol<"u"&&Symbol.toStringTag&&y(de.prototype,Symbol.toStringTag,"Dexie.Promise"),fa.env=u_();function a_(s,u,f,h,m){this.onFulfilled=typeof s=="function"?s:null,this.onRejected=typeof u=="function"?u:null,this.resolve=f,this.reject=h,this.psd=m}E(de,{all:function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.length===0&&u([]);var h=s.length;s.forEach(function(m,b){return de.resolve(m).then(function(T){s[b]=T,--h||u(s)},f)})})},resolve:function(s){if(s instanceof de)return s;if(s&&typeof s.then=="function")return new de(function(f,h){s.then(f,h)});var u=new de(Ne,!0,s);return u},reject:Tl,race:function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.map(function(h){return de.resolve(h).then(u,f)})})},PSD:{get:function(){return be},set:function(s){return be=s}},totalEchoes:{get:function(){return Al}},newPSD:da,usePSD:Ja,scheduler:{get:function(){return Cn},set:function(s){Cn=s}},rejectionMapper:{get:function(){return Dh},set:function(s){Dh=s}},follow:function(s,u){return new de(function(f,h){return da(function(m,b){var T=be;T.unhandleds=[],T.onunhandled=b,T.finalize=fi(function(){var A=this;WS(function(){A.unhandleds.length===0?m():b(A.unhandleds[0])})},T.finalize),s()},u,f,h)})}}),cr&&(cr.allSettled&&y(de,"allSettled",function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u){s.length===0&&u([]);var f=s.length,h=new Array(f);s.forEach(function(m,b){return de.resolve(m).then(function(T){return h[b]={status:"fulfilled",value:T}},function(T){return h[b]={status:"rejected",reason:T}}).then(function(){return--f||u(h)})})})}),cr.any&&typeof AggregateError<"u"&&y(de,"any",function(){var s=ut.apply(null,arguments).map(wl);return new de(function(u,f){s.length===0&&f(new AggregateError([]));var h=s.length,m=new Array(h);s.forEach(function(b,T){return de.resolve(b).then(function(A){return u(A)},function(A){m[T]=A,--h||f(new AggregateError(m))})})})}),cr.withResolvers&&(de.withResolvers=cr.withResolvers));function s_(s,u){try{u(function(f){if(s._state===null){if(f===s)throw new TypeError("A promise cannot be resolved with itself.");var h=s._lib&&js();f&&typeof f.then=="function"?s_(s,function(m,b){f instanceof de?f._then(m,b):f.then(m,b)}):(s._state=!0,s._value=f,o_(s)),h&&Ws()}},Rh.bind(null,s))}catch(f){Rh(s,f)}}function Rh(s,u){if(Xa.push(u),s._state===null){var f=s._lib&&js();u=Dh(u),s._state=!1,s._value=u,GS(s),o_(s),f&&Ws()}}function o_(s){var u=s._listeners;s._listeners=[];for(var f=0,h=u.length;f0;)for(s=vu,vu=[],f=s.length,u=0;u0);Yn=!0,Kn=!0}function Ph(){var s=un;un=[],s.forEach(function(h){h._PSD.onunhandled.call(null,h._value,h)});for(var u=vl.slice(0),f=u.length;f;)u[--f]()}function WS(s){function u(){s(),vl.splice(vl.indexOf(u),1)}vl.push(u),++Za,Cn(function(){--Za===0&&Ph()},[])}function GS(s){un.some(function(u){return u._value===s._value})||un.push(s)}function QS(s){for(var u=un.length;u;)if(un[--u]._value===s._value){un.splice(u,1);return}}function Tl(s){return new de(Ne,!1,s)}function At(s,u){var f=be;return function(){var h=js(),m=be;try{return pa(f,!0),s.apply(this,arguments)}catch(b){u&&u(b)}finally{pa(m,!1),h&&Ws()}}}var Jt={awaits:0,echoes:0,id:0},XS=0,xl=[],yl=0,Al=0,ZS=0;function da(s,u,f,h){var m=be,b=Object.create(m);b.parent=m,b.ref=0,b.global=!1,b.id=++ZS,fa.env,b.env=Zt?{Promise:de,PromiseProp:{value:de,configurable:!0,writable:!0},all:de.all,race:de.race,allSettled:de.allSettled,any:de.any,resolve:de.resolve,reject:de.reject}:{},u&&l(b,u),++m.ref,b.finalize=function(){--this.parent.ref||this.parent.finalize()};var T=Ja(b,s,f,h);return b.ref===0&&b.finalize(),T}function Gs(){return Jt.id||(Jt.id=++XS),++Jt.awaits,Jt.echoes+=kt,Jt.id}function ha(){return Jt.awaits?(--Jt.awaits===0&&(Jt.id=0),Jt.echoes=Jt.awaits*kt,!0):!1}(""+Eu).indexOf("[native code]")===-1&&(Gs=ha=nt);function wl(s){return Jt.echoes&&s&&s.constructor===cr?(Gs(),s.then(function(u){return ha(),u},function(u){return ha(),Lt(u)})):s}function JS(s){++Al,(!Jt.echoes||--Jt.echoes===0)&&(Jt.echoes=Jt.awaits=Jt.id=0),xl.push(be),pa(s,!0)}function eC(){var s=xl[xl.length-1];xl.pop(),pa(s,!1)}function pa(s,u){var f=be;if((u?Jt.echoes&&(!yl++||s!==be):yl&&(!--yl||s!==be))&&queueMicrotask(u?JS.bind(null,s):eC),s!==be&&(be=s,f===fa&&(fa.env=u_()),Zt)){var h=fa.env.Promise,m=s.env;(f.global||s.global)&&(Object.defineProperty(i,"Promise",m.PromiseProp),h.all=m.all,h.race=m.race,h.resolve=m.resolve,h.reject=m.reject,m.allSettled&&(h.allSettled=m.allSettled),m.any&&(h.any=m.any))}}function u_(){var s=i.Promise;return Zt?{Promise:s,PromiseProp:Object.getOwnPropertyDescriptor(i,"Promise"),all:s.all,race:s.race,allSettled:s.allSettled,any:s.any,resolve:s.resolve,reject:s.reject}:{}}function Ja(s,u,f,h,m){var b=be;try{return pa(s,!0),u(f,h,m)}finally{pa(b,!1)}}function c_(s,u,f,h){return typeof s!="function"?s:function(){var m=be;f&&Gs(),pa(u,!0);try{return s.apply(this,arguments)}finally{pa(m,!1),h&&queueMicrotask(ha)}}}function Mh(s){Promise===cr&&Jt.echoes===0?yl===0?s():enqueueNativeMicroTask(s):setTimeout(s,0)}var Lt=de.reject;function Fh(s,u,f,h){if(!s.idbdb||!s._state.openComplete&&!be.letThrough&&!s._vip){if(s._state.openComplete)return Lt(new me.DatabaseClosed(s._state.dbOpenError));if(!s._state.isBeingOpened){if(!s._state.autoOpen)return Lt(new me.DatabaseClosed);s.open().catch(nt)}return s._state.dbReadyPromise.then(function(){return Fh(s,u,f,h)})}else{var m=s._createTransaction(u,f,s._dbSchema);try{m.create(),s._state.PR1398_maxLoop=3}catch(b){return b.name===$t.InvalidState&&s.isOpen()&&--s._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),s.close({disableAutoOpen:!1}),s.open().then(function(){return Fh(s,u,f,h)})):Lt(b)}return m._promise(u,function(b,T){return da(function(){return be.trans=m,h(b,T,m)})}).then(function(b){if(u==="readwrite")try{m.idbtrans.commit()}catch{}return u==="readonly"?b:m._completion.then(function(){return b})})}}var l_="4.0.11",es=String.fromCharCode(65535),Bh=-1/0,Ri="Invalid key provided. Keys must be of type string, number, Date or Array.",f_="String expected.",Qs=[],Sl="__dbnames",$h="readonly",Hh="readwrite";function ts(s,u){return s?u?function(){return s.apply(this,arguments)&&u.apply(this,arguments)}:s:u}var d_={type:3,lower:-1/0,lowerOpen:!1,upper:[[]],upperOpen:!1};function Cl(s){return typeof s=="string"&&!/\./.test(s)?function(u){return u[s]===void 0&&s in u&&(u=F(u),delete u[s]),u}:function(u){return u}}function h_(){throw me.Type()}function We(s,u){try{var f=p_(s),h=p_(u);if(f!==h)return f==="Array"?1:h==="Array"?-1:f==="binary"?1:h==="binary"?-1:f==="string"?1:h==="string"?-1:f==="Date"?1:h!=="Date"?NaN:-1;switch(f){case"number":case"Date":case"string":return s>u?1:s=0})){for(var D=0;D0){var b=m.valueMapper,T=Il(m,m.table.core.schema);return m.table.core.query({trans:h,limit:m.limit,values:!0,query:{index:T,range:m.range}}).then(function(S){var O=S.result;return b?O.map(b):O})}else{var A=[];return Nl(m,function(S){return A.push(S)},h,m.table.core).then(function(){return A})}},u)},s.prototype.offset=function(u){var f=this._ctx;return u<=0?this:(f.offset+=u,Xs(f)?Vh(f,function(){var h=u;return function(m,b){return h===0?!0:h===1?(--h,!1):(b(function(){m.advance(h),h=0}),!1)}}):Vh(f,function(){var h=u;return function(){return--h<0}}),this)},s.prototype.limit=function(u){return this._ctx.limit=Math.min(this._ctx.limit,u),Vh(this._ctx,function(){var f=u;return function(h,m,b){return--f<=0&&m(b),f>=0}},!0),this},s.prototype.until=function(u,f){return Uh(this._ctx,function(h,m,b){return u(h.value)?(m(b),f):!0}),this},s.prototype.first=function(u){return this.limit(1).toArray(function(f){return f[0]}).then(u)},s.prototype.last=function(u){return this.reverse().first(u)},s.prototype.filter=function(u){return Uh(this._ctx,function(f){return u(f.value)}),iC(this._ctx,u),this},s.prototype.and=function(u){return this.filter(u)},s.prototype.or=function(u){return new this.db.WhereClause(this._ctx.table,u,this)},s.prototype.reverse=function(){return this._ctx.dir=this._ctx.dir==="prev"?"next":"prev",this._ondirectionchange&&this._ondirectionchange(this._ctx.dir),this},s.prototype.desc=function(){return this.reverse()},s.prototype.eachKey=function(u){var f=this._ctx;return f.keysOnly=!f.isMatch,this.each(function(h,m){u(m.key,m)})},s.prototype.eachUniqueKey=function(u){return this._ctx.unique="unique",this.eachKey(u)},s.prototype.eachPrimaryKey=function(u){var f=this._ctx;return f.keysOnly=!f.isMatch,this.each(function(h,m){u(m.primaryKey,m)})},s.prototype.keys=function(u){var f=this._ctx;f.keysOnly=!f.isMatch;var h=[];return this.each(function(m,b){h.push(b.key)}).then(function(){return h}).then(u)},s.prototype.primaryKeys=function(u){var f=this._ctx;if(f.dir==="next"&&Xs(f,!0)&&f.limit>0)return this._read(function(m){var b=Il(f,f.table.core.schema);return f.table.core.query({trans:m,values:!1,limit:f.limit,query:{index:b,range:f.range}})}).then(function(m){var b=m.result;return b}).then(u);f.keysOnly=!f.isMatch;var h=[];return this.each(function(m,b){h.push(b.primaryKey)}).then(function(){return h}).then(u)},s.prototype.uniqueKeys=function(u){return this._ctx.unique="unique",this.keys(u)},s.prototype.firstKey=function(u){return this.limit(1).keys(function(f){return f[0]}).then(u)},s.prototype.lastKey=function(u){return this.reverse().firstKey(u)},s.prototype.distinct=function(){var u=this._ctx,f=u.index&&u.table.schema.idxByName[u.index];if(!f||!f.multi)return this;var h={};return Uh(this._ctx,function(m){var b=m.primaryKey.toString(),T=g(h,b);return h[b]=!0,!T}),this},s.prototype.modify=function(u){var f=this,h=this._ctx;return this._write(function(m){var b;if(typeof u=="function")b=u;else{var T=a(u),A=T.length;b=function(Q){for(var Z=!1,re=0;re0&&S.mutate({trans:m,type:"add",values:le}).then(function(ye){for(var It in ye.failures)pe.splice(parseInt(It),1);J(le.length,ye)})).then(function(){return(Ae.length>0||Z&&typeof u=="object")&&S.mutate({trans:m,type:"put",keys:Ve,values:Ae,criteria:Z,changeSpec:typeof u!="function"&&u,isAdditionalChunk:G>0}).then(function(ye){return J(Ae.length,ye)})}).then(function(){return(pe.length>0||Z&&u===qh)&&S.mutate({trans:m,type:"delete",keys:pe,criteria:Z,isAdditionalChunk:G>0}).then(function(ye){return J(pe.length,ye)})}).then(function(){return Q.length>G+ue&&re(G+W)})})};return re(0).then(function(){if(M.length>0)throw new zr("Error modifying one or more objects",M,z,j);return Q.length})})})},s.prototype.delete=function(){var u=this._ctx,f=u.range;return Xs(u)&&(u.isPrimKey||f.type===3)?this._write(function(h){var m=u.table.core.schema.primaryKey,b=f;return u.table.core.count({trans:h,query:{index:m,range:b}}).then(function(T){return u.table.core.mutate({trans:h,type:"deleteRange",range:b}).then(function(A){var S=A.failures;A.lastResult,A.results;var O=A.numFailures;if(O)throw new zr("Could not delete some values",Object.keys(S).map(function($){return S[$]}),T-O);return T-O})})}):this.modify(qh)},s}(),qh=function(s,u){return u.value=null};function sC(s){return xu(aC.prototype,function(f,h){this.db=s;var m=d_,b=null;if(h)try{m=h()}catch(O){b=O}var T=f._ctx,A=T.table,S=A.hook.reading.fire;this._ctx={table:A,index:T.index,isPrimKey:!T.index||A.schema.primKey.keyPath&&T.index===A.schema.primKey.name,range:m,keysOnly:!1,dir:"next",unique:"",algorithm:null,filter:null,replayFilter:null,justLimit:!0,isMatch:null,offset:0,limit:1/0,error:b,or:T.or,valueMapper:S!==Qa?S:null}})}function oC(s,u){return su?-1:s===u?0:1}function cn(s,u,f){var h=s instanceof v_?new s.Collection(s):s;return h._ctx.error=f?new f(u):new TypeError(u),h}function Zs(s){return new s.Collection(s,function(){return E_("")}).limit(0)}function cC(s){return s==="next"?function(u){return u.toUpperCase()}:function(u){return u.toLowerCase()}}function lC(s){return s==="next"?function(u){return u.toLowerCase()}:function(u){return u.toUpperCase()}}function fC(s,u,f,h,m,b){for(var T=Math.min(s.length,h.length),A=-1,S=0;S=0?s.substr(0,A)+u[A]+f.substr(A+1):null;m(s[S],O)<0&&(A=S)}return T0)&&(re=ue)}return j(re!==null?function(){z.continue(re+$)}:J),!1}),ie}function ma(s,u,f,h){return{type:2,lower:s,upper:u,lowerOpen:f,upperOpen:h}}function E_(s){return{type:1,lower:s,upper:s}}var v_=function(){function s(){}return Object.defineProperty(s.prototype,"Collection",{get:function(){return this._ctx.table.db.Collection},enumerable:!1,configurable:!0}),s.prototype.between=function(u,f,h,m){h=h!==!1,m=m===!0;try{return this._cmp(u,f)>0||this._cmp(u,f)===0&&(h||m)&&!(h&&m)?Zs(this):new this.Collection(this,function(){return ma(u,f,!h,!m)})}catch{return cn(this,Ri)}},s.prototype.equals=function(u){return u==null?cn(this,Ri):new this.Collection(this,function(){return E_(u)})},s.prototype.above=function(u){return u==null?cn(this,Ri):new this.Collection(this,function(){return ma(u,void 0,!0)})},s.prototype.aboveOrEqual=function(u){return u==null?cn(this,Ri):new this.Collection(this,function(){return ma(u,void 0,!1)})},s.prototype.below=function(u){return u==null?cn(this,Ri):new this.Collection(this,function(){return ma(void 0,u,!1,!0)})},s.prototype.belowOrEqual=function(u){return u==null?cn(this,Ri):new this.Collection(this,function(){return ma(void 0,u)})},s.prototype.startsWith=function(u){return typeof u!="string"?cn(this,f_):this.between(u,u+es,!0,!0)},s.prototype.startsWithIgnoreCase=function(u){return u===""?this.startsWith(u):Ol(this,function(f,h){return f.indexOf(h[0])===0},[u],es)},s.prototype.equalsIgnoreCase=function(u){return Ol(this,function(f,h){return f===h[0]},[u],"")},s.prototype.anyOfIgnoreCase=function(){var u=ut.apply(ot,arguments);return u.length===0?Zs(this):Ol(this,function(f,h){return h.indexOf(f)!==-1},u,"")},s.prototype.startsWithAnyOfIgnoreCase=function(){var u=ut.apply(ot,arguments);return u.length===0?Zs(this):Ol(this,function(f,h){return h.some(function(m){return f.indexOf(m)===0})},u,es)},s.prototype.anyOf=function(){var u=this,f=ut.apply(ot,arguments),h=this._cmp;try{f.sort(h)}catch{return cn(this,Ri)}if(f.length===0)return Zs(this);var m=new this.Collection(this,function(){return ma(f[0],f[f.length-1])});m._ondirectionchange=function(T){h=T==="next"?u._ascending:u._descending,f.sort(h)};var b=0;return m._addAlgorithm(function(T,A,S){for(var O=T.key;h(O,f[b])>0;)if(++b,b===f.length)return A(S),!1;return h(O,f[b])===0?!0:(A(function(){T.continue(f[b])}),!1)}),m},s.prototype.notEqual=function(u){return this.inAnyRange([[Bh,u],[u,this.db._maxKey]],{includeLowers:!1,includeUppers:!1})},s.prototype.noneOf=function(){var u=ut.apply(ot,arguments);if(u.length===0)return new this.Collection(this);try{u.sort(this._ascending)}catch{return cn(this,Ri)}var f=u.reduce(function(h,m){return h?h.concat([[h[h.length-1][1],m]]):[[Bh,m]]},null);return f.push([u[u.length-1],this.db._maxKey]),this.inAnyRange(f,{includeLowers:!1,includeUppers:!1})},s.prototype.inAnyRange=function(u,f){var h=this,m=this._cmp,b=this._ascending,T=this._descending,A=this._min,S=this._max;if(u.length===0)return Zs(this);if(!u.every(function(G){return G[0]!==void 0&&G[1]!==void 0&&b(G[0],G[1])<=0}))return cn(this,"First argument to inAnyRange() must be an Array of two-value Arrays [lower,upper] where upper must not be lower than lower",me.InvalidArgument);var O=!f||f.includeLowers!==!1,$=f&&f.includeUppers===!0;function D(G,ue){for(var he=0,le=G.length;he0){Ae[0]=A(Ae[0],ue[0]),Ae[1]=S(Ae[1],ue[1]);break}}return he===le&&G.push(ue),G}var W=b;function ie(G,ue){return W(G[0],ue[0])}var M;try{M=u.reduce(D,[]),M.sort(ie)}catch{return cn(this,Ri)}var z=0,j=$?function(G){return b(G,M[z][1])>0}:function(G){return b(G,M[z][1])>=0},J=O?function(G){return T(G,M[z][0])>0}:function(G){return T(G,M[z][0])>=0};function Q(G){return!j(G)&&!J(G)}var Z=j,re=new this.Collection(this,function(){return ma(M[0][0],M[M.length-1][1],!O,!$)});return re._ondirectionchange=function(G){G==="next"?(Z=j,W=b):(Z=J,W=T),M.sort(ie)},re._addAlgorithm(function(G,ue,he){for(var le=G.key;Z(le);)if(++z,z===M.length)return ue(he),!1;return Q(le)?!0:(h._cmp(le,M[z][1])===0||h._cmp(le,M[z][0])===0||ue(function(){W===b?G.continue(M[z][0]):G.continue(M[z][1])}),!1)}),re},s.prototype.startsWithAnyOf=function(){var u=ut.apply(ot,arguments);return u.every(function(f){return typeof f=="string"})?u.length===0?Zs(this):this.inAnyRange(u.map(function(f){return[f,f+es]})):cn(this,"startsWithAnyOf() only works with strings")},s}();function dC(s){return xu(v_.prototype,function(f,h,m){if(this.db=s,this._ctx={table:f,index:h===":id"?null:h,or:m},this._cmp=this._ascending=We,this._descending=function(b,T){return We(T,b)},this._max=function(b,T){return We(b,T)>0?b:T},this._min=function(b,T){return We(b,T)<0?b:T},this._IDBKeyRange=s._deps.IDBKeyRange,!this._IDBKeyRange)throw new me.MissingAPI})}function di(s){return At(function(u){return Au(u),s(u.target.error),!1})}function Au(s){s.stopPropagation&&s.stopPropagation(),s.preventDefault&&s.preventDefault()}var wu="storagemutated",zh="x-storagemutated-1",ga=Tu(null,wu),hC=function(){function s(){}return s.prototype._lock=function(){return R(!be.global),++this._reculock,this._reculock===1&&!be.global&&(be.lockOwnerFor=this),this},s.prototype._unlock=function(){if(R(!be.global),--this._reculock===0)for(be.global||(be.lockOwnerFor=null);this._blockedFuncs.length>0&&!this._locked();){var u=this._blockedFuncs.shift();try{Ja(u[1],u[0])}catch{}}return this},s.prototype._locked=function(){return this._reculock&&be.lockOwnerFor!==this},s.prototype.create=function(u){var f=this;if(!this.mode)return this;var h=this.db.idbdb,m=this.db._state.dbOpenError;if(R(!this.idbtrans),!u&&!h)switch(m&&m.name){case"DatabaseClosedError":throw new me.DatabaseClosed(m);case"MissingAPIError":throw new me.MissingAPI(m.message,m);default:throw new me.OpenFailed(m)}if(!this.active)throw new me.TransactionInactive;return R(this._completion._state===null),u=this.idbtrans=u||(this.db.core?this.db.core.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability}):h.transaction(this.storeNames,this.mode,{durability:this.chromeTransactionDurability})),u.onerror=At(function(b){Au(b),f._reject(u.error)}),u.onabort=At(function(b){Au(b),f.active&&f._reject(new me.Abort(u.error)),f.active=!1,f.on("abort").fire(b)}),u.oncomplete=At(function(){f.active=!1,f._resolve(),"mutatedParts"in u&&ga.storagemutated.fire(u.mutatedParts)}),this},s.prototype._promise=function(u,f,h){var m=this;if(u==="readwrite"&&this.mode!=="readwrite")return Lt(new me.ReadOnly("Transaction is readonly"));if(!this.active)return Lt(new me.TransactionInactive);if(this._locked())return new de(function(T,A){m._blockedFuncs.push([function(){m._promise(u,f,h).then(T,A)},be])});if(h)return da(function(){var T=new de(function(A,S){m._lock();var O=f(A,S,m);O&&O.then&&O.then(A,S)});return T.finally(function(){return m._unlock()}),T._lib=!0,T});var b=new de(function(T,A){var S=f(T,A,m);S&&S.then&&S.then(T,A)});return b._lib=!0,b},s.prototype._root=function(){return this.parent?this.parent._root():this},s.prototype.waitFor=function(u){var f=this._root(),h=de.resolve(u);if(f._waitingFor)f._waitingFor=f._waitingFor.then(function(){return h});else{f._waitingFor=h,f._waitingQueue=[];var m=f.idbtrans.objectStore(f.storeNames[0]);(function T(){for(++f._spinCount;f._waitingQueue.length;)f._waitingQueue.shift()();f._waitingFor&&(m.get(-1/0).onsuccess=T)})()}var b=f._waitingFor;return new de(function(T,A){h.then(function(S){return f._waitingQueue.push(At(T.bind(null,S)))},function(S){return f._waitingQueue.push(At(A.bind(null,S)))}).finally(function(){f._waitingFor===b&&(f._waitingFor=null)})})},s.prototype.abort=function(){this.active&&(this.active=!1,this.idbtrans&&this.idbtrans.abort(),this._reject(new me.Abort))},s.prototype.table=function(u){var f=this._memoizedTables||(this._memoizedTables={});if(g(f,u))return f[u];var h=this.schema[u];if(!h)throw new me.NotFound("Table "+u+" not part of transaction");var m=new this.db.Table(u,h,this);return m.core=this.db.core.table(u),f[u]=m,m},s}();function pC(s){return xu(hC.prototype,function(f,h,m,b,T){var A=this;this.db=s,this.mode=f,this.storeNames=h,this.schema=m,this.chromeTransactionDurability=b,this.idbtrans=null,this.on=Tu(this,"complete","error","abort"),this.parent=T||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 de(function(S,O){A._resolve=S,A._reject=O}),this._completion.then(function(){A.active=!1,A.on.complete.fire()},function(S){var O=A.active;return A.active=!1,A.on.error.fire(S),A.parent?A.parent._reject(S):O&&A.idbtrans&&A.idbtrans.abort(),Lt(S)})})}function Yh(s,u,f,h,m,b,T){return{name:s,keyPath:u,unique:f,multi:h,auto:m,compound:b,src:(f&&!T?"&":"")+(h?"*":"")+(m?"++":"")+T_(u)}}function T_(s){return typeof s=="string"?s:s?"["+[].join.call(s,"+")+"]":""}function Kh(s,u,f){return{name:s,primKey:u,indexes:f,mappedClass:null,idxByName:V(f,function(h){return[h.name,h]})}}function mC(s){return s.length===1?s[0]:s}var Su=function(s){try{return s.only([[]]),Su=function(){return[[]]},[[]]}catch{return Su=function(){return es},es}};function jh(s){return s==null?function(){}:typeof s=="string"?gC(s):function(u){return X(u,s)}}function gC(s){var u=s.split(".");return u.length===1?function(f){return f[s]}:function(f){return X(f,s)}}function x_(s){return[].slice.call(s)}var _C=0;function Cu(s){return s==null?":id":typeof s=="string"?s:"[".concat(s.join("+"),"]")}function bC(s,u,f){function h(D,W){var ie=x_(D.objectStoreNames);return{schema:{name:D.name,tables:ie.map(function(M){return W.objectStore(M)}).map(function(M){var z=M.keyPath,j=M.autoIncrement,J=o(z),Q=z==null,Z={},re={name:M.name,primaryKey:{name:null,isPrimaryKey:!0,outbound:Q,compound:J,keyPath:z,autoIncrement:j,unique:!0,extractKey:jh(z)},indexes:x_(M.indexNames).map(function(G){return M.index(G)}).map(function(G){var ue=G.name,he=G.unique,le=G.multiEntry,Ae=G.keyPath,Ve=o(Ae),pe={name:ue,compound:Ve,keyPath:Ae,unique:he,multiEntry:le,extractKey:jh(Ae)};return Z[Cu(Ae)]=pe,pe}),getIndexByKeyPath:function(G){return Z[Cu(G)]}};return Z[":id"]=re.primaryKey,z!=null&&(Z[Cu(z)]=re.primaryKey),re})},hasGetAll:ie.length>0&&"getAll"in W.objectStore(ie[0])&&!(typeof navigator<"u"&&/Safari/.test(navigator.userAgent)&&!/(Chrome\/|Edge\/)/.test(navigator.userAgent)&&[].concat(navigator.userAgent.match(/Safari\/(\d*)/))[1]<604)}}function m(D){if(D.type===3)return null;if(D.type===4)throw new Error("Cannot convert never type to IDBKeyRange");var W=D.lower,ie=D.upper,M=D.lowerOpen,z=D.upperOpen,j=W===void 0?ie===void 0?null:u.upperBound(ie,!!z):ie===void 0?u.lowerBound(W,!!M):u.bound(W,ie,!!M,!!z);return j}function b(D){var W=D.name;function ie(j){var J=j.trans,Q=j.type,Z=j.keys,re=j.values,G=j.range;return new Promise(function(ue,he){ue=At(ue);var le=J.objectStore(W),Ae=le.keyPath==null,Ve=Q==="put"||Q==="add";if(!Ve&&Q!=="delete"&&Q!=="deleteRange")throw new Error("Invalid operation type: "+Q);var pe=(Z||re||{length:1}).length;if(Z&&re&&Z.length!==re.length)throw new Error("Given keys array must have same length as given values array.");if(pe===0)return ue({numFailures:0,failures:{},results:[],lastResult:void 0});var Be,Ce=[],Xe=[],ye=0,It=function(pi){++ye,Au(pi)};if(Q==="deleteRange"){if(G.type===4)return ue({numFailures:ye,failures:Xe,results:[],lastResult:void 0});G.type===3?Ce.push(Be=le.clear()):Ce.push(Be=le.delete(m(G)))}else{var Tr=Ve?Ae?[re,Z]:[re,null]:[Z,null],hi=Tr[0],Yr=Tr[1];if(Ve)for(var In=0;In=u});if(A.length===0)return de.resolve();A.forEach(function(O){m.push(function(){var $=T,D=O._cfg.dbschema;Pl(s,$,h),Pl(s,D,h),T=s._dbSchema=D;var W=Gh($,D);W.add.forEach(function(Q){Qh(h,Q[0],Q[1].primKey,Q[1].indexes)}),W.change.forEach(function(Q){if(Q.recreate)throw new me.Upgrade("Not yet support for changing primary key");var Z=h.objectStore(Q.name);Q.add.forEach(function(re){return Rl(Z,re)}),Q.change.forEach(function(re){Z.deleteIndex(re.name),Rl(Z,re)}),Q.del.forEach(function(re){return Z.deleteIndex(re)})});var ie=O._cfg.contentUpgrade;if(ie&&O._cfg.version>u){Dl(s,h),f._memoizedTables={};var M=Re(D);W.del.forEach(function(Q){M[Q]=$[Q]}),Wh(s,[s.Transaction.prototype]),kl(s,[s.Transaction.prototype],a(M),M),f.schema=M;var z=_t(ie);z&&Gs();var j,J=de.follow(function(){if(j=ie(f),j&&z){var Q=ha.bind(null,null);j.then(Q,Q)}});return j&&typeof j.then=="function"?de.resolve(j):J.then(function(){return j})}}),m.push(function($){var D=O._cfg.dbschema;SC(D,$),Wh(s,[s.Transaction.prototype]),kl(s,[s.Transaction.prototype],s._storeNames,s._dbSchema),f.schema=s._dbSchema}),m.push(function($){s.idbdb.objectStoreNames.contains("$meta")&&(Math.ceil(s.idbdb.version/10)===O._cfg.version?(s.idbdb.deleteObjectStore("$meta"),delete s._dbSchema.$meta,s._storeNames=s._storeNames.filter(function(D){return D!=="$meta"})):$.objectStore("$meta").put(O._cfg.version,"version"))})});function S(){return m.length?de.resolve(m.shift()(f.idbtrans)).then(S):de.resolve()}return S().then(function(){y_(T,h)})}function Gh(s,u){var f={del:[],add:[],change:[]},h;for(h in s)u[h]||f.del.push(h);for(h in u){var m=s[h],b=u[h];if(!m)f.add.push([h,b]);else{var T={name:h,def:b,recreate:!1,del:[],add:[],change:[]};if(""+(m.primKey.keyPath||"")!=""+(b.primKey.keyPath||"")||m.primKey.auto!==b.primKey.auto)T.recreate=!0,f.change.push(T);else{var A=m.idxByName,S=b.idxByName,O=void 0;for(O in A)S[O]||T.del.push(O);for(O in S){var $=A[O],D=S[O];$?$.src!==D.src&&T.change.push(D):T.add.push(D)}(T.del.length>0||T.add.length>0||T.change.length>0)&&f.change.push(T)}}}return f}function Qh(s,u,f,h){var m=s.db.createObjectStore(u,f.keyPath?{keyPath:f.keyPath,autoIncrement:f.auto}:{autoIncrement:f.auto});return h.forEach(function(b){return Rl(m,b)}),m}function y_(s,u){a(s).forEach(function(f){u.db.objectStoreNames.contains(f)||(on&&console.debug("Dexie: Creating missing table",f),Qh(u,f,s[f].primKey,s[f].indexes))})}function SC(s,u){[].slice.call(u.db.objectStoreNames).forEach(function(f){return s[f]==null&&u.db.deleteObjectStore(f)})}function Rl(s,u){s.createIndex(u.name,u.keyPath,{unique:u.unique,multiEntry:u.multi})}function Ll(s,u,f){var h={},m=L(u.objectStoreNames,0);return m.forEach(function(b){for(var T=f.objectStore(b),A=T.keyPath,S=Yh(T_(A),A||"",!0,!1,!!T.autoIncrement,A&&typeof A!="string",!0),O=[],$=0;$1?u:s}:{d:0});else{var f=new vr;return s&&"d"in s&&l(f,s),f}};E(vr.prototype,(ep={add:function(s){return Nu(this,s),this},addKey:function(s){return Iu(this,s,s),this},addKeys:function(s){var u=this;return s.forEach(function(f){return Iu(u,f,f)}),this},hasKey:function(s){var u=Ml(this).next(s).value;return u&&We(u.from,s)<=0&&We(u.to,s)>=0}},ep[Fe]=function(){return Ml(this)},ep));function Iu(s,u,f){var h=We(u,f);if(!isNaN(h)){if(h>0)throw RangeError();if(tp(s))return l(s,{from:u,to:f,d:1});var m=s.l,b=s.r;if(We(f,s.from)<0)return m?Iu(m,u,f):s.l={from:u,to:f,d:1,l:null,r:null},S_(s);if(We(u,s.to)>0)return b?Iu(b,u,f):s.r={from:u,to:f,d:1,l:null,r:null},S_(s);We(u,s.from)<0&&(s.from=u,s.l=null,s.d=b?b.d+1:1),We(f,s.to)>0&&(s.to=f,s.r=null,s.d=s.l?s.l.d+1:1);var T=!s.r;m&&!s.l&&Nu(s,m),b&&T&&Nu(s,b)}}function Nu(s,u){function f(h,m){var b=m.from,T=m.to,A=m.l,S=m.r;Iu(h,b,T),A&&f(h,A),S&&f(h,S)}tp(u)||f(s,u)}function w_(s,u){var f=Ml(u),h=f.next();if(h.done)return!1;for(var m=h.value,b=Ml(s),T=b.next(m.from),A=T.value;!h.done&&!T.done;){if(We(A.from,m.to)<=0&&We(A.to,m.from)>=0)return!0;We(m.from,A.from)<0?m=(h=f.next(A.from)).value:A=(T=b.next(m.from)).value}return!1}function Ml(s){var u=tp(s)?null:{s:0,n:s};return{next:function(f){for(var h=arguments.length>0;u;)switch(u.s){case 0:if(u.s=1,h)for(;u.n.l&&We(f,u.n.from)<0;)u={up:u,n:u.n.l,s:1};else for(;u.n.l;)u={up:u,n:u.n.l,s:1};case 1:if(u.s=2,!h||We(f,u.n.to)<=0)return{value:u.n,done:!1};case 2:if(u.n.r){u.s=3,u={up:u,n:u.n.r,s:0};continue}case 3:u=u.up}return{done:!0}}}}function S_(s){var u,f,h=(((u=s.r)===null||u===void 0?void 0:u.d)||0)-(((f=s.l)===null||f===void 0?void 0:f.d)||0),m=h>1?"r":h<-1?"l":"";if(m){var b=m==="r"?"l":"r",T=r({},s),A=s[m];s.from=A.from,s.to=A.to,s[m]=A[m],T[m]=A[b],s[b]=T,T.d=C_(T)}s.d=C_(s)}function C_(s){var u=s.r,f=s.l;return(u?f?Math.max(u.d,f.d):u.d:f?f.d:0)+1}function Fl(s,u){return a(u).forEach(function(f){s[f]?Nu(s[f],u[f]):s[f]=et(u[f])}),s}function rp(s,u){return s.all||u.all||Object.keys(s).some(function(f){return u[f]&&w_(u[f],s[f])})}var rs={},np={},ip=!1;function Bl(s,u){Fl(np,s),ip||(ip=!0,setTimeout(function(){ip=!1;var f=np;np={},ap(f,!1)},0))}function ap(s,u){u===void 0&&(u=!1);var f=new Set;if(s.all)for(var h=0,m=Object.values(rs);hMath.pow(2,62)?0:z.oldVersion;O=J<1,s.idbdb=M.result,b&&yC(s,S),xC(s,J/10,S,W)}},W),M.onsuccess=At(function(){S=null;var z=s.idbdb=M.result,j=L(z.objectStoreNames);if(j.length>0)try{var J=z.transaction(mC(j),"readonly");if(u.autoSchema)CC(s,z,J);else if(Pl(s,s._dbSchema,J),!IC(s,J)&&!b)return console.warn("Dexie SchemaDiff: Schema was extended without increasing the number passed to db.version(). Dexie will add missing parts and increment native version number to workaround this."),z.close(),m=z.version+1,b=!0,D($());Dl(s,J)}catch{}Qs.push(s),z.onversionchange=At(function(Q){u.vcFired=!0,s.on("versionchange").fire(Q)}),z.onclose=At(function(Q){s.on("close").fire(Q)}),O&&kC(s._deps,ie),D()},W)}).catch(function(D){switch(D?.name){case"UnknownError":if(u.PR1398_maxLoop>0)return u.PR1398_maxLoop--,console.warn("Dexie: Workaround for Chrome UnknownError on open()"),$();break;case"VersionError":if(m>0)return m=0,$();break}return de.reject(D)})};return de.race([h,(typeof navigator>"u"?de.resolve():LC()).then($)]).then(function(){return T(),u.onReadyBeingFired=[],de.resolve(Jh(function(){return s.on.ready.fire(s.vip)})).then(function D(){if(u.onReadyBeingFired.length>0){var W=u.onReadyBeingFired.reduce(Ks,nt);return u.onReadyBeingFired=[],de.resolve(Jh(function(){return W(s.vip)})).then(D)}})}).finally(function(){u.openCanceller===h&&(u.onReadyBeingFired=null,u.isBeingOpened=!1)}).catch(function(D){u.dbOpenError=D;try{S&&S.abort()}catch{}return h===u.openCanceller&&s._close(),Lt(D)}).finally(function(){u.openComplete=!0,A()}).then(function(){if(O){var D={};s.tables.forEach(function(W){W.schema.indexes.forEach(function(ie){ie.name&&(D["idb://".concat(s.name,"/").concat(W.name,"/").concat(ie.name)]=new vr(-1/0,[[[]]]))}),D["idb://".concat(s.name,"/").concat(W.name,"/")]=D["idb://".concat(s.name,"/").concat(W.name,"/:dels")]=new vr(-1/0,[[[]]])}),ga(wu).fire(D),ap(D,!0)}return s})}function sp(s){var u=function(T){return s.next(T)},f=function(T){return s.throw(T)},h=b(u),m=b(f);function b(T){return function(A){var S=T(A),O=S.value;return S.done?O:!O||typeof O.then!="function"?o(O)?Promise.all(O).then(h,m):h(O):O.then(h,m)}}return b(u)()}function MC(s,u,f){var h=arguments.length;if(h<2)throw new me.InvalidArgument("Too few arguments");for(var m=new Array(h-1);--h;)m[h-1]=arguments[h];f=m.pop();var b=St(m);return[s,b,f]}function N_(s,u,f,h,m){return de.resolve().then(function(){var b=be.transless||be,T=s._createTransaction(u,f,s._dbSchema,h);T.explicit=!0;var A={trans:T,transless:b};if(h)T.idbtrans=h.idbtrans;else try{T.create(),T.idbtrans._explicit=!0,s._state.PR1398_maxLoop=3}catch(D){return D.name===$t.InvalidState&&s.isOpen()&&--s._state.PR1398_maxLoop>0?(console.warn("Dexie: Need to reopen db"),s.close({disableAutoOpen:!1}),s.open().then(function(){return N_(s,u,f,null,m)})):Lt(D)}var S=_t(m);S&&Gs();var O,$=de.follow(function(){if(O=m.call(T,T),O)if(S){var D=ha.bind(null,null);O.then(D,D)}else typeof O.next=="function"&&typeof O.throw=="function"&&(O=sp(O))},A);return(O&&typeof O.then=="function"?de.resolve(O).then(function(D){return T.active?D:Lt(new me.PrematureCommit("Transaction committed too early. See http://bit.ly/2kdckMn"))}):$.then(function(){return O})).then(function(D){return h&&T._resolve(),T._completion.then(function(){return D})}).catch(function(D){return T._reject(D),Lt(D)})})}function $l(s,u,f){for(var h=o(s)?s.slice():[s],m=0;m0,ue=r(r({},J),{name:G?"".concat(Q,"(virtual-from:").concat(J.name,")"):J.name,lowLevelIndex:J,isVirtual:G,keyTail:j,keyLength:re,extractKey:jh(z),unique:!G&&J.unique});if(Z.push(ue),ue.isPrimaryKey||b.push(ue),re>1){var he=re===2?z[0]:z.slice(0,re-1);T(he,j+1,J)}return Z.sort(function(le,Ae){return le.keyTail-Ae.keyTail}),ue}var A=T(h.primaryKey.keyPath,0,h.primaryKey);m[":id"]=[A];for(var S=0,O=h.indexes;S0?Promise.reject(Z.failures[0]):Q.length0:We(s,u.lower)>=0}function YC(s,u){return u.upper===void 0?!0:u.upperOpen?We(s,u.upper)<0:We(s,u.upper)<=0}function cp(s,u){return zC(s,u)&&YC(s,u)}function L_(s,u,f,h,m,b){if(!f||f.length===0)return s;var T=u.query.index,A=T.multiEntry,S=u.query.range,O=h.schema.primaryKey,$=O.extractKey,D=T.extractKey,W=(T.lowLevelIndex||T).extractKey,ie=f.reduce(function(M,z){var j=M,J=[];if(z.type==="add"||z.type==="put")for(var Q=new vr,Z=z.values.length-1;Z>=0;--Z){var re=z.values[Z],G=$(re);if(!Q.hasKey(G)){var ue=D(re);(A&&o(ue)?ue.some(function(pe){return cp(pe,S)}):cp(ue,S))&&(Q.addKey(G),J.push(re))}}switch(z.type){case"add":{var he=new vr().addKeys(u.values?M.map(function(pe){return $(pe)}):M);j=M.concat(u.values?J.filter(function(pe){var Be=$(pe);return he.hasKey(Be)?!1:(he.addKey(Be),!0)}):J.map(function(pe){return $(pe)}).filter(function(pe){return he.hasKey(pe)?!1:(he.addKey(pe),!0)}));break}case"put":{var le=new vr().addKeys(z.values.map(function(pe){return $(pe)}));j=M.filter(function(pe){return!le.hasKey(u.values?$(pe):pe)}).concat(u.values?J:J.map(function(pe){return $(pe)}));break}case"delete":var Ae=new vr().addKeys(z.keys);j=M.filter(function(pe){return!Ae.hasKey(u.values?$(pe):pe)});break;case"deleteRange":var Ve=z.range;j=M.filter(function(pe){return!cp($(pe),Ve)});break}return j},s);return ie===s?s:(ie.sort(function(M,z){return We(W(M),W(z))||We($(M),$(z))}),u.limit&&u.limit<1/0&&(ie.length>u.limit?ie.length=u.limit:s.length===u.limit&&ie.length=0}function GC(s,u,f,h){var m=rs["idb://".concat(s,"/").concat(u)];if(!m)return[];var b=m.queries[f];if(!b)return[null,!1,m,null];var T=h.query?h.query.index.name:null,A=b[T||""];if(!A)return[null,!1,m,null];switch(f){case"query":var S=A.find(function(D){return D.req.limit===h.limit&&D.req.values===h.values&&P_(D.req.query.range,h.query.range)});if(S)return[S,!0,m,A];var O=A.find(function(D){var W="limit"in D.req?D.req.limit:1/0;return W>=h.limit&&(h.values?D.req.values:!0)&&WC(D.req.query.range,h.query.range)});return[O,!1,m,A];case"count":var $=A.find(function(D){return P_(D.req.query.range,h.query.range)});return[$,!!$,m,A]}}function QC(s,u,f,h){s.subscribers.add(f),h.addEventListener("abort",function(){s.subscribers.delete(f),s.subscribers.size===0&&XC(s,u)})}function XC(s,u){setTimeout(function(){s.subscribers.size===0&&Ue(u,s)},3e3)}var ZC={stack:"dbcore",level:0,name:"Cache",create:function(s){var u=s.schema.name,f=r(r({},s),{transaction:function(h,m,b){var T=s.transaction(h,m,b);if(m==="readwrite"){var A=new AbortController,S=A.signal,O=function($){return function(){if(A.abort(),m==="readwrite"){for(var D=new Set,W=0,ie=h;W0){z.optimisticOps=z.optimisticOps.filter(function(Xe){return Xe.trans!==T});for(var le=0,Ae=Object.values(z.queries.query);le=50||up(b,A).some(function(D){return D==null}))?$.then(function(D){var W=r(r({},A),{values:A.values.map(function(M,z){var j;if(D.failures[z])return M;var J=!((j=b.keyPath)===null||j===void 0)&&j.includes(".")?F(M):r({},M);return ce(J,b.keyPath,D.results[z]),J})}),ie=R_(O,W,D);O.optimisticOps.push(ie),queueMicrotask(function(){return A.mutatedParts&&Bl(A.mutatedParts)})}):(O.optimisticOps.push(A),A.mutatedParts&&Bl(A.mutatedParts),$.then(function(D){if(D.numFailures>0){Ue(O.optimisticOps,A);var W=R_(O,A,D);W&&O.optimisticOps.push(W),A.mutatedParts&&Bl(A.mutatedParts)}}),$.catch(function(){Ue(O.optimisticOps,A),A.mutatedParts&&Bl(A.mutatedParts)})),$},query:function(A){var S;if(!D_(be,m)||!k_("query",A))return m.query(A);var O=((S=be.trans)===null||S===void 0?void 0:S.db._options.cache)==="immutable",$=be,D=$.requery,W=$.signal,ie=GC(u,h,"query",A),M=ie[0],z=ie[1],j=ie[2],J=ie[3];if(M&&z)M.obsSet=A.obsSet;else{var Q=m.query(A).then(function(Z){var re=Z.result;if(M&&(M.res=re),O){for(var G=0,ue=re.length;G0?console.warn("Another connection wants to upgrade database '".concat(h.name,"'. Closing db now to resume the upgrade.")):console.warn("Another connection wants to delete database '".concat(h.name,"'. Closing db now to resume the delete request.")),h.close({disableAutoOpen:!1})}),this.on("blocked",function(S){!S.newVersion||S.newVersion=0&&Qs.splice(f,1),this.idbdb){try{this.idbdb.close()}catch{}this.idbdb=null}u.isBeingOpened||(u.dbReadyPromise=new de(function(h){u.dbReadyResolve=h}),u.openCanceller=new de(function(h,m){u.cancelOpen=m}))},s.prototype.close=function(u){var f=u===void 0?{disableAutoOpen:!0}:u,h=f.disableAutoOpen,m=this._state;h?(m.isBeingOpened&&m.cancelOpen(new me.DatabaseClosed),this._close(),m.autoOpen=!1,m.dbOpenError=new me.DatabaseClosed):(this._close(),m.autoOpen=this._options.autoOpen||m.isBeingOpened,m.openComplete=!1,m.dbOpenError=null)},s.prototype.delete=function(u){var f=this;u===void 0&&(u={disableAutoOpen:!0});var h=arguments.length>0&&typeof arguments[0]!="object",m=this._state;return new de(function(b,T){var A=function(){f.close(u);var S=f._deps.indexedDB.deleteDatabase(f.name);S.onsuccess=At(function(){RC(f._deps,f.name),b()}),S.onerror=di(T),S.onblocked=f._fireOnBlocked};if(h)throw new me.InvalidArgument("Invalid closeOptions argument to db.delete()");m.isBeingOpened?m.dbReadyPromise.then(A):A()})},s.prototype.backendDB=function(){return this.idbdb},s.prototype.isOpen=function(){return this.idbdb!==null},s.prototype.hasBeenClosed=function(){var u=this._state.dbOpenError;return u&&u.name==="DatabaseClosed"},s.prototype.hasFailed=function(){return this._state.dbOpenError!==null},s.prototype.dynamicallyOpened=function(){return this._state.autoSchema},Object.defineProperty(s.prototype,"tables",{get:function(){var u=this;return a(this._allTables).map(function(f){return u._allTables[f]})},enumerable:!1,configurable:!0}),s.prototype.transaction=function(){var u=MC.apply(this,arguments);return this._transaction.apply(this,u)},s.prototype._transaction=function(u,f,h){var m=this,b=be.trans;(!b||b.db!==this||u.indexOf("!")!==-1)&&(b=null);var T=u.indexOf("?")!==-1;u=u.replace("!","").replace("?","");var A,S;try{if(S=f.map(function($){var D=$ instanceof m.Table?$.name:$;if(typeof D!="string")throw new TypeError("Invalid table argument to Dexie.transaction(). Only Table or String are allowed");return D}),u=="r"||u===$h)A=$h;else if(u=="rw"||u==Hh)A=Hh;else throw new me.InvalidArgument("Invalid transaction mode: "+u);if(b){if(b.mode===$h&&A===Hh)if(T)b=null;else throw new me.SubTransaction("Cannot enter a sub-transaction with READWRITE mode when parent transaction is READONLY");b&&S.forEach(function($){if(b&&b.storeNames.indexOf($)===-1)if(T)b=null;else throw new me.SubTransaction("Table "+$+" not included in parent transaction.")}),T&&b&&!b.active&&(b=null)}}catch($){return b?b._promise(null,function(D,W){W($)}):Lt($)}var O=N_.bind(null,this,A,S,b,h);return b?b._promise(A,O,"lock"):be.trans?Ja(be.transless,function(){return m._whenReady(O)}):this._whenReady(O)},s.prototype.table=function(u){if(!g(this._allTables,u))throw new me.InvalidTable("Table ".concat(u," does not exist"));return this._allTables[u]},s}(),JC=typeof Symbol<"u"&&"observable"in Symbol?Symbol.observable:"@@observable",eI=function(){function s(u){this._subscribe=u}return s.prototype.subscribe=function(u,f,h){return this._subscribe(!u||typeof u=="function"?{next:u,error:f,complete:h}:u)},s.prototype[JC]=function(){return this},s}(),Ul;try{Ul={indexedDB:i.indexedDB||i.mozIndexedDB||i.webkitIndexedDB||i.msIndexedDB,IDBKeyRange:i.IDBKeyRange||i.webkitIDBKeyRange}}catch{Ul={indexedDB:null,IDBKeyRange:null}}function M_(s){var u=!1,f,h=new eI(function(m){var b=_t(s);function T(J){var Q=js();try{b&&Gs();var Z=da(s,J);return b&&(Z=Z.finally(ha)),Z}finally{Q&&Ws()}}var A=!1,S,O={},$={},D={get closed(){return A},unsubscribe:function(){A||(A=!0,S&&S.abort(),W&&ga.storagemutated.unsubscribe(z))}};m.start&&m.start(D);var W=!1,ie=function(){return Mh(j)};function M(){return rp($,O)}var z=function(J){Fl(O,J),M()&&ie()},j=function(){if(!(A||!Ul.indexedDB)){O={};var J={};S&&S.abort(),S=new AbortController;var Q={subscr:J,signal:S.signal,requery:ie,querier:s,trans:null},Z=T(Q);Promise.resolve(Z).then(function(re){u=!0,f=re,!(A||Q.signal.aborted)&&(O={},$=J,!je($)&&!W&&(ga(wu,z),W=!0),Mh(function(){return!A&&m.next&&m.next(re)}))},function(re){u=!1,["DatabaseClosedError","AbortError"].includes(re?.name)||A||Mh(function(){A||m.error&&m.error(re)})})}};return setTimeout(ie,0),D});return h.hasValue=function(){return u},h.getValue=function(){return f},h}var ns=Li;E(ns,r(r({},ca),{delete:function(s){var u=new ns(s,{addons:[]});return u.delete()},exists:function(s){return new ns(s,{addons:[]}).open().then(function(u){return u.close(),!0}).catch("NoSuchDatabaseError",function(){return!1})},getDatabaseNames:function(s){try{return DC(ns.dependencies).then(s)}catch{return Lt(new me.MissingAPI)}},defineClass:function(){function s(u){l(this,u)}return s},ignoreTransaction:function(s){return be.trans?Ja(be.transless,s):s()},vip:Jh,async:function(s){return function(){try{var u=sp(s.apply(this,arguments));return!u||typeof u.then!="function"?de.resolve(u):u}catch(f){return Lt(f)}}},spawn:function(s,u,f){try{var h=sp(s.apply(f,u||[]));return!h||typeof h.then!="function"?de.resolve(h):h}catch(m){return Lt(m)}},currentTransaction:{get:function(){return be.trans||null}},waitFor:function(s,u){var f=de.resolve(typeof s=="function"?ns.ignoreTransaction(s):s).timeout(u||6e4);return be.trans?be.trans.waitFor(f):f},Promise:de,debug:{get:function(){return on},set:function(s){El(s)}},derive:C,extend:l,props:E,override:H,Events:Tu,on:ga,liveQuery:M_,extendObservabilitySet:Fl,getByKeyPath:X,setByKeyPath:ce,delByKeyPath:ve,shallowClone:Re,deepClone:F,getObjectDiff:op,cmp:We,asap:B,minKey:Bh,addons:[],connections:Qs,errnames:$t,dependencies:Ul,cache:rs,semVer:l_,version:l_.split(".").map(function(s){return parseInt(s)}).reduce(function(s,u,f){return s+u/Math.pow(10,f*2)})})),ns.maxKey=Su(ns.dependencies.IDBKeyRange),typeof dispatchEvent<"u"&&typeof addEventListener<"u"&&(ga(wu,function(s){if(!_a){var u;u=new CustomEvent(zh,{detail:s}),_a=!0,dispatchEvent(u),_a=!1}}),addEventListener(zh,function(s){var u=s.detail;_a||lp(u)}));function lp(s){var u=_a;try{_a=!0,ga.storagemutated.fire(s),ap(s,!0)}finally{_a=u}}var _a=!1,ba,fp=function(){};typeof BroadcastChannel<"u"&&(fp=function(){ba=new BroadcastChannel(zh),ba.onmessage=function(s){return s.data&&lp(s.data)}},fp(),typeof ba.unref=="function"&&ba.unref(),ga(wu,function(s){_a||ba.postMessage(s)})),typeof addEventListener<"u"&&(addEventListener("pagehide",function(s){if(!Li.disableBfCache&&s.persisted){on&&console.debug("Dexie: handling persisted pagehide"),ba?.close();for(var u=0,f=Qs;u{"use strict";function Ad(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}Tt.defaults=Ad();function TA(e){Tt.defaults=e}var xA=/[&<>"']/,cR=new RegExp(xA.source,"g"),yA=/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,lR=new RegExp(yA.source,"g"),fR={"&":"&","<":"<",">":">",'"':""","'":"'"},gA=e=>fR[e];function xn(e,t){if(t){if(xA.test(e))return e.replace(cR,gA)}else if(yA.test(e))return e.replace(lR,gA);return e}var dR=/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/ig;function hR(e){return e.replace(dR,(t,r)=>(r=r.toLowerCase(),r==="colon"?":":r.charAt(0)==="#"?r.charAt(1)==="x"?String.fromCharCode(parseInt(r.substring(2),16)):String.fromCharCode(+r.substring(1)):""))}var pR=/(^|[^\[])\^/g;function dt(e,t){let r=typeof e=="string"?e:e.source;t=t||"";let n={replace:(i,a)=>{let o=typeof a=="string"?a:a.source;return o=o.replace(pR,"$1"),r=r.replace(i,o),n},getRegex:()=>new RegExp(r,t)};return n}function _A(e){try{e=encodeURI(e).replace(/%25/g,"%")}catch{return null}return e}var Bc={exec:()=>null};function bA(e,t){let r=e.replace(/\|/g,(a,o,l)=>{let d=!1,p=o;for(;--p>=0&&l[p]==="\\";)d=!d;return d?"|":" |"}),n=r.split(/ \|/),i=0;if(n[0].trim()||n.shift(),n.length>0&&!n[n.length-1].trim()&&n.pop(),t)if(n.length>t)n.splice(t);else for(;n.length{let a=i.match(/^\s+/);if(a===null)return i;let[o]=a;return o.length>=n.length?i.slice(n.length):i}).join(` +`)}var Rs=class{options;rules;lexer;constructor(t){this.options=t||Tt.defaults}space(t){let r=this.rules.block.newline.exec(t);if(r&&r[0].length>0)return{type:"space",raw:r[0]}}code(t){let r=this.rules.block.code.exec(t);if(r){let n=r[0].replace(/^ {1,4}/gm,"");return{type:"code",raw:r[0],codeBlockStyle:"indented",text:this.options.pedantic?n:vd(n,` +`)}}}fences(t){let r=this.rules.block.fences.exec(t);if(r){let n=r[0],i=gR(n,r[3]||"");return{type:"code",raw:n,lang:r[2]?r[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):r[2],text:i}}}heading(t){let r=this.rules.block.heading.exec(t);if(r){let n=r[2].trim();if(/#$/.test(n)){let i=vd(n,"#");(this.options.pedantic||!i||/ $/.test(i))&&(n=i.trim())}return{type:"heading",raw:r[0],depth:r[1].length,text:n,tokens:this.lexer.inline(n)}}}hr(t){let r=this.rules.block.hr.exec(t);if(r)return{type:"hr",raw:r[0]}}blockquote(t){let r=this.rules.block.blockquote.exec(t);if(r){let n=r[0].replace(/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,` + $1`);n=vd(n.replace(/^ *>[ \t]?/gm,""),` +`);let i=this.lexer.state.top;this.lexer.state.top=!0;let a=this.lexer.blockTokens(n);return this.lexer.state.top=i,{type:"blockquote",raw:r[0],tokens:a,text:n}}}list(t){let r=this.rules.block.list.exec(t);if(r){let n=r[1].trim(),i=n.length>1,a={type:"list",raw:"",ordered:i,start:i?+n.slice(0,-1):"",loose:!1,items:[]};n=i?`\\d{1,9}\\${n.slice(-1)}`:`\\${n}`,this.options.pedantic&&(n=i?n:"[*+-]");let o=new RegExp(`^( {0,3}${n})((?:[ ][^\\n]*)?(?:\\n|$))`),l="",d="",p=!1;for(;t;){let g=!1;if(!(r=o.exec(t))||this.rules.block.hr.test(t))break;l=r[0],t=t.substring(l.length);let E=r[2].split(` +`,1)[0].replace(/^\t+/,N=>" ".repeat(3*N.length)),_=t.split(` +`,1)[0],y=0;this.options.pedantic?(y=2,d=E.trimStart()):(y=r[2].search(/[^ ]/),y=y>4?1:y,d=E.slice(y),y+=r[1].length);let C=!1;if(!E&&/^ *$/.test(_)&&(l+=_+` +`,t=t.substring(_.length+1),g=!0),!g){let N=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),L=new RegExp(`^ {0,${Math.min(3,y-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),H=new RegExp(`^ {0,${Math.min(3,y-1)}}(?:\`\`\`|~~~)`),R=new RegExp(`^ {0,${Math.min(3,y-1)}}#`);for(;t;){let B=t.split(` +`,1)[0];if(_=B,this.options.pedantic&&(_=_.replace(/^ {1,4}(?=( {4})*[^ ])/g," ")),H.test(_)||R.test(_)||N.test(_)||L.test(t))break;if(_.search(/[^ ]/)>=y||!_.trim())d+=` +`+_.slice(y);else{if(C||E.search(/[^ ]/)>=4||H.test(E)||R.test(E)||L.test(E))break;d+=` +`+_}!C&&!_.trim()&&(C=!0),l+=B+` +`,t=t.substring(B.length+1),E=_.slice(y)}}a.loose||(p?a.loose=!0:/\n *\n *$/.test(l)&&(p=!0));let k=null,P;this.options.gfm&&(k=/^\[[ xX]\] /.exec(d),k&&(P=k[0]!=="[ ] ",d=d.replace(/^\[[ xX]\] +/,""))),a.items.push({type:"list_item",raw:l,task:!!k,checked:P,loose:!1,text:d,tokens:[]}),a.raw+=l}a.items[a.items.length-1].raw=l.trimEnd(),a.items[a.items.length-1].text=d.trimEnd(),a.raw=a.raw.trimEnd();for(let g=0;gy.type==="space"),_=E.length>0&&E.some(y=>/\n.*\n/.test(y.raw));a.loose=_}if(a.loose)for(let g=0;g$/,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",a=r[3]?r[3].substring(1,r[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):r[3];return{type:"def",tag:n,raw:r[0],href:i,title:a}}}table(t){let r=this.rules.block.table.exec(t);if(!r||!/[:|]/.test(r[2]))return;let n=bA(r[1]),i=r[2].replace(/^\||\| *$/g,"").split("|"),a=r[3]&&r[3].trim()?r[3].replace(/\n[ \t]*$/,"").split(` +`):[],o={type:"table",raw:r[0],header:[],align:[],rows:[]};if(n.length===i.length){for(let l of i)/^ *-+: *$/.test(l)?o.align.push("right"):/^ *:-+: *$/.test(l)?o.align.push("center"):/^ *:-+ *$/.test(l)?o.align.push("left"):o.align.push(null);for(let l of n)o.header.push({text:l,tokens:this.lexer.inline(l)});for(let l of a)o.rows.push(bA(l,o.header.length).map(d=>({text:d,tokens:this.lexer.inline(d)})));return o}}lheading(t){let r=this.rules.block.lheading.exec(t);if(r)return{type:"heading",raw:r[0],depth:r[2].charAt(0)==="="?1:2,text:r[1],tokens:this.lexer.inline(r[1])}}paragraph(t){let r=this.rules.block.paragraph.exec(t);if(r){let n=r[1].charAt(r[1].length-1)===` +`?r[1].slice(0,-1):r[1];return{type:"paragraph",raw:r[0],text:n,tokens:this.lexer.inline(n)}}}text(t){let r=this.rules.block.text.exec(t);if(r)return{type:"text",raw:r[0],text:r[0],tokens:this.lexer.inline(r[0])}}escape(t){let r=this.rules.inline.escape.exec(t);if(r)return{type:"escape",raw:r[0],text:xn(r[1])}}tag(t){let r=this.rules.inline.tag.exec(t);if(r)return!this.lexer.state.inLink&&/^/i.test(r[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&/^<(pre|code|kbd|script)(\s|>)/i.test(r[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&/^<\/(pre|code|kbd|script)(\s|>)/i.test(r[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:r[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:r[0]}}link(t){let r=this.rules.inline.link.exec(t);if(r){let n=r[2].trim();if(!this.options.pedantic&&/^$/.test(n))return;let o=vd(n.slice(0,-1),"\\");if((n.length-o.length)%2===0)return}else{let o=mR(r[2],"()");if(o>-1){let d=(r[0].indexOf("!")===0?5:4)+r[1].length+o;r[2]=r[2].substring(0,o),r[0]=r[0].substring(0,d).trim(),r[3]=""}}let i=r[2],a="";if(this.options.pedantic){let o=/^([^'"]*[^\s])\s+(['"])(.*)\2/.exec(i);o&&(i=o[1],a=o[3])}else a=r[3]?r[3].slice(1,-1):"";return i=i.trim(),/^$/.test(n)?i=i.slice(1):i=i.slice(1,-1)),EA(r,{href:i&&i.replace(this.rules.inline.anyPunctuation,"$1"),title:a&&a.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer)}}reflink(t,r){let n;if((n=this.rules.inline.reflink.exec(t))||(n=this.rules.inline.nolink.exec(t))){let i=(n[2]||n[1]).replace(/\s+/g," "),a=r[i.toLowerCase()];if(!a){let o=n[0].charAt(0);return{type:"text",raw:o,text:o}}return EA(n,a,n[0],this.lexer)}}emStrong(t,r,n=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!i||i[3]&&n.match(/[\p{L}\p{N}]/u))return;if(!(i[1]||i[2]||"")||!n||this.rules.inline.punctuation.exec(n)){let o=[...i[0]].length-1,l,d,p=o,g=0,E=i[0][0]==="*"?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(E.lastIndex=0,r=r.slice(-1*t.length+o);(i=E.exec(r))!=null;){if(l=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!l)continue;if(d=[...l].length,i[3]||i[4]){p+=d;continue}else if((i[5]||i[6])&&o%3&&!((o+d)%3)){g+=d;continue}if(p-=d,p>0)continue;d=Math.min(d,d+p+g);let _=[...i[0]][0].length,y=t.slice(0,o+i.index+_+d);if(Math.min(o,d)%2){let k=y.slice(1,-1);return{type:"em",raw:y,text:k,tokens:this.lexer.inlineTokens(k)}}let C=y.slice(2,-2);return{type:"strong",raw:y,text:C,tokens:this.lexer.inlineTokens(C)}}}}codespan(t){let r=this.rules.inline.code.exec(t);if(r){let n=r[2].replace(/\n/g," "),i=/[^ ]/.test(n),a=/^ /.test(n)&&/ $/.test(n);return i&&a&&(n=n.substring(1,n.length-1)),n=xn(n,!0),{type:"codespan",raw:r[0],text:n}}}br(t){let r=this.rules.inline.br.exec(t);if(r)return{type:"br",raw:r[0]}}del(t){let r=this.rules.inline.del.exec(t);if(r)return{type:"del",raw:r[0],text:r[2],tokens:this.lexer.inlineTokens(r[2])}}autolink(t){let r=this.rules.inline.autolink.exec(t);if(r){let n,i;return r[2]==="@"?(n=xn(r[1]),i="mailto:"+n):(n=xn(r[1]),i=n),{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}url(t){let r;if(r=this.rules.inline.url.exec(t)){let n,i;if(r[2]==="@")n=xn(r[0]),i="mailto:"+n;else{let a;do a=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"";while(a!==r[0]);n=xn(r[0]),r[1]==="www."?i="http://"+r[0]:i=r[0]}return{type:"link",raw:r[0],text:n,href:i,tokens:[{type:"text",raw:n,text:n}]}}}inlineText(t){let r=this.rules.inline.text.exec(t);if(r){let n;return this.lexer.state.inRawBlock?n=r[0]:n=xn(r[0]),{type:"text",raw:r[0],text:n}}}},_R=/^(?: *(?:\n|$))+/,bR=/^( {4}[^\n]+(?:\n(?: *(?:\n|$))*)?)+/,ER=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,$c=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,vR=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,AA=/(?:[*+-]|\d{1,9}[.)])/,wA=dt(/^(?!bull |blockCode|fences|blockquote|heading|html)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,AA).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(),k0=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,TR=/^[^\n]+/,R0=/(?!\s*\])(?:\\.|[^\[\]\\])+/,xR=dt(/^ {0,3}\[(label)\]: *(?:\n *)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n *)?| *\n *)(title))? *(?:\n+|$)/).replace("label",R0).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),yR=dt(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,AA).getRegex(),wd="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",L0=/|$))/,AR=dt("^ {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",L0).replace("tag",wd).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),SA=dt(k0).replace("hr",$c).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",wd).getRegex(),wR=dt(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",SA).getRegex(),P0={blockquote:wR,code:bR,def:xR,fences:ER,heading:vR,hr:$c,html:AR,lheading:wA,list:yR,newline:_R,paragraph:SA,table:Bc,text:TR},vA=dt("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",$c).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",wd).getRegex(),SR={...P0,table:vA,paragraph:dt(k0).replace("hr",$c).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",vA).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",wd).getRegex()},CR={...P0,html:dt(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",L0).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:Bc,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:dt(k0).replace("hr",$c).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",wA).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},CA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,IR=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,IA=/^( {2,}|\\)\n(?!\s*$)/,NR=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,kR=dt(/^(?:\*+(?:((?!\*)[punct])|[^\s*]))|^_+(?:((?!_)[punct])|([^\s_]))/,"u").replace(/punct/g,Hc).getRegex(),RR=dt("^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)[punct](\\*+)(?=[\\s]|$)|[^punct\\s](\\*+)(?!\\*)(?=[punct\\s]|$)|(?!\\*)[punct\\s](\\*+)(?=[^punct\\s])|[\\s](\\*+)(?!\\*)(?=[punct])|(?!\\*)[punct](\\*+)(?!\\*)(?=[punct])|[^punct\\s](\\*+)(?=[^punct\\s])","gu").replace(/punct/g,Hc).getRegex(),LR=dt("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)[punct](_+)(?=[\\s]|$)|[^punct\\s](_+)(?!_)(?=[punct\\s]|$)|(?!_)[punct\\s](_+)(?=[^punct\\s])|[\\s](_+)(?!_)(?=[punct])|(?!_)[punct](_+)(?!_)(?=[punct])","gu").replace(/punct/g,Hc).getRegex(),PR=dt(/\\([punct])/,"gu").replace(/punct/g,Hc).getRegex(),MR=dt(/^<(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(),FR=dt(L0).replace("(?:-->|$)","-->").getRegex(),BR=dt("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",FR).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),xd=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,$R=dt(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",xd).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),NA=dt(/^!?\[(label)\]\[(ref)\]/).replace("label",xd).replace("ref",R0).getRegex(),OA=dt(/^!?\[(ref)\](?:\[\])?/).replace("ref",R0).getRegex(),HR=dt("reflink|nolink(?!\\()","g").replace("reflink",NA).replace("nolink",OA).getRegex(),M0={_backpedal:Bc,anyPunctuation:PR,autolink:MR,blockSkip:DR,br:IA,code:IR,del:Bc,emStrongLDelim:kR,emStrongRDelimAst:RR,emStrongRDelimUnd:LR,escape:CA,link:$R,nolink:OA,punctuation:OR,reflink:NA,reflinkSearch:HR,tag:BR,text:NR,url:Bc},UR={...M0,link:dt(/^!?\[(label)\]\((.*?)\)/).replace("label",xd).getRegex(),reflink:dt(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",xd).getRegex()},D0={...M0,escape:dt(CA).replace("])","~|])").getRegex(),url:dt(/^((?: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]*?(?:(?=[\\d+" ".repeat(p.length));let n,i,a,o;for(;t;)if(!(this.options.extensions&&this.options.extensions.block&&this.options.extensions.block.some(l=>(n=l.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.space(t)){t=t.substring(n.raw.length),n.raw.length===1&&r.length>0?r[r.length-1].raw+=` +`:r.push(n);continue}if(n=this.tokenizer.code(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` +`+n.raw,i.text+=` +`+n.text,this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(n=this.tokenizer.fences(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.heading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.hr(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.blockquote(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.list(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.html(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.def(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&(i.type==="paragraph"||i.type==="text")?(i.raw+=` +`+n.raw,i.text+=` +`+n.raw,this.inlineQueue[this.inlineQueue.length-1].src=i.text):this.tokens.links[n.tag]||(this.tokens.links[n.tag]={href:n.href,title:n.title});continue}if(n=this.tokenizer.table(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.lheading(t)){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startBlock){let l=1/0,d=t.slice(1),p;this.options.extensions.startBlock.forEach(g=>{p=g.call({lexer:this},d),typeof p=="number"&&p>=0&&(l=Math.min(l,p))}),l<1/0&&l>=0&&(a=t.substring(0,l+1))}if(this.state.top&&(n=this.tokenizer.paragraph(a))){i=r[r.length-1],o&&i.type==="paragraph"?(i.raw+=` +`+n.raw,i.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n),o=a.length!==t.length,t=t.substring(n.raw.length);continue}if(n=this.tokenizer.text(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&i.type==="text"?(i.raw+=` +`+n.raw,i.text+=` +`+n.text,this.inlineQueue.pop(),this.inlineQueue[this.inlineQueue.length-1].src=i.text):r.push(n);continue}if(t){let l="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(l);break}else throw new Error(l)}}return this.state.top=!0,r}inline(t,r=[]){return this.inlineQueue.push({src:t,tokens:r}),r}inlineTokens(t,r=[]){let n,i,a,o=t,l,d,p;if(this.tokens.links){let g=Object.keys(this.tokens.links);if(g.length>0)for(;(l=this.tokenizer.rules.inline.reflinkSearch.exec(o))!=null;)g.includes(l[0].slice(l[0].lastIndexOf("[")+1,-1))&&(o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;(l=this.tokenizer.rules.inline.blockSkip.exec(o))!=null;)o=o.slice(0,l.index)+"["+"a".repeat(l[0].length-2)+"]"+o.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);for(;(l=this.tokenizer.rules.inline.anyPunctuation.exec(o))!=null;)o=o.slice(0,l.index)+"++"+o.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;t;)if(d||(p=""),d=!1,!(this.options.extensions&&this.options.extensions.inline&&this.options.extensions.inline.some(g=>(n=g.call({lexer:this},t,r))?(t=t.substring(n.raw.length),r.push(n),!0):!1))){if(n=this.tokenizer.escape(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.tag(t)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.link(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(n.raw.length),i=r[r.length-1],i&&n.type==="text"&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(n=this.tokenizer.emStrong(t,o,p)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.codespan(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.br(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.del(t)){t=t.substring(n.raw.length),r.push(n);continue}if(n=this.tokenizer.autolink(t)){t=t.substring(n.raw.length),r.push(n);continue}if(!this.state.inLink&&(n=this.tokenizer.url(t))){t=t.substring(n.raw.length),r.push(n);continue}if(a=t,this.options.extensions&&this.options.extensions.startInline){let g=1/0,E=t.slice(1),_;this.options.extensions.startInline.forEach(y=>{_=y.call({lexer:this},E),typeof _=="number"&&_>=0&&(g=Math.min(g,_))}),g<1/0&&g>=0&&(a=t.substring(0,g+1))}if(n=this.tokenizer.inlineText(a)){t=t.substring(n.raw.length),n.raw.slice(-1)!=="_"&&(p=n.raw.slice(-1)),d=!0,i=r[r.length-1],i&&i.type==="text"?(i.raw+=n.raw,i.text+=n.text):r.push(n);continue}if(t){let g="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(g);break}else throw new Error(g)}}return r}},Ls=class{options;constructor(t){this.options=t||Tt.defaults}code(t,r,n){let i=(r||"").match(/^\S*/)?.[0];return t=t.replace(/\n$/,"")+` +`,i?'
'+(n?t:xn(t,!0))+`
+`:"
"+(n?t:xn(t,!0))+`
+`}blockquote(t){return`
+${t}
+`}html(t,r){return t}heading(t,r,n){return`${t} +`}hr(){return`
+`}list(t,r,n){let i=r?"ol":"ul",a=r&&n!==1?' start="'+n+'"':"";return"<"+i+a+`> +`+t+" +`}listitem(t,r,n){return`
  • ${t}
  • +`}checkbox(t){return"'}paragraph(t){return`

    ${t}

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

    An error occurred:

    "+xn(n.message+"",!0)+"
    ";return r?Promise.resolve(i):i}if(r)return Promise.reject(n);throw n}}},Ps=new yd;function st(e,t){return Ps.parse(e,t)}st.options=st.setOptions=function(e){return Ps.setOptions(e),st.defaults=Ps.defaults,TA(st.defaults),st};st.getDefaults=Ad;st.defaults=Tt.defaults;st.use=function(...e){return Ps.use(...e),st.defaults=Ps.defaults,TA(st.defaults),st};st.walkTokens=function(e,t){return Ps.walkTokens(e,t)};st.parseInline=Ps.parseInline;st.Parser=An;st.parser=An.parse;st.Renderer=Ls;st.TextRenderer=Yo;st.Lexer=yn;st.lexer=yn.lex;st.Tokenizer=Rs;st.Hooks=Ba;st.parse=st;var qR=st.options,zR=st.setOptions,YR=st.use,KR=st.walkTokens,jR=st.parseInline,WR=st,GR=An.parse,QR=yn.lex;Tt.Hooks=Ba;Tt.Lexer=yn;Tt.Marked=yd;Tt.Parser=An;Tt.Renderer=Ls;Tt.TextRenderer=Yo;Tt.Tokenizer=Rs;Tt.getDefaults=Ad;Tt.lexer=QR;Tt.marked=st;Tt.options=qR;Tt.parse=WR;Tt.parseInline=jR;Tt.parser=GR;Tt.setOptions=zR;Tt.use=YR;Tt.walkTokens=KR});function kA(e){return e.type===Ze.Tag||e.type===Ze.Script||e.type===Ze.Style}var Ze,RA,LA,PA,MA,FA,BA,$A,HA,UA,Ko=v(()=>{(function(e){e.Root="root",e.Text="text",e.Directive="directive",e.Comment="comment",e.Script="script",e.Style="style",e.Tag="tag",e.CDATA="cdata",e.Doctype="doctype"})(Ze||(Ze={}));RA=Ze.Root,LA=Ze.Text,PA=Ze.Directive,MA=Ze.Comment,FA=Ze.Script,BA=Ze.Style,$A=Ze.Tag,HA=Ze.CDATA,UA=Ze.Doctype});function _e(e){return kA(e)}function jo(e){return e.type===Ze.CDATA}function nn(e){return e.type===Ze.Text}function $s(e){return e.type===Ze.Comment}function Cd(e){return e.type===Ze.Directive}function Bn(e){return e.type===Ze.Root}function ht(e){return Object.prototype.hasOwnProperty.call(e,"children")}function Wo(e,t=!1){let r;if(nn(e))r=new Ni(e.data);else if($s(e))r=new Ms(e.data);else if(_e(e)){let n=t?F0(e.children):[],i=new Bs(e.name,{...e.attribs},n);n.forEach(a=>a.parent=i),e.namespace!=null&&(i.namespace=e.namespace),e["x-attribsNamespace"]&&(i["x-attribsNamespace"]={...e["x-attribsNamespace"]}),e["x-attribsPrefix"]&&(i["x-attribsPrefix"]={...e["x-attribsPrefix"]}),r=i}else if(jo(e)){let n=t?F0(e.children):[],i=new qc(n);n.forEach(a=>a.parent=i),r=i}else if(Bn(e)){let n=t?F0(e.children):[],i=new wn(n);n.forEach(a=>a.parent=i),e["x-mode"]&&(i["x-mode"]=e["x-mode"]),r=i}else if(Cd(e)){let n=new Fs(e.name,e.data);e["x-name"]!=null&&(n["x-name"]=e["x-name"],n["x-publicId"]=e["x-publicId"],n["x-systemId"]=e["x-systemId"]),r=n}else throw new Error(`Not implemented yet: ${e.type}`);return r.startIndex=e.startIndex,r.endIndex=e.endIndex,e.sourceCodeLocation!=null&&(r.sourceCodeLocation=e.sourceCodeLocation),r}function F0(e){let t=e.map(r=>Wo(r,!0));for(let r=1;r{Ko();Sd=class{constructor(){this.parent=null,this.prev=null,this.next=null,this.startIndex=null,this.endIndex=null}get parentNode(){return this.parent}set parentNode(t){this.parent=t}get previousSibling(){return this.prev}set previousSibling(t){this.prev=t}get nextSibling(){return this.next}set nextSibling(t){this.next=t}cloneNode(t=!1){return Wo(this,t)}},Uc=class extends Sd{constructor(t){super(),this.data=t}get nodeValue(){return this.data}set nodeValue(t){this.data=t}},Ni=class extends Uc{constructor(){super(...arguments),this.type=Ze.Text}get nodeType(){return 3}},Ms=class extends Uc{constructor(){super(...arguments),this.type=Ze.Comment}get nodeType(){return 8}},Fs=class extends Uc{constructor(t,r){super(r),this.name=t,this.type=Ze.Directive}get nodeType(){return 1}},Vc=class extends Sd{constructor(t){super(),this.children=t}get firstChild(){var t;return(t=this.children[0])!==null&&t!==void 0?t:null}get lastChild(){return this.children.length>0?this.children[this.children.length-1]:null}get childNodes(){return this.children}set childNodes(t){this.children=t}},qc=class extends Vc{constructor(){super(...arguments),this.type=Ze.CDATA}get nodeType(){return 4}},wn=class extends Vc{constructor(){super(...arguments),this.type=Ze.Root}get nodeType(){return 9}},Bs=class extends Vc{constructor(t,r,n=[],i=t==="script"?Ze.Script:t==="style"?Ze.Style:Ze.Tag){super(n),this.name=t,this.attribs=r,this.type=i}get nodeType(){return 1}get tagName(){return this.name}set tagName(t){this.name=t}get attributes(){return Object.keys(this.attribs).map(t=>{var r,n;return{name:t,value:this.attribs[t],namespace:(r=this["x-attribsNamespace"])===null||r===void 0?void 0:r[t],prefix:(n=this["x-attribsPrefix"])===null||n===void 0?void 0:n[t]}})}}});var qA,Go,_r=v(()=>{Ko();B0();B0();qA={withStartIndices:!1,withEndIndices:!1,xmlMode:!1},Go=class{constructor(t,r,n){this.dom=[],this.root=new wn(this.dom),this.done=!1,this.tagStack=[this.root],this.lastNode=null,this.parser=null,typeof r=="function"&&(n=r,r=qA),typeof t=="object"&&(r=t,t=void 0),this.callback=t??null,this.options=r??qA,this.elementCB=n??null}onparserinit(t){this.parser=t}onreset(){this.dom=[],this.root=new wn(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(t){this.handleCallback(t)}onclosetag(){this.lastNode=null;let t=this.tagStack.pop();this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),this.elementCB&&this.elementCB(t)}onopentag(t,r){let n=this.options.xmlMode?Ze.Tag:void 0,i=new Bs(t,r,void 0,n);this.addNode(i),this.tagStack.push(i)}ontext(t){let{lastNode:r}=this;if(r&&r.type===Ze.Text)r.data+=t,this.options.withEndIndices&&(r.endIndex=this.parser.endIndex);else{let n=new Ni(t);this.addNode(n),this.lastNode=n}}oncomment(t){if(this.lastNode&&this.lastNode.type===Ze.Comment){this.lastNode.data+=t;return}let r=new Ms(t);this.addNode(r),this.lastNode=r}oncommentend(){this.lastNode=null}oncdatastart(){let t=new Ni(""),r=new qc([t]);this.addNode(r),t.parent=r,this.lastNode=t}oncdataend(){this.lastNode=null}onprocessinginstruction(t,r){let n=new Fs(t,r);this.addNode(n)}handleCallback(t){if(typeof this.callback=="function")this.callback(t,this.dom);else if(t)throw t}addNode(t){let r=this.tagStack[this.tagStack.length-1],n=r.children[r.children.length-1];this.options.withStartIndices&&(t.startIndex=this.parser.startIndex),this.options.withEndIndices&&(t.endIndex=this.parser.endIndex),r.children.push(t),n&&(t.prev=n,n.next=t),t.parent=r,this.lastNode=null}}});var Qo,zA=v(()=>{Qo=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(e=>e.charCodeAt(0)))});var Id,YA=v(()=>{Id=new Uint16Array("\u0200aglq \x1B\u026D\0\0p;\u4026os;\u4027t;\u403Et;\u403Cuot;\u4022".split("").map(e=>e.charCodeAt(0)))});function H0(e){var t;return e>=55296&&e<=57343||e>1114111?65533:(t=XR.get(e))!==null&&t!==void 0?t:e}var $0,XR,Xo,U0=v(()=>{XR=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]]),Xo=($0=String.fromCodePoint)!==null&&$0!==void 0?$0:function(e){let t="";return e>65535&&(e-=65536,t+=String.fromCharCode(e>>>10&1023|55296),e=56320|e&1023),t+=String.fromCharCode(e),t}});function V0(e){return e>=or.ZERO&&e<=or.NINE}function JR(e){return e>=or.UPPER_A&&e<=or.UPPER_F||e>=or.LOWER_A&&e<=or.LOWER_F}function eL(e){return e>=or.UPPER_A&&e<=or.UPPER_Z||e>=or.LOWER_A&&e<=or.LOWER_Z||V0(e)}function tL(e){return e===or.EQUALS||eL(e)}function KA(e){let t="",r=new Ha(e,n=>t+=Xo(n));return function(i,a){let o=0,l=0;for(;(l=i.indexOf("&",l))>=0;){t+=i.slice(o,l),r.startEntity(a);let p=r.write(i,l+1);if(p<0){o=l+r.end();break}o=l+p,l=p===0?o+1:o}let d=t+i.slice(o);return t="",d}}function rL(e,t,r,n){let i=(t&$a.BRANCH_LENGTH)>>7,a=t&$a.JUMP_TABLE;if(i===0)return a!==0&&n===a?r:-1;if(a){let d=n-a;return d<0||d>=i?-1:e[r+d]-1}let o=r,l=o+i-1;for(;o<=l;){let d=o+l>>>1,p=e[d];if(pn)l=d-1;else return e[d+i]}return-1}var or,ZR,$a,sr,Dr,Ha,Nre,Ore,Zo=v(()=>{zA();YA();U0();U0();(function(e){e[e.NUM=35]="NUM",e[e.SEMI=59]="SEMI",e[e.EQUALS=61]="EQUALS",e[e.ZERO=48]="ZERO",e[e.NINE=57]="NINE",e[e.LOWER_A=97]="LOWER_A",e[e.LOWER_F=102]="LOWER_F",e[e.LOWER_X=120]="LOWER_X",e[e.LOWER_Z=122]="LOWER_Z",e[e.UPPER_A=65]="UPPER_A",e[e.UPPER_F=70]="UPPER_F",e[e.UPPER_Z=90]="UPPER_Z"})(or||(or={}));ZR=32;(function(e){e[e.VALUE_LENGTH=49152]="VALUE_LENGTH",e[e.BRANCH_LENGTH=16256]="BRANCH_LENGTH",e[e.JUMP_TABLE=127]="JUMP_TABLE"})($a||($a={}));(function(e){e[e.EntityStart=0]="EntityStart",e[e.NumericStart=1]="NumericStart",e[e.NumericDecimal=2]="NumericDecimal",e[e.NumericHex=3]="NumericHex",e[e.NamedEntity=4]="NamedEntity"})(sr||(sr={}));(function(e){e[e.Legacy=0]="Legacy",e[e.Strict=1]="Strict",e[e.Attribute=2]="Attribute"})(Dr||(Dr={}));Ha=class{constructor(t,r,n){this.decodeTree=t,this.emitCodePoint=r,this.errors=n,this.state=sr.EntityStart,this.consumed=1,this.result=0,this.treeIndex=0,this.excess=1,this.decodeMode=Dr.Strict}startEntity(t){this.decodeMode=t,this.state=sr.EntityStart,this.result=0,this.treeIndex=0,this.excess=1,this.consumed=1}write(t,r){switch(this.state){case sr.EntityStart:return t.charCodeAt(r)===or.NUM?(this.state=sr.NumericStart,this.consumed+=1,this.stateNumericStart(t,r+1)):(this.state=sr.NamedEntity,this.stateNamedEntity(t,r));case sr.NumericStart:return this.stateNumericStart(t,r);case sr.NumericDecimal:return this.stateNumericDecimal(t,r);case sr.NumericHex:return this.stateNumericHex(t,r);case sr.NamedEntity:return this.stateNamedEntity(t,r)}}stateNumericStart(t,r){return r>=t.length?-1:(t.charCodeAt(r)|ZR)===or.LOWER_X?(this.state=sr.NumericHex,this.consumed+=1,this.stateNumericHex(t,r+1)):(this.state=sr.NumericDecimal,this.stateNumericDecimal(t,r))}addToNumericResult(t,r,n,i){if(r!==n){let a=n-r;this.result=this.result*Math.pow(i,a)+parseInt(t.substr(r,a),i),this.consumed+=a}}stateNumericHex(t,r){let n=r;for(;r>14;for(;r>14,a!==0){if(o===or.SEMI)return this.emitNamedEntityData(this.treeIndex,a,this.consumed+this.excess);this.decodeMode!==Dr.Strict&&(this.result=this.treeIndex,this.consumed+=this.excess,this.excess=0)}}return-1}emitNotTerminatedNamedEntity(){var t;let{result:r,decodeTree:n}=this,i=(n[r]&$a.VALUE_LENGTH)>>14;return this.emitNamedEntityData(r,i,this.consumed),(t=this.errors)===null||t===void 0||t.missingSemicolonAfterCharacterReference(),this.consumed}emitNamedEntityData(t,r,n){let{decodeTree:i}=this;return this.emitCodePoint(r===1?i[t]&~$a.VALUE_LENGTH:i[t+1],n),r===3&&this.emitCodePoint(i[t+2],n),n}end(){var t;switch(this.state){case sr.NamedEntity:return this.result!==0&&(this.decodeMode!==Dr.Attribute||this.result===this.treeIndex)?this.emitNotTerminatedNamedEntity():0;case sr.NumericDecimal:return this.emitNumericEntity(0,2);case sr.NumericHex:return this.emitNumericEntity(0,3);case sr.NumericStart:return(t=this.errors)===null||t===void 0||t.absenceOfDigitsInNumericCharacterReference(this.consumed),0;case sr.EntityStart:return 0}}};Nre=KA(Qo),Ore=KA(Id)});function Nd(e){for(let t=1;t{nL=new Map(Nd([[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(Nd([[824,"≪̸"],[7577,"≪⃒"]]))}],[0,{v:"≫",n:new Map(Nd([[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(Nd([[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 zc(e){let t="",r=0,n;for(;(n=q0.exec(e))!==null;){let i=n.index,a=e.charCodeAt(i),o=WA.get(a);o!==void 0?(t+=e.substring(r,i)+o,r=i+1):(t+=`${e.substring(r,i)}&#x${GA(e,i).toString(16)};`,r=q0.lastIndex+=+((a&64512)===55296))}return t+e.substr(r)}function z0(e,t){return function(n){let i,a=0,o="";for(;i=e.exec(n);)a!==i.index&&(o+=n.substring(a,i.index)),o+=t.get(i[0].charCodeAt(0)),a=i.index+1;return o+n.substring(a)}}var q0,WA,GA,QA,Jo,eu,Yc=v(()=>{q0=/["&'<>$\x80-\uFFFF]/g,WA=new Map([[34,"""],[38,"&"],[39,"'"],[60,"<"],[62,">"]]),GA=String.prototype.codePointAt!=null?(e,t)=>e.codePointAt(t):(e,t)=>(e.charCodeAt(t)&64512)===55296?(e.charCodeAt(t)-55296)*1024+e.charCodeAt(t+1)-56320+65536:e.charCodeAt(t);QA=z0(/[&<>'"]/g,WA),Jo=z0(/["&\u00A0]/g,new Map([[34,"""],[38,"&"],[160," "]])),eu=z0(/[&<>\u00A0]/g,new Map([[38,"&"],[60,"<"],[62,">"],[160," "]]))});var Y0=v(()=>{jA();Yc()});var XA,ZA,t2=v(()=>{Zo();Y0();Yc();Yc();Y0();Zo();(function(e){e[e.XML=0]="XML",e[e.HTML=1]="HTML"})(XA||(XA={}));(function(e){e[e.UTF8=0]="UTF8",e[e.ASCII=1]="ASCII",e[e.Extensive=2]="Extensive",e[e.Attribute=3]="Attribute",e[e.Text=4]="Text"})(ZA||(ZA={}))});var r2,n2,i2=v(()=>{r2=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(e=>[e.toLowerCase(),e])),n2=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(e=>[e.toLowerCase(),e]))});function sL(e){return e.replace(/"/g,""")}function oL(e,t){var r;if(!e)return;let n=((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)===!1?sL:t.xmlMode||t.encodeEntities!=="utf8"?zc:Jo;return Object.keys(e).map(i=>{var a,o;let l=(a=e[i])!==null&&a!==void 0?a:"";return t.xmlMode==="foreign"&&(i=(o=n2.get(i))!==null&&o!==void 0?o:i),!t.emptyAttrs&&!t.xmlMode&&l===""?i:`${i}="${n(l)}"`}).join(" ")}function W0(e,t={}){let r="length"in e?e:[e],n="";for(let i=0;i0&&(n+=W0(e.children,t)),(t.xmlMode||!a2.has(e.name))&&(n+=``)),n}function dL(e){return`<${e.data}>`}function hL(e,t){var r;let n=e.data||"";return((r=t.encodeEntities)!==null&&r!==void 0?r:t.decodeEntities)!==!1&&!(!t.xmlMode&&e.parent&&aL.has(e.parent.name))&&(n=t.xmlMode||t.encodeEntities!=="utf8"?zc(n):eu(n)),n}function pL(e){return``}function mL(e){return``}var aL,a2,Od,cL,lL,G0=v(()=>{Ko();t2();i2();aL=new Set(["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"]);a2=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]);Od=W0;cL=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignObject","desc","title"]),lL=new Set(["svg","math"])});function s2(e,t){return Od(e,t)}function gL(e,t){return ht(e)?e.children.map(r=>s2(r,t)).join(""):""}function Dd(e){return Array.isArray(e)?e.map(Dd).join(""):_e(e)?e.name==="br"?` +`:Dd(e.children):jo(e)?Dd(e.children):nn(e)?e.data:""}function ra(e){return Array.isArray(e)?e.map(ra).join(""):ht(e)&&!$s(e)?ra(e.children):nn(e)?e.data:""}function Kc(e){return Array.isArray(e)?e.map(Kc).join(""):ht(e)&&(e.type===Ze.Tag||jo(e))?Kc(e.children):nn(e)?e.data:""}var Q0=v(()=>{_r();G0();Ko()});function tu(e){return ht(e)?e.children:[]}function o2(e){return e.parent||null}function X0(e){let t=o2(e);if(t!=null)return tu(t);let r=[e],{prev:n,next:i}=e;for(;n!=null;)r.unshift(n),{prev:n}=n;for(;i!=null;)r.push(i),{next:i}=i;return r}function _L(e,t){var r;return(r=e.attribs)===null||r===void 0?void 0:r[t]}function bL(e,t){return e.attribs!=null&&Object.prototype.hasOwnProperty.call(e.attribs,t)&&e.attribs[t]!=null}function EL(e){return e.name}function kd(e){let{next:t}=e;for(;t!==null&&!_e(t);)({next:t}=t);return t}function Rd(e){let{prev:t}=e;for(;t!==null&&!_e(t);)({prev:t}=t);return t}var u2=v(()=>{_r()});function na(e){if(e.prev&&(e.prev.next=e.next),e.next&&(e.next.prev=e.prev),e.parent){let t=e.parent.children,r=t.lastIndexOf(e);r>=0&&t.splice(r,1)}e.next=null,e.prev=null,e.parent=null}function vL(e,t){let r=t.prev=e.prev;r&&(r.next=t);let n=t.next=e.next;n&&(n.prev=t);let i=t.parent=e.parent;if(i){let a=i.children;a[a.lastIndexOf(e)]=t,e.parent=null}}function TL(e,t){if(na(t),t.next=null,t.parent=e,e.children.push(t)>1){let r=e.children[e.children.length-2];r.next=t,t.prev=r}else t.prev=null}function xL(e,t){na(t);let{parent:r}=e,n=e.next;if(t.next=n,t.prev=e,e.next=t,t.parent=r,n){if(n.prev=t,r){let i=r.children;i.splice(i.lastIndexOf(n),0,t)}}else r&&r.children.push(t)}function yL(e,t){if(na(t),t.parent=e,t.prev=null,e.children.unshift(t)!==1){let r=e.children[1];r.prev=t,t.next=r}else t.next=null}function AL(e,t){na(t);let{parent:r}=e;if(r){let n=r.children;n.splice(n.indexOf(e),0,t)}e.prev&&(e.prev.next=t),t.parent=r,t.prev=e.prev,t.next=e,e.prev=t}var c2=v(()=>{});function ru(e,t,r=!0,n=1/0){return Ld(e,Array.isArray(t)?t:[t],r,n)}function Ld(e,t,r,n){let i=[],a=[Array.isArray(t)?t:[t]],o=[0];for(;;){if(o[0]>=a[0].length){if(o.length===1)return i;a.shift(),o.shift();continue}let l=a[0][o[0]++];if(e(l)&&(i.push(l),--n<=0))return i;r&&ht(l)&&l.children.length>0&&(o.unshift(0),a.unshift(l.children))}}function wL(e,t){return t.find(e)}function Pd(e,t,r=!0){let n=Array.isArray(t)?t:[t];for(let i=0;i0){let o=Pd(e,a.children,!0);if(o)return o}}return null}function l2(e,t){return(Array.isArray(t)?t:[t]).some(r=>_e(r)&&e(r)||ht(r)&&l2(e,r.children))}function SL(e,t){let r=[],n=[Array.isArray(t)?t:[t]],i=[0];for(;;){if(i[0]>=n[0].length){if(n.length===1)return r;n.shift(),i.shift();continue}let a=n[0][i[0]++];_e(a)&&e(a)&&r.push(a),ht(a)&&a.children.length>0&&(i.unshift(0),n.unshift(a.children))}}var Z0=v(()=>{_r()});function J0(e,t){return typeof t=="function"?r=>_e(r)&&t(r.attribs[e]):r=>_e(r)&&r.attribs[e]===t}function CL(e,t){return r=>e(r)||t(r)}function f2(e){let t=Object.keys(e).map(r=>{let n=e[r];return Object.prototype.hasOwnProperty.call(Md,r)?Md[r](n):J0(r,n)});return t.length===0?null:t.reduce(CL)}function IL(e,t){let r=f2(e);return r?r(t):!0}function NL(e,t,r,n=1/0){let i=f2(e);return i?ru(i,t,r,n):[]}function OL(e,t,r=!0){return Array.isArray(t)||(t=[t]),Pd(J0("id",e),t,r)}function Hs(e,t,r=!0,n=1/0){return ru(Md.tag_name(e),t,r,n)}function DL(e,t,r=!0,n=1/0){return ru(J0("class",e),t,r,n)}function kL(e,t,r=!0,n=1/0){return ru(Md.tag_type(e),t,r,n)}var Md,eg=v(()=>{_r();Z0();Md={tag_name(e){return typeof e=="function"?t=>_e(t)&&e(t.name):e==="*"?_e:t=>_e(t)&&t.name===e},tag_type(e){return typeof e=="function"?t=>e(t.type):t=>t.type===e},tag_contains(e){return typeof e=="function"?t=>nn(t)&&e(t.data):t=>nn(t)&&t.data===e}}});function RL(e){let t=e.length;for(;--t>=0;){let r=e[t];if(t>0&&e.lastIndexOf(r,t-1)>=0){e.splice(t,1);continue}for(let n=r.parent;n;n=n.parent)if(e.includes(n)){e.splice(t,1);break}}return e}function d2(e,t){let r=[],n=[];if(e===t)return 0;let i=ht(e)?e:e.parent;for(;i;)r.unshift(i),i=i.parent;for(i=ht(t)?t:t.parent;i;)n.unshift(i),i=i.parent;let a=Math.min(r.length,n.length),o=0;for(;od.indexOf(g)?l===t?$n.FOLLOWING|$n.CONTAINED_BY:$n.FOLLOWING:l===e?$n.PRECEDING|$n.CONTAINS:$n.PRECEDING}function Ua(e){return e=e.filter((t,r,n)=>!n.includes(t,r+1)),e.sort((t,r)=>{let n=d2(t,r);return n&$n.PRECEDING?-1:n&$n.FOLLOWING?1:0}),e}var $n,h2=v(()=>{_r();(function(e){e[e.DISCONNECTED=1]="DISCONNECTED",e[e.PRECEDING=2]="PRECEDING",e[e.FOLLOWING=4]="FOLLOWING",e[e.CONTAINS=8]="CONTAINS",e[e.CONTAINED_BY=16]="CONTAINED_BY"})($n||($n={}))});function tg(e){let t=Fd(BL,e);return t?t.name==="feed"?LL(t):PL(t):null}function LL(e){var t;let r=e.children,n={type:"atom",items:Hs("entry",r).map(o=>{var l;let{children:d}=o,p={media:p2(d)};an(p,"id","id",d),an(p,"title","title",d);let g=(l=Fd("link",d))===null||l===void 0?void 0:l.attribs.href;g&&(p.link=g);let E=Va("summary",d)||Va("content",d);E&&(p.description=E);let _=Va("updated",d);return _&&(p.pubDate=new Date(_)),p})};an(n,"id","id",r),an(n,"title","title",r);let i=(t=Fd("link",r))===null||t===void 0?void 0:t.attribs.href;i&&(n.link=i),an(n,"description","subtitle",r);let a=Va("updated",r);return a&&(n.updated=new Date(a)),an(n,"author","email",r,!0),n}function PL(e){var t,r;let n=(r=(t=Fd("channel",e.children))===null||t===void 0?void 0:t.children)!==null&&r!==void 0?r:[],i={type:e.name.substr(0,3),id:"",items:Hs("item",e.children).map(o=>{let{children:l}=o,d={media:p2(l)};an(d,"id","guid",l),an(d,"title","title",l),an(d,"link","link",l),an(d,"description","description",l);let p=Va("pubDate",l)||Va("dc:date",l);return p&&(d.pubDate=new Date(p)),d})};an(i,"title","title",n),an(i,"link","link",n),an(i,"description","description",n);let a=Va("lastBuildDate",n);return a&&(i.updated=new Date(a)),an(i,"author","managingEditor",n,!0),i}function p2(e){return Hs("media:content",e).map(t=>{let{attribs:r}=t,n={medium:r.medium,isDefault:!!r.isDefault};for(let i of ML)r[i]&&(n[i]=r[i]);for(let i of FL)r[i]&&(n[i]=parseInt(r[i],10));return r.expression&&(n.expression=r.expression),n})}function Fd(e,t){return Hs(e,t,!0,1)[0]}function Va(e,t,r=!1){return ra(Hs(e,t,r,1)).trim()}function an(e,t,r,n,i=!1){let a=Va(r,n,i);a&&(e[t]=a)}function BL(e){return e==="rss"||e==="feed"||e==="rdf:RDF"}var ML,FL,m2=v(()=>{Q0();eg();ML=["url","type","lang"],FL=["fileSize","bitrate","framerate","samplingrate","channels","duration","height","width"]});var qa={};Nn(qa,{DocumentPosition:()=>$n,append:()=>xL,appendChild:()=>TL,compareDocumentPosition:()=>d2,existsOne:()=>l2,filter:()=>ru,find:()=>Ld,findAll:()=>SL,findOne:()=>Pd,findOneChild:()=>wL,getAttributeValue:()=>_L,getChildren:()=>tu,getElementById:()=>OL,getElements:()=>NL,getElementsByClassName:()=>DL,getElementsByTagName:()=>Hs,getElementsByTagType:()=>kL,getFeed:()=>tg,getInnerHTML:()=>gL,getName:()=>EL,getOuterHTML:()=>s2,getParent:()=>o2,getSiblings:()=>X0,getText:()=>Dd,hasAttrib:()=>bL,hasChildren:()=>ht,innerText:()=>Kc,isCDATA:()=>jo,isComment:()=>$s,isDocument:()=>Bn,isTag:()=>_e,isText:()=>nn,nextElementSibling:()=>kd,prepend:()=>AL,prependChild:()=>yL,prevElementSibling:()=>Rd,removeElement:()=>na,removeSubsets:()=>RL,replaceElement:()=>vL,testElement:()=>IL,textContent:()=>ra,uniqueSort:()=>Ua});var ui=v(()=>{Q0();u2();c2();Z0();eg();h2();m2();_r()});function jc(e,t){if(!e)return t??$L;let r={_useHtmlParser2:!!e.xmlMode,...t,...e};return e.xml?(r._useHtmlParser2=!0,r.xmlMode=!0,e.xml!==!0&&Object.assign(r,e.xml)):e.xmlMode&&(r._useHtmlParser2=!0),r}var $L,rg=v(()=>{$L={_useHtmlParser2:!1}});var ig={};Nn(ig,{contains:()=>Wc,extract:()=>YL,html:()=>UL,merge:()=>ng,parseHTML:()=>qL,root:()=>zL,text:()=>Us,xml:()=>VL});function _2(e,t,r){return e?e(t??e._root.children,null,void 0,r).toString():""}function HL(e,t){return!t&&typeof e=="object"&&e!=null&&!("length"in e)&&!("type"in e)}function UL(e,t){let r=HL(e)?(t=e,void 0):e,n={...this===null||this===void 0?void 0:this._options,...jc(t)};return _2(this,r,n)}function VL(e){let t={...this._options,xmlMode:!0};return _2(this,e,t)}function Us(e){let t=e??(this?this.root():[]),r="";for(let n=0;n{ui();rg()});function Hn(e){return e.cheerio!=null}function b2(e){return e.replace(/[._-](\w|$)/g,(t,r)=>r.toUpperCase())}function E2(e){return e.replace(/[A-Z]/g,"-$&").toLowerCase()}function gt(e,t){let r=e.length;for(let n=0;ne.length-3)return!1;let r=e.charCodeAt(t+1);return(r>=Vs.LowerA&&r<=Vs.LowerZ||r>=Vs.UpperA&&r<=Vs.UpperZ||r===Vs.Exclamation)&&e.includes(">",t+2)}var Vs,iu=v(()=>{(function(e){e[e.LowerA=97]="LowerA",e[e.LowerZ=122]="LowerZ",e[e.UpperA=65]="UpperA",e[e.UpperZ=90]="UpperZ",e[e.Exclamation=33]="Exclamation"})(Vs||(Vs={}))});var ug={};Nn(ug,{addClass:()=>A2,attr:()=>jL,data:()=>XL,hasClass:()=>eP,prop:()=>WL,removeAttr:()=>JL,removeClass:()=>w2,toggleClass:()=>S2,val:()=>ZL});function Bd(e,t,r){var n;if(!(!e||!_e(e))){if((n=e.attribs)!==null&&n!==void 0||(e.attribs={}),!t)return e.attribs;if(Qc.call(e.attribs,t))return!r&&og.test(t)?t:e.attribs[t];if(e.name==="option"&&t==="value")return Us(e.children);if(e.name==="input"&&(e.attribs.type==="radio"||e.attribs.type==="checkbox")&&t==="value")return"on"}}function au(e,t,r){r===null?y2(e,t):e.attribs[t]=`${r}`}function jL(e,t){if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e!="string")throw new Error("Bad combination of arguments.");return gt(this,(r,n)=>{_e(r)&&au(r,e,t.call(r,n,r.attribs[e]))})}return gt(this,r=>{if(_e(r))if(typeof e=="object")for(let n of Object.keys(e)){let i=e[n];au(r,n,i)}else au(r,e,t)})}return arguments.length>1?this:Bd(this[0],e,this.options.xmlMode)}function v2(e,t,r){return t in e?e[t]:!r&&og.test(t)?Bd(e,t,!1)!==void 0:Bd(e,t,r)}function ag(e,t,r,n){t in e?e[t]=r:au(e,t,!n&&og.test(t)?r?"":null:`${r}`)}function WL(e,t){var r;if(typeof e=="string"&&t===void 0){let n=this[0];if(!n||!_e(n))return;switch(e){case"style":{let i=this.css(),a=Object.keys(i);for(let o=0;o").parent().html();case"innerHTML":return this.html();default:return v2(n,e,this.options.xmlMode)}}if(typeof e=="object"||t!==void 0){if(typeof t=="function"){if(typeof e=="object")throw new TypeError("Bad combination of arguments.");return gt(this,(n,i)=>{_e(n)&&ag(n,e,t.call(n,i,v2(n,e,this.options.xmlMode)),this.options.xmlMode)})}return gt(this,n=>{if(_e(n))if(typeof e=="object")for(let i of Object.keys(e)){let a=e[i];ag(n,i,a,this.options.xmlMode)}else ag(n,e,t,this.options.xmlMode)})}}function T2(e,t,r){var n;(n=e.data)!==null&&n!==void 0||(e.data={}),typeof t=="object"?Object.assign(e.data,t):typeof t=="string"&&r!==void 0&&(e.data[t]=r)}function GL(e){for(let t of Object.keys(e.attribs)){if(!t.startsWith(sg))continue;let r=b2(t.slice(sg.length));Qc.call(e.data,r)||(e.data[r]=x2(e.attribs[t]))}return e.data}function QL(e,t){let r=sg+E2(t),n=e.data;if(Qc.call(n,t))return n[t];if(Qc.call(e.attribs,r))return n[t]=x2(e.attribs[r])}function x2(e){if(e==="null")return null;if(e==="true")return!0;if(e==="false")return!1;let t=Number(e);if(e===String(t))return t;if(KL.test(e))try{return JSON.parse(e)}catch{}return e}function XL(e,t){var r;let n=this[0];if(!n||!_e(n))return;let i=n;return(r=i.data)!==null&&r!==void 0||(i.data={}),e==null?GL(i):typeof e=="object"||t!==void 0?(gt(this,a=>{_e(a)&&(typeof e=="object"?T2(a,e):T2(a,e,t))}),this):QL(i,e)}function ZL(e){let t=arguments.length===0,r=this[0];if(!r||!_e(r))return t?void 0:this;switch(r.name){case"textarea":return this.text(e);case"select":{let n=this.find("option:selected");if(!t){if(this.attr("multiple")==null&&typeof e=="object")return this;this.find("option").removeAttr("selected");let i=typeof e=="object"?e:[e];for(let a of i)this.find(`option[value="${a}"]`).attr("selected","");return this}return this.attr("multiple")?n.toArray().map(i=>Us(i.children)):n.attr("value")}case"input":case"option":return t?this.attr("value"):this.attr("value",e)}}function y2(e,t){!e.attribs||!Qc.call(e.attribs,t)||delete e.attribs[t]}function $d(e){return e?e.trim().split(Xc):[]}function JL(e){let t=$d(e);for(let r of t)gt(this,n=>{_e(n)&&y2(n,r)});return this}function eP(e){return this.toArray().some(t=>{let r=_e(t)&&t.attribs.class,n=-1;if(r&&e.length>0)for(;(n=r.indexOf(e,n+1))>-1;){let i=n+e.length;if((n===0||Xc.test(r[n-1]))&&(i===r.length||Xc.test(r[i])))return!0}return!1})}function A2(e){if(typeof e=="function")return gt(this,(n,i)=>{if(_e(n)){let a=n.attribs.class||"";A2.call([n],e.call(n,i,a))}});if(!e||typeof e!="string")return this;let t=e.split(Xc),r=this.length;for(let n=0;n{_e(i)&&w2.call([i],e.call(i,a,i.attribs.class||""))});let t=$d(e),r=t.length,n=arguments.length===0;return gt(this,i=>{if(_e(i))if(n)i.attribs.class="";else{let a=$d(i.attribs.class),o=!1;for(let l=0;l=0&&(a.splice(d,1),o=!0,l--)}o&&(i.attribs.class=a.join(" "))}})}function S2(e,t){if(typeof e=="function")return gt(this,(o,l)=>{_e(o)&&S2.call([o],e.call(o,l,o.attribs.class||"",t),t)});if(!e||typeof e!="string")return this;let r=e.split(Xc),n=r.length,i=typeof t=="boolean"?t?1:-1:0,a=this.length;for(let o=0;o=0&&g<0?d.push(r[p]):i<=0&&g>=0&&d.splice(g,1)}l.attribs.class=d.join(" ")}return this}var Qc,Xc,sg,og,KL,C2=v(()=>{nu();iu();_r();ui();Qc=Object.prototype.hasOwnProperty,Xc=/\s+/,sg="data-",og=/^(?:autofocus|autoplay|async|checked|controls|defer|disabled|hidden|loop|multiple|open|readonly|required|scoped|selected)$/i,KL=/^{[^]*}$|^\[[^]*]$/});var Ee,Bt,cg=v(()=>{(function(e){e.Attribute="attribute",e.Pseudo="pseudo",e.PseudoElement="pseudo-element",e.Tag="tag",e.Universal="universal",e.Adjacent="adjacent",e.Child="child",e.Descendant="descendant",e.Parent="parent",e.Sibling="sibling",e.ColumnCombinator="column-combinator"})(Ee||(Ee={}));(function(e){e.Any="any",e.Element="element",e.End="end",e.Equals="equals",e.Exists="exists",e.Hyphen="hyphen",e.Not="not",e.Start="start"})(Bt||(Bt={}))});function qs(e){switch(e.type){case Ee.Adjacent:case Ee.Child:case Ee.Descendant:case Ee.Parent:case Ee.Sibling:case Ee.ColumnCombinator:return!0;default:return!1}}function aP(e,t,r){let n=parseInt(t,16)-65536;return n!==n||r?t:n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,n&1023|56320)}function Zc(e){return e.replace(tP,aP)}function lg(e){return e===39||e===34}function N2(e){return e===32||e===9||e===10||e===12||e===13}function ia(e){let t=[],r=O2(t,`${e}`,0);if(r0&&r0&&qs(n[n.length-1]))throw new Error("Did not expect successive traversals.")}function p(_){if(n.length>0&&n[n.length-1].type===Ee.Descendant){n[n.length-1].type=_;return}d(),n.push({type:_})}function g(_,y){n.push({type:Ee.Attribute,name:_,action:y,value:i(1),namespace:null,ignoreCase:"quirks"})}function E(){if(n.length&&n[n.length-1].type===Ee.Descendant&&n.pop(),n.length===0)throw new Error("Empty sub-selector");e.push(n)}if(a(0),t.length===r)return r;e:for(;r{cg();I2=/^[^\\#]?(?:\\(?:[\da-f]{1,6}\s?|.)|[\w\-\u00b0-\uFFFF])+/,tP=/\\([\da-f]{1,6}\s?|(\s)|.)/gi,rP=new Map([[126,Bt.Element],[94,Bt.Start],[36,Bt.End],[42,Bt.Any],[33,Bt.Not],[124,Bt.Hyphen]]),nP=new Set(["has","not","matches","is","where","host","host-context"]);iP=new Set(["contains","icontains"])});var su=v(()=>{cg();D2()});var za=Pi((Mne,k2)=>{k2.exports={trueFunc:function(){return!0},falseFunc:function(){return!1}}});function Jc(e){return!R2.has(e.type)}function fg(e){let t=e.map(L2);for(let r=1;r=0&&n>=1)):e.type===Ee.Pseudo&&(e.data?e.name==="has"||e.name==="contains"?n=0:Array.isArray(e.data)?(n=Math.min(...e.data.map(i=>Math.min(...i.map(L2)))),n<0&&(n=0)):n=2:n=3),n}var R2,sP,dg=v(()=>{su();R2=new Map([[Ee.Universal,50],[Ee.Tag,30],[Ee.Attribute,1],[Ee.Pseudo,0]]);sP=new Map([[Bt.Exists,10],[Bt.Equals,8],[Bt.Not,7],[Bt.Start,6],[Bt.End,6],[Bt.Any,5]])});function P2(e){return e.replace(oP,"\\$&")}function zs(e,t){return typeof e.ignoreCase=="boolean"?e.ignoreCase:e.ignoreCase==="quirks"?!!t.quirksMode:!t.xmlMode&&uP.has(e.name)}var el,oP,uP,M2,F2=v(()=>{el=ln(za(),1),oP=/[-[\]{}()*+?.,\\^$|#\s]/g;uP=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"]);M2={equals(e,t,r){let{adapter:n}=r,{name:i}=t,{value:a}=t;return zs(t,r)?(a=a.toLowerCase(),o=>{let l=n.getAttributeValue(o,i);return l!=null&&l.length===a.length&&l.toLowerCase()===a&&e(o)}):o=>n.getAttributeValue(o,i)===a&&e(o)},hyphen(e,t,r){let{adapter:n}=r,{name:i}=t,{value:a}=t,o=a.length;return zs(t,r)?(a=a.toLowerCase(),function(d){let p=n.getAttributeValue(d,i);return p!=null&&(p.length===o||p.charAt(o)==="-")&&p.substr(0,o).toLowerCase()===a&&e(d)}):function(d){let p=n.getAttributeValue(d,i);return p!=null&&(p.length===o||p.charAt(o)==="-")&&p.substr(0,o)===a&&e(d)}},element(e,t,r){let{adapter:n}=r,{name:i,value:a}=t;if(/\s/.test(a))return el.default.falseFunc;let o=new RegExp(`(?:^|\\s)${P2(a)}(?:$|\\s)`,zs(t,r)?"i":"");return function(d){let p=n.getAttributeValue(d,i);return p!=null&&p.length>=a.length&&o.test(p)&&e(d)}},exists(e,{name:t},{adapter:r}){return n=>r.hasAttrib(n,t)&&e(n)},start(e,t,r){let{adapter:n}=r,{name:i}=t,{value:a}=t,o=a.length;return o===0?el.default.falseFunc:zs(t,r)?(a=a.toLowerCase(),l=>{let d=n.getAttributeValue(l,i);return d!=null&&d.length>=o&&d.substr(0,o).toLowerCase()===a&&e(l)}):l=>{var d;return!!(!((d=n.getAttributeValue(l,i))===null||d===void 0)&&d.startsWith(a))&&e(l)}},end(e,t,r){let{adapter:n}=r,{name:i}=t,{value:a}=t,o=-a.length;return o===0?el.default.falseFunc:zs(t,r)?(a=a.toLowerCase(),l=>{var d;return((d=n.getAttributeValue(l,i))===null||d===void 0?void 0:d.substr(o).toLowerCase())===a&&e(l)}):l=>{var d;return!!(!((d=n.getAttributeValue(l,i))===null||d===void 0)&&d.endsWith(a))&&e(l)}},any(e,t,r){let{adapter:n}=r,{name:i,value:a}=t;if(a==="")return el.default.falseFunc;if(zs(t,r)){let o=new RegExp(P2(a),"i");return function(d){let p=n.getAttributeValue(d,i);return p!=null&&p.length>=a.length&&o.test(p)&&e(d)}}return o=>{var l;return!!(!((l=n.getAttributeValue(o,i))===null||l===void 0)&&l.includes(a))&&e(o)}},not(e,t,r){let{adapter:n}=r,{name:i}=t,{value:a}=t;return a===""?o=>!!n.getAttributeValue(o,i)&&e(o):zs(t,r)?(a=a.toLowerCase(),o=>{let l=n.getAttributeValue(o,i);return(l==null||l.length!==a.length||l.toLowerCase()!==a)&&e(o)}):o=>n.getAttributeValue(o,i)!==a&&e(o)}}});function $2(e){if(e=e.trim().toLowerCase(),e==="even")return[2,0];if(e==="odd")return[2,1];let t=0,r=0,n=a(),i=o();if(t=B2&&e.charCodeAt(t)<=lP;)p=p*10+(e.charCodeAt(t)-B2),t++;return t===d?null:p}function l(){for(;t{cP=new Set([9,10,12,13,32]),B2="0".charCodeAt(0),lP="9".charCodeAt(0)});function U2(e){let t=e[0],r=e[1]-1;if(r<0&&t<=0)return hg.default.falseFunc;if(t===-1)return a=>a<=r;if(t===0)return a=>a===r;if(t===1)return r<0?hg.default.trueFunc:a=>a>=r;let n=Math.abs(t),i=(r%n+n)%n;return t>1?a=>a>=r&&a%n===i:a=>a<=r&&a%n===i}var hg,V2=v(()=>{hg=ln(za(),1)});function ou(e){return U2($2(e))}var q2=v(()=>{H2();V2()});function Hd(e,t){return r=>{let n=t.getParent(r);return n!=null&&t.isTag(n)&&e(r)}}function pg(e){return function(r,n,{adapter:i}){let a=i[e];return typeof a!="function"?sn.default.falseFunc:function(l){return a(l)&&r(l)}}}var sn,uu,z2=v(()=>{q2();sn=ln(za(),1);uu={contains(e,t,{adapter:r}){return function(i){return e(i)&&r.getText(i).includes(t)}},icontains(e,t,{adapter:r}){let n=t.toLowerCase();return function(a){return e(a)&&r.getText(a).toLowerCase().includes(n)}},"nth-child"(e,t,{adapter:r,equals:n}){let i=ou(t);return i===sn.default.falseFunc?sn.default.falseFunc:i===sn.default.trueFunc?Hd(e,r):function(o){let l=r.getSiblings(o),d=0;for(let p=0;p=0&&!n(o,l[p]);p--)r.isTag(l[p])&&d++;return i(d)&&e(o)}},"nth-of-type"(e,t,{adapter:r,equals:n}){let i=ou(t);return i===sn.default.falseFunc?sn.default.falseFunc:i===sn.default.trueFunc?Hd(e,r):function(o){let l=r.getSiblings(o),d=0;for(let p=0;p=0;p--){let g=l[p];if(n(o,g))break;r.isTag(g)&&r.getName(g)===r.getName(o)&&d++}return i(d)&&e(o)}},root(e,t,{adapter:r}){return n=>{let i=r.getParent(n);return(i==null||!r.isTag(i))&&e(n)}},scope(e,t,r,n){let{equals:i}=r;return!n||n.length===0?uu.root(e,t,r):n.length===1?a=>i(n[0],a)&&e(a):a=>n.includes(a)&&e(a)},hover:pg("isHovered"),visited:pg("isVisited"),active:pg("isActive")}});function mg(e,t,r,n){if(r===null){if(e.length>n)throw new Error(`Pseudo-class :${t} requires an argument`)}else if(e.length===n)throw new Error(`Pseudo-class :${t} doesn't have any arguments`)}var tl,Y2=v(()=>{tl={empty(e,{adapter:t}){return!t.getChildren(e).some(r=>t.isTag(r)||t.getText(r)!=="")},"first-child"(e,{adapter:t,equals:r}){if(t.prevElementSibling)return t.prevElementSibling(e)==null;let n=t.getSiblings(e).find(i=>t.isTag(i));return n!=null&&r(e,n)},"last-child"(e,{adapter:t,equals:r}){let n=t.getSiblings(e);for(let i=n.length-1;i>=0;i--){if(r(e,n[i]))return!0;if(t.isTag(n[i]))break}return!1},"first-of-type"(e,{adapter:t,equals:r}){let n=t.getSiblings(e),i=t.getName(e);for(let a=0;a=0;a--){let o=n[a];if(r(e,o))return!0;if(t.isTag(o)&&t.getName(o)===i)break}return!1},"only-of-type"(e,{adapter:t,equals:r}){let n=t.getName(e);return t.getSiblings(e).every(i=>r(e,i)||!t.isTag(i)||t.getName(i)!==n)},"only-child"(e,{adapter:t,equals:r}){return t.getSiblings(e).every(n=>r(e,n)||!t.isTag(n))}}});var Ud,K2=v(()=>{Ud={"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 Eg(e,t){return e===Un.default.falseFunc?Un.default.falseFunc:r=>t.isTag(r)&&e(r)}function vg(e,t){let r=t.getSiblings(e);if(r.length<=1)return[];let n=r.indexOf(e);return n<0||n===r.length-1?[]:r.slice(n+1).filter(t.isTag)}function _g(e){return{xmlMode:!!e.xmlMode,lowerCaseAttributeNames:!!e.lowerCaseAttributeNames,lowerCaseTags:!!e.lowerCaseTags,quirksMode:!!e.quirksMode,cacheResults:!!e.cacheResults,pseudos:e.pseudos,adapter:e.adapter,equals:e.equals}}var Un,bg,gg,Vd,qd=v(()=>{Un=ln(za(),1);dg();bg={};gg=(e,t,r,n,i)=>{let a=i(t,_g(r),n);return a===Un.default.trueFunc?e:a===Un.default.falseFunc?Un.default.falseFunc:o=>a(o)&&e(o)},Vd={is:gg,matches:gg,where:gg,not(e,t,r,n,i){let a=i(t,_g(r),n);return a===Un.default.falseFunc?e:a===Un.default.trueFunc?Un.default.falseFunc:o=>!a(o)&&e(o)},has(e,t,r,n,i){let{adapter:a}=r,o=_g(r);o.relativeSelector=!0;let l=t.some(g=>g.some(Jc))?[bg]:void 0,d=i(t,o,l);if(d===Un.default.falseFunc)return Un.default.falseFunc;let p=Eg(d,a);if(l&&d!==Un.default.trueFunc){let{shouldTestNextSiblings:g=!1}=d;return E=>{if(!e(E))return!1;l[0]=E;let _=a.getChildren(E),y=g?[..._,...vg(E,a)]:_;return a.existsOne(p,y)}}return g=>e(g)&&a.existsOne(p,a.getChildren(g))}}});function j2(e,t,r,n,i){var a;let{name:o,data:l}=t;if(Array.isArray(l)){if(!(o in Vd))throw new Error(`Unknown pseudo-class :${o}(${l})`);return Vd[o](e,l,r,n,i)}let d=(a=r.pseudos)===null||a===void 0?void 0:a[o],p=typeof d=="string"?d:Ud[o];if(typeof p=="string"){if(l!=null)throw new Error(`Pseudo ${o} doesn't have any arguments`);let g=ia(p);return Vd.is(e,g,r,n,i)}if(typeof d=="function")return mg(d,o,l,1),g=>d(g,l)&&e(g);if(o in uu)return uu[o](e,l,r,n);if(o in tl){let g=tl[o];return mg(g,o,l,2),E=>g(E,r,l)&&e(E)}throw new Error(`Unknown pseudo-class :${o}`)}var Tg=v(()=>{su();z2();Y2();K2();qd()});function xg(e,t){let r=t.getParent(e);return r&&t.isTag(r)?r:null}function W2(e,t,r,n,i){let{adapter:a,equals:o}=r;switch(t.type){case Ee.PseudoElement:throw new Error("Pseudo-elements are not supported by css-select");case Ee.ColumnCombinator:throw new Error("Column combinators are not yet supported by css-select");case Ee.Attribute:{if(t.namespace!=null)throw new Error("Namespaced attributes are not yet supported by css-select");return(!r.xmlMode||r.lowerCaseAttributeNames)&&(t.name=t.name.toLowerCase()),M2[t.action](e,t,r)}case Ee.Pseudo:return j2(e,t,r,n,i);case Ee.Tag:{if(t.namespace!=null)throw new Error("Namespaced tag names are not yet supported by css-select");let{name:l}=t;return(!r.xmlMode||r.lowerCaseTags)&&(l=l.toLowerCase()),function(p){return a.getName(p)===l&&e(p)}}case Ee.Descendant:{if(r.cacheResults===!1||typeof WeakSet>"u")return function(p){let g=p;for(;g=xg(g,a);)if(e(g))return!0;return!1};let l=new WeakSet;return function(p){let g=p;for(;g=xg(g,a);)if(!l.has(g)){if(a.isTag(g)&&e(g))return!0;l.add(g)}return!1}}case"_flexibleDescendant":return function(d){let p=d;do if(e(p))return!0;while(p=xg(p,a));return!1};case Ee.Parent:return function(d){return a.getChildren(d).some(p=>a.isTag(p)&&e(p))};case Ee.Child:return function(d){let p=a.getParent(d);return p!=null&&a.isTag(p)&&e(p)};case Ee.Sibling:return function(d){let p=a.getSiblings(d);for(let g=0;g{F2();Tg();su()});function Q2(e,t,r){let n=zd(e,t,r);return Eg(n,t.adapter)}function zd(e,t,r){let n=typeof e=="string"?ia(e):e;return Yd(n,t,r)}function X2(e){return e.type===Ee.Pseudo&&(e.name==="scope"||Array.isArray(e.data)&&e.data.some(t=>t.some(X2)))}function pP(e,{adapter:t},r){let n=!!r?.every(i=>{let a=t.isTag(i)&&t.getParent(i);return i===bg||a&&t.isTag(a)});for(let i of e){if(!(i.length>0&&Jc(i[0])&&i[0].type!==Ee.Descendant))if(n&&!i.some(X2))i.unshift(fP);else continue;i.unshift(hP)}}function Yd(e,t,r){var n;e.forEach(fg),r=(n=t.context)!==null&&n!==void 0?n:r;let i=Array.isArray(r),a=r&&(Array.isArray(r)?r:[r]);if(t.relativeSelector!==!1)pP(e,t,a);else if(e.some(d=>d.length>0&&Jc(d[0])))throw new Error("Relative selectors are not allowed when the `relativeSelector` option is disabled");let o=!1,l=e.map(d=>{if(d.length>=2){let[p,g]=d;p.type!==Ee.Pseudo||p.name!=="scope"||(i&&g.type===Ee.Descendant?d[1]=dP:(g.type===Ee.Adjacent||g.type===Ee.Sibling)&&(o=!0))}return mP(d,t,a)}).reduce(gP,aa.default.falseFunc);return l.shouldTestNextSiblings=o,l}function mP(e,t,r){var n;return e.reduce((i,a)=>i===aa.default.falseFunc?aa.default.falseFunc:W2(i,a,t,r,Yd),(n=t.rootFunc)!==null&&n!==void 0?n:aa.default.trueFunc)}function gP(e,t){return t===aa.default.falseFunc||e===aa.default.trueFunc?e:e===aa.default.falseFunc||t===aa.default.trueFunc?t:function(n){return e(n)||t(n)}}var aa,fP,dP,hP,Z2=v(()=>{su();aa=ln(za(),1);dg();G2();qd();fP={type:Ee.Descendant},dP={type:"_flexibleDescendant"},hP={type:Ee.Pseudo,name:"scope",data:null}});function ew(e){var t,r,n,i;let a=e??_P;return(t=a.adapter)!==null&&t!==void 0||(a.adapter=qa),(r=a.equals)!==null&&r!==void 0||(a.equals=(i=(n=a.adapter)===null||n===void 0?void 0:n.equals)!==null&&i!==void 0?i:J2),a}function Ag(e){return function(r,n,i){let a=ew(n);return e(r,a,i)}}function tw(e){return function(r,n,i){let a=ew(i);typeof r!="function"&&(r=zd(r,a,n));let o=jd(n,a.adapter,r.shouldTestNextSiblings);return e(r,o,a)}}function jd(e,t,r=!1){return r&&(e=bP(e,t)),Array.isArray(e)?t.removeSubsets(e):t.getChildren(e)}function bP(e,t){let r=Array.isArray(e)?e.slice(0):[e],n=r.length;for(let i=0;i{ui();yg=ln(za(),1);Z2();qd();Tg();J2=(e,t)=>e===t,_P={adapter:qa,equals:J2};mie=Ag(Q2),gie=Ag(zd),Kd=Ag(Yd);_ie=tw((e,t,r)=>e===yg.default.falseFunc||!t||t.length===0?[]:r.adapter.findAll(e,t)),bie=tw((e,t,r)=>e===yg.default.falseFunc||!t||t.length===0?null:r.adapter.findOne(e,t))});function cu(e){return e.type!=="pseudo"?!1:EP.has(e.name)?!0:e.name==="not"&&Array.isArray(e.data)?e.data.some(t=>t.some(cu)):!1}function rw(e,t,r){let n=t!=null?parseInt(t,10):NaN;switch(e){case"first":return 1;case"nth":case"eq":return isFinite(n)?n>=0?n+1:1/0:0;case"lt":return isFinite(n)?n>=0?Math.min(n,r):1/0:0;case"gt":return isFinite(n)?1/0:0;case"odd":return 2*r;case"even":return 2*r-1;case"last":case"not":return 1/0}}var EP,Sg=v(()=>{EP=new Set(["first","last","eq","gt","nth","lt","even","odd"])});function nw(e){for(;e.parent;)e=e.parent;return e}function Wd(e){let t=[],r=[];for(let n of e)n.some(cu)?t.push(n):r.push(n);return[r,t]}var iw=v(()=>{Sg()});function Ng(e,t,r={}){return Og([e],t,r)}function Og(e,t,r={}){if(typeof t=="function")return e.some(t);let[n,i]=Wd(ia(t));return n.length>0&&e.some(Kd(n,r))||i.some(a=>sw(a,e,r).length>0)}function xP(e,t,r,n){let i=typeof r=="string"?parseInt(r,10):NaN;switch(e){case"first":case"lt":return t;case"last":return t.length>0?[t[t.length-1]]:t;case"nth":case"eq":return isFinite(i)&&Math.abs(i)o%2===0);case"odd":return t.filter((a,o)=>o%2===1);case"not":{let a=new Set(aw(r,t,n));return t.filter(o=>!a.has(o))}}}function Dg(e,t,r={}){return aw(ia(e),t,r)}function aw(e,t,r){if(t.length===0)return[];let[n,i]=Wd(e),a;if(n.length){let o=Ig(t,n,r);if(i.length===0)return o;o.length&&(a=new Set(o))}for(let o=0;o_e(g)&&!a.has(g)):t).length===0)break;let p=sw(l,t,r);if(p.length)if(a)p.forEach(g=>a.add(g));else{if(o===i.length-1)return p;a=new Set(p)}}return typeof a<"u"?a.size===t.length?t:t.filter(o=>a.has(o)):[]}function sw(e,t,r){var n;if(e.some(qs)){let i=(n=r.root)!==null&&n!==void 0?n:nw(t[0]),a={...r,context:t,relativeSelector:!1};return e.push(TP),Qd(i,e,a,!0,t.length)}return Qd(t,e,r,!1,t.length)}function ow(e,t,r={},n=1/0){if(typeof e=="function")return uw(t,e);let[i,a]=Wd(ia(e)),o=a.map(l=>Qd(t,l,r,!0,n));return i.length&&o.push(Cg(t,i,r,n)),o.length===0?[]:o.length===1?o[0]:Ua(o.reduce((l,d)=>[...l,...d]))}function Qd(e,t,r,n,i){let a=t.findIndex(cu),o=t.slice(0,a),l=t[a],d=t.length-1===a?i:1/0,p=rw(l.name,l.data,d);if(p===0)return[];let E=(o.length===0&&!Array.isArray(e)?tu(e).filter(_e):o.length===0?(Array.isArray(e)?e:[e]).filter(_e):n||o.some(qs)?Cg(e,[o],r,p):Ig(e,[o],r)).slice(0,p),_=xP(l.name,E,l.data,r);if(_.length===0||t.length===a+1)return _;let y=t.slice(a+1),C=y.some(qs);if(C){if(qs(y[0])){let{type:k}=y[0];(k===Ee.Sibling||k===Ee.Adjacent)&&(_=jd(_,qa,!0)),y.unshift(vP)}r={...r,relativeSelector:!1,rootFunc:k=>_.includes(k)}}else r.rootFunc&&r.rootFunc!==Gd.trueFunc&&(r={...r,rootFunc:Gd.trueFunc});return y.some(cu)?Qd(_,y,r,!1,i):C?Cg(_,[y],r,i):Ig(_,[y],r)}function Cg(e,t,r,n){let i=Kd(t,r,e);return uw(e,i,n)}function uw(e,t,r=1/0){let n=jd(e,qa,t.shouldTestNextSiblings);return Ld(i=>_e(i)&&t(i),n,!0,r)}function Ig(e,t,r){let n=(Array.isArray(e)?e:[e]).filter(_e);if(n.length===0)return n;let i=Kd(t,r);return i===Gd.trueFunc?n:n.filter(i)}var Gd,vP,TP,cw=v(()=>{su();wg();ui();Gd=ln(za(),1);iw();Sg();wg();vP={type:Ee.Universal,namespace:null},TP={type:Ee.Pseudo,name:"scope",data:null}});var Mg={};Nn(Mg,{_findBySelector:()=>SP,add:()=>e4,addBack:()=>t4,children:()=>BP,closest:()=>OP,contents:()=>$P,each:()=>HP,end:()=>JP,eq:()=>WP,filter:()=>VP,filterArray:()=>Pg,find:()=>wP,first:()=>KP,get:()=>GP,has:()=>YP,index:()=>XP,is:()=>qP,last:()=>jP,map:()=>UP,next:()=>DP,nextAll:()=>kP,nextUntil:()=>RP,not:()=>zP,parent:()=>CP,parents:()=>IP,parentsUntil:()=>NP,prev:()=>LP,prevAll:()=>PP,prevUntil:()=>MP,siblings:()=>FP,slice:()=>ZP,toArray:()=>QP});function wP(e){if(!e)return this._make([]);if(typeof e!="string"){let t=Hn(e)?e.toArray():[e],r=this.toArray();return this._make(t.filter(n=>r.some(i=>Wc(i,n))))}return this._findBySelector(e,Number.POSITIVE_INFINITY)}function SP(e,t){var r;let n=this.toArray(),i=AP.test(e)?n:this.children().toArray(),a={context:n,root:(r=this._root)===null||r===void 0?void 0:r[0],xmlMode:this.options.xmlMode,lowerCaseTags:this.options.lowerCaseTags,lowerCaseAttributeNames:this.options.lowerCaseAttributeNames,pseudos:this.options.pseudos,quirksMode:this.options.quirksMode};return this._make(ow(e,i,a,t))}function kg(e){return function(t,...r){return function(n){var i;let a=e(t,this);return n&&(a=Pg(a,n,this.options.xmlMode,(i=this._root)===null||i===void 0?void 0:i[0])),this._make(this.length>1&&a.length>1?r.reduce((o,l)=>l(o),a):a)}}}function Lg(e,...t){let r=null,n=kg((i,a)=>{let o=[];return gt(a,l=>{for(let d;(d=i(l))&&!r?.(d,o.length);l=d)o.push(d)}),o})(e,...t);return function(i,a){r=typeof i=="string"?l=>Ng(l,i,this.options):i?nl(i):null;let o=n.call(this,a);return r=null,o}}function lu(e){return e.length>1?Array.from(new Set(e)):e}function OP(e){var t;let r=[];if(!e)return this._make(r);let n={xmlMode:this.options.xmlMode,root:(t=this._root)===null||t===void 0?void 0:t[0]},i=typeof e=="string"?a=>Ng(a,e,n):nl(e);return gt(this,a=>{for(a&&!Bn(a)&&!_e(a)&&(a=a.parent);a&&_e(a);){if(i(a,0)){r.includes(a)||r.push(a);break}a=a.parent}}),this._make(r)}function $P(){let e=this.toArray().reduce((t,r)=>ht(r)?t.concat(r.children):t,[]);return this._make(e)}function HP(e){let t=0,r=this.length;for(;te.call(t,r,t):Hn(e)?t=>Array.prototype.includes.call(e,t):function(t){return e===t}}function VP(e){var t;return this._make(Pg(this.toArray(),e,this.options.xmlMode,(t=this._root)===null||t===void 0?void 0:t[0]))}function Pg(e,t,r,n){return typeof t=="string"?Dg(t,e,{xmlMode:r,root:n}):e.filter(nl(t))}function qP(e){let t=this.toArray();return typeof e=="string"?Og(t.filter(_e),e,this.options):e?t.some(nl(e)):!1}function zP(e){let t=this.toArray();if(typeof e=="string"){let r=new Set(Dg(e,t,this.options));t=t.filter(n=>!r.has(n))}else{let r=nl(e);t=t.filter((n,i)=>!r(n,i))}return this._make(t)}function YP(e){return this.filter(typeof e=="string"?`:has(${e})`:(t,r)=>this._make(r).find(e).length>0)}function KP(){return this.length>1?this._make(this[0]):this}function jP(){return this.length>0?this._make(this[this.length-1]):this}function WP(e){var t;return e=+e,e===0&&this.length<=1?this:(e<0&&(e=this.length+e),this._make((t=this[e])!==null&&t!==void 0?t:[]))}function GP(e){return e==null?this.toArray():this[e<0?this.length+e:e]}function QP(){return Array.prototype.slice.call(this)}function XP(e){let t,r;return e==null?(t=this.parent().children(),r=this[0]):typeof e=="string"?(t=this._make(e),r=this[0]):(t=this,r=Hn(e)?e[0]:e),Array.prototype.indexOf.call(t,r)}function ZP(e,t){return this._make(Array.prototype.slice.call(this,e,t))}function JP(){var e;return(e=this.prevObject)!==null&&e!==void 0?e:this._make([])}function e4(e,t){let r=this._make(e,t),n=Ua([...this.get(),...r.get()]);return this._make(n)}function t4(e){return this.prevObject?this.add(e?this.prevObject.filter(e):this.prevObject):this}var AP,rl,Rg,CP,IP,NP,DP,kP,RP,LP,PP,MP,FP,BP,lw=v(()=>{_r();cw();iu();nu();ui();AP=/^\s*[+~]/;rl=kg((e,t)=>{let r=[];for(let n=0;n0&&(r=r.concat(i))}return r}),Rg=kg((e,t)=>{let r=[];for(let n=0;ne&&!Bn(e)?e:null,lu),IP=rl(e=>{let t=[];for(;e.parent&&!Bn(e.parent);)t.push(e.parent),e=e.parent;return t},Ua,e=>e.reverse()),NP=Lg(({parent:e})=>e&&!Bn(e)?e:null,Ua,e=>e.reverse());DP=Rg(e=>kd(e)),kP=rl(e=>{let t=[];for(;e.next;)e=e.next,_e(e)&&t.push(e);return t},lu),RP=Lg(e=>kd(e),lu),LP=Rg(e=>Rd(e)),PP=rl(e=>{let t=[];for(;e.prev;)e=e.prev,_e(e)&&t.push(e);return t},lu),MP=Lg(e=>Rd(e),lu),FP=rl(e=>X0(e).filter(t=>_e(t)&&t!==e),Ua),BP=rl(e=>tu(e).filter(_e),lu)});function fw(e){return function(r,n,i,a){if(typeof Buffer<"u"&&Buffer.isBuffer(r)&&(r=r.toString()),typeof r=="string")return e(r,n,i,a);let o=r;if(!Array.isArray(o)&&Bn(o))return o;let l=new wn([]);return Ya(o,l),l}}function Ya(e,t){let r=Array.isArray(e)?e:[e];t?t.children=r:t=null;for(let n=0;n{ui();_r()});var Bg={};Nn(Bg,{_makeDomArray:()=>r4,after:()=>f4,append:()=>a4,appendTo:()=>n4,before:()=>h4,clone:()=>T4,empty:()=>_4,html:()=>b4,insertAfter:()=>d4,insertBefore:()=>p4,prepend:()=>s4,prependTo:()=>i4,remove:()=>m4,replaceWith:()=>g4,text:()=>v4,toString:()=>E4,unwrap:()=>c4,wrap:()=>o4,wrapAll:()=>l4,wrapInner:()=>u4});function r4(e,t){if(e==null)return[];if(typeof e=="string")return this._parse(e,this.options,!1,null).children.slice(0);if("length"in e){if(e.length===1)return this._makeDomArray(e[0],t);let r=[];for(let n=0;n{if(!ht(n))return;let a=typeof t[0]=="function"?t[0].call(n,i,this._render(n.children)):t,o=this._makeDomArray(a,i=e.length?null:e[t+r];for(let g=0;g-1&&(_.children.splice(C,1),i===_&&t>C&&l[0]--)}E.parent=i,E.prev&&(E.prev.next=(a=E.next)!==null&&a!==void 0?a:null),E.next&&(E.next.prev=(o=E.prev)!==null&&o!==void 0?o:null),E.prev=g===0?d:n[g-1],E.next=g===n.length-1?p:n[g+1]}return d&&(d.next=n[0]),p&&(p.prev=n[n.length-1]),e.splice(...l)}function n4(e){return(Hn(e)?e:this._make(e)).append(this),this}function i4(e){return(Hn(e)?e:this._make(e)).prepend(this),this}function hw(e){return function(t){let r=this.length-1,n=this.parents().last();for(let i=0;i{this._make(r).replaceWith(r.children)}),this}function l4(e){let t=this[0];if(t){let r=this._make(typeof e=="function"?e.call(t,0,t):e).insertBefore(t),n;for(let a=0;a{if(!ht(r)||!r.parent)return;let i=r.parent.children,a=i.indexOf(r);if(a<0)return;let o=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,l=this._makeDomArray(o,n{if(!ht(r)||!r.parent)return;let i=r.parent.children,a=i.indexOf(r);if(a<0)return;let o=typeof e[0]=="function"?e[0].call(r,n,this._render(r.children)):e,l=this._makeDomArray(o,n{let i=this.clone().toArray(),{parent:a}=n;if(!a)return;let o=a.children,l=o.indexOf(n);l<0||(Ka(o,l,0,i,a),r.push(...i))}),this._make(r)}function m4(e){let t=e?this.filter(e):this;return gt(t,r=>{na(r),r.prev=r.next=r.parent=null}),this}function g4(e){return gt(this,(t,r)=>{let{parent:n}=t;if(!n)return;let i=n.children,a=typeof e=="function"?e.call(t,r,t):e,o=this._makeDomArray(a);Ya(o,null);let l=i.indexOf(t);Ka(i,l,1,o,n),o.includes(t)||(t.parent=t.prev=t.next=null)})}function _4(){return gt(this,e=>{if(ht(e)){for(let t of e.children)t.next=t.prev=t.parent=null;e.children.length=0}})}function b4(e){if(e===void 0){let t=this[0];return!t||!ht(t)?null:this._render(t.children)}return gt(this,t=>{if(!ht(t))return;for(let n of t.children)n.next=n.prev=n.parent=null;let r=Hn(e)?e.toArray():this._parse(`${e}`,this.options,!1,t).children;Ya(r,t)})}function E4(){return this._render(this)}function v4(e){return e===void 0?Us(this):typeof e=="function"?gt(this,(t,r)=>this._make(t).text(e.call(t,r,Us([t])))):gt(this,t=>{if(!ht(t))return;for(let n of t.children)n.next=n.prev=n.parent=null;let r=new Ni(`${e}`);Ya(r,t)})}function T4(){let e=Array.prototype.map.call(this.get(),r=>Wo(r,!0)),t=new wn(e);for(let r of e)r.parent=t;return this._make(e)}var a4,s4,o4,u4,pw=v(()=>{_r();Fg();nu();iu();ui();a4=dw((e,t,r)=>{Ka(t,t.length,0,e,r)}),s4=dw((e,t,r)=>{Ka(t,0,0,e,r)});o4=hw((e,t,r)=>{let{parent:n}=e;if(!n)return;let i=n.children,a=i.indexOf(e);Ya([e],t),Ka(i,a,0,r,n)}),u4=hw((e,t,r)=>{ht(e)&&(Ya(e.children,t),Ya(r,e))})});var $g={};Nn($g,{css:()=>x4});function x4(e,t){if(e!=null&&t!=null||typeof e=="object"&&!Array.isArray(e))return gt(this,(r,n)=>{_e(r)&&mw(r,e,t,n)});if(this.length!==0)return gw(this[0],e)}function mw(e,t,r,n){if(typeof t=="string"){let i=gw(e),a=typeof r=="function"?r.call(e,n,i[t]):r;a===""?delete i[t]:a!=null&&(i[t]=a),e.attribs.style=y4(i)}else if(typeof t=="object"){let i=Object.keys(t);for(let a=0;a`${t}${t?" ":""}${r}: ${e[r]};`,"")}function A4(e){if(e=(e||"").trim(),!e)return{};let t={},r;for(let n of e.split(";")){let i=n.indexOf(":");if(i<1||i===n.length-1){let a=n.trimEnd();a.length>0&&r!==void 0&&(t[r]+=`;${a}`)}else r=n.slice(0,i).trim(),t[r]=n.slice(i+1).trim()}return t}var _w=v(()=>{iu();_r()});var Hg={};Nn(Hg,{serialize:()=>S4,serializeArray:()=>C4});function S4(){return this.serializeArray().map(r=>`${encodeURIComponent(r.name)}=${encodeURIComponent(r.value)}`).join("&").replace(w4,"+")}function C4(){return this.map((e,t)=>{let r=this._make(t);return _e(t)&&t.name==="form"?r.find(bw).toArray():r.filter(bw).toArray()}).filter('[name!=""]:enabled:not(:submit, :button, :image, :reset, :file):matches([checked], :not(:checkbox, :radio))').map((e,t)=>{var r;let n=this._make(t),i=n.attr("name"),a=(r=n.val())!==null&&r!==void 0?r:"";return Array.isArray(a)?a.map(o=>({name:i,value:o.replace(Ew,`\r +`)})):{name:i,value:a.replace(Ew,`\r +`)}}).toArray()}var bw,w4,Ew,vw=v(()=>{_r();bw="input,select,textarea,keygen",w4=/%20/g,Ew=/\r?\n/g});var Ug={};Nn(Ug,{extract:()=>N4});function I4(e){var t;return typeof e=="string"?{selector:e,value:"textContent"}:{selector:e.selector,value:(t=e.value)!==null&&t!==void 0?t:"textContent"}}function N4(e){let t={};for(let r in e){let n=e[r],i=Array.isArray(n),{selector:a,value:o}=I4(i?n[0]:n),l=typeof o=="function"?o:typeof o=="string"?d=>this._make(d).prop(o):d=>this._make(d).extract(o);if(i)t[r]=this._findBySelector(a,Number.POSITIVE_INFINITY).map((d,p)=>l(p,r,t)).get();else{let d=this._findBySelector(a,1);t[r]=d.length>0?l(d[0],r,t):void 0}}return t}var Tw=v(()=>{});var ja,xw=v(()=>{C2();lw();pw();_w();vw();Tw();ja=class{constructor(t,r,n){if(this.length=0,this.options=n,this._root=r,t){for(let i=0;i{rg();nu();xw();iu()});function Xd(e){return e>=55296&&e<=57343}function ww(e){return e>=56320&&e<=57343}function Sw(e,t){return(e-55296)*1024+9216+t}function Zd(e){return e!==32&&e!==10&&e!==13&&e!==9&&e!==12&&e>=1&&e<=31||e>=127&&e<=159}function Jd(e){return e>=64976&&e<=65007||D4.has(e)}var D4,xt,x,Vr,eh=v(()=>{D4=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]),xt="\uFFFD";(function(e){e[e.EOF=-1]="EOF",e[e.NULL=0]="NULL",e[e.TABULATION=9]="TABULATION",e[e.CARRIAGE_RETURN=13]="CARRIAGE_RETURN",e[e.LINE_FEED=10]="LINE_FEED",e[e.FORM_FEED=12]="FORM_FEED",e[e.SPACE=32]="SPACE",e[e.EXCLAMATION_MARK=33]="EXCLAMATION_MARK",e[e.QUOTATION_MARK=34]="QUOTATION_MARK",e[e.AMPERSAND=38]="AMPERSAND",e[e.APOSTROPHE=39]="APOSTROPHE",e[e.HYPHEN_MINUS=45]="HYPHEN_MINUS",e[e.SOLIDUS=47]="SOLIDUS",e[e.DIGIT_0=48]="DIGIT_0",e[e.DIGIT_9=57]="DIGIT_9",e[e.SEMICOLON=59]="SEMICOLON",e[e.LESS_THAN_SIGN=60]="LESS_THAN_SIGN",e[e.EQUALS_SIGN=61]="EQUALS_SIGN",e[e.GREATER_THAN_SIGN=62]="GREATER_THAN_SIGN",e[e.QUESTION_MARK=63]="QUESTION_MARK",e[e.LATIN_CAPITAL_A=65]="LATIN_CAPITAL_A",e[e.LATIN_CAPITAL_Z=90]="LATIN_CAPITAL_Z",e[e.RIGHT_SQUARE_BRACKET=93]="RIGHT_SQUARE_BRACKET",e[e.GRAVE_ACCENT=96]="GRAVE_ACCENT",e[e.LATIN_SMALL_A=97]="LATIN_SMALL_A",e[e.LATIN_SMALL_Z=122]="LATIN_SMALL_Z"})(x||(x={}));Vr={DASH_DASH:"--",CDATA_START:"[CDATA[",DOCTYPE:"doctype",SCRIPT:"script",PUBLIC:"public",SYSTEM:"system"}});var Y,il=v(()=>{(function(e){e.controlCharacterInInputStream="control-character-in-input-stream",e.noncharacterInInputStream="noncharacter-in-input-stream",e.surrogateInInputStream="surrogate-in-input-stream",e.nonVoidHtmlElementStartTagWithTrailingSolidus="non-void-html-element-start-tag-with-trailing-solidus",e.endTagWithAttributes="end-tag-with-attributes",e.endTagWithTrailingSolidus="end-tag-with-trailing-solidus",e.unexpectedSolidusInTag="unexpected-solidus-in-tag",e.unexpectedNullCharacter="unexpected-null-character",e.unexpectedQuestionMarkInsteadOfTagName="unexpected-question-mark-instead-of-tag-name",e.invalidFirstCharacterOfTagName="invalid-first-character-of-tag-name",e.unexpectedEqualsSignBeforeAttributeName="unexpected-equals-sign-before-attribute-name",e.missingEndTagName="missing-end-tag-name",e.unexpectedCharacterInAttributeName="unexpected-character-in-attribute-name",e.unknownNamedCharacterReference="unknown-named-character-reference",e.missingSemicolonAfterCharacterReference="missing-semicolon-after-character-reference",e.unexpectedCharacterAfterDoctypeSystemIdentifier="unexpected-character-after-doctype-system-identifier",e.unexpectedCharacterInUnquotedAttributeValue="unexpected-character-in-unquoted-attribute-value",e.eofBeforeTagName="eof-before-tag-name",e.eofInTag="eof-in-tag",e.missingAttributeValue="missing-attribute-value",e.missingWhitespaceBetweenAttributes="missing-whitespace-between-attributes",e.missingWhitespaceAfterDoctypePublicKeyword="missing-whitespace-after-doctype-public-keyword",e.missingWhitespaceBetweenDoctypePublicAndSystemIdentifiers="missing-whitespace-between-doctype-public-and-system-identifiers",e.missingWhitespaceAfterDoctypeSystemKeyword="missing-whitespace-after-doctype-system-keyword",e.missingQuoteBeforeDoctypePublicIdentifier="missing-quote-before-doctype-public-identifier",e.missingQuoteBeforeDoctypeSystemIdentifier="missing-quote-before-doctype-system-identifier",e.missingDoctypePublicIdentifier="missing-doctype-public-identifier",e.missingDoctypeSystemIdentifier="missing-doctype-system-identifier",e.abruptDoctypePublicIdentifier="abrupt-doctype-public-identifier",e.abruptDoctypeSystemIdentifier="abrupt-doctype-system-identifier",e.cdataInHtmlContent="cdata-in-html-content",e.incorrectlyOpenedComment="incorrectly-opened-comment",e.eofInScriptHtmlCommentLikeText="eof-in-script-html-comment-like-text",e.eofInDoctype="eof-in-doctype",e.nestedComment="nested-comment",e.abruptClosingOfEmptyComment="abrupt-closing-of-empty-comment",e.eofInComment="eof-in-comment",e.incorrectlyClosedComment="incorrectly-closed-comment",e.eofInCdata="eof-in-cdata",e.absenceOfDigitsInNumericCharacterReference="absence-of-digits-in-numeric-character-reference",e.nullCharacterReference="null-character-reference",e.surrogateCharacterReference="surrogate-character-reference",e.characterReferenceOutsideUnicodeRange="character-reference-outside-unicode-range",e.controlCharacterReference="control-character-reference",e.noncharacterCharacterReference="noncharacter-character-reference",e.missingWhitespaceBeforeDoctypeName="missing-whitespace-before-doctype-name",e.missingDoctypeName="missing-doctype-name",e.invalidCharacterSequenceAfterDoctypeName="invalid-character-sequence-after-doctype-name",e.duplicateAttribute="duplicate-attribute",e.nonConformingDoctype="non-conforming-doctype",e.missingDoctype="missing-doctype",e.misplacedDoctype="misplaced-doctype",e.endTagWithoutMatchingOpenElement="end-tag-without-matching-open-element",e.closingOfElementWithOpenChildElements="closing-of-element-with-open-child-elements",e.disallowedContentInNoscriptInHead="disallowed-content-in-noscript-in-head",e.openElementsLeftAfterEof="open-elements-left-after-eof",e.abandonedHeadElementChild="abandoned-head-element-child",e.misplacedStartTagForHeadElement="misplaced-start-tag-for-head-element",e.nestedNoscriptInHead="nested-noscript-in-head",e.eofInElementThatCanContainOnlyText="eof-in-element-that-can-contain-only-text"})(Y||(Y={}))});var R4,th,Cw=v(()=>{eh();il();R4=65536,th=class{constructor(t){this.handler=t,this.html="",this.pos=-1,this.lastGapPos=-2,this.gapStack=[],this.skipNextNewLine=!1,this.lastChunkWritten=!1,this.endOfChunkHit=!1,this.bufferWaterline=R4,this.isEol=!1,this.lineStartPos=0,this.droppedBufferSize=0,this.line=1,this.lastErrOffset=-1}get col(){return this.pos-this.lineStartPos+ +(this.lastGapPos!==this.pos)}get offset(){return this.droppedBufferSize+this.pos}getError(t,r){let{line:n,col:i,offset:a}=this,o=i+r,l=a+r;return{code:t,startLine:n,endLine:n,startCol:o,endCol:o,startOffset:l,endOffset:l}}_err(t){this.handler.onParseError&&this.lastErrOffset!==this.offset&&(this.lastErrOffset=this.offset,this.handler.onParseError(this.getError(t,0)))}_addGap(){this.gapStack.push(this.lastGapPos),this.lastGapPos=this.pos}_processSurrogate(t){if(this.pos!==this.html.length-1){let r=this.html.charCodeAt(this.pos+1);if(ww(r))return this.pos++,this._addGap(),Sw(t,r)}else if(!this.lastChunkWritten)return this.endOfChunkHit=!0,x.EOF;return this._err(Y.surrogateInInputStream),t}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(t,r){this.html.length>0?this.html+=t:this.html=t,this.endOfChunkHit=!1,this.lastChunkWritten=r}insertHtmlAtCurrentPos(t){this.html=this.html.substring(0,this.pos+1)+t+this.html.substring(this.pos+1),this.endOfChunkHit=!1}startsWith(t,r){if(this.pos+t.length>this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,!1;if(r)return this.html.startsWith(t,this.pos);for(let n=0;n=this.html.length)return this.endOfChunkHit=!this.lastChunkWritten,x.EOF;let n=this.html.charCodeAt(r);return n===x.CARRIAGE_RETURN?x.LINE_FEED:n}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,x.EOF;let t=this.html.charCodeAt(this.pos);return t===x.CARRIAGE_RETURN?(this.isEol=!0,this.skipNextNewLine=!0,x.LINE_FEED):t===x.LINE_FEED&&(this.isEol=!0,this.skipNextNewLine)?(this.line--,this.skipNextNewLine=!1,this._addGap(),this.advance()):(this.skipNextNewLine=!1,Xd(t)&&(t=this._processSurrogate(t)),this.handler.onParseError===null||t>31&&t<127||t===x.LINE_FEED||t===x.CARRIAGE_RETURN||t>159&&t<64976||this._checkForProblematicCharacters(t),t)}_checkForProblematicCharacters(t){Zd(t)?this._err(Y.controlCharacterInInputStream):Jd(t)&&this._err(Y.noncharacterInInputStream)}retreat(t){for(this.pos-=t;this.pos=0;r--)if(e.attrs[r].name===t)return e.attrs[r].value;return null}var Qe,nh=v(()=>{(function(e){e[e.CHARACTER=0]="CHARACTER",e[e.NULL_CHARACTER=1]="NULL_CHARACTER",e[e.WHITESPACE_CHARACTER=2]="WHITESPACE_CHARACTER",e[e.START_TAG=3]="START_TAG",e[e.END_TAG=4]="END_TAG",e[e.COMMENT=5]="COMMENT",e[e.DOCTYPE=6]="DOCTYPE",e[e.EOF=7]="EOF",e[e.HIBERNATION=8]="HIBERNATION"})(Qe||(Qe={}))});var ih={};Nn(ih,{ATTRS:()=>Oi,DOCUMENT_MODE:()=>kr,NS:()=>ee,NUMBERED_HEADERS:()=>fu,SPECIAL_ELEMENTS:()=>Vg,TAG_ID:()=>c,TAG_NAMES:()=>U,getTagID:()=>Wa,hasUnescapedText:()=>qg});function Wa(e){var t;return(t=P4.get(e))!==null&&t!==void 0?t:c.UNKNOWN}function qg(e,t){return M4.has(e)||t&&e===U.NOSCRIPT}var ee,Oi,kr,U,c,P4,ae,Vg,fu,M4,sa=v(()=>{(function(e){e.HTML="http://www.w3.org/1999/xhtml",e.MATHML="http://www.w3.org/1998/Math/MathML",e.SVG="http://www.w3.org/2000/svg",e.XLINK="http://www.w3.org/1999/xlink",e.XML="http://www.w3.org/XML/1998/namespace",e.XMLNS="http://www.w3.org/2000/xmlns/"})(ee||(ee={}));(function(e){e.TYPE="type",e.ACTION="action",e.ENCODING="encoding",e.PROMPT="prompt",e.NAME="name",e.COLOR="color",e.FACE="face",e.SIZE="size"})(Oi||(Oi={}));(function(e){e.NO_QUIRKS="no-quirks",e.QUIRKS="quirks",e.LIMITED_QUIRKS="limited-quirks"})(kr||(kr={}));(function(e){e.A="a",e.ADDRESS="address",e.ANNOTATION_XML="annotation-xml",e.APPLET="applet",e.AREA="area",e.ARTICLE="article",e.ASIDE="aside",e.B="b",e.BASE="base",e.BASEFONT="basefont",e.BGSOUND="bgsound",e.BIG="big",e.BLOCKQUOTE="blockquote",e.BODY="body",e.BR="br",e.BUTTON="button",e.CAPTION="caption",e.CENTER="center",e.CODE="code",e.COL="col",e.COLGROUP="colgroup",e.DD="dd",e.DESC="desc",e.DETAILS="details",e.DIALOG="dialog",e.DIR="dir",e.DIV="div",e.DL="dl",e.DT="dt",e.EM="em",e.EMBED="embed",e.FIELDSET="fieldset",e.FIGCAPTION="figcaption",e.FIGURE="figure",e.FONT="font",e.FOOTER="footer",e.FOREIGN_OBJECT="foreignObject",e.FORM="form",e.FRAME="frame",e.FRAMESET="frameset",e.H1="h1",e.H2="h2",e.H3="h3",e.H4="h4",e.H5="h5",e.H6="h6",e.HEAD="head",e.HEADER="header",e.HGROUP="hgroup",e.HR="hr",e.HTML="html",e.I="i",e.IMG="img",e.IMAGE="image",e.INPUT="input",e.IFRAME="iframe",e.KEYGEN="keygen",e.LABEL="label",e.LI="li",e.LINK="link",e.LISTING="listing",e.MAIN="main",e.MALIGNMARK="malignmark",e.MARQUEE="marquee",e.MATH="math",e.MENU="menu",e.META="meta",e.MGLYPH="mglyph",e.MI="mi",e.MO="mo",e.MN="mn",e.MS="ms",e.MTEXT="mtext",e.NAV="nav",e.NOBR="nobr",e.NOFRAMES="noframes",e.NOEMBED="noembed",e.NOSCRIPT="noscript",e.OBJECT="object",e.OL="ol",e.OPTGROUP="optgroup",e.OPTION="option",e.P="p",e.PARAM="param",e.PLAINTEXT="plaintext",e.PRE="pre",e.RB="rb",e.RP="rp",e.RT="rt",e.RTC="rtc",e.RUBY="ruby",e.S="s",e.SCRIPT="script",e.SEARCH="search",e.SECTION="section",e.SELECT="select",e.SOURCE="source",e.SMALL="small",e.SPAN="span",e.STRIKE="strike",e.STRONG="strong",e.STYLE="style",e.SUB="sub",e.SUMMARY="summary",e.SUP="sup",e.TABLE="table",e.TBODY="tbody",e.TEMPLATE="template",e.TEXTAREA="textarea",e.TFOOT="tfoot",e.TD="td",e.TH="th",e.THEAD="thead",e.TITLE="title",e.TR="tr",e.TRACK="track",e.TT="tt",e.U="u",e.UL="ul",e.SVG="svg",e.VAR="var",e.WBR="wbr",e.XMP="xmp"})(U||(U={}));(function(e){e[e.UNKNOWN=0]="UNKNOWN",e[e.A=1]="A",e[e.ADDRESS=2]="ADDRESS",e[e.ANNOTATION_XML=3]="ANNOTATION_XML",e[e.APPLET=4]="APPLET",e[e.AREA=5]="AREA",e[e.ARTICLE=6]="ARTICLE",e[e.ASIDE=7]="ASIDE",e[e.B=8]="B",e[e.BASE=9]="BASE",e[e.BASEFONT=10]="BASEFONT",e[e.BGSOUND=11]="BGSOUND",e[e.BIG=12]="BIG",e[e.BLOCKQUOTE=13]="BLOCKQUOTE",e[e.BODY=14]="BODY",e[e.BR=15]="BR",e[e.BUTTON=16]="BUTTON",e[e.CAPTION=17]="CAPTION",e[e.CENTER=18]="CENTER",e[e.CODE=19]="CODE",e[e.COL=20]="COL",e[e.COLGROUP=21]="COLGROUP",e[e.DD=22]="DD",e[e.DESC=23]="DESC",e[e.DETAILS=24]="DETAILS",e[e.DIALOG=25]="DIALOG",e[e.DIR=26]="DIR",e[e.DIV=27]="DIV",e[e.DL=28]="DL",e[e.DT=29]="DT",e[e.EM=30]="EM",e[e.EMBED=31]="EMBED",e[e.FIELDSET=32]="FIELDSET",e[e.FIGCAPTION=33]="FIGCAPTION",e[e.FIGURE=34]="FIGURE",e[e.FONT=35]="FONT",e[e.FOOTER=36]="FOOTER",e[e.FOREIGN_OBJECT=37]="FOREIGN_OBJECT",e[e.FORM=38]="FORM",e[e.FRAME=39]="FRAME",e[e.FRAMESET=40]="FRAMESET",e[e.H1=41]="H1",e[e.H2=42]="H2",e[e.H3=43]="H3",e[e.H4=44]="H4",e[e.H5=45]="H5",e[e.H6=46]="H6",e[e.HEAD=47]="HEAD",e[e.HEADER=48]="HEADER",e[e.HGROUP=49]="HGROUP",e[e.HR=50]="HR",e[e.HTML=51]="HTML",e[e.I=52]="I",e[e.IMG=53]="IMG",e[e.IMAGE=54]="IMAGE",e[e.INPUT=55]="INPUT",e[e.IFRAME=56]="IFRAME",e[e.KEYGEN=57]="KEYGEN",e[e.LABEL=58]="LABEL",e[e.LI=59]="LI",e[e.LINK=60]="LINK",e[e.LISTING=61]="LISTING",e[e.MAIN=62]="MAIN",e[e.MALIGNMARK=63]="MALIGNMARK",e[e.MARQUEE=64]="MARQUEE",e[e.MATH=65]="MATH",e[e.MENU=66]="MENU",e[e.META=67]="META",e[e.MGLYPH=68]="MGLYPH",e[e.MI=69]="MI",e[e.MO=70]="MO",e[e.MN=71]="MN",e[e.MS=72]="MS",e[e.MTEXT=73]="MTEXT",e[e.NAV=74]="NAV",e[e.NOBR=75]="NOBR",e[e.NOFRAMES=76]="NOFRAMES",e[e.NOEMBED=77]="NOEMBED",e[e.NOSCRIPT=78]="NOSCRIPT",e[e.OBJECT=79]="OBJECT",e[e.OL=80]="OL",e[e.OPTGROUP=81]="OPTGROUP",e[e.OPTION=82]="OPTION",e[e.P=83]="P",e[e.PARAM=84]="PARAM",e[e.PLAINTEXT=85]="PLAINTEXT",e[e.PRE=86]="PRE",e[e.RB=87]="RB",e[e.RP=88]="RP",e[e.RT=89]="RT",e[e.RTC=90]="RTC",e[e.RUBY=91]="RUBY",e[e.S=92]="S",e[e.SCRIPT=93]="SCRIPT",e[e.SEARCH=94]="SEARCH",e[e.SECTION=95]="SECTION",e[e.SELECT=96]="SELECT",e[e.SOURCE=97]="SOURCE",e[e.SMALL=98]="SMALL",e[e.SPAN=99]="SPAN",e[e.STRIKE=100]="STRIKE",e[e.STRONG=101]="STRONG",e[e.STYLE=102]="STYLE",e[e.SUB=103]="SUB",e[e.SUMMARY=104]="SUMMARY",e[e.SUP=105]="SUP",e[e.TABLE=106]="TABLE",e[e.TBODY=107]="TBODY",e[e.TEMPLATE=108]="TEMPLATE",e[e.TEXTAREA=109]="TEXTAREA",e[e.TFOOT=110]="TFOOT",e[e.TD=111]="TD",e[e.TH=112]="TH",e[e.THEAD=113]="THEAD",e[e.TITLE=114]="TITLE",e[e.TR=115]="TR",e[e.TRACK=116]="TRACK",e[e.TT=117]="TT",e[e.U=118]="U",e[e.UL=119]="UL",e[e.SVG=120]="SVG",e[e.VAR=121]="VAR",e[e.WBR=122]="WBR",e[e.XMP=123]="XMP"})(c||(c={}));P4=new Map([[U.A,c.A],[U.ADDRESS,c.ADDRESS],[U.ANNOTATION_XML,c.ANNOTATION_XML],[U.APPLET,c.APPLET],[U.AREA,c.AREA],[U.ARTICLE,c.ARTICLE],[U.ASIDE,c.ASIDE],[U.B,c.B],[U.BASE,c.BASE],[U.BASEFONT,c.BASEFONT],[U.BGSOUND,c.BGSOUND],[U.BIG,c.BIG],[U.BLOCKQUOTE,c.BLOCKQUOTE],[U.BODY,c.BODY],[U.BR,c.BR],[U.BUTTON,c.BUTTON],[U.CAPTION,c.CAPTION],[U.CENTER,c.CENTER],[U.CODE,c.CODE],[U.COL,c.COL],[U.COLGROUP,c.COLGROUP],[U.DD,c.DD],[U.DESC,c.DESC],[U.DETAILS,c.DETAILS],[U.DIALOG,c.DIALOG],[U.DIR,c.DIR],[U.DIV,c.DIV],[U.DL,c.DL],[U.DT,c.DT],[U.EM,c.EM],[U.EMBED,c.EMBED],[U.FIELDSET,c.FIELDSET],[U.FIGCAPTION,c.FIGCAPTION],[U.FIGURE,c.FIGURE],[U.FONT,c.FONT],[U.FOOTER,c.FOOTER],[U.FOREIGN_OBJECT,c.FOREIGN_OBJECT],[U.FORM,c.FORM],[U.FRAME,c.FRAME],[U.FRAMESET,c.FRAMESET],[U.H1,c.H1],[U.H2,c.H2],[U.H3,c.H3],[U.H4,c.H4],[U.H5,c.H5],[U.H6,c.H6],[U.HEAD,c.HEAD],[U.HEADER,c.HEADER],[U.HGROUP,c.HGROUP],[U.HR,c.HR],[U.HTML,c.HTML],[U.I,c.I],[U.IMG,c.IMG],[U.IMAGE,c.IMAGE],[U.INPUT,c.INPUT],[U.IFRAME,c.IFRAME],[U.KEYGEN,c.KEYGEN],[U.LABEL,c.LABEL],[U.LI,c.LI],[U.LINK,c.LINK],[U.LISTING,c.LISTING],[U.MAIN,c.MAIN],[U.MALIGNMARK,c.MALIGNMARK],[U.MARQUEE,c.MARQUEE],[U.MATH,c.MATH],[U.MENU,c.MENU],[U.META,c.META],[U.MGLYPH,c.MGLYPH],[U.MI,c.MI],[U.MO,c.MO],[U.MN,c.MN],[U.MS,c.MS],[U.MTEXT,c.MTEXT],[U.NAV,c.NAV],[U.NOBR,c.NOBR],[U.NOFRAMES,c.NOFRAMES],[U.NOEMBED,c.NOEMBED],[U.NOSCRIPT,c.NOSCRIPT],[U.OBJECT,c.OBJECT],[U.OL,c.OL],[U.OPTGROUP,c.OPTGROUP],[U.OPTION,c.OPTION],[U.P,c.P],[U.PARAM,c.PARAM],[U.PLAINTEXT,c.PLAINTEXT],[U.PRE,c.PRE],[U.RB,c.RB],[U.RP,c.RP],[U.RT,c.RT],[U.RTC,c.RTC],[U.RUBY,c.RUBY],[U.S,c.S],[U.SCRIPT,c.SCRIPT],[U.SEARCH,c.SEARCH],[U.SECTION,c.SECTION],[U.SELECT,c.SELECT],[U.SOURCE,c.SOURCE],[U.SMALL,c.SMALL],[U.SPAN,c.SPAN],[U.STRIKE,c.STRIKE],[U.STRONG,c.STRONG],[U.STYLE,c.STYLE],[U.SUB,c.SUB],[U.SUMMARY,c.SUMMARY],[U.SUP,c.SUP],[U.TABLE,c.TABLE],[U.TBODY,c.TBODY],[U.TEMPLATE,c.TEMPLATE],[U.TEXTAREA,c.TEXTAREA],[U.TFOOT,c.TFOOT],[U.TD,c.TD],[U.TH,c.TH],[U.THEAD,c.THEAD],[U.TITLE,c.TITLE],[U.TR,c.TR],[U.TRACK,c.TRACK],[U.TT,c.TT],[U.U,c.U],[U.UL,c.UL],[U.SVG,c.SVG],[U.VAR,c.VAR],[U.WBR,c.WBR],[U.XMP,c.XMP]]);ae=c,Vg={[ee.HTML]:new Set([ae.ADDRESS,ae.APPLET,ae.AREA,ae.ARTICLE,ae.ASIDE,ae.BASE,ae.BASEFONT,ae.BGSOUND,ae.BLOCKQUOTE,ae.BODY,ae.BR,ae.BUTTON,ae.CAPTION,ae.CENTER,ae.COL,ae.COLGROUP,ae.DD,ae.DETAILS,ae.DIR,ae.DIV,ae.DL,ae.DT,ae.EMBED,ae.FIELDSET,ae.FIGCAPTION,ae.FIGURE,ae.FOOTER,ae.FORM,ae.FRAME,ae.FRAMESET,ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6,ae.HEAD,ae.HEADER,ae.HGROUP,ae.HR,ae.HTML,ae.IFRAME,ae.IMG,ae.INPUT,ae.LI,ae.LINK,ae.LISTING,ae.MAIN,ae.MARQUEE,ae.MENU,ae.META,ae.NAV,ae.NOEMBED,ae.NOFRAMES,ae.NOSCRIPT,ae.OBJECT,ae.OL,ae.P,ae.PARAM,ae.PLAINTEXT,ae.PRE,ae.SCRIPT,ae.SECTION,ae.SELECT,ae.SOURCE,ae.STYLE,ae.SUMMARY,ae.TABLE,ae.TBODY,ae.TD,ae.TEMPLATE,ae.TEXTAREA,ae.TFOOT,ae.TH,ae.THEAD,ae.TITLE,ae.TR,ae.TRACK,ae.UL,ae.WBR,ae.XMP]),[ee.MATHML]:new Set([ae.MI,ae.MO,ae.MN,ae.MS,ae.MTEXT,ae.ANNOTATION_XML]),[ee.SVG]:new Set([ae.TITLE,ae.FOREIGN_OBJECT,ae.DESC]),[ee.XLINK]:new Set,[ee.XML]:new Set,[ee.XMLNS]:new Set},fu=new Set([ae.H1,ae.H2,ae.H3,ae.H4,ae.H5,ae.H6]),M4=new Set([U.STYLE,U.SCRIPT,U.XMP,U.IFRAME,U.NOEMBED,U.NOFRAMES,U.PLAINTEXT])});function F4(e){return e>=x.DIGIT_0&&e<=x.DIGIT_9}function al(e){return e>=x.LATIN_CAPITAL_A&&e<=x.LATIN_CAPITAL_Z}function B4(e){return e>=x.LATIN_SMALL_A&&e<=x.LATIN_SMALL_Z}function Ga(e){return B4(e)||al(e)}function Iw(e){return Ga(e)||F4(e)}function ah(e){return e+32}function Ow(e){return e===x.SPACE||e===x.LINE_FEED||e===x.TABULATION||e===x.FORM_FEED}function Nw(e){return Ow(e)||e===x.SOLIDUS||e===x.GREATER_THAN_SIGN}function $4(e){return e===x.NULL?Y.nullCharacterReference:e>1114111?Y.characterReferenceOutsideUnicodeRange:Xd(e)?Y.surrogateCharacterReference:Jd(e)?Y.noncharacterCharacterReference:Zd(e)||e===x.CARRIAGE_RETURN?Y.controlCharacterReference:null}var w,Rr,sl,zg=v(()=>{Cw();eh();nh();Zo();il();sa();(function(e){e[e.DATA=0]="DATA",e[e.RCDATA=1]="RCDATA",e[e.RAWTEXT=2]="RAWTEXT",e[e.SCRIPT_DATA=3]="SCRIPT_DATA",e[e.PLAINTEXT=4]="PLAINTEXT",e[e.TAG_OPEN=5]="TAG_OPEN",e[e.END_TAG_OPEN=6]="END_TAG_OPEN",e[e.TAG_NAME=7]="TAG_NAME",e[e.RCDATA_LESS_THAN_SIGN=8]="RCDATA_LESS_THAN_SIGN",e[e.RCDATA_END_TAG_OPEN=9]="RCDATA_END_TAG_OPEN",e[e.RCDATA_END_TAG_NAME=10]="RCDATA_END_TAG_NAME",e[e.RAWTEXT_LESS_THAN_SIGN=11]="RAWTEXT_LESS_THAN_SIGN",e[e.RAWTEXT_END_TAG_OPEN=12]="RAWTEXT_END_TAG_OPEN",e[e.RAWTEXT_END_TAG_NAME=13]="RAWTEXT_END_TAG_NAME",e[e.SCRIPT_DATA_LESS_THAN_SIGN=14]="SCRIPT_DATA_LESS_THAN_SIGN",e[e.SCRIPT_DATA_END_TAG_OPEN=15]="SCRIPT_DATA_END_TAG_OPEN",e[e.SCRIPT_DATA_END_TAG_NAME=16]="SCRIPT_DATA_END_TAG_NAME",e[e.SCRIPT_DATA_ESCAPE_START=17]="SCRIPT_DATA_ESCAPE_START",e[e.SCRIPT_DATA_ESCAPE_START_DASH=18]="SCRIPT_DATA_ESCAPE_START_DASH",e[e.SCRIPT_DATA_ESCAPED=19]="SCRIPT_DATA_ESCAPED",e[e.SCRIPT_DATA_ESCAPED_DASH=20]="SCRIPT_DATA_ESCAPED_DASH",e[e.SCRIPT_DATA_ESCAPED_DASH_DASH=21]="SCRIPT_DATA_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN=22]="SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_OPEN=23]="SCRIPT_DATA_ESCAPED_END_TAG_OPEN",e[e.SCRIPT_DATA_ESCAPED_END_TAG_NAME=24]="SCRIPT_DATA_ESCAPED_END_TAG_NAME",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_START=25]="SCRIPT_DATA_DOUBLE_ESCAPE_START",e[e.SCRIPT_DATA_DOUBLE_ESCAPED=26]="SCRIPT_DATA_DOUBLE_ESCAPED",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH=27]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH=28]="SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH",e[e.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN=29]="SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN",e[e.SCRIPT_DATA_DOUBLE_ESCAPE_END=30]="SCRIPT_DATA_DOUBLE_ESCAPE_END",e[e.BEFORE_ATTRIBUTE_NAME=31]="BEFORE_ATTRIBUTE_NAME",e[e.ATTRIBUTE_NAME=32]="ATTRIBUTE_NAME",e[e.AFTER_ATTRIBUTE_NAME=33]="AFTER_ATTRIBUTE_NAME",e[e.BEFORE_ATTRIBUTE_VALUE=34]="BEFORE_ATTRIBUTE_VALUE",e[e.ATTRIBUTE_VALUE_DOUBLE_QUOTED=35]="ATTRIBUTE_VALUE_DOUBLE_QUOTED",e[e.ATTRIBUTE_VALUE_SINGLE_QUOTED=36]="ATTRIBUTE_VALUE_SINGLE_QUOTED",e[e.ATTRIBUTE_VALUE_UNQUOTED=37]="ATTRIBUTE_VALUE_UNQUOTED",e[e.AFTER_ATTRIBUTE_VALUE_QUOTED=38]="AFTER_ATTRIBUTE_VALUE_QUOTED",e[e.SELF_CLOSING_START_TAG=39]="SELF_CLOSING_START_TAG",e[e.BOGUS_COMMENT=40]="BOGUS_COMMENT",e[e.MARKUP_DECLARATION_OPEN=41]="MARKUP_DECLARATION_OPEN",e[e.COMMENT_START=42]="COMMENT_START",e[e.COMMENT_START_DASH=43]="COMMENT_START_DASH",e[e.COMMENT=44]="COMMENT",e[e.COMMENT_LESS_THAN_SIGN=45]="COMMENT_LESS_THAN_SIGN",e[e.COMMENT_LESS_THAN_SIGN_BANG=46]="COMMENT_LESS_THAN_SIGN_BANG",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH=47]="COMMENT_LESS_THAN_SIGN_BANG_DASH",e[e.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH=48]="COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH",e[e.COMMENT_END_DASH=49]="COMMENT_END_DASH",e[e.COMMENT_END=50]="COMMENT_END",e[e.COMMENT_END_BANG=51]="COMMENT_END_BANG",e[e.DOCTYPE=52]="DOCTYPE",e[e.BEFORE_DOCTYPE_NAME=53]="BEFORE_DOCTYPE_NAME",e[e.DOCTYPE_NAME=54]="DOCTYPE_NAME",e[e.AFTER_DOCTYPE_NAME=55]="AFTER_DOCTYPE_NAME",e[e.AFTER_DOCTYPE_PUBLIC_KEYWORD=56]="AFTER_DOCTYPE_PUBLIC_KEYWORD",e[e.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER=57]="BEFORE_DOCTYPE_PUBLIC_IDENTIFIER",e[e.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED=58]="DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED=59]="DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_PUBLIC_IDENTIFIER=60]="AFTER_DOCTYPE_PUBLIC_IDENTIFIER",e[e.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS=61]="BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS",e[e.AFTER_DOCTYPE_SYSTEM_KEYWORD=62]="AFTER_DOCTYPE_SYSTEM_KEYWORD",e[e.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER=63]="BEFORE_DOCTYPE_SYSTEM_IDENTIFIER",e[e.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED=64]="DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED",e[e.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED=65]="DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED",e[e.AFTER_DOCTYPE_SYSTEM_IDENTIFIER=66]="AFTER_DOCTYPE_SYSTEM_IDENTIFIER",e[e.BOGUS_DOCTYPE=67]="BOGUS_DOCTYPE",e[e.CDATA_SECTION=68]="CDATA_SECTION",e[e.CDATA_SECTION_BRACKET=69]="CDATA_SECTION_BRACKET",e[e.CDATA_SECTION_END=70]="CDATA_SECTION_END",e[e.CHARACTER_REFERENCE=71]="CHARACTER_REFERENCE",e[e.AMBIGUOUS_AMPERSAND=72]="AMBIGUOUS_AMPERSAND"})(w||(w={}));Rr={DATA:w.DATA,RCDATA:w.RCDATA,RAWTEXT:w.RAWTEXT,SCRIPT_DATA:w.SCRIPT_DATA,PLAINTEXT:w.PLAINTEXT,CDATA_SECTION:w.CDATA_SECTION};sl=class{constructor(t,r){this.options=t,this.handler=r,this.paused=!1,this.inLoop=!1,this.inForeignNode=!1,this.lastStartTagName="",this.active=!1,this.state=w.DATA,this.returnState=w.DATA,this.entityStartPos=0,this.consumedAfterSnapshot=-1,this.currentCharacterToken=null,this.currentToken=null,this.currentAttr={name:"",value:""},this.preprocessor=new th(r),this.currentLocation=this.getCurrentLocation(-1),this.entityDecoder=new Ha(Qo,(n,i)=>{this.preprocessor.pos=this.entityStartPos+i-1,this._flushCodePointConsumedAsCharacterReference(n)},r.onParseError?{missingSemicolonAfterCharacterReference:()=>{this._err(Y.missingSemicolonAfterCharacterReference,1)},absenceOfDigitsInNumericCharacterReference:n=>{this._err(Y.absenceOfDigitsInNumericCharacterReference,this.entityStartPos-this.preprocessor.pos+n)},validateNumericCharacterReference:n=>{let i=$4(n);i&&this._err(i,1)}}:void 0)}_err(t,r=0){var n,i;(i=(n=this.handler).onParseError)===null||i===void 0||i.call(n,this.preprocessor.getError(t,r))}getCurrentLocation(t){return this.options.sourceCodeLocationInfo?{startLine:this.preprocessor.line,startCol:this.preprocessor.col-t,startOffset:this.preprocessor.offset-t,endLine:-1,endCol:-1,endOffset:-1}:null}_runParsingLoop(){if(!this.inLoop){for(this.inLoop=!0;this.active&&!this.paused;){this.consumedAfterSnapshot=0;let t=this._consume();this._ensureHibernation()||this._callState(t)}this.inLoop=!1}}pause(){this.paused=!0}resume(t){if(!this.paused)throw new Error("Parser was already resumed");this.paused=!1,!this.inLoop&&(this._runParsingLoop(),this.paused||t?.())}write(t,r,n){this.active=!0,this.preprocessor.write(t,r),this._runParsingLoop(),this.paused||n?.()}insertHtmlAtCurrentPos(t){this.active=!0,this.preprocessor.insertHtmlAtCurrentPos(t),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(t){this.consumedAfterSnapshot+=t;for(let r=0;r0&&this._err(Y.endTagWithAttributes),t.selfClosing&&this._err(Y.endTagWithTrailingSolidus),this.handler.onEndTag(t)),this.preprocessor.dropParsedChunk()}emitCurrentComment(t){this.prepareToken(t),this.handler.onComment(t),this.preprocessor.dropParsedChunk()}emitCurrentDoctype(t){this.prepareToken(t),this.handler.onDoctype(t),this.preprocessor.dropParsedChunk()}_emitCurrentCharacterToken(t){if(this.currentCharacterToken){switch(t&&this.currentCharacterToken.location&&(this.currentCharacterToken.location.endLine=t.startLine,this.currentCharacterToken.location.endCol=t.startCol,this.currentCharacterToken.location.endOffset=t.startOffset),this.currentCharacterToken.type){case Qe.CHARACTER:{this.handler.onCharacter(this.currentCharacterToken);break}case Qe.NULL_CHARACTER:{this.handler.onNullCharacter(this.currentCharacterToken);break}case Qe.WHITESPACE_CHARACTER:{this.handler.onWhitespaceCharacter(this.currentCharacterToken);break}}this.currentCharacterToken=null}}_emitEOFToken(){let t=this.getCurrentLocation(0);t&&(t.endLine=t.startLine,t.endCol=t.startCol,t.endOffset=t.startOffset),this._emitCurrentCharacterToken(t),this.handler.onEof({type:Qe.EOF,location:t}),this.active=!1}_appendCharToCurrentCharacterToken(t,r){if(this.currentCharacterToken)if(this.currentCharacterToken.type===t){this.currentCharacterToken.chars+=r;return}else this.currentLocation=this.getCurrentLocation(0),this._emitCurrentCharacterToken(this.currentLocation),this.preprocessor.dropParsedChunk();this._createCharacterToken(t,r)}_emitCodePoint(t){let r=Ow(t)?Qe.WHITESPACE_CHARACTER:t===x.NULL?Qe.NULL_CHARACTER:Qe.CHARACTER;this._appendCharToCurrentCharacterToken(r,String.fromCodePoint(t))}_emitChars(t){this._appendCharToCurrentCharacterToken(Qe.CHARACTER,t)}_startCharacterReference(){this.returnState=this.state,this.state=w.CHARACTER_REFERENCE,this.entityStartPos=this.preprocessor.pos,this.entityDecoder.startEntity(this._isCharacterReferenceInAttribute()?Dr.Attribute:Dr.Legacy)}_isCharacterReferenceInAttribute(){return this.returnState===w.ATTRIBUTE_VALUE_DOUBLE_QUOTED||this.returnState===w.ATTRIBUTE_VALUE_SINGLE_QUOTED||this.returnState===w.ATTRIBUTE_VALUE_UNQUOTED}_flushCodePointConsumedAsCharacterReference(t){this._isCharacterReferenceInAttribute()?this.currentAttr.value+=String.fromCodePoint(t):this._emitCodePoint(t)}_callState(t){switch(this.state){case w.DATA:{this._stateData(t);break}case w.RCDATA:{this._stateRcdata(t);break}case w.RAWTEXT:{this._stateRawtext(t);break}case w.SCRIPT_DATA:{this._stateScriptData(t);break}case w.PLAINTEXT:{this._statePlaintext(t);break}case w.TAG_OPEN:{this._stateTagOpen(t);break}case w.END_TAG_OPEN:{this._stateEndTagOpen(t);break}case w.TAG_NAME:{this._stateTagName(t);break}case w.RCDATA_LESS_THAN_SIGN:{this._stateRcdataLessThanSign(t);break}case w.RCDATA_END_TAG_OPEN:{this._stateRcdataEndTagOpen(t);break}case w.RCDATA_END_TAG_NAME:{this._stateRcdataEndTagName(t);break}case w.RAWTEXT_LESS_THAN_SIGN:{this._stateRawtextLessThanSign(t);break}case w.RAWTEXT_END_TAG_OPEN:{this._stateRawtextEndTagOpen(t);break}case w.RAWTEXT_END_TAG_NAME:{this._stateRawtextEndTagName(t);break}case w.SCRIPT_DATA_LESS_THAN_SIGN:{this._stateScriptDataLessThanSign(t);break}case w.SCRIPT_DATA_END_TAG_OPEN:{this._stateScriptDataEndTagOpen(t);break}case w.SCRIPT_DATA_END_TAG_NAME:{this._stateScriptDataEndTagName(t);break}case w.SCRIPT_DATA_ESCAPE_START:{this._stateScriptDataEscapeStart(t);break}case w.SCRIPT_DATA_ESCAPE_START_DASH:{this._stateScriptDataEscapeStartDash(t);break}case w.SCRIPT_DATA_ESCAPED:{this._stateScriptDataEscaped(t);break}case w.SCRIPT_DATA_ESCAPED_DASH:{this._stateScriptDataEscapedDash(t);break}case w.SCRIPT_DATA_ESCAPED_DASH_DASH:{this._stateScriptDataEscapedDashDash(t);break}case w.SCRIPT_DATA_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataEscapedLessThanSign(t);break}case w.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:{this._stateScriptDataEscapedEndTagOpen(t);break}case w.SCRIPT_DATA_ESCAPED_END_TAG_NAME:{this._stateScriptDataEscapedEndTagName(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPE_START:{this._stateScriptDataDoubleEscapeStart(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED:{this._stateScriptDataDoubleEscaped(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH:{this._stateScriptDataDoubleEscapedDash(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_DASH_DASH:{this._stateScriptDataDoubleEscapedDashDash(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPED_LESS_THAN_SIGN:{this._stateScriptDataDoubleEscapedLessThanSign(t);break}case w.SCRIPT_DATA_DOUBLE_ESCAPE_END:{this._stateScriptDataDoubleEscapeEnd(t);break}case w.BEFORE_ATTRIBUTE_NAME:{this._stateBeforeAttributeName(t);break}case w.ATTRIBUTE_NAME:{this._stateAttributeName(t);break}case w.AFTER_ATTRIBUTE_NAME:{this._stateAfterAttributeName(t);break}case w.BEFORE_ATTRIBUTE_VALUE:{this._stateBeforeAttributeValue(t);break}case w.ATTRIBUTE_VALUE_DOUBLE_QUOTED:{this._stateAttributeValueDoubleQuoted(t);break}case w.ATTRIBUTE_VALUE_SINGLE_QUOTED:{this._stateAttributeValueSingleQuoted(t);break}case w.ATTRIBUTE_VALUE_UNQUOTED:{this._stateAttributeValueUnquoted(t);break}case w.AFTER_ATTRIBUTE_VALUE_QUOTED:{this._stateAfterAttributeValueQuoted(t);break}case w.SELF_CLOSING_START_TAG:{this._stateSelfClosingStartTag(t);break}case w.BOGUS_COMMENT:{this._stateBogusComment(t);break}case w.MARKUP_DECLARATION_OPEN:{this._stateMarkupDeclarationOpen(t);break}case w.COMMENT_START:{this._stateCommentStart(t);break}case w.COMMENT_START_DASH:{this._stateCommentStartDash(t);break}case w.COMMENT:{this._stateComment(t);break}case w.COMMENT_LESS_THAN_SIGN:{this._stateCommentLessThanSign(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG:{this._stateCommentLessThanSignBang(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG_DASH:{this._stateCommentLessThanSignBangDash(t);break}case w.COMMENT_LESS_THAN_SIGN_BANG_DASH_DASH:{this._stateCommentLessThanSignBangDashDash(t);break}case w.COMMENT_END_DASH:{this._stateCommentEndDash(t);break}case w.COMMENT_END:{this._stateCommentEnd(t);break}case w.COMMENT_END_BANG:{this._stateCommentEndBang(t);break}case w.DOCTYPE:{this._stateDoctype(t);break}case w.BEFORE_DOCTYPE_NAME:{this._stateBeforeDoctypeName(t);break}case w.DOCTYPE_NAME:{this._stateDoctypeName(t);break}case w.AFTER_DOCTYPE_NAME:{this._stateAfterDoctypeName(t);break}case w.AFTER_DOCTYPE_PUBLIC_KEYWORD:{this._stateAfterDoctypePublicKeyword(t);break}case w.BEFORE_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateBeforeDoctypePublicIdentifier(t);break}case w.DOCTYPE_PUBLIC_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypePublicIdentifierDoubleQuoted(t);break}case w.DOCTYPE_PUBLIC_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypePublicIdentifierSingleQuoted(t);break}case w.AFTER_DOCTYPE_PUBLIC_IDENTIFIER:{this._stateAfterDoctypePublicIdentifier(t);break}case w.BETWEEN_DOCTYPE_PUBLIC_AND_SYSTEM_IDENTIFIERS:{this._stateBetweenDoctypePublicAndSystemIdentifiers(t);break}case w.AFTER_DOCTYPE_SYSTEM_KEYWORD:{this._stateAfterDoctypeSystemKeyword(t);break}case w.BEFORE_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateBeforeDoctypeSystemIdentifier(t);break}case w.DOCTYPE_SYSTEM_IDENTIFIER_DOUBLE_QUOTED:{this._stateDoctypeSystemIdentifierDoubleQuoted(t);break}case w.DOCTYPE_SYSTEM_IDENTIFIER_SINGLE_QUOTED:{this._stateDoctypeSystemIdentifierSingleQuoted(t);break}case w.AFTER_DOCTYPE_SYSTEM_IDENTIFIER:{this._stateAfterDoctypeSystemIdentifier(t);break}case w.BOGUS_DOCTYPE:{this._stateBogusDoctype(t);break}case w.CDATA_SECTION:{this._stateCdataSection(t);break}case w.CDATA_SECTION_BRACKET:{this._stateCdataSectionBracket(t);break}case w.CDATA_SECTION_END:{this._stateCdataSectionEnd(t);break}case w.CHARACTER_REFERENCE:{this._stateCharacterReference();break}case w.AMBIGUOUS_AMPERSAND:{this._stateAmbiguousAmpersand(t);break}default:throw new Error("Unknown state")}}_stateData(t){switch(t){case x.LESS_THAN_SIGN:{this.state=w.TAG_OPEN;break}case x.AMPERSAND:{this._startCharacterReference();break}case x.NULL:{this._err(Y.unexpectedNullCharacter),this._emitCodePoint(t);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRcdata(t){switch(t){case x.AMPERSAND:{this._startCharacterReference();break}case x.LESS_THAN_SIGN:{this.state=w.RCDATA_LESS_THAN_SIGN;break}case x.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(xt);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateRawtext(t){switch(t){case x.LESS_THAN_SIGN:{this.state=w.RAWTEXT_LESS_THAN_SIGN;break}case x.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(xt);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateScriptData(t){switch(t){case x.LESS_THAN_SIGN:{this.state=w.SCRIPT_DATA_LESS_THAN_SIGN;break}case x.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(xt);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_statePlaintext(t){switch(t){case x.NULL:{this._err(Y.unexpectedNullCharacter),this._emitChars(xt);break}case x.EOF:{this._emitEOFToken();break}default:this._emitCodePoint(t)}}_stateTagOpen(t){if(Ga(t))this._createStartTagToken(),this.state=w.TAG_NAME,this._stateTagName(t);else switch(t){case x.EXCLAMATION_MARK:{this.state=w.MARKUP_DECLARATION_OPEN;break}case x.SOLIDUS:{this.state=w.END_TAG_OPEN;break}case x.QUESTION_MARK:{this._err(Y.unexpectedQuestionMarkInsteadOfTagName),this._createCommentToken(1),this.state=w.BOGUS_COMMENT,this._stateBogusComment(t);break}case x.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("<"),this._emitEOFToken();break}default:this._err(Y.invalidFirstCharacterOfTagName),this._emitChars("<"),this.state=w.DATA,this._stateData(t)}}_stateEndTagOpen(t){if(Ga(t))this._createEndTagToken(),this.state=w.TAG_NAME,this._stateTagName(t);else switch(t){case x.GREATER_THAN_SIGN:{this._err(Y.missingEndTagName),this.state=w.DATA;break}case x.EOF:{this._err(Y.eofBeforeTagName),this._emitChars("");break}case x.NULL:{this._err(Y.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_ESCAPED,this._emitChars(xt);break}case x.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataEscapedLessThanSign(t){t===x.SOLIDUS?this.state=w.SCRIPT_DATA_ESCAPED_END_TAG_OPEN:Ga(t)?(this._emitChars("<"),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPE_START,this._stateScriptDataDoubleEscapeStart(t)):(this._emitChars("<"),this.state=w.SCRIPT_DATA_ESCAPED,this._stateScriptDataEscaped(t))}_stateScriptDataEscapedEndTagOpen(t){Ga(t)?(this.state=w.SCRIPT_DATA_ESCAPED_END_TAG_NAME,this._stateScriptDataEscapedEndTagName(t)):(this._emitChars("");break}case x.NULL:{this._err(Y.unexpectedNullCharacter),this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitChars(xt);break}case x.EOF:{this._err(Y.eofInScriptHtmlCommentLikeText),this._emitEOFToken();break}default:this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._emitCodePoint(t)}}_stateScriptDataDoubleEscapedLessThanSign(t){t===x.SOLIDUS?(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPE_END,this._emitChars("/")):(this.state=w.SCRIPT_DATA_DOUBLE_ESCAPED,this._stateScriptDataDoubleEscaped(t))}_stateScriptDataDoubleEscapeEnd(t){if(this.preprocessor.startsWith(Vr.SCRIPT,!1)&&Nw(this.preprocessor.peek(Vr.SCRIPT.length))){this._emitCodePoint(t);for(let r=0;r{sa();Lw=new Set([c.DD,c.DT,c.LI,c.OPTGROUP,c.OPTION,c.P,c.RB,c.RP,c.RT,c.RTC]),Dw=new Set([...Lw,c.CAPTION,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR]),sh=new Set([c.APPLET,c.CAPTION,c.HTML,c.MARQUEE,c.OBJECT,c.TABLE,c.TD,c.TEMPLATE,c.TH]),H4=new Set([...sh,c.OL,c.UL]),U4=new Set([...sh,c.BUTTON]),kw=new Set([c.ANNOTATION_XML,c.MI,c.MN,c.MO,c.MS,c.MTEXT]),Rw=new Set([c.DESC,c.FOREIGN_OBJECT,c.TITLE]),V4=new Set([c.TR,c.TEMPLATE,c.HTML]),q4=new Set([c.TBODY,c.TFOOT,c.THEAD,c.TEMPLATE,c.HTML]),z4=new Set([c.TABLE,c.TEMPLATE,c.HTML]),Y4=new Set([c.TD,c.TH]),oh=class{get currentTmplContentOrNode(){return this._isInTemplate()?this.treeAdapter.getTemplateContent(this.current):this.current}constructor(t,r,n){this.treeAdapter=r,this.handler=n,this.items=[],this.tagIDs=[],this.stackTop=-1,this.tmplCount=0,this.currentTagId=c.UNKNOWN,this.current=t}_indexOf(t){return this.items.lastIndexOf(t,this.stackTop)}_isInTemplate(){return this.currentTagId===c.TEMPLATE&&this.treeAdapter.getNamespaceURI(this.current)===ee.HTML}_updateCurrentElement(){this.current=this.items[this.stackTop],this.currentTagId=this.tagIDs[this.stackTop]}push(t,r){this.stackTop++,this.items[this.stackTop]=t,this.current=t,this.tagIDs[this.stackTop]=r,this.currentTagId=r,this._isInTemplate()&&this.tmplCount++,this.handler.onItemPush(t,r,!0)}pop(){let t=this.current;this.tmplCount>0&&this._isInTemplate()&&this.tmplCount--,this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!0)}replace(t,r){let n=this._indexOf(t);this.items[n]=r,n===this.stackTop&&(this.current=r)}insertAfter(t,r,n){let i=this._indexOf(t)+1;this.items.splice(i,0,r),this.tagIDs.splice(i,0,n),this.stackTop++,i===this.stackTop&&this._updateCurrentElement(),this.handler.onItemPush(this.current,this.currentTagId,i===this.stackTop)}popUntilTagNamePopped(t){let r=this.stackTop+1;do r=this.tagIDs.lastIndexOf(t,r-1);while(r>0&&this.treeAdapter.getNamespaceURI(this.items[r])!==ee.HTML);this.shortenToLength(r<0?0:r)}shortenToLength(t){for(;this.stackTop>=t;){let r=this.current;this.tmplCount>0&&this._isInTemplate()&&(this.tmplCount-=1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(r,this.stackTop=0;n--)if(t.has(this.tagIDs[n])&&this.treeAdapter.getNamespaceURI(this.items[n])===r)return n;return-1}clearBackTo(t,r){let n=this._indexOfTagNames(t,r);this.shortenToLength(n+1)}clearBackToTableContext(){this.clearBackTo(z4,ee.HTML)}clearBackToTableBodyContext(){this.clearBackTo(q4,ee.HTML)}clearBackToTableRowContext(){this.clearBackTo(V4,ee.HTML)}remove(t){let r=this._indexOf(t);r>=0&&(r===this.stackTop?this.pop():(this.items.splice(r,1),this.tagIDs.splice(r,1),this.stackTop--,this._updateCurrentElement(),this.handler.onItemPop(t,!1)))}tryPeekProperlyNestedBodyElement(){return this.stackTop>=1&&this.tagIDs[1]===c.BODY?this.items[1]:null}contains(t){return this._indexOf(t)>-1}getCommonAncestor(t){let r=this._indexOf(t)-1;return r>=0?this.items[r]:null}isRootHtmlElementCurrent(){return this.stackTop===0&&this.tagIDs[0]===c.HTML}hasInDynamicScope(t,r){for(let n=this.stackTop;n>=0;n--){let i=this.tagIDs[n];switch(this.treeAdapter.getNamespaceURI(this.items[n])){case ee.HTML:{if(i===t)return!0;if(r.has(i))return!1;break}case ee.SVG:{if(Rw.has(i))return!1;break}case ee.MATHML:{if(kw.has(i))return!1;break}}}return!0}hasInScope(t){return this.hasInDynamicScope(t,sh)}hasInListItemScope(t){return this.hasInDynamicScope(t,H4)}hasInButtonScope(t){return this.hasInDynamicScope(t,U4)}hasNumberedHeaderInScope(){for(let t=this.stackTop;t>=0;t--){let r=this.tagIDs[t];switch(this.treeAdapter.getNamespaceURI(this.items[t])){case ee.HTML:{if(fu.has(r))return!0;if(sh.has(r))return!1;break}case ee.SVG:{if(Rw.has(r))return!1;break}case ee.MATHML:{if(kw.has(r))return!1;break}}}return!0}hasInTableScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===ee.HTML)switch(this.tagIDs[r]){case t:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasTableBodyContextInTableScope(){for(let t=this.stackTop;t>=0;t--)if(this.treeAdapter.getNamespaceURI(this.items[t])===ee.HTML)switch(this.tagIDs[t]){case c.TBODY:case c.THEAD:case c.TFOOT:return!0;case c.TABLE:case c.HTML:return!1}return!0}hasInSelectScope(t){for(let r=this.stackTop;r>=0;r--)if(this.treeAdapter.getNamespaceURI(this.items[r])===ee.HTML)switch(this.tagIDs[r]){case t:return!0;case c.OPTION:case c.OPTGROUP:break;default:return!1}return!0}generateImpliedEndTags(){for(;Lw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsThoroughly(){for(;Dw.has(this.currentTagId);)this.pop()}generateImpliedEndTagsWithExclusion(t){for(;this.currentTagId!==t&&Dw.has(this.currentTagId);)this.pop()}}});var ci,Mw,uh,Fw=v(()=>{(function(e){e[e.Marker=0]="Marker",e[e.Element=1]="Element"})(ci||(ci={}));Mw={type:ci.Marker},uh=class{constructor(t){this.treeAdapter=t,this.entries=[],this.bookmark=null}_getNoahArkConditionCandidates(t,r){let n=[],i=r.length,a=this.treeAdapter.getTagName(t),o=this.treeAdapter.getNamespaceURI(t);for(let l=0;l[o.name,o.value])),a=0;for(let o=0;oi.get(d.name)===d.value)&&(a+=1,a>=3&&this.entries.splice(l.idx,1))}}insertMarker(){this.entries.unshift(Mw)}pushElement(t,r){this._ensureNoahArkCondition(t),this.entries.unshift({type:ci.Element,element:t,token:r})}insertElementAfterBookmark(t,r){let n=this.entries.indexOf(this.bookmark);this.entries.splice(n,0,{type:ci.Element,element:t,token:r})}removeEntry(t){let r=this.entries.indexOf(t);r>=0&&this.entries.splice(r,1)}clearToLastMarker(){let t=this.entries.indexOf(Mw);t>=0?this.entries.splice(0,t+1):this.entries.length=0}getElementEntryInScopeWithTagName(t){let r=this.entries.find(n=>n.type===ci.Marker||this.treeAdapter.getTagName(n.element)===t);return r&&r.type===ci.Element?r:null}getElementEntry(t){return this.entries.find(r=>r.type===ci.Element&&r.element===t)}}});var Vn,ch=v(()=>{sa();Vn={createDocument(){return{nodeName:"#document",mode:kr.NO_QUIRKS,childNodes:[]}},createDocumentFragment(){return{nodeName:"#document-fragment",childNodes:[]}},createElement(e,t,r){return{nodeName:e,tagName:e,attrs:r,namespaceURI:t,childNodes:[],parentNode:null}},createCommentNode(e){return{nodeName:"#comment",data:e,parentNode:null}},createTextNode(e){return{nodeName:"#text",value:e,parentNode:null}},appendChild(e,t){e.childNodes.push(t),t.parentNode=e},insertBefore(e,t,r){let n=e.childNodes.indexOf(r);e.childNodes.splice(n,0,t),t.parentNode=e},setTemplateContent(e,t){e.content=t},getTemplateContent(e){return e.content},setDocumentType(e,t,r,n){let i=e.childNodes.find(a=>a.nodeName==="#documentType");if(i)i.name=t,i.publicId=r,i.systemId=n;else{let a={nodeName:"#documentType",name:t,publicId:r,systemId:n,parentNode:null};Vn.appendChild(e,a)}},setDocumentMode(e,t){e.mode=t},getDocumentMode(e){return e.mode},detachNode(e){if(e.parentNode){let t=e.parentNode.childNodes.indexOf(e);e.parentNode.childNodes.splice(t,1),e.parentNode=null}},insertText(e,t){if(e.childNodes.length>0){let r=e.childNodes[e.childNodes.length-1];if(Vn.isTextNode(r)){r.value+=t;return}}Vn.appendChild(e,Vn.createTextNode(t))},insertTextBefore(e,t,r){let n=e.childNodes[e.childNodes.indexOf(r)-1];n&&Vn.isTextNode(n)?n.value+=t:Vn.insertBefore(e,Vn.createTextNode(t),r)},adoptAttributes(e,t){let r=new Set(e.attrs.map(n=>n.name));for(let n=0;ne.startsWith(r))}function Vw(e){return e.name===$w&&e.publicId===null&&(e.systemId===null||e.systemId===K4)}function qw(e){if(e.name!==$w)return kr.QUIRKS;let{systemId:t}=e;if(t&&t.toLowerCase()===j4)return kr.QUIRKS;let{publicId:r}=e;if(r!==null){if(r=r.toLowerCase(),G4.has(r))return kr.QUIRKS;let n=t===null?W4:Hw;if(Bw(r,n))return kr.QUIRKS;if(n=t===null?Uw:Q4,Bw(r,n))return kr.LIMITED_QUIRKS}return kr.NO_QUIRKS}var $w,K4,j4,Hw,W4,G4,Uw,Q4,zw=v(()=>{sa();$w="html",K4="about:legacy-compat",j4="http://www.ibm.com/data/dtd/v11/ibmxhtml1-transitional.dtd",Hw=["+//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//"],W4=[...Hw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"],G4=new Set(["-//w3o//dtd w3 html strict 3.0//en//","-/w3c/dtd html 4.0 transitional/en","html"]),Uw=["-//w3c//dtd xhtml 1.0 frameset//","-//w3c//dtd xhtml 1.0 transitional//"],Q4=[...Uw,"-//w3c//dtd html 4.01 frameset//","-//w3c//dtd html 4.01 transitional//"]});function Kw(e){let t=e.tagID;return t===c.FONT&&e.attrs.some(({name:n})=>n===Oi.COLOR||n===Oi.SIZE||n===Oi.FACE)||n8.has(t)}function Yg(e){for(let t=0;t{sa();Yw={TEXT_HTML:"text/html",APPLICATION_XML:"application/xhtml+xml"},Z4="definitionurl",J4="definitionURL",e8=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(e=>[e.toLowerCase(),e])),t8=new Map([["xlink:actuate",{prefix:"xlink",name:"actuate",namespace:ee.XLINK}],["xlink:arcrole",{prefix:"xlink",name:"arcrole",namespace:ee.XLINK}],["xlink:href",{prefix:"xlink",name:"href",namespace:ee.XLINK}],["xlink:role",{prefix:"xlink",name:"role",namespace:ee.XLINK}],["xlink:show",{prefix:"xlink",name:"show",namespace:ee.XLINK}],["xlink:title",{prefix:"xlink",name:"title",namespace:ee.XLINK}],["xlink:type",{prefix:"xlink",name:"type",namespace:ee.XLINK}],["xml:lang",{prefix:"xml",name:"lang",namespace:ee.XML}],["xml:space",{prefix:"xml",name:"space",namespace:ee.XML}],["xmlns",{prefix:"",name:"xmlns",namespace:ee.XMLNS}],["xmlns:xlink",{prefix:"xmlns",name:"xlink",namespace:ee.XMLNS}]]),r8=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(e=>[e.toLowerCase(),e])),n8=new Set([c.B,c.BIG,c.BLOCKQUOTE,c.BODY,c.BR,c.CENTER,c.CODE,c.DD,c.DIV,c.DL,c.DT,c.EM,c.EMBED,c.H1,c.H2,c.H3,c.H4,c.H5,c.H6,c.HEAD,c.HR,c.I,c.IMG,c.LI,c.LISTING,c.MENU,c.META,c.NOBR,c.OL,c.P,c.PRE,c.RUBY,c.S,c.SMALL,c.SPAN,c.STRONG,c.STRIKE,c.SUB,c.SUP,c.TABLE,c.TT,c.U,c.UL,c.VAR])});function l8(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(t.tagName);return r?e.openElements.contains(r.element)?e.openElements.hasInScope(t.tagID)||(r=null):(e.activeFormattingElements.removeEntry(r),r=null):iS(e,t),r}function f8(e,t){let r=null,n=e.openElements.stackTop;for(;n>=0;n--){let i=e.openElements.items[n];if(i===t.element)break;e._isSpecialElement(i,e.openElements.tagIDs[n])&&(r=i)}return r||(e.openElements.shortenToLength(n<0?0:n),e.activeFormattingElements.removeEntry(t)),r}function d8(e,t,r){let n=t,i=e.openElements.getCommonAncestor(t);for(let a=0,o=i;o!==r;a++,o=i){i=e.openElements.getCommonAncestor(o);let l=e.activeFormattingElements.getElementEntry(o),d=l&&a>=u8;!l||d?(d&&e.activeFormattingElements.removeEntry(l),e.openElements.remove(o)):(o=h8(e,l),n===t&&(e.activeFormattingElements.bookmark=l),e.treeAdapter.detachNode(n),e.treeAdapter.appendChild(o,n),n=o)}return n}function h8(e,t){let r=e.treeAdapter.getNamespaceURI(t.element),n=e.treeAdapter.createElement(t.token.tagName,r,t.token.attrs);return e.openElements.replace(t.element,n),t.element=n,n}function p8(e,t,r){let n=e.treeAdapter.getTagName(t),i=Wa(n);if(e._isElementCausesFosterParenting(i))e._fosterParentElement(r);else{let a=e.treeAdapter.getNamespaceURI(t);i===c.TEMPLATE&&a===ee.HTML&&(t=e.treeAdapter.getTemplateContent(t)),e.treeAdapter.appendChild(t,r)}}function m8(e,t,r){let n=e.treeAdapter.getNamespaceURI(r.element),{token:i}=r,a=e.treeAdapter.createElement(i.tagName,n,i.attrs);e._adoptNodes(t,a),e.treeAdapter.appendChild(t,a),e.activeFormattingElements.insertElementAfterBookmark(a,i),e.activeFormattingElements.removeEntry(r),e.openElements.remove(r.element),e.openElements.insertAfter(t,a,i.tagID)}function Xg(e,t){for(let r=0;r=r;n--)e._setEndLocation(e.openElements.items[n],t);if(!e.fragmentContext&&e.openElements.stackTop>=0){let n=e.openElements.items[0],i=e.treeAdapter.getNodeSourceCodeLocation(n);if(i&&!i.endTag&&(e._setEndLocation(n,t),e.openElements.stackTop>=1)){let a=e.openElements.items[1],o=e.treeAdapter.getNodeSourceCodeLocation(a);o&&!o.endTag&&e._setEndLocation(a,t)}}}}function b8(e,t){e._setDocumentType(t);let r=t.forceQuirks?kr.QUIRKS:qw(t);Vw(t)||e._err(t,Y.nonConformingDoctype),e.treeAdapter.setDocumentMode(e.document,r),e.insertionMode=I.BEFORE_HTML}function ol(e,t){e._err(t,Y.missingDoctype,!0),e.treeAdapter.setDocumentMode(e.document,kr.QUIRKS),e.insertionMode=I.BEFORE_HTML,e._processToken(t)}function E8(e,t){t.tagID===c.HTML?(e._insertElement(t,ee.HTML),e.insertionMode=I.BEFORE_HEAD):cl(e,t)}function v8(e,t){let r=t.tagID;(r===c.HTML||r===c.HEAD||r===c.BODY||r===c.BR)&&cl(e,t)}function cl(e,t){e._insertFakeRootElement(),e.insertionMode=I.BEFORE_HEAD,e._processToken(t)}function T8(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.HEAD:{e._insertElement(t,ee.HTML),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD;break}default:ll(e,t)}}function x8(e,t){let r=t.tagID;r===c.HEAD||r===c.BODY||r===c.HTML||r===c.BR?ll(e,t):e._err(t,Y.endTagWithoutMatchingOpenElement)}function ll(e,t){e._insertFakeElement(U.HEAD,c.HEAD),e.headElement=e.openElements.current,e.insertionMode=I.IN_HEAD,e._processToken(t)}function li(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:{e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break}case c.TITLE:{e._switchToTextParsing(t,Rr.RCDATA);break}case c.NOSCRIPT:{e.options.scriptingEnabled?e._switchToTextParsing(t,Rr.RAWTEXT):(e._insertElement(t,ee.HTML),e.insertionMode=I.IN_HEAD_NO_SCRIPT);break}case c.NOFRAMES:case c.STYLE:{e._switchToTextParsing(t,Rr.RAWTEXT);break}case c.SCRIPT:{e._switchToTextParsing(t,Rr.SCRIPT_DATA);break}case c.TEMPLATE:{e._insertTemplate(t),e.activeFormattingElements.insertMarker(),e.framesetOk=!1,e.insertionMode=I.IN_TEMPLATE,e.tmplInsertionModeStack.unshift(I.IN_TEMPLATE);break}case c.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:fl(e,t)}}function y8(e,t){switch(t.tagID){case c.HEAD:{e.openElements.pop(),e.insertionMode=I.AFTER_HEAD;break}case c.BODY:case c.BR:case c.HTML:{fl(e,t);break}case c.TEMPLATE:{Ys(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function Ys(e,t){e.openElements.tmplCount>0?(e.openElements.generateImpliedEndTagsThoroughly(),e.openElements.currentTagId!==c.TEMPLATE&&e._err(t,Y.closingOfElementWithOpenChildElements),e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode()):e._err(t,Y.endTagWithoutMatchingOpenElement)}function fl(e,t){e.openElements.pop(),e.insertionMode=I.AFTER_HEAD,e._processToken(t)}function A8(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.BASEFONT:case c.BGSOUND:case c.HEAD:case c.LINK:case c.META:case c.NOFRAMES:case c.STYLE:{li(e,t);break}case c.NOSCRIPT:{e._err(t,Y.nestedNoscriptInHead);break}default:dl(e,t)}}function w8(e,t){switch(t.tagID){case c.NOSCRIPT:{e.openElements.pop(),e.insertionMode=I.IN_HEAD;break}case c.BR:{dl(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function dl(e,t){let r=t.type===Qe.EOF?Y.openElementsLeftAfterEof:Y.disallowedContentInNoscriptInHead;e._err(t,r),e.openElements.pop(),e.insertionMode=I.IN_HEAD,e._processToken(t)}function S8(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.BODY:{e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=I.IN_BODY;break}case c.FRAMESET:{e._insertElement(t,ee.HTML),e.insertionMode=I.IN_FRAMESET;break}case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{e._err(t,Y.abandonedHeadElementChild),e.openElements.push(e.headElement,c.HEAD),li(e,t),e.openElements.remove(e.headElement);break}case c.HEAD:{e._err(t,Y.misplacedStartTagForHeadElement);break}default:hl(e,t)}}function C8(e,t){switch(t.tagID){case c.BODY:case c.HTML:case c.BR:{hl(e,t);break}case c.TEMPLATE:{Ys(e,t);break}default:e._err(t,Y.endTagWithoutMatchingOpenElement)}}function hl(e,t){e._insertFakeElement(U.BODY,c.BODY),e.insertionMode=I.IN_BODY,ph(e,t)}function ph(e,t){switch(t.type){case Qe.CHARACTER:{tS(e,t);break}case Qe.WHITESPACE_CHARACTER:{eS(e,t);break}case Qe.COMMENT:{Gg(e,t);break}case Qe.START_TAG:{Lr(e,t);break}case Qe.END_TAG:{mh(e,t);break}case Qe.EOF:{aS(e,t);break}default:}}function eS(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t)}function tS(e,t){e._reconstructActiveFormattingElements(),e._insertCharacters(t),e.framesetOk=!1}function I8(e,t){e.openElements.tmplCount===0&&e.treeAdapter.adoptAttributes(e.openElements.items[0],t.attrs)}function N8(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e.openElements.tmplCount===0&&(e.framesetOk=!1,e.treeAdapter.adoptAttributes(r,t.attrs))}function O8(e,t){let r=e.openElements.tryPeekProperlyNestedBodyElement();e.framesetOk&&r&&(e.treeAdapter.detachNode(r),e.openElements.popAllUpToHtmlElement(),e._insertElement(t,ee.HTML),e.insertionMode=I.IN_FRAMESET)}function D8(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,ee.HTML)}function k8(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),fu.has(e.openElements.currentTagId)&&e.openElements.pop(),e._insertElement(t,ee.HTML)}function R8(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.skipNextNewLine=!0,e.framesetOk=!1}function L8(e,t){let r=e.openElements.tmplCount>0;(!e.formElement||r)&&(e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,ee.HTML),r||(e.formElement=e.openElements.current))}function P8(e,t){e.framesetOk=!1;let r=t.tagID;for(let n=e.openElements.stackTop;n>=0;n--){let i=e.openElements.tagIDs[n];if(r===c.LI&&i===c.LI||(r===c.DD||r===c.DT)&&(i===c.DD||i===c.DT)){e.openElements.generateImpliedEndTagsWithExclusion(i),e.openElements.popUntilTagNamePopped(i);break}if(i!==c.ADDRESS&&i!==c.DIV&&i!==c.P&&e._isSpecialElement(e.openElements.items[n],i))break}e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,ee.HTML)}function M8(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.tokenizer.state=Rr.PLAINTEXT}function F8(e,t){e.openElements.hasInScope(c.BUTTON)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(c.BUTTON)),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.framesetOk=!1}function B8(e,t){let r=e.activeFormattingElements.getElementEntryInScopeWithTagName(U.A);r&&(Xg(e,t),e.openElements.remove(r.element),e.activeFormattingElements.removeEntry(r)),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function $8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function H8(e,t){e._reconstructActiveFormattingElements(),e.openElements.hasInScope(c.NOBR)&&(Xg(e,t),e._reconstructActiveFormattingElements()),e._insertElement(t,ee.HTML),e.activeFormattingElements.pushElement(e.openElements.current,t)}function U8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.activeFormattingElements.insertMarker(),e.framesetOk=!1}function V8(e,t){e.treeAdapter.getDocumentMode(e.document)!==kr.QUIRKS&&e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=I.IN_TABLE}function rS(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function nS(e){let t=rh(e,Oi.TYPE);return t!=null&&t.toLowerCase()===s8}function q8(e,t){e._reconstructActiveFormattingElements(),e._appendElement(t,ee.HTML),nS(t)||(e.framesetOk=!1),t.ackSelfClosing=!0}function z8(e,t){e._appendElement(t,ee.HTML),t.ackSelfClosing=!0}function Y8(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._appendElement(t,ee.HTML),e.framesetOk=!1,t.ackSelfClosing=!0}function K8(e,t){t.tagName=U.IMG,t.tagID=c.IMG,rS(e,t)}function j8(e,t){e._insertElement(t,ee.HTML),e.skipNextNewLine=!0,e.tokenizer.state=Rr.RCDATA,e.originalInsertionMode=e.insertionMode,e.framesetOk=!1,e.insertionMode=I.TEXT}function W8(e,t){e.openElements.hasInButtonScope(c.P)&&e._closePElement(),e._reconstructActiveFormattingElements(),e.framesetOk=!1,e._switchToTextParsing(t,Rr.RAWTEXT)}function G8(e,t){e.framesetOk=!1,e._switchToTextParsing(t,Rr.RAWTEXT)}function Xw(e,t){e._switchToTextParsing(t,Rr.RAWTEXT)}function Q8(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML),e.framesetOk=!1,e.insertionMode=e.insertionMode===I.IN_TABLE||e.insertionMode===I.IN_CAPTION||e.insertionMode===I.IN_TABLE_BODY||e.insertionMode===I.IN_ROW||e.insertionMode===I.IN_CELL?I.IN_SELECT_IN_TABLE:I.IN_SELECT}function X8(e,t){e.openElements.currentTagId===c.OPTION&&e.openElements.pop(),e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML)}function Z8(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTags(),e._insertElement(t,ee.HTML)}function J8(e,t){e.openElements.hasInScope(c.RUBY)&&e.openElements.generateImpliedEndTagsWithExclusion(c.RTC),e._insertElement(t,ee.HTML)}function eM(e,t){e._reconstructActiveFormattingElements(),Yg(t),lh(t),t.selfClosing?e._appendElement(t,ee.MATHML):e._insertElement(t,ee.MATHML),t.ackSelfClosing=!0}function tM(e,t){e._reconstructActiveFormattingElements(),Kg(t),lh(t),t.selfClosing?e._appendElement(t,ee.SVG):e._insertElement(t,ee.SVG),t.ackSelfClosing=!0}function Zw(e,t){e._reconstructActiveFormattingElements(),e._insertElement(t,ee.HTML)}function Lr(e,t){switch(t.tagID){case c.I:case c.S:case c.B:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.SMALL:case c.STRIKE:case c.STRONG:{$8(e,t);break}case c.A:{B8(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{k8(e,t);break}case c.P:case c.DL:case c.OL:case c.UL:case c.DIV:case c.DIR:case c.NAV:case c.MAIN:case c.MENU:case c.ASIDE:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.DETAILS:case c.ADDRESS:case c.ARTICLE:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{D8(e,t);break}case c.LI:case c.DD:case c.DT:{P8(e,t);break}case c.BR:case c.IMG:case c.WBR:case c.AREA:case c.EMBED:case c.KEYGEN:{rS(e,t);break}case c.HR:{Y8(e,t);break}case c.RB:case c.RTC:{Z8(e,t);break}case c.RT:case c.RP:{J8(e,t);break}case c.PRE:case c.LISTING:{R8(e,t);break}case c.XMP:{W8(e,t);break}case c.SVG:{tM(e,t);break}case c.HTML:{I8(e,t);break}case c.BASE:case c.LINK:case c.META:case c.STYLE:case c.TITLE:case c.SCRIPT:case c.BGSOUND:case c.BASEFONT:case c.TEMPLATE:{li(e,t);break}case c.BODY:{N8(e,t);break}case c.FORM:{L8(e,t);break}case c.NOBR:{H8(e,t);break}case c.MATH:{eM(e,t);break}case c.TABLE:{V8(e,t);break}case c.INPUT:{q8(e,t);break}case c.PARAM:case c.TRACK:case c.SOURCE:{z8(e,t);break}case c.IMAGE:{K8(e,t);break}case c.BUTTON:{F8(e,t);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{U8(e,t);break}case c.IFRAME:{G8(e,t);break}case c.SELECT:{Q8(e,t);break}case c.OPTION:case c.OPTGROUP:{X8(e,t);break}case c.NOEMBED:case c.NOFRAMES:{Xw(e,t);break}case c.FRAMESET:{O8(e,t);break}case c.TEXTAREA:{j8(e,t);break}case c.NOSCRIPT:{e.options.scriptingEnabled?Xw(e,t):Zw(e,t);break}case c.PLAINTEXT:{M8(e,t);break}case c.COL:case c.TH:case c.TD:case c.TR:case c.HEAD:case c.FRAME:case c.TBODY:case c.TFOOT:case c.THEAD:case c.CAPTION:case c.COLGROUP:break;default:Zw(e,t)}}function rM(e,t){if(e.openElements.hasInScope(c.BODY)&&(e.insertionMode=I.AFTER_BODY,e.options.sourceCodeLocationInfo)){let r=e.openElements.tryPeekProperlyNestedBodyElement();r&&e._setEndLocation(r,t)}}function nM(e,t){e.openElements.hasInScope(c.BODY)&&(e.insertionMode=I.AFTER_BODY,hS(e,t))}function iM(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r))}function aM(e){let t=e.openElements.tmplCount>0,{formElement:r}=e;t||(e.formElement=null),(r||t)&&e.openElements.hasInScope(c.FORM)&&(e.openElements.generateImpliedEndTags(),t?e.openElements.popUntilTagNamePopped(c.FORM):r&&e.openElements.remove(r))}function sM(e){e.openElements.hasInButtonScope(c.P)||e._insertFakeElement(U.P,c.P),e._closePElement()}function oM(e){e.openElements.hasInListItemScope(c.LI)&&(e.openElements.generateImpliedEndTagsWithExclusion(c.LI),e.openElements.popUntilTagNamePopped(c.LI))}function uM(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTagsWithExclusion(r),e.openElements.popUntilTagNamePopped(r))}function cM(e){e.openElements.hasNumberedHeaderInScope()&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilNumberedHeaderPopped())}function lM(e,t){let r=t.tagID;e.openElements.hasInScope(r)&&(e.openElements.generateImpliedEndTags(),e.openElements.popUntilTagNamePopped(r),e.activeFormattingElements.clearToLastMarker())}function fM(e){e._reconstructActiveFormattingElements(),e._insertFakeElement(U.BR,c.BR),e.openElements.pop(),e.framesetOk=!1}function iS(e,t){let r=t.tagName,n=t.tagID;for(let i=e.openElements.stackTop;i>0;i--){let a=e.openElements.items[i],o=e.openElements.tagIDs[i];if(n===o&&(n!==c.UNKNOWN||e.treeAdapter.getTagName(a)===r)){e.openElements.generateImpliedEndTagsWithExclusion(n),e.openElements.stackTop>=i&&e.openElements.shortenToLength(i);break}if(e._isSpecialElement(a,o))break}}function mh(e,t){switch(t.tagID){case c.A:case c.B:case c.I:case c.S:case c.U:case c.EM:case c.TT:case c.BIG:case c.CODE:case c.FONT:case c.NOBR:case c.SMALL:case c.STRIKE:case c.STRONG:{Xg(e,t);break}case c.P:{sM(e);break}case c.DL:case c.UL:case c.OL:case c.DIR:case c.DIV:case c.NAV:case c.PRE:case c.MAIN:case c.MENU:case c.ASIDE:case c.BUTTON:case c.CENTER:case c.FIGURE:case c.FOOTER:case c.HEADER:case c.HGROUP:case c.DIALOG:case c.ADDRESS:case c.ARTICLE:case c.DETAILS:case c.SEARCH:case c.SECTION:case c.SUMMARY:case c.LISTING:case c.FIELDSET:case c.BLOCKQUOTE:case c.FIGCAPTION:{iM(e,t);break}case c.LI:{oM(e);break}case c.DD:case c.DT:{uM(e,t);break}case c.H1:case c.H2:case c.H3:case c.H4:case c.H5:case c.H6:{cM(e);break}case c.BR:{fM(e);break}case c.BODY:{rM(e,t);break}case c.HTML:{nM(e,t);break}case c.FORM:{aM(e);break}case c.APPLET:case c.OBJECT:case c.MARQUEE:{lM(e,t);break}case c.TEMPLATE:{Ys(e,t);break}default:iS(e,t)}}function aS(e,t){e.tmplInsertionModeStack.length>0?dS(e,t):Zg(e,t)}function dM(e,t){var r;t.tagID===c.SCRIPT&&((r=e.scriptHandler)===null||r===void 0||r.call(e,e.openElements.current)),e.openElements.pop(),e.insertionMode=e.originalInsertionMode}function hM(e,t){e._err(t,Y.eofInElementThatCanContainOnlyText),e.openElements.pop(),e.insertionMode=e.originalInsertionMode,e.onEof(t)}function Wg(e,t){if(Jw.has(e.openElements.currentTagId))switch(e.pendingCharacterTokens.length=0,e.hasNonWhitespacePendingCharacterToken=!1,e.originalInsertionMode=e.insertionMode,e.insertionMode=I.IN_TABLE_TEXT,t.type){case Qe.CHARACTER:{oS(e,t);break}case Qe.WHITESPACE_CHARACTER:{sS(e,t);break}}else ml(e,t)}function pM(e,t){e.openElements.clearBackToTableContext(),e.activeFormattingElements.insertMarker(),e._insertElement(t,ee.HTML),e.insertionMode=I.IN_CAPTION}function mM(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ee.HTML),e.insertionMode=I.IN_COLUMN_GROUP}function gM(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(U.COLGROUP,c.COLGROUP),e.insertionMode=I.IN_COLUMN_GROUP,Jg(e,t)}function _M(e,t){e.openElements.clearBackToTableContext(),e._insertElement(t,ee.HTML),e.insertionMode=I.IN_TABLE_BODY}function bM(e,t){e.openElements.clearBackToTableContext(),e._insertFakeElement(U.TBODY,c.TBODY),e.insertionMode=I.IN_TABLE_BODY,gh(e,t)}function EM(e,t){e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode(),e._processStartTag(t))}function vM(e,t){nS(t)?e._appendElement(t,ee.HTML):ml(e,t),t.ackSelfClosing=!0}function TM(e,t){!e.formElement&&e.openElements.tmplCount===0&&(e._insertElement(t,ee.HTML),e.formElement=e.openElements.current,e.openElements.pop())}function hu(e,t){switch(t.tagID){case c.TD:case c.TH:case c.TR:{bM(e,t);break}case c.STYLE:case c.SCRIPT:case c.TEMPLATE:{li(e,t);break}case c.COL:{gM(e,t);break}case c.FORM:{TM(e,t);break}case c.TABLE:{EM(e,t);break}case c.TBODY:case c.TFOOT:case c.THEAD:{_M(e,t);break}case c.INPUT:{vM(e,t);break}case c.CAPTION:{pM(e,t);break}case c.COLGROUP:{mM(e,t);break}default:ml(e,t)}}function pl(e,t){switch(t.tagID){case c.TABLE:{e.openElements.hasInTableScope(c.TABLE)&&(e.openElements.popUntilTagNamePopped(c.TABLE),e._resetInsertionMode());break}case c.TEMPLATE:{Ys(e,t);break}case c.BODY:case c.CAPTION:case c.COL:case c.COLGROUP:case c.HTML:case c.TBODY:case c.TD:case c.TFOOT:case c.TH:case c.THEAD:case c.TR:break;default:ml(e,t)}}function ml(e,t){let r=e.fosterParentingEnabled;e.fosterParentingEnabled=!0,ph(e,t),e.fosterParentingEnabled=r}function sS(e,t){e.pendingCharacterTokens.push(t)}function oS(e,t){e.pendingCharacterTokens.push(t),e.hasNonWhitespacePendingCharacterToken=!0}function ul(e,t){let r=0;if(e.hasNonWhitespacePendingCharacterToken)for(;r0&&e.openElements.currentTagId===c.OPTION&&e.openElements.tagIDs[e.openElements.stackTop-1]===c.OPTGROUP&&e.openElements.pop(),e.openElements.currentTagId===c.OPTGROUP&&e.openElements.pop();break}case c.OPTION:{e.openElements.currentTagId===c.OPTION&&e.openElements.pop();break}case c.SELECT:{e.openElements.hasInSelectScope(c.SELECT)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode());break}case c.TEMPLATE:{Ys(e,t);break}default:}}function CM(e,t){let r=t.tagID;r===c.CAPTION||r===c.TABLE||r===c.TBODY||r===c.TFOOT||r===c.THEAD||r===c.TR||r===c.TD||r===c.TH?(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e._processStartTag(t)):lS(e,t)}function IM(e,t){let r=t.tagID;r===c.CAPTION||r===c.TABLE||r===c.TBODY||r===c.TFOOT||r===c.THEAD||r===c.TR||r===c.TD||r===c.TH?e.openElements.hasInTableScope(r)&&(e.openElements.popUntilTagNamePopped(c.SELECT),e._resetInsertionMode(),e.onEndTag(t)):fS(e,t)}function NM(e,t){switch(t.tagID){case c.BASE:case c.BASEFONT:case c.BGSOUND:case c.LINK:case c.META:case c.NOFRAMES:case c.SCRIPT:case c.STYLE:case c.TEMPLATE:case c.TITLE:{li(e,t);break}case c.CAPTION:case c.COLGROUP:case c.TBODY:case c.TFOOT:case c.THEAD:{e.tmplInsertionModeStack[0]=I.IN_TABLE,e.insertionMode=I.IN_TABLE,hu(e,t);break}case c.COL:{e.tmplInsertionModeStack[0]=I.IN_COLUMN_GROUP,e.insertionMode=I.IN_COLUMN_GROUP,Jg(e,t);break}case c.TR:{e.tmplInsertionModeStack[0]=I.IN_TABLE_BODY,e.insertionMode=I.IN_TABLE_BODY,gh(e,t);break}case c.TD:case c.TH:{e.tmplInsertionModeStack[0]=I.IN_ROW,e.insertionMode=I.IN_ROW,_h(e,t);break}default:e.tmplInsertionModeStack[0]=I.IN_BODY,e.insertionMode=I.IN_BODY,Lr(e,t)}}function OM(e,t){t.tagID===c.TEMPLATE&&Ys(e,t)}function dS(e,t){e.openElements.tmplCount>0?(e.openElements.popUntilTagNamePopped(c.TEMPLATE),e.activeFormattingElements.clearToLastMarker(),e.tmplInsertionModeStack.shift(),e._resetInsertionMode(),e.onEof(t)):Zg(e,t)}function DM(e,t){t.tagID===c.HTML?Lr(e,t):hh(e,t)}function hS(e,t){var r;if(t.tagID===c.HTML){if(e.fragmentContext||(e.insertionMode=I.AFTER_AFTER_BODY),e.options.sourceCodeLocationInfo&&e.openElements.tagIDs[0]===c.HTML){e._setEndLocation(e.openElements.items[0],t);let n=e.openElements.items[1];n&&!(!((r=e.treeAdapter.getNodeSourceCodeLocation(n))===null||r===void 0)&&r.endTag)&&e._setEndLocation(n,t)}}else hh(e,t)}function hh(e,t){e.insertionMode=I.IN_BODY,ph(e,t)}function kM(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.FRAMESET:{e._insertElement(t,ee.HTML);break}case c.FRAME:{e._appendElement(t,ee.HTML),t.ackSelfClosing=!0;break}case c.NOFRAMES:{li(e,t);break}default:}}function RM(e,t){t.tagID===c.FRAMESET&&!e.openElements.isRootHtmlElementCurrent()&&(e.openElements.pop(),!e.fragmentContext&&e.openElements.currentTagId!==c.FRAMESET&&(e.insertionMode=I.AFTER_FRAMESET))}function LM(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.NOFRAMES:{li(e,t);break}default:}}function PM(e,t){t.tagID===c.HTML&&(e.insertionMode=I.AFTER_AFTER_FRAMESET)}function MM(e,t){t.tagID===c.HTML?Lr(e,t):fh(e,t)}function fh(e,t){e.insertionMode=I.IN_BODY,ph(e,t)}function FM(e,t){switch(t.tagID){case c.HTML:{Lr(e,t);break}case c.NOFRAMES:{li(e,t);break}default:}}function BM(e,t){t.chars=xt,e._insertCharacters(t)}function $M(e,t){e._insertCharacters(t),e.framesetOk=!1}function pS(e){for(;e.treeAdapter.getNamespaceURI(e.openElements.current)!==ee.HTML&&!e._isIntegrationPoint(e.openElements.currentTagId,e.openElements.current);)e.openElements.pop()}function HM(e,t){if(Kw(t))pS(e),e._startTagOutsideForeignContent(t);else{let r=e._getAdjustedCurrentElement(),n=e.treeAdapter.getNamespaceURI(r);n===ee.MATHML?Yg(t):n===ee.SVG&&(jw(t),Kg(t)),lh(t),t.selfClosing?e._appendElement(t,n):e._insertElement(t,n),t.ackSelfClosing=!0}}function UM(e,t){if(t.tagID===c.P||t.tagID===c.BR){pS(e),e._endTagOutsideForeignContent(t);return}for(let r=e.openElements.stackTop;r>0;r--){let n=e.openElements.items[r];if(e.treeAdapter.getNamespaceURI(n)===ee.HTML){e._endTagOutsideForeignContent(t);break}let i=e.treeAdapter.getTagName(n);if(i.toLowerCase()===t.tagName){t.tagName=i,e.openElements.shortenToLength(r);break}}}var s8,o8,u8,I,c8,Jw,Qw,du,uS,e_=v(()=>{zg();Pw();Fw();ch();zw();jg();il();eh();sa();nh();s8="hidden",o8=8,u8=3;(function(e){e[e.INITIAL=0]="INITIAL",e[e.BEFORE_HTML=1]="BEFORE_HTML",e[e.BEFORE_HEAD=2]="BEFORE_HEAD",e[e.IN_HEAD=3]="IN_HEAD",e[e.IN_HEAD_NO_SCRIPT=4]="IN_HEAD_NO_SCRIPT",e[e.AFTER_HEAD=5]="AFTER_HEAD",e[e.IN_BODY=6]="IN_BODY",e[e.TEXT=7]="TEXT",e[e.IN_TABLE=8]="IN_TABLE",e[e.IN_TABLE_TEXT=9]="IN_TABLE_TEXT",e[e.IN_CAPTION=10]="IN_CAPTION",e[e.IN_COLUMN_GROUP=11]="IN_COLUMN_GROUP",e[e.IN_TABLE_BODY=12]="IN_TABLE_BODY",e[e.IN_ROW=13]="IN_ROW",e[e.IN_CELL=14]="IN_CELL",e[e.IN_SELECT=15]="IN_SELECT",e[e.IN_SELECT_IN_TABLE=16]="IN_SELECT_IN_TABLE",e[e.IN_TEMPLATE=17]="IN_TEMPLATE",e[e.AFTER_BODY=18]="AFTER_BODY",e[e.IN_FRAMESET=19]="IN_FRAMESET",e[e.AFTER_FRAMESET=20]="AFTER_FRAMESET",e[e.AFTER_AFTER_BODY=21]="AFTER_AFTER_BODY",e[e.AFTER_AFTER_FRAMESET=22]="AFTER_AFTER_FRAMESET"})(I||(I={}));c8={startLine:-1,startCol:-1,startOffset:-1,endLine:-1,endCol:-1,endOffset:-1},Jw=new Set([c.TABLE,c.TBODY,c.TFOOT,c.THEAD,c.TR]),Qw={scriptingEnabled:!0,sourceCodeLocationInfo:!1,treeAdapter:Vn,onParseError:null},du=class{constructor(t,r,n=null,i=null){this.fragmentContext=n,this.scriptHandler=i,this.currentToken=null,this.stopped=!1,this.insertionMode=I.INITIAL,this.originalInsertionMode=I.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={...Qw,...t},this.treeAdapter=this.options.treeAdapter,this.onParseError=this.options.onParseError,this.onParseError&&(this.options.sourceCodeLocationInfo=!0),this.document=r??this.treeAdapter.createDocument(),this.tokenizer=new sl(this.options,this),this.activeFormattingElements=new uh(this.treeAdapter),this.fragmentContextID=n?Wa(this.treeAdapter.getTagName(n)):c.UNKNOWN,this._setContextModes(n??this.document,this.fragmentContextID),this.openElements=new oh(this.document,this.treeAdapter,this)}static parse(t,r){let n=new this(r);return n.tokenizer.write(t,!0),n.document}static getFragmentParser(t,r){let n={...Qw,...r};t??(t=n.treeAdapter.createElement(U.TEMPLATE,ee.HTML,[]));let i=n.treeAdapter.createElement("documentmock",ee.HTML,[]),a=new this(n,i,t);return a.fragmentContextID===c.TEMPLATE&&a.tmplInsertionModeStack.unshift(I.IN_TEMPLATE),a._initTokenizerForFragmentParsing(),a._insertFakeRootElement(),a._resetInsertionMode(),a._findFormInFragmentContext(),a}getFragment(){let t=this.treeAdapter.getFirstChild(this.document),r=this.treeAdapter.createDocumentFragment();return this._adoptNodes(t,r),r}_err(t,r,n){var i;if(!this.onParseError)return;let a=(i=t.location)!==null&&i!==void 0?i:c8,o={code:r,startLine:a.startLine,startCol:a.startCol,startOffset:a.startOffset,endLine:n?a.startLine:a.endLine,endCol:n?a.startCol:a.endCol,endOffset:n?a.startOffset:a.endOffset};this.onParseError(o)}onItemPush(t,r,n){var i,a;(a=(i=this.treeAdapter).onItemPush)===null||a===void 0||a.call(i,t),n&&this.openElements.stackTop>0&&this._setContextModes(t,r)}onItemPop(t,r){var n,i;if(this.options.sourceCodeLocationInfo&&this._setEndLocation(t,this.currentToken),(i=(n=this.treeAdapter).onItemPop)===null||i===void 0||i.call(n,t,this.openElements.current),r){let a,o;this.openElements.stackTop===0&&this.fragmentContext?(a=this.fragmentContext,o=this.fragmentContextID):{current:a,currentTagId:o}=this.openElements,this._setContextModes(a,o)}}_setContextModes(t,r){let n=t===this.document||this.treeAdapter.getNamespaceURI(t)===ee.HTML;this.currentNotInHTML=!n,this.tokenizer.inForeignNode=!n&&!this._isIntegrationPoint(r,t)}_switchToTextParsing(t,r){this._insertElement(t,ee.HTML),this.tokenizer.state=r,this.originalInsertionMode=this.insertionMode,this.insertionMode=I.TEXT}switchToPlaintextParsing(){this.insertionMode=I.TEXT,this.originalInsertionMode=I.IN_BODY,this.tokenizer.state=Rr.PLAINTEXT}_getAdjustedCurrentElement(){return this.openElements.stackTop===0&&this.fragmentContext?this.fragmentContext:this.openElements.current}_findFormInFragmentContext(){let t=this.fragmentContext;for(;t;){if(this.treeAdapter.getTagName(t)===U.FORM){this.formElement=t;break}t=this.treeAdapter.getParentNode(t)}}_initTokenizerForFragmentParsing(){if(!(!this.fragmentContext||this.treeAdapter.getNamespaceURI(this.fragmentContext)!==ee.HTML))switch(this.fragmentContextID){case c.TITLE:case c.TEXTAREA:{this.tokenizer.state=Rr.RCDATA;break}case c.STYLE:case c.XMP:case c.IFRAME:case c.NOEMBED:case c.NOFRAMES:case c.NOSCRIPT:{this.tokenizer.state=Rr.RAWTEXT;break}case c.SCRIPT:{this.tokenizer.state=Rr.SCRIPT_DATA;break}case c.PLAINTEXT:{this.tokenizer.state=Rr.PLAINTEXT;break}default:}}_setDocumentType(t){let r=t.name||"",n=t.publicId||"",i=t.systemId||"";if(this.treeAdapter.setDocumentType(this.document,r,n,i),t.location){let o=this.treeAdapter.getChildNodes(this.document).find(l=>this.treeAdapter.isDocumentTypeNode(l));o&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}}_attachElementToTree(t,r){if(this.options.sourceCodeLocationInfo){let n=r&&{...r,startTag:r};this.treeAdapter.setNodeSourceCodeLocation(t,n)}if(this._shouldFosterParentOnInsertion())this._fosterParentElement(t);else{let n=this.openElements.currentTmplContentOrNode;this.treeAdapter.appendChild(n,t)}}_appendElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location)}_insertElement(t,r){let n=this.treeAdapter.createElement(t.tagName,r,t.attrs);this._attachElementToTree(n,t.location),this.openElements.push(n,t.tagID)}_insertFakeElement(t,r){let n=this.treeAdapter.createElement(t,ee.HTML,[]);this._attachElementToTree(n,null),this.openElements.push(n,r)}_insertTemplate(t){let r=this.treeAdapter.createElement(t.tagName,ee.HTML,t.attrs),n=this.treeAdapter.createDocumentFragment();this.treeAdapter.setTemplateContent(r,n),this._attachElementToTree(r,t.location),this.openElements.push(r,t.tagID),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,null)}_insertFakeRootElement(){let t=this.treeAdapter.createElement(U.HTML,ee.HTML,[]);this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(t,null),this.treeAdapter.appendChild(this.openElements.current,t),this.openElements.push(t,c.HTML)}_appendCommentNode(t,r){let n=this.treeAdapter.createCommentNode(t.data);this.treeAdapter.appendChild(r,n),this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(n,t.location)}_insertCharacters(t){let r,n;if(this._shouldFosterParentOnInsertion()?({parent:r,beforeElement:n}=this._findFosterParentingLocation(),n?this.treeAdapter.insertTextBefore(r,t.chars,n):this.treeAdapter.insertText(r,t.chars)):(r=this.openElements.currentTmplContentOrNode,this.treeAdapter.insertText(r,t.chars)),!t.location)return;let i=this.treeAdapter.getChildNodes(r),a=n?i.lastIndexOf(n):i.length,o=i[a-1];if(this.treeAdapter.getNodeSourceCodeLocation(o)){let{endLine:d,endCol:p,endOffset:g}=t.location;this.treeAdapter.updateNodeSourceCodeLocation(o,{endLine:d,endCol:p,endOffset:g})}else this.options.sourceCodeLocationInfo&&this.treeAdapter.setNodeSourceCodeLocation(o,t.location)}_adoptNodes(t,r){for(let n=this.treeAdapter.getFirstChild(t);n;n=this.treeAdapter.getFirstChild(t))this.treeAdapter.detachNode(n),this.treeAdapter.appendChild(r,n)}_setEndLocation(t,r){if(this.treeAdapter.getNodeSourceCodeLocation(t)&&r.location){let n=r.location,i=this.treeAdapter.getTagName(t),a=r.type===Qe.END_TAG&&i===r.tagName?{endTag:{...n},endLine:n.endLine,endCol:n.endCol,endOffset:n.endOffset}:{endLine:n.startLine,endCol:n.startCol,endOffset:n.startOffset};this.treeAdapter.updateNodeSourceCodeLocation(t,a)}}shouldProcessStartTagTokenInForeignContent(t){if(!this.currentNotInHTML)return!1;let r,n;return this.openElements.stackTop===0&&this.fragmentContext?(r=this.fragmentContext,n=this.fragmentContextID):{current:r,currentTagId:n}=this.openElements,t.tagID===c.SVG&&this.treeAdapter.getTagName(r)===U.ANNOTATION_XML&&this.treeAdapter.getNamespaceURI(r)===ee.MATHML?!1:this.tokenizer.inForeignNode||(t.tagID===c.MGLYPH||t.tagID===c.MALIGNMARK)&&!this._isIntegrationPoint(n,r,ee.HTML)}_processToken(t){switch(t.type){case Qe.CHARACTER:{this.onCharacter(t);break}case Qe.NULL_CHARACTER:{this.onNullCharacter(t);break}case Qe.COMMENT:{this.onComment(t);break}case Qe.DOCTYPE:{this.onDoctype(t);break}case Qe.START_TAG:{this._processStartTag(t);break}case Qe.END_TAG:{this.onEndTag(t);break}case Qe.EOF:{this.onEof(t);break}case Qe.WHITESPACE_CHARACTER:{this.onWhitespaceCharacter(t);break}}}_isIntegrationPoint(t,r,n){let i=this.treeAdapter.getNamespaceURI(r),a=this.treeAdapter.getAttrList(r);return Ww(t,i,a,n)}_reconstructActiveFormattingElements(){let t=this.activeFormattingElements.entries.length;if(t){let r=this.activeFormattingElements.entries.findIndex(i=>i.type===ci.Marker||this.openElements.contains(i.element)),n=r<0?t-1:r-1;for(let i=n;i>=0;i--){let a=this.activeFormattingElements.entries[i];this._insertElement(a.token,this.treeAdapter.getNamespaceURI(a.element)),a.element=this.openElements.current}}}_closeTableCell(){this.openElements.generateImpliedEndTags(),this.openElements.popUntilTableCellPopped(),this.activeFormattingElements.clearToLastMarker(),this.insertionMode=I.IN_ROW}_closePElement(){this.openElements.generateImpliedEndTagsWithExclusion(c.P),this.openElements.popUntilTagNamePopped(c.P)}_resetInsertionMode(){for(let t=this.openElements.stackTop;t>=0;t--)switch(t===0&&this.fragmentContext?this.fragmentContextID:this.openElements.tagIDs[t]){case c.TR:{this.insertionMode=I.IN_ROW;return}case c.TBODY:case c.THEAD:case c.TFOOT:{this.insertionMode=I.IN_TABLE_BODY;return}case c.CAPTION:{this.insertionMode=I.IN_CAPTION;return}case c.COLGROUP:{this.insertionMode=I.IN_COLUMN_GROUP;return}case c.TABLE:{this.insertionMode=I.IN_TABLE;return}case c.BODY:{this.insertionMode=I.IN_BODY;return}case c.FRAMESET:{this.insertionMode=I.IN_FRAMESET;return}case c.SELECT:{this._resetInsertionModeForSelect(t);return}case c.TEMPLATE:{this.insertionMode=this.tmplInsertionModeStack[0];return}case c.HTML:{this.insertionMode=this.headElement?I.AFTER_HEAD:I.BEFORE_HEAD;return}case c.TD:case c.TH:{if(t>0){this.insertionMode=I.IN_CELL;return}break}case c.HEAD:{if(t>0){this.insertionMode=I.IN_HEAD;return}break}}this.insertionMode=I.IN_BODY}_resetInsertionModeForSelect(t){if(t>0)for(let r=t-1;r>0;r--){let n=this.openElements.tagIDs[r];if(n===c.TEMPLATE)break;if(n===c.TABLE){this.insertionMode=I.IN_SELECT_IN_TABLE;return}}this.insertionMode=I.IN_SELECT}_isElementCausesFosterParenting(t){return Jw.has(t)}_shouldFosterParentOnInsertion(){return this.fosterParentingEnabled&&this._isElementCausesFosterParenting(this.openElements.currentTagId)}_findFosterParentingLocation(){for(let t=this.openElements.stackTop;t>=0;t--){let r=this.openElements.items[t];switch(this.openElements.tagIDs[t]){case c.TEMPLATE:{if(this.treeAdapter.getNamespaceURI(r)===ee.HTML)return{parent:this.treeAdapter.getTemplateContent(r),beforeElement:null};break}case c.TABLE:{let n=this.treeAdapter.getParentNode(r);return n?{parent:n,beforeElement:r}:{parent:this.openElements.items[t-1],beforeElement:null}}default:}}return{parent:this.openElements.items[0],beforeElement:null}}_fosterParentElement(t){let r=this._findFosterParentingLocation();r.beforeElement?this.treeAdapter.insertBefore(r.parent,t,r.beforeElement):this.treeAdapter.appendChild(r.parent,t)}_isSpecialElement(t,r){let n=this.treeAdapter.getNamespaceURI(t);return Vg[n].has(r)}onCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){$M(this,t);return}switch(this.insertionMode){case I.INITIAL:{ol(this,t);break}case I.BEFORE_HTML:{cl(this,t);break}case I.BEFORE_HEAD:{ll(this,t);break}case I.IN_HEAD:{fl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{dl(this,t);break}case I.AFTER_HEAD:{hl(this,t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:{tS(this,t);break}case I.TEXT:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Wg(this,t);break}case I.IN_TABLE_TEXT:{oS(this,t);break}case I.IN_COLUMN_GROUP:{dh(this,t);break}case I.AFTER_BODY:{hh(this,t);break}case I.AFTER_AFTER_BODY:{fh(this,t);break}default:}}onNullCharacter(t){if(this.skipNextNewLine=!1,this.tokenizer.inForeignNode){BM(this,t);return}switch(this.insertionMode){case I.INITIAL:{ol(this,t);break}case I.BEFORE_HTML:{cl(this,t);break}case I.BEFORE_HEAD:{ll(this,t);break}case I.IN_HEAD:{fl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{dl(this,t);break}case I.AFTER_HEAD:{hl(this,t);break}case I.TEXT:{this._insertCharacters(t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Wg(this,t);break}case I.IN_COLUMN_GROUP:{dh(this,t);break}case I.AFTER_BODY:{hh(this,t);break}case I.AFTER_AFTER_BODY:{fh(this,t);break}default:}}onComment(t){if(this.skipNextNewLine=!1,this.currentNotInHTML){Gg(this,t);return}switch(this.insertionMode){case I.INITIAL:case I.BEFORE_HTML:case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_TEMPLATE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{Gg(this,t);break}case I.IN_TABLE_TEXT:{ul(this,t);break}case I.AFTER_BODY:{g8(this,t);break}case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{_8(this,t);break}default:}}onDoctype(t){switch(this.skipNextNewLine=!1,this.insertionMode){case I.INITIAL:{b8(this,t);break}case I.BEFORE_HEAD:case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:{this._err(t,Y.misplacedDoctype);break}case I.IN_TABLE_TEXT:{ul(this,t);break}default:}}onStartTag(t){this.skipNextNewLine=!1,this.currentToken=t,this._processStartTag(t),t.selfClosing&&!t.ackSelfClosing&&this._err(t,Y.nonVoidHtmlElementStartTagWithTrailingSolidus)}_processStartTag(t){this.shouldProcessStartTagTokenInForeignContent(t)?HM(this,t):this._startTagOutsideForeignContent(t)}_startTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{ol(this,t);break}case I.BEFORE_HTML:{E8(this,t);break}case I.BEFORE_HEAD:{T8(this,t);break}case I.IN_HEAD:{li(this,t);break}case I.IN_HEAD_NO_SCRIPT:{A8(this,t);break}case I.AFTER_HEAD:{S8(this,t);break}case I.IN_BODY:{Lr(this,t);break}case I.IN_TABLE:{hu(this,t);break}case I.IN_TABLE_TEXT:{ul(this,t);break}case I.IN_CAPTION:{xM(this,t);break}case I.IN_COLUMN_GROUP:{Jg(this,t);break}case I.IN_TABLE_BODY:{gh(this,t);break}case I.IN_ROW:{_h(this,t);break}case I.IN_CELL:{wM(this,t);break}case I.IN_SELECT:{lS(this,t);break}case I.IN_SELECT_IN_TABLE:{CM(this,t);break}case I.IN_TEMPLATE:{NM(this,t);break}case I.AFTER_BODY:{DM(this,t);break}case I.IN_FRAMESET:{kM(this,t);break}case I.AFTER_FRAMESET:{LM(this,t);break}case I.AFTER_AFTER_BODY:{MM(this,t);break}case I.AFTER_AFTER_FRAMESET:{FM(this,t);break}default:}}onEndTag(t){this.skipNextNewLine=!1,this.currentToken=t,this.currentNotInHTML?UM(this,t):this._endTagOutsideForeignContent(t)}_endTagOutsideForeignContent(t){switch(this.insertionMode){case I.INITIAL:{ol(this,t);break}case I.BEFORE_HTML:{v8(this,t);break}case I.BEFORE_HEAD:{x8(this,t);break}case I.IN_HEAD:{y8(this,t);break}case I.IN_HEAD_NO_SCRIPT:{w8(this,t);break}case I.AFTER_HEAD:{C8(this,t);break}case I.IN_BODY:{mh(this,t);break}case I.TEXT:{dM(this,t);break}case I.IN_TABLE:{pl(this,t);break}case I.IN_TABLE_TEXT:{ul(this,t);break}case I.IN_CAPTION:{yM(this,t);break}case I.IN_COLUMN_GROUP:{AM(this,t);break}case I.IN_TABLE_BODY:{Qg(this,t);break}case I.IN_ROW:{cS(this,t);break}case I.IN_CELL:{SM(this,t);break}case I.IN_SELECT:{fS(this,t);break}case I.IN_SELECT_IN_TABLE:{IM(this,t);break}case I.IN_TEMPLATE:{OM(this,t);break}case I.AFTER_BODY:{hS(this,t);break}case I.IN_FRAMESET:{RM(this,t);break}case I.AFTER_FRAMESET:{PM(this,t);break}case I.AFTER_AFTER_BODY:{fh(this,t);break}default:}}onEof(t){switch(this.insertionMode){case I.INITIAL:{ol(this,t);break}case I.BEFORE_HTML:{cl(this,t);break}case I.BEFORE_HEAD:{ll(this,t);break}case I.IN_HEAD:{fl(this,t);break}case I.IN_HEAD_NO_SCRIPT:{dl(this,t);break}case I.AFTER_HEAD:{hl(this,t);break}case I.IN_BODY:case I.IN_TABLE:case I.IN_CAPTION:case I.IN_COLUMN_GROUP:case I.IN_TABLE_BODY:case I.IN_ROW:case I.IN_CELL:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:{aS(this,t);break}case I.TEXT:{hM(this,t);break}case I.IN_TABLE_TEXT:{ul(this,t);break}case I.IN_TEMPLATE:{dS(this,t);break}case I.AFTER_BODY:case I.IN_FRAMESET:case I.AFTER_FRAMESET:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{Zg(this,t);break}default:}}onWhitespaceCharacter(t){if(this.skipNextNewLine&&(this.skipNextNewLine=!1,t.chars.charCodeAt(0)===x.LINE_FEED)){if(t.chars.length===1)return;t.chars=t.chars.substr(1)}if(this.tokenizer.inForeignNode){this._insertCharacters(t);return}switch(this.insertionMode){case I.IN_HEAD:case I.IN_HEAD_NO_SCRIPT:case I.AFTER_HEAD:case I.TEXT:case I.IN_COLUMN_GROUP:case I.IN_SELECT:case I.IN_SELECT_IN_TABLE:case I.IN_FRAMESET:case I.AFTER_FRAMESET:{this._insertCharacters(t);break}case I.IN_BODY:case I.IN_CAPTION:case I.IN_CELL:case I.IN_TEMPLATE:case I.AFTER_BODY:case I.AFTER_AFTER_BODY:case I.AFTER_AFTER_FRAMESET:{eS(this,t);break}case I.IN_TABLE:case I.IN_TABLE_BODY:case I.IN_ROW:{Wg(this,t);break}case I.IN_TABLE_TEXT:{sS(this,t);break}default:}}};uS=new Set([c.CAPTION,c.COL,c.COLGROUP,c.TBODY,c.TD,c.TFOOT,c.TH,c.THEAD,c.TR])});function qM(e,t){return t.treeAdapter.isElementNode(e)&&t.treeAdapter.getNamespaceURI(e)===ee.HTML&&VM.has(t.treeAdapter.getTagName(e))}function t_(e,t){let r={...zM,...t};return mS(e,r)}function YM(e,t){let r="",n=t.treeAdapter.isElementNode(e)&&t.treeAdapter.getTagName(e)===U.TEMPLATE&&t.treeAdapter.getNamespaceURI(e)===ee.HTML?t.treeAdapter.getTemplateContent(e):e,i=t.treeAdapter.getChildNodes(n);if(i)for(let a of i)r+=mS(a,t);return r}function mS(e,t){return t.treeAdapter.isElementNode(e)?KM(e,t):t.treeAdapter.isTextNode(e)?WM(e,t):t.treeAdapter.isCommentNode(e)?GM(e,t):t.treeAdapter.isDocumentTypeNode(e)?QM(e,t):""}function KM(e,t){let r=t.treeAdapter.getTagName(e);return`<${r}${jM(e,t)}>${qM(e,t)?"":`${YM(e,t)}`}`}function jM(e,{treeAdapter:t}){let r="";for(let n of t.getAttrList(e)){if(r+=" ",n.namespace)switch(n.namespace){case ee.XML:{r+=`xml:${n.name}`;break}case ee.XMLNS:{n.name!=="xmlns"&&(r+="xmlns:"),r+=n.name;break}case ee.XLINK:{r+=`xlink:${n.name}`;break}default:r+=`${n.prefix}:${n.name}`}else r+=n.name;r+=`="${Jo(n.value)}"`}return r}function WM(e,t){let{treeAdapter:r}=t,n=r.getTextNodeContent(e),i=r.getParentNode(e),a=i&&r.isElementNode(i)&&r.getTagName(i);return a&&r.getNamespaceURI(i)===ee.HTML&&qg(a,t.scriptingEnabled)?n:eu(n)}function GM(e,{treeAdapter:t}){return``}function QM(e,{treeAdapter:t}){return``}var VM,zM,gS=v(()=>{sa();Yc();ch();VM=new Set([U.AREA,U.BASE,U.BASEFONT,U.BGSOUND,U.BR,U.COL,U.EMBED,U.FRAME,U.HR,U.IMG,U.INPUT,U.KEYGEN,U.LINK,U.META,U.PARAM,U.SOURCE,U.TRACK,U.WBR]);zM={treeAdapter:Vn,scriptingEnabled:!0}});function _S(e,t){return du.parse(e,t)}function bS(e,t,r){typeof e=="string"&&(r=t,t=e,e=null);let n=du.getFragmentParser(e,r);return n.tokenizer.write(t,!0),n.getFragment()}var r_=v(()=>{e_();ch();e_();gS();il();jg();sa();nh();zg()});function ES(e){let t=e.includes('"')?"'":'"';return t+e+t}function XM(e,t,r){let n="!DOCTYPE ";return e&&(n+=e),t?n+=` PUBLIC ${ES(t)}`:r&&(n+=" SYSTEM"),r&&(n+=` ${ES(r)}`),n}var oa,vS=v(()=>{r_();_r();oa={isCommentNode:$s,isElementNode:_e,isTextNode:nn,createDocument(){let e=new wn([]);return e["x-mode"]=ih.DOCUMENT_MODE.NO_QUIRKS,e},createDocumentFragment(){return new wn([])},createElement(e,t,r){let n=Object.create(null),i=Object.create(null),a=Object.create(null);for(let l=0;lCd(o)&&o.name==="!doctype");a?a.data=i??null:(a=new Fs("!doctype",i),oa.appendChild(e,a)),a["x-name"]=t,a["x-publicId"]=r,a["x-systemId"]=n},setDocumentMode(e,t){e["x-mode"]=t},getDocumentMode(e){return e["x-mode"]},detachNode(e){if(e.parent){let t=e.parent.children.indexOf(e),{prev:r,next:n}=e;e.prev=null,e.next=null,r&&(r.next=n),n&&(n.prev=r),e.parent.children.splice(t,1),e.parent=null}},insertText(e,t){let r=e.children[e.children.length-1];r&&nn(r)?r.data+=t:oa.appendChild(e,oa.createTextNode(t))},insertTextBefore(e,t,r){let n=e.children[e.children.indexOf(r)-1];n&&nn(n)?n.data+=t:oa.insertBefore(e,oa.createTextNode(t),r)},adoptAttributes(e,t){for(let r=0;r{_r();r_();vS();ZM={treeAdapter:oa}});function ua(e){return e===Ie.Space||e===Ie.NewLine||e===Ie.Tab||e===Ie.FormFeed||e===Ie.CarriageReturn}function bh(e){return e===Ie.Slash||e===Ie.Gt||ua(e)}function JM(e){return e>=Ie.LowerA&&e<=Ie.LowerZ||e>=Ie.UpperA&&e<=Ie.UpperZ}var Ie,ne,qn,br,pu,n_=v(()=>{Zo();(function(e){e[e.Tab=9]="Tab",e[e.NewLine=10]="NewLine",e[e.FormFeed=12]="FormFeed",e[e.CarriageReturn=13]="CarriageReturn",e[e.Space=32]="Space",e[e.ExclamationMark=33]="ExclamationMark",e[e.Number=35]="Number",e[e.Amp=38]="Amp",e[e.SingleQuote=39]="SingleQuote",e[e.DoubleQuote=34]="DoubleQuote",e[e.Dash=45]="Dash",e[e.Slash=47]="Slash",e[e.Zero=48]="Zero",e[e.Nine=57]="Nine",e[e.Semi=59]="Semi",e[e.Lt=60]="Lt",e[e.Eq=61]="Eq",e[e.Gt=62]="Gt",e[e.Questionmark=63]="Questionmark",e[e.UpperA=65]="UpperA",e[e.LowerA=97]="LowerA",e[e.UpperF=70]="UpperF",e[e.LowerF=102]="LowerF",e[e.UpperZ=90]="UpperZ",e[e.LowerZ=122]="LowerZ",e[e.LowerX=120]="LowerX",e[e.OpeningSquareBracket=91]="OpeningSquareBracket"})(Ie||(Ie={}));(function(e){e[e.Text=1]="Text",e[e.BeforeTagName=2]="BeforeTagName",e[e.InTagName=3]="InTagName",e[e.InSelfClosingTag=4]="InSelfClosingTag",e[e.BeforeClosingTagName=5]="BeforeClosingTagName",e[e.InClosingTagName=6]="InClosingTagName",e[e.AfterClosingTagName=7]="AfterClosingTagName",e[e.BeforeAttributeName=8]="BeforeAttributeName",e[e.InAttributeName=9]="InAttributeName",e[e.AfterAttributeName=10]="AfterAttributeName",e[e.BeforeAttributeValue=11]="BeforeAttributeValue",e[e.InAttributeValueDq=12]="InAttributeValueDq",e[e.InAttributeValueSq=13]="InAttributeValueSq",e[e.InAttributeValueNq=14]="InAttributeValueNq",e[e.BeforeDeclaration=15]="BeforeDeclaration",e[e.InDeclaration=16]="InDeclaration",e[e.InProcessingInstruction=17]="InProcessingInstruction",e[e.BeforeComment=18]="BeforeComment",e[e.CDATASequence=19]="CDATASequence",e[e.InSpecialComment=20]="InSpecialComment",e[e.InCommentLike=21]="InCommentLike",e[e.BeforeSpecialS=22]="BeforeSpecialS",e[e.BeforeSpecialT=23]="BeforeSpecialT",e[e.SpecialStartSequence=24]="SpecialStartSequence",e[e.InSpecialTag=25]="InSpecialTag",e[e.InEntity=26]="InEntity"})(ne||(ne={}));(function(e){e[e.NoValue=0]="NoValue",e[e.Unquoted=1]="Unquoted",e[e.Single=2]="Single",e[e.Double=3]="Double"})(qn||(qn={}));br={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])},pu=class{constructor({xmlMode:t=!1,decodeEntities:r=!0},n){this.cbs=n,this.state=ne.Text,this.buffer="",this.sectionStart=0,this.index=0,this.entityStart=0,this.baseState=ne.Text,this.isSpecial=!1,this.running=!0,this.offset=0,this.currentSequence=void 0,this.sequenceIndex=0,this.xmlMode=t,this.decodeEntities=r,this.entityDecoder=new Ha(t?Id:Qo,(i,a)=>this.emitCodePoint(i,a))}reset(){this.state=ne.Text,this.buffer="",this.sectionStart=0,this.index=0,this.baseState=ne.Text,this.currentSequence=void 0,this.running=!0,this.offset=0}write(t){this.offset+=this.buffer.length,this.buffer=t,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=ne.BeforeTagName,this.sectionStart=this.index):this.decodeEntities&&t===Ie.Amp&&this.startEntity()}stateSpecialStartSequence(t){let r=this.sequenceIndex===this.currentSequence.length;if(!(r?bh(t):(t|32)===this.currentSequence[this.sequenceIndex]))this.isSpecial=!1;else if(!r){this.sequenceIndex++;return}this.sequenceIndex=0,this.state=ne.InTagName,this.stateInTagName(t)}stateInSpecialTag(t){if(this.sequenceIndex===this.currentSequence.length){if(t===Ie.Gt||ua(t)){let r=this.index-this.currentSequence.length;if(this.sectionStart=0?(this.state=this.baseState,t===0&&(this.index=this.entityStart)):this.index=this.offset+this.buffer.length-1}cleanup(){this.running&&this.sectionStart!==this.index&&(this.state===ne.Text||this.state===ne.InSpecialTag&&this.sequenceIndex===0?(this.cbs.ontext(this.sectionStart,this.index),this.sectionStart=this.index):(this.state===ne.InAttributeValueDq||this.state===ne.InAttributeValueSq||this.state===ne.InAttributeValueNq)&&(this.cbs.onattribdata(this.sectionStart,this.index),this.sectionStart=this.index))}shouldContinue(){return this.index=t||(this.state===ne.InCommentLike?this.currentSequence===br.CdataEnd?this.cbs.oncdata(this.sectionStart,t,0):this.cbs.oncomment(this.sectionStart,t,0):this.state===ne.InTagName||this.state===ne.BeforeAttributeName||this.state===ne.BeforeAttributeValue||this.state===ne.AfterAttributeName||this.state===ne.InAttributeName||this.state===ne.InAttributeValueSq||this.state===ne.InAttributeValueDq||this.state===ne.InAttributeValueNq||this.state===ne.InClosingTagName||this.cbs.ontext(this.sectionStart,t))}emitCodePoint(t,r){this.baseState!==ne.Text&&this.baseState!==ne.InSpecialTag?(this.sectionStart{n_();Zo();mu=new Set(["input","option","optgroup","select","button","datalist","textarea"]),pt=new Set(["p"]),AS=new Set(["thead","tbody"]),wS=new Set(["dd","dt"]),SS=new Set(["rt","rp"]),eF=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",pt],["h1",pt],["h2",pt],["h3",pt],["h4",pt],["h5",pt],["h6",pt],["select",mu],["input",mu],["output",mu],["button",mu],["datalist",mu],["textarea",mu],["option",new Set(["option"])],["optgroup",new Set(["optgroup","option"])],["dd",wS],["dt",wS],["address",pt],["article",pt],["aside",pt],["blockquote",pt],["details",pt],["div",pt],["dl",pt],["fieldset",pt],["figcaption",pt],["figure",pt],["footer",pt],["form",pt],["header",pt],["hr",pt],["main",pt],["nav",pt],["ol",pt],["pre",pt],["section",pt],["table",pt],["ul",pt],["rt",SS],["rp",SS],["tbody",AS],["tfoot",AS]]),tF=new Set(["area","base","basefont","br","col","command","embed","frame","hr","img","input","isindex","keygen","link","meta","param","source","track","wbr"]),CS=new Set(["math","svg"]),IS=new Set(["mi","mo","mn","ms","mtext","annotation-xml","foreignobject","desc","title"]),rF=/\s|\//,gl=class{constructor(t,r={}){var n,i,a,o,l,d;this.options=r,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=t??{},this.htmlMode=!this.options.xmlMode,this.lowerCaseTagNames=(n=r.lowerCaseTags)!==null&&n!==void 0?n:this.htmlMode,this.lowerCaseAttributeNames=(i=r.lowerCaseAttributeNames)!==null&&i!==void 0?i:this.htmlMode,this.recognizeSelfClosing=(a=r.recognizeSelfClosing)!==null&&a!==void 0?a:!this.htmlMode,this.tokenizer=new((o=r.Tokenizer)!==null&&o!==void 0?o:pu)(this.options,this),this.foreignContext=[!this.htmlMode],(d=(l=this.cbs).onparserinit)===null||d===void 0||d.call(l,this)}ontext(t,r){var n,i;let a=this.getSlice(t,r);this.endIndex=r-1,(i=(n=this.cbs).ontext)===null||i===void 0||i.call(n,a),this.startIndex=r}ontextentity(t,r){var n,i;this.endIndex=r-1,(i=(n=this.cbs).ontext)===null||i===void 0||i.call(n,Xo(t)),this.startIndex=r}isVoidElement(t){return this.htmlMode&&tF.has(t)}onopentagname(t,r){this.endIndex=r;let n=this.getSlice(t,r);this.lowerCaseTagNames&&(n=n.toLowerCase()),this.emitOpenTag(n)}emitOpenTag(t){var r,n,i,a;this.openTagStart=this.startIndex,this.tagname=t;let o=this.htmlMode&&eF.get(t);if(o)for(;this.stack.length>0&&o.has(this.stack[0]);){let l=this.stack.shift();(n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,l,!0)}this.isVoidElement(t)||(this.stack.unshift(t),this.htmlMode&&(CS.has(t)?this.foreignContext.unshift(!0):IS.has(t)&&this.foreignContext.unshift(!1))),(a=(i=this.cbs).onopentagname)===null||a===void 0||a.call(i,t),this.cbs.onopentag&&(this.attribs={})}endOpenTag(t){var r,n;this.startIndex=this.openTagStart,this.attribs&&((n=(r=this.cbs).onopentag)===null||n===void 0||n.call(r,this.tagname,this.attribs,t),this.attribs=null),this.cbs.onclosetag&&this.isVoidElement(this.tagname)&&this.cbs.onclosetag(this.tagname,!0),this.tagname=""}onopentagend(t){this.endIndex=t,this.endOpenTag(!1),this.startIndex=t+1}onclosetag(t,r){var n,i,a,o,l,d,p,g;this.endIndex=r;let E=this.getSlice(t,r);if(this.lowerCaseTagNames&&(E=E.toLowerCase()),this.htmlMode&&(CS.has(E)||IS.has(E))&&this.foreignContext.shift(),this.isVoidElement(E))this.htmlMode&&E==="br"&&((o=(a=this.cbs).onopentagname)===null||o===void 0||o.call(a,"br"),(d=(l=this.cbs).onopentag)===null||d===void 0||d.call(l,"br",{},!0),(g=(p=this.cbs).onclosetag)===null||g===void 0||g.call(p,"br",!1));else{let _=this.stack.indexOf(E);if(_!==-1)for(let y=0;y<=_;y++){let C=this.stack.shift();(i=(n=this.cbs).onclosetag)===null||i===void 0||i.call(n,C,y!==_)}else this.htmlMode&&E==="p"&&(this.emitOpenTag("p"),this.closeCurrentTag(!0))}this.startIndex=r+1}onselfclosingtag(t){this.endIndex=t,this.recognizeSelfClosing||this.foreignContext[0]?(this.closeCurrentTag(!1),this.startIndex=t+1):this.onopentagend(t)}closeCurrentTag(t){var r,n;let i=this.tagname;this.endOpenTag(t),this.stack[0]===i&&((n=(r=this.cbs).onclosetag)===null||n===void 0||n.call(r,i,!t),this.stack.shift())}onattribname(t,r){this.startIndex=t;let n=this.getSlice(t,r);this.attribname=this.lowerCaseAttributeNames?n.toLowerCase():n}onattribdata(t,r){this.attribvalue+=this.getSlice(t,r)}onattribentity(t){this.attribvalue+=Xo(t)}onattribend(t,r){var n,i;this.endIndex=r,(i=(n=this.cbs).onattribute)===null||i===void 0||i.call(n,this.attribname,this.attribvalue,t===qn.Double?'"':t===qn.Single?"'":t===qn.NoValue?void 0:null),this.attribs&&!Object.prototype.hasOwnProperty.call(this.attribs,this.attribname)&&(this.attribs[this.attribname]=this.attribvalue),this.attribvalue=""}getInstructionName(t){let r=t.search(rF),n=r<0?t:t.substr(0,r);return this.lowerCaseTagNames&&(n=n.toLowerCase()),n}ondeclaration(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let i=this.getInstructionName(n);this.cbs.onprocessinginstruction(`!${i}`,`!${n}`)}this.startIndex=r+1}onprocessinginstruction(t,r){this.endIndex=r;let n=this.getSlice(t,r);if(this.cbs.onprocessinginstruction){let i=this.getInstructionName(n);this.cbs.onprocessinginstruction(`?${i}`,`?${n}`)}this.startIndex=r+1}oncomment(t,r,n){var i,a,o,l;this.endIndex=r,(a=(i=this.cbs).oncomment)===null||a===void 0||a.call(i,this.getSlice(t,r-n)),(l=(o=this.cbs).oncommentend)===null||l===void 0||l.call(o),this.startIndex=r+1}oncdata(t,r,n){var i,a,o,l,d,p,g,E,_,y;this.endIndex=r;let C=this.getSlice(t,r-n);!this.htmlMode||this.options.recognizeCDATA?((a=(i=this.cbs).oncdatastart)===null||a===void 0||a.call(i),(l=(o=this.cbs).ontext)===null||l===void 0||l.call(o,C),(p=(d=this.cbs).oncdataend)===null||p===void 0||p.call(d)):((E=(g=this.cbs).oncomment)===null||E===void 0||E.call(g,`[CDATA[${C}]]`),(y=(_=this.cbs).oncommentend)===null||y===void 0||y.call(_)),this.startIndex=r+1}onend(){var t,r;if(this.cbs.onclosetag){this.endIndex=this.startIndex;for(let n=0;n=this.buffers[0].length;)this.shiftBuffer();let n=this.buffers[0].slice(t-this.bufferOffset,r-this.bufferOffset);for(;r-this.bufferOffset>this.buffers[0].length;)this.shiftBuffer(),n+=this.buffers[0].slice(0,r-this.bufferOffset);return n}shiftBuffer(){this.bufferOffset+=this.buffers[0].length,this.writeIndex--,this.buffers.shift()}write(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".write() after done!"));return}this.buffers.push(t),this.tokenizer.running&&(this.tokenizer.write(t),this.writeIndex++)}end(t){var r,n;if(this.ended){(n=(r=this.cbs).onerror)===null||n===void 0||n.call(r,new Error(".end() after done!"));return}t&&this.write(t),this.ended=!0,this.tokenizer.end()}pause(){this.tokenizer.pause()}resume(){for(this.tokenizer.resume();this.tokenizer.running&&this.writeIndex{i_();i_();_r();_r();n_();Ko();ui();ui();ui()});var nF,iF,DS=v(()=>{Aw();Fg();yS();G0();OS();nF=fw((e,t,r,n)=>t._useHtmlParser2?NS(e,t):TS(e,t,r,n)),iF=yw(nF,(e,t)=>t._useHtmlParser2?Od(e,t):xS(e))});var kS={};Nn(kS,{contains:()=>Wc,load:()=>iF,merge:()=>ng});var RS=v(()=>{nu();DS()});var PS=Pi((ose,LS)=>{"use strict";var aF=(RS(),B_(kS));function sF(e){let t=aF.load(e),r=[];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:n,attr:i})=>{t(n).each((a,o)=>{t(o).attr(i)&&r.push(t(o).attr(i))})}),r}LS.exports=sF});var BS=Pi((use,FS)=>{"use strict";var{marked:MS}=DA(),oF=PS();FS.exports=function(t,r=!1){MS.setOptions({mangle:!1});let n=MS(t);return oF(n)}});var zS={};Nn(zS,{default:()=>uF,getServer:()=>qS});function qS(e){let t=_0(e),r=US.createServer(async function(n,i){i.setHeader("Access-Control-Allow-Origin","*"),i.setHeader("Access-Control-Allow-Methods","GET, HEAD, POST, OPTIONS, PUT, PATCH, DELETE"),i.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"),i.setHeader("Access-Control-Allow-Credentials","true");try{if(n.url){let a=VS.parse(n.url,!0);if(a.pathname==="/search"){let o=a.query.q,l=await t.search(o);i.statusCode=200,i.setHeader("Content-Type","application/json"),i.end(JSON.stringify(l))}else i.end()}}catch(a){i.statusCode=500,i.end(a)}});return{listen(n){console.debug(`Omnisearch - Starting HTTP server on port ${n}`),r.listen({port:parseInt(n),host:e.settings.DANGER_httpHost??"localhost"},()=>{console.log(`Omnisearch - Started HTTP server on port ${n}`),e.settings.DANGER_httpHost&&e.settings.DANGER_httpHost!=="localhost"?new _l.Notice(`Omnisearch - Started non-localhost HTTP server at ${e.settings.DANGER_httpHost}:${n}`,12e4):e.settings.httpApiNotice&&new _l.Notice(`Omnisearch - Started HTTP server on port ${n}`)}),r.on("error",i=>{console.error(i),new _l.Notice(`Omnisearch - Cannot start HTTP server on ${n}. See console for more details.`)})},close(){r.close(),console.log("Omnisearch - Terminated HTTP server"),e.settings.httpApiEnabled&&e.settings.httpApiNotice&&new _l.Notice("Omnisearch - Terminated HTTP server")}}}var US,VS,_l,uF,YS=v(()=>{US=ln(require("http")),VS=ln(require("url")),_l=require("obsidian");b0();uF=qS});var lF={};Nn(lF,{default:()=>Ch});module.exports=B_(lF);var zn=require("obsidian");Lc();Ao();mr();mr();mr();en();b0();var pd=ln(rA(),1),nA=Symbol.for("Dexie"),md=globalThis[nA]||(globalThis[nA]=pd.default);if(pd.default.semVer!==md.semVer)throw new Error(`Two different versions of Dexie loaded in the same app: ${pd.default.semVer} and ${md.semVer}`);var{liveQuery:ere,mergeRanges:tre,rangesOverlap:rre,RangeSet:nre,cmp:ire,Entity:are,PropModification:sre,replacePrefix:ore,add:ure,remove:cre}=md;var iA=md;var T0=require("obsidian"),qo=class extends iA{constructor(r){super(qo.getDbName(r.app.appId));this.plugin=r;this.version(qo.dbVersion).stores({searchHistory:"++id",minisearch:"date",embeds:"embedded"})}static getDbName(r){return"omnisearch/cache/"+r}async getMinisearchCache(){try{return(await this.plugin.database.minisearch.toArray())[0]}catch(r){return new T0.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(r),null}}async writeMinisearchCache(){let r=this.plugin.searchEngine.getSerializedMiniSearch(),n=this.plugin.searchEngine.getSerializedIndexedDocuments(),i=this.plugin.database;await i.minisearch.clear(),await i.minisearch.add({date:new Date().toISOString(),paths:n,data:r}),console.debug("Omnisearch - Search cache written")}async clearOldDatabases(){let r=(await indexedDB.databases()).filter(n=>n.name===qo.getDbName(this.plugin.app.appId)&&n.version!==qo.dbVersion*10);if(r.length){console.debug("Omnisearch - Those IndexedDb databases will be deleted:");for(let n of r)n.name&&indexedDB.deleteDatabase(n.name)}}async clearCache(){await this.minisearch.clear(),await this.embeds.clear(),new T0.Notice("Omnisearch - Cache cleared. Please restart Obsidian.")}},Pc=qo;Pc.dbVersion=10;function bd(e,t,r,n){function i(a){return a instanceof r?a:new r(function(o){o(a)})}return new(r||(r=Promise))(function(a,o){function l(g){try{p(n.next(g))}catch(E){o(E)}}function d(g){try{p(n.throw(g))}catch(E){o(E)}}function p(g){g.done?a(g.value):i(g.value).then(l,d)}p((n=n.apply(e,t||[])).next())})}var Z6="ENTRIES",cA="KEYS",lA="VALUES",gr="",Mc=class{constructor(t,r){let n=t._tree,i=Array.from(n.keys());this.set=t,this._type=r,this._path=i.length>0?[{node:n,keys:i}]:[]}next(){let t=this.dive();return this.backtrack(),t}dive(){if(this._path.length===0)return{done:!0,value:void 0};let{node:t,keys:r}=zo(this._path);if(zo(r)===gr)return{done:!1,value:this.result()};let n=t.get(zo(r));return this._path.push({node:n,keys:Array.from(n.keys())}),this.dive()}backtrack(){if(this._path.length===0)return;let t=zo(this._path).keys;t.pop(),!(t.length>0)&&(this._path.pop(),this.backtrack())}key(){return this.set._prefix+this._path.map(({keys:t})=>zo(t)).filter(t=>t!==gr).join("")}value(){return zo(this._path).node.get(gr)}result(){switch(this._type){case lA:return this.value();case cA:return this.key();default:return[this.key(),this.value()]}}[Symbol.iterator](){return this}},zo=e=>e[e.length-1],J6=(e,t,r)=>{let n=new Map;if(t===void 0)return n;let i=t.length+1,a=i+r,o=new Uint8Array(a*i).fill(r+1);for(let l=0;l{let d=a*o;e:for(let p of e.keys())if(p===gr){let g=i[d-1];g<=r&&n.set(l,[e.get(p),g])}else{let g=a;for(let E=0;Er)continue e}fA(e.get(p),t,r,n,i,g,o,l+p)}},Ci=class{constructor(t=new Map,r=""){this._size=void 0,this._tree=t,this._prefix=r}atPrefix(t){if(!t.startsWith(this._prefix))throw new Error("Mismatched prefix");let[r,n]=Ed(this._tree,t.slice(this._prefix.length));if(r===void 0){let[i,a]=N0(n);for(let o of i.keys())if(o!==gr&&o.startsWith(a)){let l=new Map;return l.set(o.slice(a.length),i.get(o)),new Ci(l,t)}}return new Ci(r,t)}clear(){this._size=void 0,this._tree.clear()}delete(t){return this._size=void 0,eR(this._tree,t)}entries(){return new Mc(this,Z6)}forEach(t){for(let[r,n]of this)t(r,n,this)}fuzzyGet(t,r){return J6(this._tree,t,r)}get(t){let r=S0(this._tree,t);return r!==void 0?r.get(gr):void 0}has(t){let r=S0(this._tree,t);return r!==void 0&&r.has(gr)}keys(){return new Mc(this,cA)}set(t,r){if(typeof t!="string")throw new Error("key must be a string");return this._size=void 0,x0(this._tree,t).set(gr,r),this}get size(){if(this._size)return this._size;this._size=0;let t=this.entries();for(;!t.next().done;)this._size+=1;return this._size}update(t,r){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;let n=x0(this._tree,t);return n.set(gr,r(n.get(gr))),this}fetch(t,r){if(typeof t!="string")throw new Error("key must be a string");this._size=void 0;let n=x0(this._tree,t),i=n.get(gr);return i===void 0&&n.set(gr,i=r()),i}values(){return new Mc(this,lA)}[Symbol.iterator](){return this.entries()}static from(t){let r=new Ci;for(let[n,i]of t)r.set(n,i);return r}static fromObject(t){return Ci.from(Object.entries(t))}},Ed=(e,t,r=[])=>{if(t.length===0||e==null)return[e,r];for(let n of e.keys())if(n!==gr&&t.startsWith(n))return r.push([e,n]),Ed(e.get(n),t.slice(n.length),r);return r.push([e,t]),Ed(void 0,"",r)},S0=(e,t)=>{if(t.length===0||e==null)return e;for(let r of e.keys())if(r!==gr&&t.startsWith(r))return S0(e.get(r),t.slice(r.length))},x0=(e,t)=>{let r=t.length;e:for(let n=0;e&&n{let[r,n]=Ed(e,t);if(r!==void 0){if(r.delete(gr),r.size===0)dA(n);else if(r.size===1){let[i,a]=r.entries().next().value;hA(n,i,a)}}},dA=e=>{if(e.length===0)return;let[t,r]=N0(e);if(t.delete(r),t.size===0)dA(e.slice(0,-1));else if(t.size===1){let[n,i]=t.entries().next().value;n!==gr&&hA(e.slice(0,-1),n,i)}},hA=(e,t,r)=>{if(e.length===0)return;let[n,i]=N0(e);n.set(i+t,r),n.delete(i)},N0=e=>e[e.length-1],O0="or",pA="and",tR="and_not",Ii=class{constructor(t){if(t?.fields==null)throw new Error('MiniSearch: option "fields" must be provided');let r=t.autoVacuum==null||t.autoVacuum===!0?w0:t.autoVacuum;this._options=Object.assign(Object.assign(Object.assign({},A0),t),{autoVacuum:r,searchOptions:Object.assign(Object.assign({},aA),t.searchOptions||{}),autoSuggestOptions:Object.assign(Object.assign({},sR),t.autoSuggestOptions||{})}),this._index=new Ci,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=I0,this.addFields(this._options.fields)}add(t){let{extractField:r,tokenize:n,processTerm:i,fields:a,idField:o}=this._options,l=r(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);if(this._idToShortId.has(l))throw new Error(`MiniSearch: duplicate ID ${l}`);let d=this.addDocumentId(l);this.saveStoredFields(d,t);for(let p of a){let g=r(t,p);if(g==null)continue;let E=n(g.toString(),p),_=this._fieldIds[p],y=new Set(E).size;this.addFieldLength(d,_,this._documentCount-1,y);for(let C of E){let k=i(C,p);if(Array.isArray(k))for(let P of k)this.addTerm(_,d,P);else k&&this.addTerm(_,d,k)}}}addAll(t){for(let r of t)this.add(r)}addAllAsync(t,r={}){let{chunkSize:n=10}=r,i={chunk:[],promise:Promise.resolve()},{chunk:a,promise:o}=t.reduce(({chunk:l,promise:d},p,g)=>(l.push(p),(g+1)%n===0?{chunk:[],promise:d.then(()=>new Promise(E=>setTimeout(E,0))).then(()=>this.addAll(l))}:{chunk:l,promise:d}),i);return o.then(()=>this.addAll(a))}remove(t){let{tokenize:r,processTerm:n,extractField:i,fields:a,idField:o}=this._options,l=i(t,o);if(l==null)throw new Error(`MiniSearch: document does not have ID field "${o}"`);let d=this._idToShortId.get(l);if(d==null)throw new Error(`MiniSearch: cannot remove document with ID ${l}: it is not in the index`);for(let p of a){let g=i(t,p);if(g==null)continue;let E=r(g.toString(),p),_=this._fieldIds[p],y=new Set(E).size;this.removeFieldLength(d,_,this._documentCount,y);for(let C of E){let k=n(C,p);if(Array.isArray(k))for(let P of k)this.removeTerm(_,d,P);else k&&this.removeTerm(_,d,k)}}this._storedFields.delete(d),this._documentIds.delete(d),this._idToShortId.delete(l),this._fieldLength.delete(d),this._documentCount-=1}removeAll(t){if(t)for(let r of t)this.remove(r);else{if(arguments.length>0)throw new Error("Expected documents to be present. Omit the argument to remove all documents.");this._index=new Ci,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(t){let r=this._idToShortId.get(t);if(r==null)throw new Error(`MiniSearch: cannot discard document with ID ${t}: it is not in the index`);this._idToShortId.delete(t),this._documentIds.delete(r),this._storedFields.delete(r),(this._fieldLength.get(r)||[]).forEach((n,i)=>{this.removeFieldLength(r,i,this._documentCount,n)}),this._fieldLength.delete(r),this._documentCount-=1,this._dirtCount+=1,this.maybeAutoVacuum()}maybeAutoVacuum(){if(this._options.autoVacuum===!1)return;let{minDirtFactor:t,minDirtCount:r,batchSize:n,batchWait:i}=this._options.autoVacuum;this.conditionalVacuum({batchSize:n,batchWait:i},{minDirtCount:r,minDirtFactor:t})}discardAll(t){let r=this._options.autoVacuum;try{this._options.autoVacuum=!1;for(let n of t)this.discard(n)}finally{this._options.autoVacuum=r}this.maybeAutoVacuum()}replace(t){let{idField:r,extractField:n}=this._options,i=n(t,r);this.discard(i),this.add(t)}vacuum(t={}){return this.conditionalVacuum(t)}conditionalVacuum(t,r){return this._currentVacuum?(this._enqueuedVacuumConditions=this._enqueuedVacuumConditions&&r,this._enqueuedVacuum!=null?this._enqueuedVacuum:(this._enqueuedVacuum=this._currentVacuum.then(()=>{let n=this._enqueuedVacuumConditions;return this._enqueuedVacuumConditions=I0,this.performVacuuming(t,n)}),this._enqueuedVacuum)):this.vacuumConditionsMet(r)===!1?Promise.resolve():(this._currentVacuum=this.performVacuuming(t),this._currentVacuum)}performVacuuming(t,r){return bd(this,void 0,void 0,function*(){let n=this._dirtCount;if(this.vacuumConditionsMet(r)){let i=t.batchSize||C0.batchSize,a=t.batchWait||C0.batchWait,o=1;for(let[l,d]of this._index){for(let[p,g]of d)for(let[E]of g)this._documentIds.has(E)||(g.size<=1?d.delete(p):g.delete(E));this._index.get(l).size===0&&this._index.delete(l),o%i===0&&(yield new Promise(p=>setTimeout(p,a))),o+=1}this._dirtCount-=n}yield null,this._currentVacuum=this._enqueuedVacuum,this._enqueuedVacuum=null})}vacuumConditionsMet(t){if(t==null)return!0;let{minDirtCount:r,minDirtFactor:n}=t;return r=r||w0.minDirtCount,n=n||w0.minDirtFactor,this.dirtCount>=r&&this.dirtFactor>=n}get isVacuuming(){return this._currentVacuum!=null}get dirtCount(){return this._dirtCount}get dirtFactor(){return this._dirtCount/(1+this._documentCount+this._dirtCount)}has(t){return this._idToShortId.has(t)}getStoredFields(t){let r=this._idToShortId.get(t);if(r!=null)return this._storedFields.get(r)}search(t,r={}){let n=this.executeQuery(t,r),i=[];for(let[a,{score:o,terms:l,match:d}]of n){let p=l.length||1,g={id:this._documentIds.get(a),score:o*p,terms:Object.keys(d),queryTerms:l,match:d};Object.assign(g,this._storedFields.get(a)),(r.filter==null||r.filter(g))&&i.push(g)}return t===Ii.wildcard&&r.boostDocument==null&&this._options.searchOptions.boostDocument==null||i.sort(oA),i}autoSuggest(t,r={}){r=Object.assign(Object.assign({},this._options.autoSuggestOptions),r);let n=new Map;for(let{score:a,terms:o}of this.search(t,r)){let l=o.join(" "),d=n.get(l);d!=null?(d.score+=a,d.count+=1):n.set(l,{score:a,terms:o,count:1})}let i=[];for(let[a,{score:o,terms:l,count:d}]of n)i.push({suggestion:a,terms:l,score:o/d});return i.sort(oA),i}get documentCount(){return this._documentCount}get termCount(){return this._index.size}static loadJSON(t,r){if(r==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJS(JSON.parse(t),r)}static loadJSONAsync(t,r){return bd(this,void 0,void 0,function*(){if(r==null)throw new Error("MiniSearch: loadJSON should be given the same options used when serializing the index");return this.loadJSAsync(JSON.parse(t),r)})}static getDefault(t){if(A0.hasOwnProperty(t))return y0(A0,t);throw new Error(`MiniSearch: unknown option "${t}"`)}static loadJS(t,r){let{index:n,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,d=this.instantiateMiniSearch(t,r);d._documentIds=gd(i),d._fieldLength=gd(a),d._storedFields=gd(o);for(let[p,g]of d._documentIds)d._idToShortId.set(g,p);for(let[p,g]of n){let E=new Map;for(let _ of Object.keys(g)){let y=g[_];l===1&&(y=y.ds),E.set(parseInt(_,10),gd(y))}d._index.set(p,E)}return d}static loadJSAsync(t,r){return bd(this,void 0,void 0,function*(){let{index:n,documentIds:i,fieldLength:a,storedFields:o,serializationVersion:l}=t,d=this.instantiateMiniSearch(t,r);d._documentIds=yield _d(i),d._fieldLength=yield _d(a),d._storedFields=yield _d(o);for(let[g,E]of d._documentIds)d._idToShortId.set(E,g);let p=0;for(let[g,E]of n){let _=new Map;for(let y of Object.keys(E)){let C=E[y];l===1&&(C=C.ds),_.set(parseInt(y,10),yield _d(C))}++p%1e3===0&&(yield mA(0)),d._index.set(g,_)}return d})}static instantiateMiniSearch(t,r){let{documentCount:n,nextId:i,fieldIds:a,averageFieldLength:o,dirtCount:l,serializationVersion:d}=t;if(d!==1&&d!==2)throw new Error("MiniSearch: cannot deserialize an index created with an incompatible version");let p=new Ii(r);return p._documentCount=n,p._nextId=i,p._idToShortId=new Map,p._fieldIds=a,p._avgFieldLength=o,p._dirtCount=l||0,p._index=new Ci,p}executeQuery(t,r={}){if(t===Ii.wildcard)return this.executeWildcardQuery(r);if(typeof t!="string"){let _=Object.assign(Object.assign(Object.assign({},r),t),{queries:void 0}),y=t.queries.map(C=>this.executeQuery(C,_));return this.combineResults(y,_.combineWith)}let{tokenize:n,processTerm:i,searchOptions:a}=this._options,o=Object.assign(Object.assign({tokenize:n,processTerm:i},a),r),{tokenize:l,processTerm:d}=o,E=l(t).flatMap(_=>d(_)).filter(_=>!!_).map(aR(o)).map(_=>this.executeQuerySpec(_,o));return this.combineResults(E,o.combineWith)}executeQuerySpec(t,r){let n=Object.assign(Object.assign({},this._options.searchOptions),r),i=(n.fields||this._options.fields).reduce((k,P)=>Object.assign(Object.assign({},k),{[P]:y0(n.boost,P)||1}),{}),{boostDocument:a,weights:o,maxFuzzy:l,bm25:d}=n,{fuzzy:p,prefix:g}=Object.assign(Object.assign({},aA.weights),o),E=this._index.get(t.term),_=this.termResults(t.term,t.term,1,t.termBoost,E,i,a,d),y,C;if(t.prefix&&(y=this._index.atPrefix(t.term)),t.fuzzy){let k=t.fuzzy===!0?.2:t.fuzzy,P=k<1?Math.min(l,Math.round(t.term.length*k)):k;P&&(C=this._index.fuzzyGet(t.term,P))}if(y)for(let[k,P]of y){let N=k.length-t.term.length;if(!N)continue;C?.delete(k);let L=g*k.length/(k.length+.3*N);this.termResults(t.term,k,L,t.termBoost,P,i,a,d,_)}if(C)for(let k of C.keys()){let[P,N]=C.get(k);if(!N)continue;let L=p*k.length/(k.length+N);this.termResults(t.term,k,L,t.termBoost,P,i,a,d,_)}return _}executeWildcardQuery(t){let r=new Map,n=Object.assign(Object.assign({},this._options.searchOptions),t);for(let[i,a]of this._documentIds){let o=n.boostDocument?n.boostDocument(a,"",this._storedFields.get(i)):1;r.set(i,{score:o,terms:[],match:{}})}return r}combineResults(t,r=O0){if(t.length===0)return new Map;let n=r.toLowerCase(),i=rR[n];if(!i)throw new Error(`Invalid combination operator: ${r}`);return t.reduce(i)||new Map}toJSON(){let t=[];for(let[r,n]of this._index){let i={};for(let[a,o]of n)i[a]=Object.fromEntries(o);t.push([r,i])}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:t,serializationVersion:2}}termResults(t,r,n,i,a,o,l,d,p=new Map){if(a==null)return p;for(let g of Object.keys(o)){let E=o[g],_=this._fieldIds[g],y=a.get(_);if(y==null)continue;let C=y.size,k=this._avgFieldLength[_];for(let P of y.keys()){if(!this._documentIds.has(P)){this.removeTerm(_,P,r),C-=1;continue}let N=l?l(this._documentIds.get(P),r,this._storedFields.get(P)):1;if(!N)continue;let L=y.get(P),H=this._fieldLength.get(P)[_],R=iR(L,C,this._documentCount,H,k,d),B=n*i*E*N*R,V=p.get(P);if(V){V.score+=B,oR(V.terms,t);let X=y0(V.match,r);X?X.push(g):V.match[r]=[g]}else p.set(P,{score:B,terms:[t],match:{[r]:[g]}})}}return p}addTerm(t,r,n){let i=this._index.fetch(n,uA),a=i.get(t);if(a==null)a=new Map,a.set(r,1),i.set(t,a);else{let o=a.get(r);a.set(r,(o||0)+1)}}removeTerm(t,r,n){if(!this._index.has(n)){this.warnDocumentChanged(r,t,n);return}let i=this._index.fetch(n,uA),a=i.get(t);a==null||a.get(r)==null?this.warnDocumentChanged(r,t,n):a.get(r)<=1?a.size<=1?i.delete(t):a.delete(r):a.set(r,a.get(r)-1),this._index.get(n).size===0&&this._index.delete(n)}warnDocumentChanged(t,r,n){for(let i of Object.keys(this._fieldIds))if(this._fieldIds[i]===r){this._options.logger("warn",`MiniSearch: document with ID ${this._documentIds.get(t)} has changed before removal: term "${n}" was not present in field "${i}". Removing a document after it has changed can corrupt the index!`,"version_conflict");return}}addDocumentId(t){let r=this._nextId;return this._idToShortId.set(t,r),this._documentIds.set(r,t),this._documentCount+=1,this._nextId+=1,r}addFields(t){for(let r=0;rObject.prototype.hasOwnProperty.call(e,t)?e[t]:void 0,rR={[O0]:(e,t)=>{for(let r of t.keys()){let n=e.get(r);if(n==null)e.set(r,t.get(r));else{let{score:i,terms:a,match:o}=t.get(r);n.score=n.score+i,n.match=Object.assign(n.match,o),sA(n.terms,a)}}return e},[pA]:(e,t)=>{let r=new Map;for(let n of t.keys()){let i=e.get(n);if(i==null)continue;let{score:a,terms:o,match:l}=t.get(n);sA(i.terms,o),r.set(n,{score:i.score+a,terms:i.terms,match:Object.assign(i.match,l)})}return r},[tR]:(e,t)=>{for(let r of t.keys())e.delete(r);return e}},nR={k:1.2,b:.7,d:.5},iR=(e,t,r,n,i,a)=>{let{k:o,b:l,d}=a;return Math.log(1+(r-t+.5)/(t+.5))*(d+e*(o+1)/(e+o*(1-l+l*n/i)))},aR=e=>(t,r,n)=>{let i=typeof e.fuzzy=="function"?e.fuzzy(t,r,n):e.fuzzy||!1,a=typeof e.prefix=="function"?e.prefix(t,r,n):e.prefix===!0,o=typeof e.boostTerm=="function"?e.boostTerm(t,r,n):1;return{term:t,fuzzy:i,prefix:a,termBoost:o}},A0={idField:"id",extractField:(e,t)=>e[t],tokenize:e=>e.split(uR),processTerm:e=>e.toLowerCase(),fields:void 0,searchOptions:void 0,storeFields:[],logger:(e,t)=>{typeof console?.[e]=="function"&&console[e](t)},autoVacuum:!0},aA={combineWith:O0,prefix:!1,fuzzy:!1,maxFuzzy:6,boost:{},weights:{fuzzy:.45,prefix:.375},bm25:nR},sR={combineWith:pA,prefix:(e,t,r)=>t===r.length-1},C0={batchSize:1e3,batchWait:10},I0={minDirtFactor:.1,minDirtCount:20},w0=Object.assign(Object.assign({},C0),I0),oR=(e,t)=>{e.includes(t)||e.push(t)},sA=(e,t)=>{for(let r of t)e.includes(r)||e.push(r)},oA=({score:e},{score:t})=>t-e,uA=()=>new Map,gd=e=>{let t=new Map;for(let r of Object.keys(e))t.set(parseInt(r,10),e[r]);return t},_d=e=>bd(void 0,void 0,void 0,function*(){let t=new Map,r=0;for(let n of Object.keys(e))t.set(parseInt(n,10),e[n]),++r%1e3===0&&(yield mA(0));return t}),mA=e=>new Promise(t=>setTimeout(t,e)),uR=/[\n\r\p{Z}\p{P}]+/u;en();Nr();var HS=require("obsidian");Oc();en();Nr();var $S=BS(),Eh=class{constructor(t){this.plugin=t}tokenizeForIndexing(t){try{let r=this.tokenizeWords(t),n=[];if(this.plugin.settings.tokenizeUrls)try{n=$S(t)}catch(a){Ke("Error extracting urls",a)}let i=this.tokenizeTokens(t,{skipChs:!0});return i=[...i.flatMap(a=>[a,...Am(a),...ym(a)]),...r],n.length&&(i=[...i,...n]),i=[...new Set(i)],i}catch(r){return console.error("Error tokenizing text, skipping document",r),[]}}tokenizeForSearch(t){let r=$S(t);t=r.reduce((i,a)=>i.replace(a,""),t);let n=[...this.tokenizeTokens(t),...r].filter(Boolean);return{combineWith:"OR",queries:[{combineWith:"AND",queries:n},{combineWith:"AND",queries:this.tokenizeWords(t).filter(Boolean)},{combineWith:"AND",queries:n.flatMap(Am)},{combineWith:"AND",queries:n.flatMap(ym)}]}}tokenizeWords(t,{skipChs:r=!1}={}){let n=t.split(sv);return r?n:this.tokenizeChsWord(n)}tokenizeTokens(t,{skipChs:r=!1}={}){let n=t.split(yf);return r?n:this.tokenizeChsWord(n)}tokenizeChsWord(t){let r=this.plugin.getChsSegmenter();return r?t.flatMap(n=>nv.test(n)?r.cut(n,{search:!0}):[n]):t}};var vh=class{constructor(t){this.plugin=t;this.indexedDocuments=new Map;this.tokenizer=new Eh(t),this.minisearch=new Ii(this.getOptions())}async loadCache(){await this.plugin.embedsRepository.loadFromCache();let t=await this.plugin.database.getMinisearchCache();return t?(this.minisearch=await Ii.loadJSAsync(t.data,this.getOptions()),this.indexedDocuments=new Map(t.paths.map(r=>[r.path,r.mtime])),!0):(console.log("Omnisearch - No cache found"),!1)}getDocumentsToReindex(t){let r=new Map(t.map(a=>[a.path,a.mtime])),n=t.filter(a=>!this.indexedDocuments.has(a.path)||this.indexedDocuments.get(a.path)!==a.mtime),i=[...this.indexedDocuments].filter(([a,o])=>!r.has(a)||r.get(a)!==o).map(a=>({path:a[0],mtime:a[1]}));return{toAdd:n,toRemove:i}}async addFromPaths(t){Ke("Adding files",t);let r=(await Promise.all(t.map(async i=>await this.plugin.documentsRepository.getDocument(i)))).filter(i=>!!i?.path);Ke("Sorting documents to first index markdown"),r=n0(r,i=>i.path.endsWith(".md")?0:1),this.removeFromPaths(r.filter(i=>this.indexedDocuments.has(i.path)).map(i=>i.path));let n=dv(r,500);for(let i of n){Ke("Indexing into search engine",i),i.forEach(o=>this.indexedDocuments.set(o.path,o.mtime));let a=i.filter(o=>this.minisearch.has(o.path));this.removeFromPaths(a.map(o=>o.path)),await this.minisearch.addAllAsync(i)}}removeFromPaths(t){t.forEach(n=>this.indexedDocuments.delete(n));let r=t.filter(n=>this.minisearch.has(n));this.minisearch.discardAll(r)}async search(t,r){let n=this.plugin.settings;if(t.isEmpty())return[];Ke("=== New search ==="),Ke("Starting search for",t);let i;switch(n.fuzziness){case"0":i=0;break;case"1":i=.1;break;default:i=.2;break}let a=this.tokenizer.tokenizeForSearch(t.segmentsToStr());Ke(JSON.stringify(a,null,1));let o=this.minisearch.search(a,{prefix:E=>E.length>=r.prefixLength,fuzzy:E=>E.length<=3?0:E.length<=5?i/2:i,boost:{basename:n.weightBasename,aliases:n.weightBasename,displayTitle:n.weightBasename,directory:n.weightDirectory,headings1:n.weightH1,headings2:n.weightH2,headings3:n.weightH3,tags:n.weightUnmarkedTags,unmarkedTags:n.weightUnmarkedTags},tokenize:E=>[E],boostDocument(E,_,y){if(!y?.mtime||n.recencyBoost==="0")return 1;let C=y?.mtime,P=(new Date().valueOf()-C)/(24*3600),N={["1"]:-3,["2"]:-.3,["3"]:-.1};return 1+Math.exp(N[n.recencyBoost]*P)}});if(Ke(`Found ${o.length} results`,o),t.query.ext?.length&&(o=o.filter(E=>{let _="."+E.id.split(".").pop();return t.query.ext?.some(y=>_.startsWith(y.startsWith(".")?y:"."+y))})),t.query.path&&(o=o.filter(E=>t.query.path?.some(_=>E.id.toLowerCase().includes(_.toLowerCase())))),t.query.exclude.path&&(o=o.filter(E=>!t.query.exclude.path?.some(_=>E.id.toLowerCase().includes(_.toLowerCase())))),!o.length)return[];if(r.singleFilePath)return o.filter(E=>E.id===r.singleFilePath);Ke("searching with downranked folders",n.downrankedFoldersFilters),n.hideExcluded?o=o.filter(E=>!(this.plugin.app.metadataCache.isUserIgnored&&this.plugin.app.metadataCache.isUserIgnored(E.id))):o.forEach(E=>{this.plugin.app.metadataCache.isUserIgnored&&this.plugin.app.metadataCache.isUserIgnored(E.id)&&(E.score/=10)});let l=t.getTags();for(let E of o){let _=E.id;if(n.downrankedFoldersFilters.length>0){let C=!1;n.downrankedFoldersFilters.forEach(N=>{_.startsWith(N)&&(_===N||_.startsWith(N+"/"))&&(Ke("searching with downranked folders in path: ",_),C=!0)}),C&&(E.score/=10);let k=_.split("/"),P=k.length;for(let N=0;NP.includes(N))&&(Ke(`Boosting field "${C}" x${k} for ${_}`),E.score*=k)}for(let C of l)(E.tags??[]).includes(C)&&(E.score*=100)}Ke("Sorting and limiting results"),o=o.sort((E,_)=>_.score-E.score).slice(0,50),Ke("Filtered results:",o),o.length&&Ke("First result:",o[0]);let d=await Promise.all(o.map(async E=>{let _=await this.plugin.documentsRepository.getDocument(E.id);return _||(console.warn(`Omnisearch - Note "${E.id}" not in the live cache`),hc(!0)),_})),p=t.getExactTerms();p.length&&(Ke("Filtering with quoted terms: ",p),o=o.filter(E=>{let _=d.find(k=>k.path===E.id),y=_?.path.toLowerCase()??"",C=(_?.cleanedContent??"").toLowerCase();return p.every(k=>C.includes(k)||Wi(y,this.plugin.settings.ignoreArabicDiacritics).includes(k))}));let g=t.query.exclude.text;return g.length&&(Ke("Filtering with exclusions"),o=o.filter(E=>{let _=(d.find(y=>y.path===E.id)?.content??"").toLowerCase();return g.every(y=>!_.includes(y))})),Ke("Deduping"),o=o.filter((E,_,y)=>y.findIndex(C=>C.id===E.id)===_),o}async getSuggestions(t,r){let n;this.plugin.settings.simpleSearch?n=await this.search(t,{prefixLength:3,singleFilePath:r?.singleFilePath}):n=await this.search(t,{prefixLength:1,singleFilePath:r?.singleFilePath});let i=await Promise.all(n.map(async l=>await this.plugin.documentsRepository.getDocument(l.id))),a=i.length;for(let l=0;l{Ke("Locating matches for",l.id);let d=i.find(_=>_.path===l.id);d||(console.warn(`Omnisearch - Note "${l.id}" not in the live cache`),d={content:"",basename:l.id,path:l.id});let p=[...l.terms,...t.getExactTerms(),...t.getTags()];Ke("Matching tokens:",p),Ke("Getting matches locations...");let g=this.plugin.textProcessor.getMatches(d.content,p,t);return Ke(`Matches for note "${d.path}"`,g),{score:l.score,foundWords:p,matches:g,isEmbed:l.isEmbed,...d}});return Ke("Suggestions:",o),o}getSerializedMiniSearch(){return this.minisearch.toJSON()}getSerializedIndexedDocuments(){return Array.from(this.indexedDocuments).map(([t,r])=>({path:t,mtime:r}))}getOptions(){return{tokenize:this.tokenizer.tokenizeForIndexing.bind(this.tokenizer),extractField:(t,r)=>{if(r==="directory"){let n=t.path.split("/");return n.pop(),n.join("/")}return t[r]},processTerm:t=>(this.plugin.settings.ignoreDiacritics?Wi(t,this.plugin.settings.ignoreArabicDiacritics):t).toLowerCase(),idField:"path",fields:["basename","directory","aliases","content","headings1","headings2","headings3"],storeFields:["tags","mtime"],logger(t,r,n){n==="version_conflict"&&new HS.Notice("Omnisearch - Your index cache may be incorrect or corrupted. If this message keeps appearing, go to Settings to clear the cache.",5e3)}}}};var xh=require("obsidian");Nr();_c();var Th=class{constructor(t){this.plugin=t;this.documents=new Map;this.errorsCount=0;this.errorsWarned=!1;setInterval(()=>{this.errorsCount>0&&--this.errorsCount},1e3)}async addDocument(t){try{let r=await this.getAndMapIndexedDocument(t);if(!r.path){console.error(`Missing .path field in IndexedDocument "${r.basename}", skipping`);return}this.documents.set(t,r),this.plugin.embedsRepository.refreshEmbedsForNote(t)}catch(r){console.warn(`Omnisearch: Error while adding "${t}" to live cache`,r),this.removeDocument(t),hc()}}removeDocument(t){this.documents.delete(t)}async getDocument(t){if(this.documents.has(t))return this.documents.get(t);Ke("Generating IndexedDocument from",t),await this.addDocument(t);let r=this.documents.get(t);return r||(console.error("Omnisearch",t,"cannot be read"),hc()),r}async getAndMapIndexedDocument(t){t=(0,xh.normalizePath)(t);let r=this.plugin.app,n=r.vault.getAbstractFileByPath(t);if(!n)throw new Error(`Invalid file path: "${t}"`);if(!(n instanceof xh.TFile))throw new Error(`Not a TFile: "${t}"`);let i=null,a=this.plugin.getTextExtractor(),o=this.plugin.getAIImageAnalyzer();if(this.plugin.notesIndexer.isFilePlaintext(t))i=await r.vault.cachedRead(n);else if(Ai(t)){let g=await r.vault.cachedRead(n),E=g?JSON.parse(g):{},_=[];for(let y of E.nodes??[])y.type==="text"?_.push(y.text):y.type==="file"&&_.push(y.file);for(let y of(E.edges??[]).filter(C=>!!C.label))_.push(y.label);i=_.join(`\r +`)}else if(dc(t))try{let g=JSON.parse(await r.vault.cachedRead(n)),E=[],_=y=>{for(let C in y)typeof y[C]=="object"?_(y[C]):C==="content"&&E.push(y[C])};_(g),i=E.join(`\r +`)}catch(g){console.error("Omnisearch: Error while parsing Dataloom file",t),console.error(g)}else Mn(t)&&(this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)||this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n))?(this.plugin.settings.imagesIndexing&&a?.canFileBeExtracted(t)&&(i=await a.extractText(n)),this.plugin.settings.aiImageIndexing&&o?.canBeAnalyzed(n)&&(i=await o.analyzeImage(n)+(i??""))):ti(t)&&this.plugin.settings.PDFIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):fv(t)&&this.plugin.settings.officeIndexing&&a?.canFileBeExtracted(t)?i=await a.extractText(n):this.plugin.notesIndexer.isFilenameIndexable(t)&&(i=n.path);i==null&&(console.warn(`Omnisearch: ${i} content for file`,n.path),i="");let l=r.metadataCache.getFileCache(n);if(l){let g=gv(this.plugin.app,n,l);for(let E of g.filter(_=>!this.documents.has(_))){let _=this.plugin.notesIndexer.generateIndexableNonexistingDocument(E,n.path)}if(l.frontmatter?.["excalidraw-plugin"]){let E=l.sections?.filter(_=>_.type==="comment")??[];for(let{start:_,end:y}of E.map(C=>C.position))i=i.substring(0,_.offset-1)+i.substring(y.offset)}}let d;this.plugin.settings.displayTitle==="#heading"?d=l?.headings?.find(g=>g.level===1)?.heading??"":d=l?.frontmatter?.[this.plugin.settings.displayTitle]??"";let p=lv(l);return{basename:n.basename,displayTitle:d,content:i,cleanedContent:uv(Wi(i)),path:n.path,mtime:n.stat.mtime,tags:p,unmarkedTags:p.map(g=>g.replace("#","")),aliases:cv(l).join(""),headings1:l?Af(l,1).join(" "):"",headings2:l?Af(l,2).join(" "):"",headings3:l?Af(l,3).join(" "):""}}};Nr();_c();Nr();var yh=class{constructor(t){this.plugin=t;this.notesToReindex=new Set}flagNoteForReindex(t){this.notesToReindex.add(t)}async refreshIndex(){for(let r of this.notesToReindex)Ke("Updating file",r.path),await this.plugin.documentsRepository.addDocument(r.path);let t=[...this.notesToReindex].map(r=>r.path);t.length&&(this.plugin.searchEngine.removeFromPaths(t),await this.plugin.searchEngine.addFromPaths(t),this.notesToReindex.clear())}isFileIndexable(t){return this.isFilenameIndexable(t)||this.isContentIndexable(t)}isContentIndexable(t){let r=this.plugin.settings,n=!!this.plugin.getTextExtractor(),i=!!this.plugin.getAIImageAnalyzer(),a=n&&r.PDFIndexing,o=n&&r.imagesIndexing,l=i&&r.aiImageIndexing;return this.isFilePlaintext(t)||Ai(t)||dc(t)||a&&ti(t)||o&&Mn(t)||l&&Mn(t)}isFilenameIndexable(t){return this.canIndexUnsupportedFiles()||this.isFilePlaintext(t)||Ai(t)||dc(t)}canIndexUnsupportedFiles(){return this.plugin.settings.unsupportedFilesIndexing==="yes"||this.plugin.settings.unsupportedFilesIndexing==="default"&&!!this.plugin.app.vault.getConfig("showUnsupportedFiles")}generateIndexableNonexistingDocument(t,r){return t=Nm(t),{path:t+(t.endsWith(".md")?"":".md"),basename:t,displayTitle:"",mtime:0,content:"",cleanedContent:"",tags:[],unmarkedTags:[],aliases:"",headings1:"",headings2:"",headings3:"",doesNotExist:!0,parent:r}}isFilePlaintext(t){return[...this.plugin.settings.indexedFileTypes,"md"].some(r=>t.endsWith(`.${r}`))}};s0();var wh=require("obsidian");Nr();var Ah=class{constructor(t){this.plugin=t;this.embeds=new Map}addEmbed(t,r){this.embeds.has(t)||this.embeds.set(t,new Set),this.embeds.get(t).add(r)}removeFile(t){this.embeds.delete(t),this.refreshEmbedsForNote(t)}renameFile(t,r){this.embeds.has(t)&&(this.embeds.set(r,this.embeds.get(t)),this.embeds.delete(t)),this.embeds.forEach((n,i)=>{n.has(t)&&(n.delete(t),n.add(r))})}refreshEmbedsForNote(t){this.embeds.forEach((r,n)=>{r.has(t)&&r.delete(t)}),this.addEmbedsForNote(t)}getEmbeds(t){return this.embeds.has(t)?[...this.embeds.get(t)]:[]}async writeToCache(){Ke("Writing embeds to cache");let t=this.plugin.database,r=[];for(let[n,i]of this.embeds)r.push({embedded:n,referencedBy:[...i]});await t.embeds.clear(),await t.embeds.bulkAdd(r)}async loadFromCache(){try{let t=this.plugin.database;if(!t.embeds){Ke("No embeds in cache");return}Ke("Loading embeds from cache");let r=await t.embeds.toArray();for(let{embedded:n,referencedBy:i}of r)for(let a of i)this.addEmbed(n,a)}catch{this.plugin.database.clearCache(),console.error("Omnisearch - Error while loading embeds cache"),new wh.Notice("Omnisearch - There was an error while loading the cache. Please restart Obsidian.")}}addEmbedsForNote(t){let r=(this.plugin.app.metadataCache.getCache(t)?.embeds??[]).map(n=>this.plugin.app.metadataCache.getFirstLinkpathDest((0,wh.getLinkpath)(n.link),t)).filter(n=>!!n);for(let n of r)this.addEmbed(n.path,t)}};var Sh=class{constructor(t){this.plugin=t;this.nextQueryIsEmpty=!1}async addToHistory(t){if(!t){this.nextQueryIsEmpty=!0;return}this.nextQueryIsEmpty=!1;let r=this.plugin.database,n=await r.searchHistory.toArray();n=n.filter(i=>i.query!==t).reverse(),n.unshift({query:t}),n=n.slice(0,10),await r.searchHistory.clear(),await r.searchHistory.bulkAdd(n)}async getHistory(){let t=(await this.plugin.database.searchHistory.toArray()).reverse().map(r=>r.query);return this.nextQueryIsEmpty&&t.unshift(""),t}};var Ch=class extends zn.Plugin{constructor(r,n){super(r,n);this.apiHttpServer=null;this.settings=Dc(this.app);this.embedsRepository=new Ah(this);this.database=new Pc(this);this.notesIndexer=new yh(this);this.textProcessor=new id(this);this.searchEngine=new vh(this);this.searchHistory=new Sh(this);this.documentsRepository=new Th(this)}async onload(){if(this.settings=await Dy(this),this.addSettingTab(new nd(this)),zn.Platform.isMobile||Promise.resolve().then(()=>(YS(),zS)).then(i=>this.apiHttpServer=i.getServer(this)),If(this.app)){console.debug("Plugin disabled");return}await cF(this.app),await this.database.clearOldDatabases(),tA(this);let r=this.settings;r.ribbonIcon&&this.addRibbonButton(),Me.disable("vault"),Me.disable("infile"),Me.on("global",xf.ToggleExcerpts,()=>{Fa.set(!r.showExcerpt)}),this.addCommand({id:"show-modal",name:"Vault search",callback:()=>{new ta(this).open()}}),this.addCommand({id:"show-modal-infile",name:"In-file search",editorCallback:(i,a)=>{a.file&&new ks(this,a.file).open()}});let n=this.searchEngine;this.app.workspace.onLayoutReady(async()=>{this.registerEvent(this.app.vault.on("create",i=>{i instanceof zn.TFile&&this.notesIndexer.isFileIndexable(i.path)&&(Ke("Indexing new file",i.path),n.addFromPaths([i.path]),this.embedsRepository.refreshEmbedsForNote(i.path))})),this.registerEvent(this.app.vault.on("delete",i=>{i instanceof zn.TFile&&(Ke("Removing file",i.path),this.documentsRepository.removeDocument(i.path),n.removeFromPaths([i.path]),this.embedsRepository.removeFile(i.path))})),this.registerEvent(this.app.vault.on("modify",async i=>{i instanceof zn.TFile&&(this.notesIndexer.isFileIndexable(i.path)&&this.notesIndexer.flagNoteForReindex(i),this.embedsRepository.refreshEmbedsForNote(i.path))})),this.registerEvent(this.app.vault.on("rename",async(i,a)=>{i instanceof zn.TFile&&this.notesIndexer.isFileIndexable(i.path)&&(Ke("Renaming file",i.path),this.documentsRepository.removeDocument(a),await this.documentsRepository.addDocument(i.path),n.removeFromPaths([a]),await n.addFromPaths([i.path]),this.embedsRepository.renameFile(a,i.path))})),this.refreshIndexCallback=this.notesIndexer.refreshIndex.bind(this.notesIndexer),addEventListener("blur",this.refreshIndexCallback),removeEventListener,await this.executeFirstLaunchTasks(),await this.populateIndex(),this.apiHttpServer&&r.httpApiEnabled&&this.apiHttpServer.listen(r.httpApiPort)})}async executeFirstLaunchTasks(){let r="1.21.0";this.settings.welcomeMessage=r,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",r=>{new ta(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"),Ca.set(2);let r=this.app.vault.getFiles().filter(a=>this.notesIndexer.isFileIndexable(a.path));console.debug(`${r.length} files total`),console.debug(`Cache is ${Qi()?"enabled":"disabled"}`);let n=this.searchEngine;Qi()&&(console.time("Loading index from cache"),Ca.set(1),await n.loadCache()&&console.timeEnd("Loading index from cache"));let i=n.getDocumentsToReindex(r.map(a=>({path:a.path,mtime:a.stat.mtime})));if(Qi()&&(i.toAdd.length&&console.debug("Total number of files to add/update: "+i.toAdd.length),i.toRemove.length&&console.debug("Total number of files to remove: "+i.toRemove.length)),i.toAdd.length>=1e3&&Qi()&&new zn.Notice(`${i.toAdd.length} files need to be indexed. Obsidian may experience stutters and freezes during the process`,1e4),Ca.set(3),n.removeFromPaths(i.toRemove.map(a=>a.path)),await n.addFromPaths(i.toAdd.map(a=>a.path)),(i.toRemove.length||i.toAdd.length)&&Qi()){Ca.set(4);let a=this.settings.useCache;a&&!this.settings.DANGER_forceSaveCache&&(this.settings.useCache=!1,await ke(this)),await this.database.writeMinisearchCache(),await this.embedsRepository.writeToCache(),a&&(this.settings.useCache=!0,await ke(this))}console.timeEnd("Indexing total time"),i.toAdd.length>=1e3&&Qi()&&new zn.Notice("Your files have been indexed."),Ca.set(0),eA()}};async function cF(e){let t=[`${e.vault.configDir}/plugins/omnisearch/searchIndex.json`,`${e.vault.configDir}/plugins/omnisearch/notesCache.json`,`${e.vault.configDir}/plugins/omnisearch/notesCache.data`,`${e.vault.configDir}/plugins/omnisearch/searchIndex.data`,`${e.vault.configDir}/plugins/omnisearch/historyCache.json`,`${e.vault.configDir}/plugins/omnisearch/pdfCache.data`];for(let r of t)if(await e.vault.adapter.exists(r))try{await e.vault.adapter.remove(r)}catch{}} +/*! Bundled license information: + +lodash-es/lodash.js: + (** + * @license + * Lodash (Custom Build) + * Build: `lodash modularize exports="es" -o ./` + * Copyright OpenJS Foundation and other contributors + * Released under MIT license + * Based on Underscore.js 1.8.3 + * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + *) + +search-query-parser/lib/search-query-parser.js: + (*! + * search-query-parser.js + * Copyright(c) 2014-2019 + * MIT Licensed + *) + +dexie/dist/dexie.js: + (*! ***************************************************************************** + Copyright (c) Microsoft Corporation. + Permission to use, copy, modify, and/or distribute this software for any + purpose with or without fee is hereby granted. + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH + REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, + INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM + LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR + OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + PERFORMANCE OF THIS SOFTWARE. + ***************************************************************************** *) +*/ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/omnisearch/manifest.json b/.obsidian/plugins/omnisearch/manifest.json new file mode 100644 index 00000000..279a1185 --- /dev/null +++ b/.obsidian/plugins/omnisearch/manifest.json @@ -0,0 +1,14 @@ +{ + "id": "omnisearch", + "name": "Omnisearch", + "version": "1.27.1", + "minAppVersion": "1.7.2", + "description": "A search engine that just works", + "author": "Simon Cambier", + "authorUrl": "https://github.com/scambier/obsidian-omnisearch", + "fundingUrl": { + "Github": "https://github.com/sponsors/scambier", + "Ko-fi": "https://ko-fi.com/scambier" + }, + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/omnisearch/styles.css b/.obsidian/plugins/omnisearch/styles.css new file mode 100644 index 00000000..8b0c6c69 --- /dev/null +++ b/.obsidian/plugins/omnisearch/styles.css @@ -0,0 +1,135 @@ +.omnisearch-modal { +} + +.omnisearch-result { + white-space: normal; + display: flex; + flex-direction: row; + /* justify-content: space-between; */ + flex-wrap: nowrap; +} + +.omnisearch-result__title-container { + display: flex; + align-items: center; + justify-content: space-between; + column-gap: 5px; + flex-wrap: wrap; +} + +.omnisearch-result__title { + white-space: pre-wrap; + align-items: center; + display: flex; + gap: 5px; +} + +.omnisearch-result__title > span { +} + +.omnisearch-result__folder-path { + font-size: 0.75rem; + align-items: center; + display: flex; + gap: 5px; + color: var(--text-muted); +} + +.omnisearch-result__extension { + font-size: 0.7rem; + color: var(--text-muted); +} + +.omnisearch-result__counter { + font-size: 0.7rem; + color: var(--text-muted); +} + +.omnisearch-result__body { + white-space: normal; + font-size: small; + word-wrap: normal; + + overflow: hidden; + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + + color: var(--text-muted); + margin-inline-start: 0.5em; +} + +.omnisearch-result__embed { + margin-left: 1em; +} + + +.omnisearch-result__image-container { + flex-basis: 20%; + text-align: end; +} + +.omnisearch-highlight { +} + +.omnisearch-default-highlight { + text-decoration: underline; + text-decoration-color: var(--text-highlight-bg); + text-decoration-thickness: 3px; + text-underline-offset: -1px; + text-decoration-skip-ink: none; +} + +.omnisearch-input-container { + display: flex; + align-items: center; + flex-direction: row; + gap: 5px; +} + +.omnisearch-result__icon { + display: inline-block; + vertical-align: middle; + width: 16px; + height: 16px; + margin-right: 4px; +} + +.omnisearch-result__icon svg { + width: 100%; + height: 100%; +} + +.omnisearch-result__icon--emoji { + font-size: 16px; + vertical-align: middle; + margin-right: 4px; +} + +@media only screen and (max-width: 600px) { + .omnisearch-input-container { + flex-direction: column; + } + + .omnisearch-input-container__buttons { + display: flex; + flex-direction: row; + width: 100%; + padding: 0 1em 0 1em; + gap: 1em; + } + .omnisearch-input-container__buttons > button { + flex-grow: 1; + } +} + +@media only screen and (min-width: 600px) { + .omnisearch-input-container__buttons { + margin-inline-end: 1em; + } +} + +.omnisearch-input-field { + position: relative; + flex-grow: 1; +} diff --git a/.obsidian/plugins/oz-image-plugin/main.js b/.obsidian/plugins/oz-image-plugin/main.js new file mode 100644 index 00000000..405eb80a --- /dev/null +++ b/.obsidian/plugins/oz-image-plugin/main.js @@ -0,0 +1,191 @@ +/* +THIS IS A GENERATED/BUNDLED FILE +If you want to view the source, visit the plugins github repository +https://github.com/ozntel/oz-image-in-editor-obsidian +*/ + +var cu=Object.create;var Se=Object.defineProperty;var su=Object.getOwnPropertyDescriptor;var lu=Object.getOwnPropertyNames,Rr=Object.getOwnPropertySymbols,fu=Object.getPrototypeOf,Ir=Object.prototype.hasOwnProperty,pu=Object.prototype.propertyIsEnumerable;var Fr=(e,n,r)=>n in e?Se(e,n,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[n]=r,cr=(e,n)=>{for(var r in n||(n={}))Ir.call(n,r)&&Fr(e,r,n[r]);if(Rr)for(var r of Rr(n))pu.call(n,r)&&Fr(e,r,n[r]);return e};var jr=e=>Se(e,"__esModule",{value:!0});var H=(e,n)=>()=>(n||e((n={exports:{}}).exports,n),n.exports),mu=(e,n)=>{jr(e);for(var r in n)Se(e,r,{get:n[r],enumerable:!0})},hu=(e,n,r)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of lu(n))!Ir.call(e,a)&&a!=="default"&&Se(e,a,{get:()=>n[a],enumerable:!(r=su(n,a))||r.enumerable});return e},Z=e=>hu(jr(Se(e!=null?cu(fu(e)):{},"default",e&&e.__esModule&&"default"in e?{get:()=>e.default,enumerable:!0}:{value:e,enumerable:!0})),e);var ne=(e,n,r)=>new Promise((a,d)=>{var o=_=>{try{m(r.next(_))}catch(x){d(x)}},c=_=>{try{m(r.throw(_))}catch(x){d(x)}},m=_=>_.done?a(_.value):Promise.resolve(_.value).then(o,c);m((r=r.apply(e,n)).next())});var Vr=H((Ur,Ue)=>{(function(){function e(i){"use strict";var t={omitExtraWLInCodeBlocks:{defaultValue:!1,describe:"Omit the default extra whiteline added to code blocks",type:"boolean"},noHeaderId:{defaultValue:!1,describe:"Turn on/off generated header id",type:"boolean"},prefixHeaderId:{defaultValue:!1,describe:"Add a prefix to the generated header ids. Passing a string will prefix that string to the header id. Setting to true will add a generic 'section-' prefix",type:"string"},rawPrefixHeaderId:{defaultValue:!1,describe:'Setting this option to true will prevent showdown from modifying the prefix. This might result in malformed IDs (if, for instance, the " char is used in the prefix)',type:"boolean"},ghCompatibleHeaderId:{defaultValue:!1,describe:"Generate header ids compatible with github style (spaces are replaced with dashes, a bunch of non alphanumeric chars are removed)",type:"boolean"},rawHeaderId:{defaultValue:!1,describe:`Remove only spaces, ' and " from generated header ids (including prefixes), replacing them with dashes (-). WARNING: This might result in malformed ids`,type:"boolean"},headerLevelStart:{defaultValue:!1,describe:"The header blocks level start",type:"integer"},parseImgDimensions:{defaultValue:!1,describe:"Turn on/off image dimension parsing",type:"boolean"},simplifiedAutoLink:{defaultValue:!1,describe:"Turn on/off GFM autolink style",type:"boolean"},excludeTrailingPunctuationFromURLs:{defaultValue:!1,describe:"Excludes trailing punctuation from links generated with autoLinking",type:"boolean"},literalMidWordUnderscores:{defaultValue:!1,describe:"Parse midword underscores as literal underscores",type:"boolean"},literalMidWordAsterisks:{defaultValue:!1,describe:"Parse midword asterisks as literal asterisks",type:"boolean"},strikethrough:{defaultValue:!1,describe:"Turn on/off strikethrough support",type:"boolean"},tables:{defaultValue:!1,describe:"Turn on/off tables support",type:"boolean"},tablesHeaderId:{defaultValue:!1,describe:"Add an id to table headers",type:"boolean"},ghCodeBlocks:{defaultValue:!0,describe:"Turn on/off GFM fenced code blocks support",type:"boolean"},tasklists:{defaultValue:!1,describe:"Turn on/off GFM tasklist support",type:"boolean"},smoothLivePreview:{defaultValue:!1,describe:"Prevents weird effects in live previews due to incomplete input",type:"boolean"},smartIndentationFix:{defaultValue:!1,description:"Tries to smartly fix indentation in es6 strings",type:"boolean"},disableForced4SpacesIndentedSublists:{defaultValue:!1,description:"Disables the requirement of indenting nested sublists by 4 spaces",type:"boolean"},simpleLineBreaks:{defaultValue:!1,description:"Parses simple line breaks as
    (GFM Style)",type:"boolean"},requireSpaceBeforeHeadingText:{defaultValue:!1,description:"Makes adding a space between `#` and the header text mandatory (GFM Style)",type:"boolean"},ghMentions:{defaultValue:!1,description:"Enables github @mentions",type:"boolean"},ghMentionsLink:{defaultValue:"https://github.com/{u}",description:"Changes the link generated by @mentions. Only applies if ghMentions option is enabled.",type:"string"},encodeEmails:{defaultValue:!0,description:"Encode e-mail addresses through the use of Character Entities, transforming ASCII e-mail addresses into its equivalent decimal entities",type:"boolean"},openLinksInNewWindow:{defaultValue:!1,description:"Open all links in new windows",type:"boolean"},backslashEscapesHTMLTags:{defaultValue:!1,description:"Support for HTML Tag escaping. ex:
    foo
    ",type:"boolean"},emoji:{defaultValue:!1,description:"Enable emoji support. Ex: `this is a :smile: emoji`",type:"boolean"},underline:{defaultValue:!1,description:"Enable support for underline. Syntax is double or triple underscores: `__underline word__`. With this option enabled, underscores no longer parses into `` and ``",type:"boolean"},completeHTMLDocument:{defaultValue:!1,description:"Outputs a complete html document, including ``, `` and `` tags",type:"boolean"},metadata:{defaultValue:!1,description:"Enable support for document metadata (defined at the top of the document between `\xAB\xAB\xAB` and `\xBB\xBB\xBB` or between `---` and `---`).",type:"boolean"},splitAdjacentBlockquotes:{defaultValue:!1,description:"Split adjacent blockquote blocks",type:"boolean"}};if(i===!1)return JSON.parse(JSON.stringify(t));var u={};for(var s in t)t.hasOwnProperty(s)&&(u[s]=t[s].defaultValue);return u}function n(){"use strict";var i=e(!0),t={};for(var u in i)i.hasOwnProperty(u)&&(t[u]=!0);return t}var r={},a={},d={},o=e(!0),c="vanilla",m={github:{omitExtraWLInCodeBlocks:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,disableForced4SpacesIndentedSublists:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghCompatibleHeaderId:!0,ghMentions:!0,backslashEscapesHTMLTags:!0,emoji:!0,splitAdjacentBlockquotes:!0},original:{noHeaderId:!0,ghCodeBlocks:!1},ghost:{omitExtraWLInCodeBlocks:!0,parseImgDimensions:!0,simplifiedAutoLink:!0,excludeTrailingPunctuationFromURLs:!0,literalMidWordUnderscores:!0,strikethrough:!0,tables:!0,tablesHeaderId:!0,ghCodeBlocks:!0,tasklists:!0,smoothLivePreview:!0,simpleLineBreaks:!0,requireSpaceBeforeHeadingText:!0,ghMentions:!1,encodeEmails:!0},vanilla:e(!0),allOn:n()};r.helper={},r.extensions={},r.setOption=function(i,t){"use strict";return o[i]=t,this},r.getOption=function(i){"use strict";return o[i]},r.getOptions=function(){"use strict";return o},r.resetOptions=function(){"use strict";o=e(!0)},r.setFlavor=function(i){"use strict";if(!m.hasOwnProperty(i))throw Error(i+" flavor was not found");r.resetOptions();var t=m[i];c=i;for(var u in t)t.hasOwnProperty(u)&&(o[u]=t[u])},r.getFlavor=function(){"use strict";return c},r.getFlavorOptions=function(i){"use strict";if(m.hasOwnProperty(i))return m[i]},r.getDefaultOptions=function(i){"use strict";return e(i)},r.subParser=function(i,t){"use strict";if(r.helper.isString(i))if(typeof t!="undefined")a[i]=t;else{if(a.hasOwnProperty(i))return a[i];throw Error("SubParser named "+i+" not registered!")}},r.extension=function(i,t){"use strict";if(!r.helper.isString(i))throw Error("Extension 'name' must be a string");if(i=r.helper.stdExtName(i),r.helper.isUndefined(t)){if(!d.hasOwnProperty(i))throw Error("Extension named "+i+" is not registered!");return d[i]}else{typeof t=="function"&&(t=t()),r.helper.isArray(t)||(t=[t]);var u=_(t,i);if(u.valid)d[i]=t;else throw Error(u.error)}},r.getAllExtensions=function(){"use strict";return d},r.removeExtension=function(i){"use strict";delete d[i]},r.resetExtensions=function(){"use strict";d={}};function _(i,t){"use strict";var u=t?"Error in "+t+" extension->":"Error in unnamed extension",s={valid:!0,error:""};r.helper.isArray(i)||(i=[i]);for(var p=0;p").replace(/&/g,"&")};var S=function(i,t,u,s){"use strict";var p=s||"",h=p.indexOf("g")>-1,f=new RegExp(t+"|"+u,"g"+p.replace(/g/g,"")),g=new RegExp(t,p.replace(/g/g,"")),T=[],b,w,y,l,k;do for(b=0;y=f.exec(i);)if(g.test(y[0]))b++||(w=f.lastIndex,l=w-y[0].length);else if(b&&!--b){k=y.index+y[0].length;var C={left:{start:l,end:w},match:{start:w,end:y.index},right:{start:y.index,end:k},wholeMatch:{start:l,end:k}};if(T.push(C),!h)return T}while(b&&(f.lastIndex=w));return T};r.helper.matchRecursiveRegExp=function(i,t,u,s){"use strict";for(var p=S(i,t,u,s),h=[],f=0;f0){var b=[];f[0].wholeMatch.start!==0&&b.push(i.slice(0,f[0].wholeMatch.start));for(var w=0;w=0?s+(u||0):s},r.helper.splitAtIndex=function(i,t){"use strict";if(!r.helper.isString(i))throw"InvalidArgumentError: first parameter of showdown.helper.regexIndexOf function must be a string";return[i.substring(0,t),i.substring(t)]},r.helper.encodeEmailAddress=function(i){"use strict";var t=[function(u){return"&#"+u.charCodeAt(0)+";"},function(u){return"&#x"+u.charCodeAt(0).toString(16)+";"},function(u){return u}];return i=i.replace(/./g,function(u){if(u==="@")u=t[Math.floor(Math.random()*2)](u);else{var s=Math.random();u=s>.9?t[2](u):s>.45?t[1](u):t[0](u)}return u}),i},r.helper.padEnd=function(t,u,s){"use strict";return u=u>>0,s=String(s||" "),t.length>u?String(t):(u=u-t.length,u>s.length&&(s+=s.repeat(u/s.length)),String(t)+s.slice(0,u))},typeof console=="undefined"&&(console={warn:function(i){"use strict";alert(i)},log:function(i){"use strict";alert(i)},error:function(i){"use strict";throw i}}),r.helper.regexes={asteriskDashAndColon:/([*_:~])/g},r.helper.emojis={"+1":"\u{1F44D}","-1":"\u{1F44E}","100":"\u{1F4AF}","1234":"\u{1F522}","1st_place_medal":"\u{1F947}","2nd_place_medal":"\u{1F948}","3rd_place_medal":"\u{1F949}","8ball":"\u{1F3B1}",a:"\u{1F170}\uFE0F",ab:"\u{1F18E}",abc:"\u{1F524}",abcd:"\u{1F521}",accept:"\u{1F251}",aerial_tramway:"\u{1F6A1}",airplane:"\u2708\uFE0F",alarm_clock:"\u23F0",alembic:"\u2697\uFE0F",alien:"\u{1F47D}",ambulance:"\u{1F691}",amphora:"\u{1F3FA}",anchor:"\u2693\uFE0F",angel:"\u{1F47C}",anger:"\u{1F4A2}",angry:"\u{1F620}",anguished:"\u{1F627}",ant:"\u{1F41C}",apple:"\u{1F34E}",aquarius:"\u2652\uFE0F",aries:"\u2648\uFE0F",arrow_backward:"\u25C0\uFE0F",arrow_double_down:"\u23EC",arrow_double_up:"\u23EB",arrow_down:"\u2B07\uFE0F",arrow_down_small:"\u{1F53D}",arrow_forward:"\u25B6\uFE0F",arrow_heading_down:"\u2935\uFE0F",arrow_heading_up:"\u2934\uFE0F",arrow_left:"\u2B05\uFE0F",arrow_lower_left:"\u2199\uFE0F",arrow_lower_right:"\u2198\uFE0F",arrow_right:"\u27A1\uFE0F",arrow_right_hook:"\u21AA\uFE0F",arrow_up:"\u2B06\uFE0F",arrow_up_down:"\u2195\uFE0F",arrow_up_small:"\u{1F53C}",arrow_upper_left:"\u2196\uFE0F",arrow_upper_right:"\u2197\uFE0F",arrows_clockwise:"\u{1F503}",arrows_counterclockwise:"\u{1F504}",art:"\u{1F3A8}",articulated_lorry:"\u{1F69B}",artificial_satellite:"\u{1F6F0}",astonished:"\u{1F632}",athletic_shoe:"\u{1F45F}",atm:"\u{1F3E7}",atom_symbol:"\u269B\uFE0F",avocado:"\u{1F951}",b:"\u{1F171}\uFE0F",baby:"\u{1F476}",baby_bottle:"\u{1F37C}",baby_chick:"\u{1F424}",baby_symbol:"\u{1F6BC}",back:"\u{1F519}",bacon:"\u{1F953}",badminton:"\u{1F3F8}",baggage_claim:"\u{1F6C4}",baguette_bread:"\u{1F956}",balance_scale:"\u2696\uFE0F",balloon:"\u{1F388}",ballot_box:"\u{1F5F3}",ballot_box_with_check:"\u2611\uFE0F",bamboo:"\u{1F38D}",banana:"\u{1F34C}",bangbang:"\u203C\uFE0F",bank:"\u{1F3E6}",bar_chart:"\u{1F4CA}",barber:"\u{1F488}",baseball:"\u26BE\uFE0F",basketball:"\u{1F3C0}",basketball_man:"\u26F9\uFE0F",basketball_woman:"\u26F9\uFE0F‍\u2640\uFE0F",bat:"\u{1F987}",bath:"\u{1F6C0}",bathtub:"\u{1F6C1}",battery:"\u{1F50B}",beach_umbrella:"\u{1F3D6}",bear:"\u{1F43B}",bed:"\u{1F6CF}",bee:"\u{1F41D}",beer:"\u{1F37A}",beers:"\u{1F37B}",beetle:"\u{1F41E}",beginner:"\u{1F530}",bell:"\u{1F514}",bellhop_bell:"\u{1F6CE}",bento:"\u{1F371}",biking_man:"\u{1F6B4}",bike:"\u{1F6B2}",biking_woman:"\u{1F6B4}‍\u2640\uFE0F",bikini:"\u{1F459}",biohazard:"\u2623\uFE0F",bird:"\u{1F426}",birthday:"\u{1F382}",black_circle:"\u26AB\uFE0F",black_flag:"\u{1F3F4}",black_heart:"\u{1F5A4}",black_joker:"\u{1F0CF}",black_large_square:"\u2B1B\uFE0F",black_medium_small_square:"\u25FE\uFE0F",black_medium_square:"\u25FC\uFE0F",black_nib:"\u2712\uFE0F",black_small_square:"\u25AA\uFE0F",black_square_button:"\u{1F532}",blonde_man:"\u{1F471}",blonde_woman:"\u{1F471}‍\u2640\uFE0F",blossom:"\u{1F33C}",blowfish:"\u{1F421}",blue_book:"\u{1F4D8}",blue_car:"\u{1F699}",blue_heart:"\u{1F499}",blush:"\u{1F60A}",boar:"\u{1F417}",boat:"\u26F5\uFE0F",bomb:"\u{1F4A3}",book:"\u{1F4D6}",bookmark:"\u{1F516}",bookmark_tabs:"\u{1F4D1}",books:"\u{1F4DA}",boom:"\u{1F4A5}",boot:"\u{1F462}",bouquet:"\u{1F490}",bowing_man:"\u{1F647}",bow_and_arrow:"\u{1F3F9}",bowing_woman:"\u{1F647}‍\u2640\uFE0F",bowling:"\u{1F3B3}",boxing_glove:"\u{1F94A}",boy:"\u{1F466}",bread:"\u{1F35E}",bride_with_veil:"\u{1F470}",bridge_at_night:"\u{1F309}",briefcase:"\u{1F4BC}",broken_heart:"\u{1F494}",bug:"\u{1F41B}",building_construction:"\u{1F3D7}",bulb:"\u{1F4A1}",bullettrain_front:"\u{1F685}",bullettrain_side:"\u{1F684}",burrito:"\u{1F32F}",bus:"\u{1F68C}",business_suit_levitating:"\u{1F574}",busstop:"\u{1F68F}",bust_in_silhouette:"\u{1F464}",busts_in_silhouette:"\u{1F465}",butterfly:"\u{1F98B}",cactus:"\u{1F335}",cake:"\u{1F370}",calendar:"\u{1F4C6}",call_me_hand:"\u{1F919}",calling:"\u{1F4F2}",camel:"\u{1F42B}",camera:"\u{1F4F7}",camera_flash:"\u{1F4F8}",camping:"\u{1F3D5}",cancer:"\u264B\uFE0F",candle:"\u{1F56F}",candy:"\u{1F36C}",canoe:"\u{1F6F6}",capital_abcd:"\u{1F520}",capricorn:"\u2651\uFE0F",car:"\u{1F697}",card_file_box:"\u{1F5C3}",card_index:"\u{1F4C7}",card_index_dividers:"\u{1F5C2}",carousel_horse:"\u{1F3A0}",carrot:"\u{1F955}",cat:"\u{1F431}",cat2:"\u{1F408}",cd:"\u{1F4BF}",chains:"\u26D3",champagne:"\u{1F37E}",chart:"\u{1F4B9}",chart_with_downwards_trend:"\u{1F4C9}",chart_with_upwards_trend:"\u{1F4C8}",checkered_flag:"\u{1F3C1}",cheese:"\u{1F9C0}",cherries:"\u{1F352}",cherry_blossom:"\u{1F338}",chestnut:"\u{1F330}",chicken:"\u{1F414}",children_crossing:"\u{1F6B8}",chipmunk:"\u{1F43F}",chocolate_bar:"\u{1F36B}",christmas_tree:"\u{1F384}",church:"\u26EA\uFE0F",cinema:"\u{1F3A6}",circus_tent:"\u{1F3AA}",city_sunrise:"\u{1F307}",city_sunset:"\u{1F306}",cityscape:"\u{1F3D9}",cl:"\u{1F191}",clamp:"\u{1F5DC}",clap:"\u{1F44F}",clapper:"\u{1F3AC}",classical_building:"\u{1F3DB}",clinking_glasses:"\u{1F942}",clipboard:"\u{1F4CB}",clock1:"\u{1F550}",clock10:"\u{1F559}",clock1030:"\u{1F565}",clock11:"\u{1F55A}",clock1130:"\u{1F566}",clock12:"\u{1F55B}",clock1230:"\u{1F567}",clock130:"\u{1F55C}",clock2:"\u{1F551}",clock230:"\u{1F55D}",clock3:"\u{1F552}",clock330:"\u{1F55E}",clock4:"\u{1F553}",clock430:"\u{1F55F}",clock5:"\u{1F554}",clock530:"\u{1F560}",clock6:"\u{1F555}",clock630:"\u{1F561}",clock7:"\u{1F556}",clock730:"\u{1F562}",clock8:"\u{1F557}",clock830:"\u{1F563}",clock9:"\u{1F558}",clock930:"\u{1F564}",closed_book:"\u{1F4D5}",closed_lock_with_key:"\u{1F510}",closed_umbrella:"\u{1F302}",cloud:"\u2601\uFE0F",cloud_with_lightning:"\u{1F329}",cloud_with_lightning_and_rain:"\u26C8",cloud_with_rain:"\u{1F327}",cloud_with_snow:"\u{1F328}",clown_face:"\u{1F921}",clubs:"\u2663\uFE0F",cocktail:"\u{1F378}",coffee:"\u2615\uFE0F",coffin:"\u26B0\uFE0F",cold_sweat:"\u{1F630}",comet:"\u2604\uFE0F",computer:"\u{1F4BB}",computer_mouse:"\u{1F5B1}",confetti_ball:"\u{1F38A}",confounded:"\u{1F616}",confused:"\u{1F615}",congratulations:"\u3297\uFE0F",construction:"\u{1F6A7}",construction_worker_man:"\u{1F477}",construction_worker_woman:"\u{1F477}‍\u2640\uFE0F",control_knobs:"\u{1F39B}",convenience_store:"\u{1F3EA}",cookie:"\u{1F36A}",cool:"\u{1F192}",policeman:"\u{1F46E}",copyright:"\xA9\uFE0F",corn:"\u{1F33D}",couch_and_lamp:"\u{1F6CB}",couple:"\u{1F46B}",couple_with_heart_woman_man:"\u{1F491}",couple_with_heart_man_man:"\u{1F468}‍\u2764\uFE0F‍\u{1F468}",couple_with_heart_woman_woman:"\u{1F469}‍\u2764\uFE0F‍\u{1F469}",couplekiss_man_man:"\u{1F468}‍\u2764\uFE0F‍\u{1F48B}‍\u{1F468}",couplekiss_man_woman:"\u{1F48F}",couplekiss_woman_woman:"\u{1F469}‍\u2764\uFE0F‍\u{1F48B}‍\u{1F469}",cow:"\u{1F42E}",cow2:"\u{1F404}",cowboy_hat_face:"\u{1F920}",crab:"\u{1F980}",crayon:"\u{1F58D}",credit_card:"\u{1F4B3}",crescent_moon:"\u{1F319}",cricket:"\u{1F3CF}",crocodile:"\u{1F40A}",croissant:"\u{1F950}",crossed_fingers:"\u{1F91E}",crossed_flags:"\u{1F38C}",crossed_swords:"\u2694\uFE0F",crown:"\u{1F451}",cry:"\u{1F622}",crying_cat_face:"\u{1F63F}",crystal_ball:"\u{1F52E}",cucumber:"\u{1F952}",cupid:"\u{1F498}",curly_loop:"\u27B0",currency_exchange:"\u{1F4B1}",curry:"\u{1F35B}",custard:"\u{1F36E}",customs:"\u{1F6C3}",cyclone:"\u{1F300}",dagger:"\u{1F5E1}",dancer:"\u{1F483}",dancing_women:"\u{1F46F}",dancing_men:"\u{1F46F}‍\u2642\uFE0F",dango:"\u{1F361}",dark_sunglasses:"\u{1F576}",dart:"\u{1F3AF}",dash:"\u{1F4A8}",date:"\u{1F4C5}",deciduous_tree:"\u{1F333}",deer:"\u{1F98C}",department_store:"\u{1F3EC}",derelict_house:"\u{1F3DA}",desert:"\u{1F3DC}",desert_island:"\u{1F3DD}",desktop_computer:"\u{1F5A5}",male_detective:"\u{1F575}\uFE0F",diamond_shape_with_a_dot_inside:"\u{1F4A0}",diamonds:"\u2666\uFE0F",disappointed:"\u{1F61E}",disappointed_relieved:"\u{1F625}",dizzy:"\u{1F4AB}",dizzy_face:"\u{1F635}",do_not_litter:"\u{1F6AF}",dog:"\u{1F436}",dog2:"\u{1F415}",dollar:"\u{1F4B5}",dolls:"\u{1F38E}",dolphin:"\u{1F42C}",door:"\u{1F6AA}",doughnut:"\u{1F369}",dove:"\u{1F54A}",dragon:"\u{1F409}",dragon_face:"\u{1F432}",dress:"\u{1F457}",dromedary_camel:"\u{1F42A}",drooling_face:"\u{1F924}",droplet:"\u{1F4A7}",drum:"\u{1F941}",duck:"\u{1F986}",dvd:"\u{1F4C0}","e-mail":"\u{1F4E7}",eagle:"\u{1F985}",ear:"\u{1F442}",ear_of_rice:"\u{1F33E}",earth_africa:"\u{1F30D}",earth_americas:"\u{1F30E}",earth_asia:"\u{1F30F}",egg:"\u{1F95A}",eggplant:"\u{1F346}",eight_pointed_black_star:"\u2734\uFE0F",eight_spoked_asterisk:"\u2733\uFE0F",electric_plug:"\u{1F50C}",elephant:"\u{1F418}",email:"\u2709\uFE0F",end:"\u{1F51A}",envelope_with_arrow:"\u{1F4E9}",euro:"\u{1F4B6}",european_castle:"\u{1F3F0}",european_post_office:"\u{1F3E4}",evergreen_tree:"\u{1F332}",exclamation:"\u2757\uFE0F",expressionless:"\u{1F611}",eye:"\u{1F441}",eye_speech_bubble:"\u{1F441}‍\u{1F5E8}",eyeglasses:"\u{1F453}",eyes:"\u{1F440}",face_with_head_bandage:"\u{1F915}",face_with_thermometer:"\u{1F912}",fist_oncoming:"\u{1F44A}",factory:"\u{1F3ED}",fallen_leaf:"\u{1F342}",family_man_woman_boy:"\u{1F46A}",family_man_boy:"\u{1F468}‍\u{1F466}",family_man_boy_boy:"\u{1F468}‍\u{1F466}‍\u{1F466}",family_man_girl:"\u{1F468}‍\u{1F467}",family_man_girl_boy:"\u{1F468}‍\u{1F467}‍\u{1F466}",family_man_girl_girl:"\u{1F468}‍\u{1F467}‍\u{1F467}",family_man_man_boy:"\u{1F468}‍\u{1F468}‍\u{1F466}",family_man_man_boy_boy:"\u{1F468}‍\u{1F468}‍\u{1F466}‍\u{1F466}",family_man_man_girl:"\u{1F468}‍\u{1F468}‍\u{1F467}",family_man_man_girl_boy:"\u{1F468}‍\u{1F468}‍\u{1F467}‍\u{1F466}",family_man_man_girl_girl:"\u{1F468}‍\u{1F468}‍\u{1F467}‍\u{1F467}",family_man_woman_boy_boy:"\u{1F468}‍\u{1F469}‍\u{1F466}‍\u{1F466}",family_man_woman_girl:"\u{1F468}‍\u{1F469}‍\u{1F467}",family_man_woman_girl_boy:"\u{1F468}‍\u{1F469}‍\u{1F467}‍\u{1F466}",family_man_woman_girl_girl:"\u{1F468}‍\u{1F469}‍\u{1F467}‍\u{1F467}",family_woman_boy:"\u{1F469}‍\u{1F466}",family_woman_boy_boy:"\u{1F469}‍\u{1F466}‍\u{1F466}",family_woman_girl:"\u{1F469}‍\u{1F467}",family_woman_girl_boy:"\u{1F469}‍\u{1F467}‍\u{1F466}",family_woman_girl_girl:"\u{1F469}‍\u{1F467}‍\u{1F467}",family_woman_woman_boy:"\u{1F469}‍\u{1F469}‍\u{1F466}",family_woman_woman_boy_boy:"\u{1F469}‍\u{1F469}‍\u{1F466}‍\u{1F466}",family_woman_woman_girl:"\u{1F469}‍\u{1F469}‍\u{1F467}",family_woman_woman_girl_boy:"\u{1F469}‍\u{1F469}‍\u{1F467}‍\u{1F466}",family_woman_woman_girl_girl:"\u{1F469}‍\u{1F469}‍\u{1F467}‍\u{1F467}",fast_forward:"\u23E9",fax:"\u{1F4E0}",fearful:"\u{1F628}",feet:"\u{1F43E}",female_detective:"\u{1F575}\uFE0F‍\u2640\uFE0F",ferris_wheel:"\u{1F3A1}",ferry:"\u26F4",field_hockey:"\u{1F3D1}",file_cabinet:"\u{1F5C4}",file_folder:"\u{1F4C1}",film_projector:"\u{1F4FD}",film_strip:"\u{1F39E}",fire:"\u{1F525}",fire_engine:"\u{1F692}",fireworks:"\u{1F386}",first_quarter_moon:"\u{1F313}",first_quarter_moon_with_face:"\u{1F31B}",fish:"\u{1F41F}",fish_cake:"\u{1F365}",fishing_pole_and_fish:"\u{1F3A3}",fist_raised:"\u270A",fist_left:"\u{1F91B}",fist_right:"\u{1F91C}",flags:"\u{1F38F}",flashlight:"\u{1F526}",fleur_de_lis:"\u269C\uFE0F",flight_arrival:"\u{1F6EC}",flight_departure:"\u{1F6EB}",floppy_disk:"\u{1F4BE}",flower_playing_cards:"\u{1F3B4}",flushed:"\u{1F633}",fog:"\u{1F32B}",foggy:"\u{1F301}",football:"\u{1F3C8}",footprints:"\u{1F463}",fork_and_knife:"\u{1F374}",fountain:"\u26F2\uFE0F",fountain_pen:"\u{1F58B}",four_leaf_clover:"\u{1F340}",fox_face:"\u{1F98A}",framed_picture:"\u{1F5BC}",free:"\u{1F193}",fried_egg:"\u{1F373}",fried_shrimp:"\u{1F364}",fries:"\u{1F35F}",frog:"\u{1F438}",frowning:"\u{1F626}",frowning_face:"\u2639\uFE0F",frowning_man:"\u{1F64D}‍\u2642\uFE0F",frowning_woman:"\u{1F64D}",middle_finger:"\u{1F595}",fuelpump:"\u26FD\uFE0F",full_moon:"\u{1F315}",full_moon_with_face:"\u{1F31D}",funeral_urn:"\u26B1\uFE0F",game_die:"\u{1F3B2}",gear:"\u2699\uFE0F",gem:"\u{1F48E}",gemini:"\u264A\uFE0F",ghost:"\u{1F47B}",gift:"\u{1F381}",gift_heart:"\u{1F49D}",girl:"\u{1F467}",globe_with_meridians:"\u{1F310}",goal_net:"\u{1F945}",goat:"\u{1F410}",golf:"\u26F3\uFE0F",golfing_man:"\u{1F3CC}\uFE0F",golfing_woman:"\u{1F3CC}\uFE0F‍\u2640\uFE0F",gorilla:"\u{1F98D}",grapes:"\u{1F347}",green_apple:"\u{1F34F}",green_book:"\u{1F4D7}",green_heart:"\u{1F49A}",green_salad:"\u{1F957}",grey_exclamation:"\u2755",grey_question:"\u2754",grimacing:"\u{1F62C}",grin:"\u{1F601}",grinning:"\u{1F600}",guardsman:"\u{1F482}",guardswoman:"\u{1F482}‍\u2640\uFE0F",guitar:"\u{1F3B8}",gun:"\u{1F52B}",haircut_woman:"\u{1F487}",haircut_man:"\u{1F487}‍\u2642\uFE0F",hamburger:"\u{1F354}",hammer:"\u{1F528}",hammer_and_pick:"\u2692",hammer_and_wrench:"\u{1F6E0}",hamster:"\u{1F439}",hand:"\u270B",handbag:"\u{1F45C}",handshake:"\u{1F91D}",hankey:"\u{1F4A9}",hatched_chick:"\u{1F425}",hatching_chick:"\u{1F423}",headphones:"\u{1F3A7}",hear_no_evil:"\u{1F649}",heart:"\u2764\uFE0F",heart_decoration:"\u{1F49F}",heart_eyes:"\u{1F60D}",heart_eyes_cat:"\u{1F63B}",heartbeat:"\u{1F493}",heartpulse:"\u{1F497}",hearts:"\u2665\uFE0F",heavy_check_mark:"\u2714\uFE0F",heavy_division_sign:"\u2797",heavy_dollar_sign:"\u{1F4B2}",heavy_heart_exclamation:"\u2763\uFE0F",heavy_minus_sign:"\u2796",heavy_multiplication_x:"\u2716\uFE0F",heavy_plus_sign:"\u2795",helicopter:"\u{1F681}",herb:"\u{1F33F}",hibiscus:"\u{1F33A}",high_brightness:"\u{1F506}",high_heel:"\u{1F460}",hocho:"\u{1F52A}",hole:"\u{1F573}",honey_pot:"\u{1F36F}",horse:"\u{1F434}",horse_racing:"\u{1F3C7}",hospital:"\u{1F3E5}",hot_pepper:"\u{1F336}",hotdog:"\u{1F32D}",hotel:"\u{1F3E8}",hotsprings:"\u2668\uFE0F",hourglass:"\u231B\uFE0F",hourglass_flowing_sand:"\u23F3",house:"\u{1F3E0}",house_with_garden:"\u{1F3E1}",houses:"\u{1F3D8}",hugs:"\u{1F917}",hushed:"\u{1F62F}",ice_cream:"\u{1F368}",ice_hockey:"\u{1F3D2}",ice_skate:"\u26F8",icecream:"\u{1F366}",id:"\u{1F194}",ideograph_advantage:"\u{1F250}",imp:"\u{1F47F}",inbox_tray:"\u{1F4E5}",incoming_envelope:"\u{1F4E8}",tipping_hand_woman:"\u{1F481}",information_source:"\u2139\uFE0F",innocent:"\u{1F607}",interrobang:"\u2049\uFE0F",iphone:"\u{1F4F1}",izakaya_lantern:"\u{1F3EE}",jack_o_lantern:"\u{1F383}",japan:"\u{1F5FE}",japanese_castle:"\u{1F3EF}",japanese_goblin:"\u{1F47A}",japanese_ogre:"\u{1F479}",jeans:"\u{1F456}",joy:"\u{1F602}",joy_cat:"\u{1F639}",joystick:"\u{1F579}",kaaba:"\u{1F54B}",key:"\u{1F511}",keyboard:"\u2328\uFE0F",keycap_ten:"\u{1F51F}",kick_scooter:"\u{1F6F4}",kimono:"\u{1F458}",kiss:"\u{1F48B}",kissing:"\u{1F617}",kissing_cat:"\u{1F63D}",kissing_closed_eyes:"\u{1F61A}",kissing_heart:"\u{1F618}",kissing_smiling_eyes:"\u{1F619}",kiwi_fruit:"\u{1F95D}",koala:"\u{1F428}",koko:"\u{1F201}",label:"\u{1F3F7}",large_blue_circle:"\u{1F535}",large_blue_diamond:"\u{1F537}",large_orange_diamond:"\u{1F536}",last_quarter_moon:"\u{1F317}",last_quarter_moon_with_face:"\u{1F31C}",latin_cross:"\u271D\uFE0F",laughing:"\u{1F606}",leaves:"\u{1F343}",ledger:"\u{1F4D2}",left_luggage:"\u{1F6C5}",left_right_arrow:"\u2194\uFE0F",leftwards_arrow_with_hook:"\u21A9\uFE0F",lemon:"\u{1F34B}",leo:"\u264C\uFE0F",leopard:"\u{1F406}",level_slider:"\u{1F39A}",libra:"\u264E\uFE0F",light_rail:"\u{1F688}",link:"\u{1F517}",lion:"\u{1F981}",lips:"\u{1F444}",lipstick:"\u{1F484}",lizard:"\u{1F98E}",lock:"\u{1F512}",lock_with_ink_pen:"\u{1F50F}",lollipop:"\u{1F36D}",loop:"\u27BF",loud_sound:"\u{1F50A}",loudspeaker:"\u{1F4E2}",love_hotel:"\u{1F3E9}",love_letter:"\u{1F48C}",low_brightness:"\u{1F505}",lying_face:"\u{1F925}",m:"\u24C2\uFE0F",mag:"\u{1F50D}",mag_right:"\u{1F50E}",mahjong:"\u{1F004}\uFE0F",mailbox:"\u{1F4EB}",mailbox_closed:"\u{1F4EA}",mailbox_with_mail:"\u{1F4EC}",mailbox_with_no_mail:"\u{1F4ED}",man:"\u{1F468}",man_artist:"\u{1F468}‍\u{1F3A8}",man_astronaut:"\u{1F468}‍\u{1F680}",man_cartwheeling:"\u{1F938}‍\u2642\uFE0F",man_cook:"\u{1F468}‍\u{1F373}",man_dancing:"\u{1F57A}",man_facepalming:"\u{1F926}‍\u2642\uFE0F",man_factory_worker:"\u{1F468}‍\u{1F3ED}",man_farmer:"\u{1F468}‍\u{1F33E}",man_firefighter:"\u{1F468}‍\u{1F692}",man_health_worker:"\u{1F468}‍\u2695\uFE0F",man_in_tuxedo:"\u{1F935}",man_judge:"\u{1F468}‍\u2696\uFE0F",man_juggling:"\u{1F939}‍\u2642\uFE0F",man_mechanic:"\u{1F468}‍\u{1F527}",man_office_worker:"\u{1F468}‍\u{1F4BC}",man_pilot:"\u{1F468}‍\u2708\uFE0F",man_playing_handball:"\u{1F93E}‍\u2642\uFE0F",man_playing_water_polo:"\u{1F93D}‍\u2642\uFE0F",man_scientist:"\u{1F468}‍\u{1F52C}",man_shrugging:"\u{1F937}‍\u2642\uFE0F",man_singer:"\u{1F468}‍\u{1F3A4}",man_student:"\u{1F468}‍\u{1F393}",man_teacher:"\u{1F468}‍\u{1F3EB}",man_technologist:"\u{1F468}‍\u{1F4BB}",man_with_gua_pi_mao:"\u{1F472}",man_with_turban:"\u{1F473}",tangerine:"\u{1F34A}",mans_shoe:"\u{1F45E}",mantelpiece_clock:"\u{1F570}",maple_leaf:"\u{1F341}",martial_arts_uniform:"\u{1F94B}",mask:"\u{1F637}",massage_woman:"\u{1F486}",massage_man:"\u{1F486}‍\u2642\uFE0F",meat_on_bone:"\u{1F356}",medal_military:"\u{1F396}",medal_sports:"\u{1F3C5}",mega:"\u{1F4E3}",melon:"\u{1F348}",memo:"\u{1F4DD}",men_wrestling:"\u{1F93C}‍\u2642\uFE0F",menorah:"\u{1F54E}",mens:"\u{1F6B9}",metal:"\u{1F918}",metro:"\u{1F687}",microphone:"\u{1F3A4}",microscope:"\u{1F52C}",milk_glass:"\u{1F95B}",milky_way:"\u{1F30C}",minibus:"\u{1F690}",minidisc:"\u{1F4BD}",mobile_phone_off:"\u{1F4F4}",money_mouth_face:"\u{1F911}",money_with_wings:"\u{1F4B8}",moneybag:"\u{1F4B0}",monkey:"\u{1F412}",monkey_face:"\u{1F435}",monorail:"\u{1F69D}",moon:"\u{1F314}",mortar_board:"\u{1F393}",mosque:"\u{1F54C}",motor_boat:"\u{1F6E5}",motor_scooter:"\u{1F6F5}",motorcycle:"\u{1F3CD}",motorway:"\u{1F6E3}",mount_fuji:"\u{1F5FB}",mountain:"\u26F0",mountain_biking_man:"\u{1F6B5}",mountain_biking_woman:"\u{1F6B5}‍\u2640\uFE0F",mountain_cableway:"\u{1F6A0}",mountain_railway:"\u{1F69E}",mountain_snow:"\u{1F3D4}",mouse:"\u{1F42D}",mouse2:"\u{1F401}",movie_camera:"\u{1F3A5}",moyai:"\u{1F5FF}",mrs_claus:"\u{1F936}",muscle:"\u{1F4AA}",mushroom:"\u{1F344}",musical_keyboard:"\u{1F3B9}",musical_note:"\u{1F3B5}",musical_score:"\u{1F3BC}",mute:"\u{1F507}",nail_care:"\u{1F485}",name_badge:"\u{1F4DB}",national_park:"\u{1F3DE}",nauseated_face:"\u{1F922}",necktie:"\u{1F454}",negative_squared_cross_mark:"\u274E",nerd_face:"\u{1F913}",neutral_face:"\u{1F610}",new:"\u{1F195}",new_moon:"\u{1F311}",new_moon_with_face:"\u{1F31A}",newspaper:"\u{1F4F0}",newspaper_roll:"\u{1F5DE}",next_track_button:"\u23ED",ng:"\u{1F196}",no_good_man:"\u{1F645}‍\u2642\uFE0F",no_good_woman:"\u{1F645}",night_with_stars:"\u{1F303}",no_bell:"\u{1F515}",no_bicycles:"\u{1F6B3}",no_entry:"\u26D4\uFE0F",no_entry_sign:"\u{1F6AB}",no_mobile_phones:"\u{1F4F5}",no_mouth:"\u{1F636}",no_pedestrians:"\u{1F6B7}",no_smoking:"\u{1F6AD}","non-potable_water":"\u{1F6B1}",nose:"\u{1F443}",notebook:"\u{1F4D3}",notebook_with_decorative_cover:"\u{1F4D4}",notes:"\u{1F3B6}",nut_and_bolt:"\u{1F529}",o:"\u2B55\uFE0F",o2:"\u{1F17E}\uFE0F",ocean:"\u{1F30A}",octopus:"\u{1F419}",oden:"\u{1F362}",office:"\u{1F3E2}",oil_drum:"\u{1F6E2}",ok:"\u{1F197}",ok_hand:"\u{1F44C}",ok_man:"\u{1F646}‍\u2642\uFE0F",ok_woman:"\u{1F646}",old_key:"\u{1F5DD}",older_man:"\u{1F474}",older_woman:"\u{1F475}",om:"\u{1F549}",on:"\u{1F51B}",oncoming_automobile:"\u{1F698}",oncoming_bus:"\u{1F68D}",oncoming_police_car:"\u{1F694}",oncoming_taxi:"\u{1F696}",open_file_folder:"\u{1F4C2}",open_hands:"\u{1F450}",open_mouth:"\u{1F62E}",open_umbrella:"\u2602\uFE0F",ophiuchus:"\u26CE",orange_book:"\u{1F4D9}",orthodox_cross:"\u2626\uFE0F",outbox_tray:"\u{1F4E4}",owl:"\u{1F989}",ox:"\u{1F402}",package:"\u{1F4E6}",page_facing_up:"\u{1F4C4}",page_with_curl:"\u{1F4C3}",pager:"\u{1F4DF}",paintbrush:"\u{1F58C}",palm_tree:"\u{1F334}",pancakes:"\u{1F95E}",panda_face:"\u{1F43C}",paperclip:"\u{1F4CE}",paperclips:"\u{1F587}",parasol_on_ground:"\u26F1",parking:"\u{1F17F}\uFE0F",part_alternation_mark:"\u303D\uFE0F",partly_sunny:"\u26C5\uFE0F",passenger_ship:"\u{1F6F3}",passport_control:"\u{1F6C2}",pause_button:"\u23F8",peace_symbol:"\u262E\uFE0F",peach:"\u{1F351}",peanuts:"\u{1F95C}",pear:"\u{1F350}",pen:"\u{1F58A}",pencil2:"\u270F\uFE0F",penguin:"\u{1F427}",pensive:"\u{1F614}",performing_arts:"\u{1F3AD}",persevere:"\u{1F623}",person_fencing:"\u{1F93A}",pouting_woman:"\u{1F64E}",phone:"\u260E\uFE0F",pick:"\u26CF",pig:"\u{1F437}",pig2:"\u{1F416}",pig_nose:"\u{1F43D}",pill:"\u{1F48A}",pineapple:"\u{1F34D}",ping_pong:"\u{1F3D3}",pisces:"\u2653\uFE0F",pizza:"\u{1F355}",place_of_worship:"\u{1F6D0}",plate_with_cutlery:"\u{1F37D}",play_or_pause_button:"\u23EF",point_down:"\u{1F447}",point_left:"\u{1F448}",point_right:"\u{1F449}",point_up:"\u261D\uFE0F",point_up_2:"\u{1F446}",police_car:"\u{1F693}",policewoman:"\u{1F46E}‍\u2640\uFE0F",poodle:"\u{1F429}",popcorn:"\u{1F37F}",post_office:"\u{1F3E3}",postal_horn:"\u{1F4EF}",postbox:"\u{1F4EE}",potable_water:"\u{1F6B0}",potato:"\u{1F954}",pouch:"\u{1F45D}",poultry_leg:"\u{1F357}",pound:"\u{1F4B7}",rage:"\u{1F621}",pouting_cat:"\u{1F63E}",pouting_man:"\u{1F64E}‍\u2642\uFE0F",pray:"\u{1F64F}",prayer_beads:"\u{1F4FF}",pregnant_woman:"\u{1F930}",previous_track_button:"\u23EE",prince:"\u{1F934}",princess:"\u{1F478}",printer:"\u{1F5A8}",purple_heart:"\u{1F49C}",purse:"\u{1F45B}",pushpin:"\u{1F4CC}",put_litter_in_its_place:"\u{1F6AE}",question:"\u2753",rabbit:"\u{1F430}",rabbit2:"\u{1F407}",racehorse:"\u{1F40E}",racing_car:"\u{1F3CE}",radio:"\u{1F4FB}",radio_button:"\u{1F518}",radioactive:"\u2622\uFE0F",railway_car:"\u{1F683}",railway_track:"\u{1F6E4}",rainbow:"\u{1F308}",rainbow_flag:"\u{1F3F3}\uFE0F‍\u{1F308}",raised_back_of_hand:"\u{1F91A}",raised_hand_with_fingers_splayed:"\u{1F590}",raised_hands:"\u{1F64C}",raising_hand_woman:"\u{1F64B}",raising_hand_man:"\u{1F64B}‍\u2642\uFE0F",ram:"\u{1F40F}",ramen:"\u{1F35C}",rat:"\u{1F400}",record_button:"\u23FA",recycle:"\u267B\uFE0F",red_circle:"\u{1F534}",registered:"\xAE\uFE0F",relaxed:"\u263A\uFE0F",relieved:"\u{1F60C}",reminder_ribbon:"\u{1F397}",repeat:"\u{1F501}",repeat_one:"\u{1F502}",rescue_worker_helmet:"\u26D1",restroom:"\u{1F6BB}",revolving_hearts:"\u{1F49E}",rewind:"\u23EA",rhinoceros:"\u{1F98F}",ribbon:"\u{1F380}",rice:"\u{1F35A}",rice_ball:"\u{1F359}",rice_cracker:"\u{1F358}",rice_scene:"\u{1F391}",right_anger_bubble:"\u{1F5EF}",ring:"\u{1F48D}",robot:"\u{1F916}",rocket:"\u{1F680}",rofl:"\u{1F923}",roll_eyes:"\u{1F644}",roller_coaster:"\u{1F3A2}",rooster:"\u{1F413}",rose:"\u{1F339}",rosette:"\u{1F3F5}",rotating_light:"\u{1F6A8}",round_pushpin:"\u{1F4CD}",rowing_man:"\u{1F6A3}",rowing_woman:"\u{1F6A3}‍\u2640\uFE0F",rugby_football:"\u{1F3C9}",running_man:"\u{1F3C3}",running_shirt_with_sash:"\u{1F3BD}",running_woman:"\u{1F3C3}‍\u2640\uFE0F",sa:"\u{1F202}\uFE0F",sagittarius:"\u2650\uFE0F",sake:"\u{1F376}",sandal:"\u{1F461}",santa:"\u{1F385}",satellite:"\u{1F4E1}",saxophone:"\u{1F3B7}",school:"\u{1F3EB}",school_satchel:"\u{1F392}",scissors:"\u2702\uFE0F",scorpion:"\u{1F982}",scorpius:"\u264F\uFE0F",scream:"\u{1F631}",scream_cat:"\u{1F640}",scroll:"\u{1F4DC}",seat:"\u{1F4BA}",secret:"\u3299\uFE0F",see_no_evil:"\u{1F648}",seedling:"\u{1F331}",selfie:"\u{1F933}",shallow_pan_of_food:"\u{1F958}",shamrock:"\u2618\uFE0F",shark:"\u{1F988}",shaved_ice:"\u{1F367}",sheep:"\u{1F411}",shell:"\u{1F41A}",shield:"\u{1F6E1}",shinto_shrine:"\u26E9",ship:"\u{1F6A2}",shirt:"\u{1F455}",shopping:"\u{1F6CD}",shopping_cart:"\u{1F6D2}",shower:"\u{1F6BF}",shrimp:"\u{1F990}",signal_strength:"\u{1F4F6}",six_pointed_star:"\u{1F52F}",ski:"\u{1F3BF}",skier:"\u26F7",skull:"\u{1F480}",skull_and_crossbones:"\u2620\uFE0F",sleeping:"\u{1F634}",sleeping_bed:"\u{1F6CC}",sleepy:"\u{1F62A}",slightly_frowning_face:"\u{1F641}",slightly_smiling_face:"\u{1F642}",slot_machine:"\u{1F3B0}",small_airplane:"\u{1F6E9}",small_blue_diamond:"\u{1F539}",small_orange_diamond:"\u{1F538}",small_red_triangle:"\u{1F53A}",small_red_triangle_down:"\u{1F53B}",smile:"\u{1F604}",smile_cat:"\u{1F638}",smiley:"\u{1F603}",smiley_cat:"\u{1F63A}",smiling_imp:"\u{1F608}",smirk:"\u{1F60F}",smirk_cat:"\u{1F63C}",smoking:"\u{1F6AC}",snail:"\u{1F40C}",snake:"\u{1F40D}",sneezing_face:"\u{1F927}",snowboarder:"\u{1F3C2}",snowflake:"\u2744\uFE0F",snowman:"\u26C4\uFE0F",snowman_with_snow:"\u2603\uFE0F",sob:"\u{1F62D}",soccer:"\u26BD\uFE0F",soon:"\u{1F51C}",sos:"\u{1F198}",sound:"\u{1F509}",space_invader:"\u{1F47E}",spades:"\u2660\uFE0F",spaghetti:"\u{1F35D}",sparkle:"\u2747\uFE0F",sparkler:"\u{1F387}",sparkles:"\u2728",sparkling_heart:"\u{1F496}",speak_no_evil:"\u{1F64A}",speaker:"\u{1F508}",speaking_head:"\u{1F5E3}",speech_balloon:"\u{1F4AC}",speedboat:"\u{1F6A4}",spider:"\u{1F577}",spider_web:"\u{1F578}",spiral_calendar:"\u{1F5D3}",spiral_notepad:"\u{1F5D2}",spoon:"\u{1F944}",squid:"\u{1F991}",stadium:"\u{1F3DF}",star:"\u2B50\uFE0F",star2:"\u{1F31F}",star_and_crescent:"\u262A\uFE0F",star_of_david:"\u2721\uFE0F",stars:"\u{1F320}",station:"\u{1F689}",statue_of_liberty:"\u{1F5FD}",steam_locomotive:"\u{1F682}",stew:"\u{1F372}",stop_button:"\u23F9",stop_sign:"\u{1F6D1}",stopwatch:"\u23F1",straight_ruler:"\u{1F4CF}",strawberry:"\u{1F353}",stuck_out_tongue:"\u{1F61B}",stuck_out_tongue_closed_eyes:"\u{1F61D}",stuck_out_tongue_winking_eye:"\u{1F61C}",studio_microphone:"\u{1F399}",stuffed_flatbread:"\u{1F959}",sun_behind_large_cloud:"\u{1F325}",sun_behind_rain_cloud:"\u{1F326}",sun_behind_small_cloud:"\u{1F324}",sun_with_face:"\u{1F31E}",sunflower:"\u{1F33B}",sunglasses:"\u{1F60E}",sunny:"\u2600\uFE0F",sunrise:"\u{1F305}",sunrise_over_mountains:"\u{1F304}",surfing_man:"\u{1F3C4}",surfing_woman:"\u{1F3C4}‍\u2640\uFE0F",sushi:"\u{1F363}",suspension_railway:"\u{1F69F}",sweat:"\u{1F613}",sweat_drops:"\u{1F4A6}",sweat_smile:"\u{1F605}",sweet_potato:"\u{1F360}",swimming_man:"\u{1F3CA}",swimming_woman:"\u{1F3CA}‍\u2640\uFE0F",symbols:"\u{1F523}",synagogue:"\u{1F54D}",syringe:"\u{1F489}",taco:"\u{1F32E}",tada:"\u{1F389}",tanabata_tree:"\u{1F38B}",taurus:"\u2649\uFE0F",taxi:"\u{1F695}",tea:"\u{1F375}",telephone_receiver:"\u{1F4DE}",telescope:"\u{1F52D}",tennis:"\u{1F3BE}",tent:"\u26FA\uFE0F",thermometer:"\u{1F321}",thinking:"\u{1F914}",thought_balloon:"\u{1F4AD}",ticket:"\u{1F3AB}",tickets:"\u{1F39F}",tiger:"\u{1F42F}",tiger2:"\u{1F405}",timer_clock:"\u23F2",tipping_hand_man:"\u{1F481}‍\u2642\uFE0F",tired_face:"\u{1F62B}",tm:"\u2122\uFE0F",toilet:"\u{1F6BD}",tokyo_tower:"\u{1F5FC}",tomato:"\u{1F345}",tongue:"\u{1F445}",top:"\u{1F51D}",tophat:"\u{1F3A9}",tornado:"\u{1F32A}",trackball:"\u{1F5B2}",tractor:"\u{1F69C}",traffic_light:"\u{1F6A5}",train:"\u{1F68B}",train2:"\u{1F686}",tram:"\u{1F68A}",triangular_flag_on_post:"\u{1F6A9}",triangular_ruler:"\u{1F4D0}",trident:"\u{1F531}",triumph:"\u{1F624}",trolleybus:"\u{1F68E}",trophy:"\u{1F3C6}",tropical_drink:"\u{1F379}",tropical_fish:"\u{1F420}",truck:"\u{1F69A}",trumpet:"\u{1F3BA}",tulip:"\u{1F337}",tumbler_glass:"\u{1F943}",turkey:"\u{1F983}",turtle:"\u{1F422}",tv:"\u{1F4FA}",twisted_rightwards_arrows:"\u{1F500}",two_hearts:"\u{1F495}",two_men_holding_hands:"\u{1F46C}",two_women_holding_hands:"\u{1F46D}",u5272:"\u{1F239}",u5408:"\u{1F234}",u55b6:"\u{1F23A}",u6307:"\u{1F22F}\uFE0F",u6708:"\u{1F237}\uFE0F",u6709:"\u{1F236}",u6e80:"\u{1F235}",u7121:"\u{1F21A}\uFE0F",u7533:"\u{1F238}",u7981:"\u{1F232}",u7a7a:"\u{1F233}",umbrella:"\u2614\uFE0F",unamused:"\u{1F612}",underage:"\u{1F51E}",unicorn:"\u{1F984}",unlock:"\u{1F513}",up:"\u{1F199}",upside_down_face:"\u{1F643}",v:"\u270C\uFE0F",vertical_traffic_light:"\u{1F6A6}",vhs:"\u{1F4FC}",vibration_mode:"\u{1F4F3}",video_camera:"\u{1F4F9}",video_game:"\u{1F3AE}",violin:"\u{1F3BB}",virgo:"\u264D\uFE0F",volcano:"\u{1F30B}",volleyball:"\u{1F3D0}",vs:"\u{1F19A}",vulcan_salute:"\u{1F596}",walking_man:"\u{1F6B6}",walking_woman:"\u{1F6B6}‍\u2640\uFE0F",waning_crescent_moon:"\u{1F318}",waning_gibbous_moon:"\u{1F316}",warning:"\u26A0\uFE0F",wastebasket:"\u{1F5D1}",watch:"\u231A\uFE0F",water_buffalo:"\u{1F403}",watermelon:"\u{1F349}",wave:"\u{1F44B}",wavy_dash:"\u3030\uFE0F",waxing_crescent_moon:"\u{1F312}",wc:"\u{1F6BE}",weary:"\u{1F629}",wedding:"\u{1F492}",weight_lifting_man:"\u{1F3CB}\uFE0F",weight_lifting_woman:"\u{1F3CB}\uFE0F‍\u2640\uFE0F",whale:"\u{1F433}",whale2:"\u{1F40B}",wheel_of_dharma:"\u2638\uFE0F",wheelchair:"\u267F\uFE0F",white_check_mark:"\u2705",white_circle:"\u26AA\uFE0F",white_flag:"\u{1F3F3}\uFE0F",white_flower:"\u{1F4AE}",white_large_square:"\u2B1C\uFE0F",white_medium_small_square:"\u25FD\uFE0F",white_medium_square:"\u25FB\uFE0F",white_small_square:"\u25AB\uFE0F",white_square_button:"\u{1F533}",wilted_flower:"\u{1F940}",wind_chime:"\u{1F390}",wind_face:"\u{1F32C}",wine_glass:"\u{1F377}",wink:"\u{1F609}",wolf:"\u{1F43A}",woman:"\u{1F469}",woman_artist:"\u{1F469}‍\u{1F3A8}",woman_astronaut:"\u{1F469}‍\u{1F680}",woman_cartwheeling:"\u{1F938}‍\u2640\uFE0F",woman_cook:"\u{1F469}‍\u{1F373}",woman_facepalming:"\u{1F926}‍\u2640\uFE0F",woman_factory_worker:"\u{1F469}‍\u{1F3ED}",woman_farmer:"\u{1F469}‍\u{1F33E}",woman_firefighter:"\u{1F469}‍\u{1F692}",woman_health_worker:"\u{1F469}‍\u2695\uFE0F",woman_judge:"\u{1F469}‍\u2696\uFE0F",woman_juggling:"\u{1F939}‍\u2640\uFE0F",woman_mechanic:"\u{1F469}‍\u{1F527}",woman_office_worker:"\u{1F469}‍\u{1F4BC}",woman_pilot:"\u{1F469}‍\u2708\uFE0F",woman_playing_handball:"\u{1F93E}‍\u2640\uFE0F",woman_playing_water_polo:"\u{1F93D}‍\u2640\uFE0F",woman_scientist:"\u{1F469}‍\u{1F52C}",woman_shrugging:"\u{1F937}‍\u2640\uFE0F",woman_singer:"\u{1F469}‍\u{1F3A4}",woman_student:"\u{1F469}‍\u{1F393}",woman_teacher:"\u{1F469}‍\u{1F3EB}",woman_technologist:"\u{1F469}‍\u{1F4BB}",woman_with_turban:"\u{1F473}‍\u2640\uFE0F",womans_clothes:"\u{1F45A}",womans_hat:"\u{1F452}",women_wrestling:"\u{1F93C}‍\u2640\uFE0F",womens:"\u{1F6BA}",world_map:"\u{1F5FA}",worried:"\u{1F61F}",wrench:"\u{1F527}",writing_hand:"\u270D\uFE0F",x:"\u274C",yellow_heart:"\u{1F49B}",yen:"\u{1F4B4}",yin_yang:"\u262F\uFE0F",yum:"\u{1F60B}",zap:"\u26A1\uFE0F",zipper_mouth_face:"\u{1F910}",zzz:"\u{1F4A4}",octocat:':octocat:',showdown:`S`},r.Converter=function(i){"use strict";var t={},u=[],s=[],p={},h=c,f={parsed:{},raw:"",format:""};g();function g(){i=i||{};for(var l in o)o.hasOwnProperty(l)&&(t[l]=o[l]);if(typeof i=="object")for(var k in i)i.hasOwnProperty(k)&&(t[k]=i[k]);else throw Error("Converter expects the passed parameter to be an object, but "+typeof i+" was passed instead.");t.extensions&&r.helper.forEach(t.extensions,T)}function T(l,k){if(k=k||null,r.helper.isString(l))if(l=r.helper.stdExtName(l),k=l,r.extensions[l]){console.warn("DEPRECATION WARNING: "+l+" is an old extension that uses a deprecated loading method.Please inform the developer that the extension should be updated!"),b(r.extensions[l],l);return}else if(!r.helper.isUndefined(d[l]))l=d[l];else throw Error('Extension "'+l+'" could not be loaded. It was either not found or is not a valid extension.');typeof l=="function"&&(l=l()),r.helper.isArray(l)||(l=[l]);var C=_(l,k);if(!C.valid)throw Error(C.error);for(var L=0;L[ \t]+\xA8NBSP;<"),!k)if(window&&window.document)k=window.document;else throw new Error("HTMLParser is undefined. If in a webworker or nodejs environment, you need to provide a WHATWG DOM and HTML such as JSDOM");var C=k.createElement("div");C.innerHTML=l;var L={preList:J(C)};Y(C);for(var j=C.childNodes,P="",q=0;q'}else ee.push(U[re].innerHTML),U[re].innerHTML="",U[re].setAttribute("prenum",re.toString());return ee}return P},this.setOption=function(l,k){t[l]=k},this.getOption=function(l){return t[l]},this.getOptions=function(){return t},this.addExtension=function(l,k){k=k||null,T(l,k)},this.useExtension=function(l){T(l)},this.setFlavor=function(l){if(!m.hasOwnProperty(l))throw Error(l+" flavor was not found");var k=m[l];h=l;for(var C in k)k.hasOwnProperty(C)&&(t[C]=k[C])},this.getFlavor=function(){return h},this.removeExtension=function(l){r.helper.isArray(l)||(l=[l]);for(var k=0;k? ?(['"].*['"])?\)$/m)>-1)g="";else if(!g)if(f||(f=h.toLowerCase().replace(/ ?\n/g," ")),g="#"+f,!r.helper.isUndefined(u.gUrls[f]))g=u.gUrls[f],r.helper.isUndefined(u.gTitles[f])||(w=u.gTitles[f]);else return p;g=g.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var y='
    ",y};return i=i.replace(/\[((?:\[[^\]]*]|[^\[\]])*)] ?(?:\n *)?\[(.*?)]()()()()/g,s),i=i.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]?<([^>]*)>(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,s),i=i.replace(/\[((?:\[[^\]]*]|[^\[\]])*)]()[ \t]*\([ \t]??(?:[ \t]*((["'])([^"]*?)\5))?[ \t]?\)/g,s),i=i.replace(/\[([^\[\]]+)]()()()()()/g,s),t.ghMentions&&(i=i.replace(/(^|\s)(\\)?(@([a-z\d]+(?:[a-z\d.-]+?[a-z\d]+)*))/gmi,function(p,h,f,g,T){if(f==="\\")return h+g;if(!r.helper.isString(t.ghMentionsLink))throw new Error("ghMentionsLink option must be a string");var b=t.ghMentionsLink.replace(/\{u}/g,T),w="";return t.openLinksInNewWindow&&(w=' rel="noopener noreferrer" target="\xA8E95Eblank"'),h+'"+g+""})),i=u.converter._dispatch("anchors.after",i,t,u),i});var A=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+?\.[^'">\s]+?)()(\1)?(?=\s|$)(?!["<>])/gi,E=/([*~_]+|\b)(((https?|ftp|dict):\/\/|www\.)[^'">\s]+\.[^'">\s]+?)([.!?,()\[\]])?(\1)?(?=\s|$)(?!["<>])/gi,v=/()<(((https?|ftp|dict):\/\/|www\.)[^'">\s]+)()>()/gi,M=/(^|\s)(?:mailto:)?([A-Za-z0-9!#$%&'*+-/=?^_`{|}~.]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)(?=$|\s)/gmi,F=/<()(?:mailto:)?([-.\w]+@[-a-z0-9]+(\.[-a-z0-9]+)*\.[a-z]+)>/gi,I=function(i){"use strict";return function(t,u,s,p,h,f,g){s=s.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var T=s,b="",w="",y=u||"",l=g||"";return/^www\./i.test(s)&&(s=s.replace(/^www\./i,"http://www.")),i.excludeTrailingPunctuationFromURLs&&f&&(b=f),i.openLinksInNewWindow&&(w=' rel="noopener noreferrer" target="\xA8E95Eblank"'),y+'"+T+""+b+l}},W=function(i,t){"use strict";return function(u,s,p){var h="mailto:";return s=s||"",p=r.subParser("unescapeSpecialChars")(p,i,t),i.encodeEmails?(h=r.helper.encodeEmailAddress(h+p),p=r.helper.encodeEmailAddress(p)):h=h+p,s+''+p+""}};r.subParser("autoLinks",function(i,t,u){"use strict";return i=u.converter._dispatch("autoLinks.before",i,t,u),i=i.replace(v,I(t)),i=i.replace(F,W(t,u)),i=u.converter._dispatch("autoLinks.after",i,t,u),i}),r.subParser("simplifiedAutoLinks",function(i,t,u){"use strict";return t.simplifiedAutoLink&&(i=u.converter._dispatch("simplifiedAutoLinks.before",i,t,u),t.excludeTrailingPunctuationFromURLs?i=i.replace(E,I(t)):i=i.replace(A,I(t)),i=i.replace(M,W(t,u)),i=u.converter._dispatch("simplifiedAutoLinks.after",i,t,u)),i}),r.subParser("blockGamut",function(i,t,u){"use strict";return i=u.converter._dispatch("blockGamut.before",i,t,u),i=r.subParser("blockQuotes")(i,t,u),i=r.subParser("headers")(i,t,u),i=r.subParser("horizontalRule")(i,t,u),i=r.subParser("lists")(i,t,u),i=r.subParser("codeBlocks")(i,t,u),i=r.subParser("tables")(i,t,u),i=r.subParser("hashHTMLBlocks")(i,t,u),i=r.subParser("paragraphs")(i,t,u),i=u.converter._dispatch("blockGamut.after",i,t,u),i}),r.subParser("blockQuotes",function(i,t,u){"use strict";i=u.converter._dispatch("blockQuotes.before",i,t,u),i=i+` + +`;var s=/(^ {0,3}>[ \t]?.+\n(.+\n)*\n*)+/gm;return t.splitAdjacentBlockquotes&&(s=/^ {0,3}>[\s\S]*?(?:\n\n)/gm),i=i.replace(s,function(p){return p=p.replace(/^[ \t]*>[ \t]?/gm,""),p=p.replace(/¨0/g,""),p=p.replace(/^[ \t]+$/gm,""),p=r.subParser("githubCodeBlocks")(p,t,u),p=r.subParser("blockGamut")(p,t,u),p=p.replace(/(^|\n)/g,"$1 "),p=p.replace(/(\s*
    [^\r]+?<\/pre>)/gm,function(h,f){var g=f;return g=g.replace(/^  /mg,"\xA80"),g=g.replace(/¨0/g,""),g}),r.subParser("hashBlock")(`
    +`+p+` +
    `,t,u)}),i=u.converter._dispatch("blockQuotes.after",i,t,u),i}),r.subParser("codeBlocks",function(i,t,u){"use strict";i=u.converter._dispatch("codeBlocks.before",i,t,u),i+="\xA80";var s=/(?:\n\n|^)((?:(?:[ ]{4}|\t).*\n+)+)(\n*[ ]{0,3}[^ \t\n]|(?=¨0))/g;return i=i.replace(s,function(p,h,f){var g=h,T=f,b=` +`;return g=r.subParser("outdent")(g,t,u),g=r.subParser("encodeCode")(g,t,u),g=r.subParser("detab")(g,t,u),g=g.replace(/^\n+/g,""),g=g.replace(/\n+$/g,""),t.omitExtraWLInCodeBlocks&&(b=""),g="
    "+g+b+"
    ",r.subParser("hashBlock")(g,t,u)+T}),i=i.replace(/¨0/,""),i=u.converter._dispatch("codeBlocks.after",i,t,u),i}),r.subParser("codeSpans",function(i,t,u){"use strict";return i=u.converter._dispatch("codeSpans.before",i,t,u),typeof i=="undefined"&&(i=""),i=i.replace(/(^|[^\\])(`+)([^\r]*?[^`])\2(?!`)/gm,function(s,p,h,f){var g=f;return g=g.replace(/^([ \t]*)/g,""),g=g.replace(/[ \t]*$/g,""),g=r.subParser("encodeCode")(g,t,u),g=p+""+g+"",g=r.subParser("hashHTMLSpans")(g,t,u),g}),i=u.converter._dispatch("codeSpans.after",i,t,u),i}),r.subParser("completeHTMLDocument",function(i,t,u){"use strict";if(!t.completeHTMLDocument)return i;i=u.converter._dispatch("completeHTMLDocument.before",i,t,u);var s="html",p=` +`,h="",f=` +`,g="",T="";typeof u.metadata.parsed.doctype!="undefined"&&(p=" +`,s=u.metadata.parsed.doctype.toString().toLowerCase(),(s==="html"||s==="html5")&&(f=''));for(var b in u.metadata.parsed)if(u.metadata.parsed.hasOwnProperty(b))switch(b.toLowerCase()){case"doctype":break;case"title":h=""+u.metadata.parsed.title+` +`;break;case"charset":s==="html"||s==="html5"?f=' +`:f=' +`;break;case"language":case"lang":g=' lang="'+u.metadata.parsed[b]+'"',T+=' +`;break;default:T+=' +`}return i=p+" + +`+h+f+T+` + +`+i.trim()+` + +`,i=u.converter._dispatch("completeHTMLDocument.after",i,t,u),i}),r.subParser("detab",function(i,t,u){"use strict";return i=u.converter._dispatch("detab.before",i,t,u),i=i.replace(/\t(?=\t)/g," "),i=i.replace(/\t/g,"\xA8A\xA8B"),i=i.replace(/¨B(.+?)¨A/g,function(s,p){for(var h=p,f=4-h.length%4,g=0;g/g,">"),i=u.converter._dispatch("encodeAmpsAndAngles.after",i,t,u),i}),r.subParser("encodeBackslashEscapes",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeBackslashEscapes.before",i,t,u),i=i.replace(/\\(\\)/g,r.helper.escapeCharactersCallback),i=i.replace(/\\([`*_{}\[\]()>#+.!~=|-])/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("encodeBackslashEscapes.after",i,t,u),i}),r.subParser("encodeCode",function(i,t,u){"use strict";return i=u.converter._dispatch("encodeCode.before",i,t,u),i=i.replace(/&/g,"&").replace(//g,">").replace(/([*_{}\[\]\\=~-])/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("encodeCode.after",i,t,u),i}),r.subParser("escapeSpecialCharsWithinTagAttributes",function(i,t,u){"use strict";i=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.before",i,t,u);var s=/<\/?[a-z\d_:-]+(?:[\s]+[\s\S]+?)?>/gi,p=/-]|-[^>])(?:[^-]|-[^-])*)--)>/gi;return i=i.replace(s,function(h){return h.replace(/(.)<\/?code>(?=.)/g,"$1`").replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),i=i.replace(p,function(h){return h.replace(/([\\`*_~=|])/g,r.helper.escapeCharactersCallback)}),i=u.converter._dispatch("escapeSpecialCharsWithinTagAttributes.after",i,t,u),i}),r.subParser("githubCodeBlocks",function(i,t,u){"use strict";return t.ghCodeBlocks?(i=u.converter._dispatch("githubCodeBlocks.before",i,t,u),i+="\xA80",i=i.replace(/(?:^|\n)(?: {0,3})(```+|~~~+)(?: *)([^\s`~]*)\n([\s\S]*?)\n(?: {0,3})\1/g,function(s,p,h,f){var g=t.omitExtraWLInCodeBlocks?"":` +`;return f=r.subParser("encodeCode")(f,t,u),f=r.subParser("detab")(f,t,u),f=f.replace(/^\n+/g,""),f=f.replace(/\n+$/g,""),f="
    "+f+g+"
    ",f=r.subParser("hashBlock")(f,t,u),` + +\xA8G`+(u.ghCodeBlocks.push({text:s,codeblock:f})-1)+`G + +`}),i=i.replace(/¨0/,""),u.converter._dispatch("githubCodeBlocks.after",i,t,u)):i}),r.subParser("hashBlock",function(i,t,u){"use strict";return i=u.converter._dispatch("hashBlock.before",i,t,u),i=i.replace(/(^\n+|\n+$)/g,""),i=` + +\xA8K`+(u.gHtmlBlocks.push(i)-1)+`K + +`,i=u.converter._dispatch("hashBlock.after",i,t,u),i}),r.subParser("hashCodeTags",function(i,t,u){"use strict";i=u.converter._dispatch("hashCodeTags.before",i,t,u);var s=function(p,h,f,g){var T=f+r.subParser("encodeCode")(h,t,u)+g;return"\xA8C"+(u.gHtmlSpans.push(T)-1)+"C"};return i=r.helper.replaceRecursiveRegExp(i,s,"]*>","","gim"),i=u.converter._dispatch("hashCodeTags.after",i,t,u),i}),r.subParser("hashElement",function(i,t,u){"use strict";return function(s,p){var h=p;return h=h.replace(/\n\n/g,` +`),h=h.replace(/^\n/,""),h=h.replace(/\n+$/g,""),h=` + +\xA8K`+(u.gHtmlBlocks.push(h)-1)+`K + +`,h}}),r.subParser("hashHTMLBlocks",function(i,t,u){"use strict";i=u.converter._dispatch("hashHTMLBlocks.before",i,t,u);var s=["pre","div","h1","h2","h3","h4","h5","h6","blockquote","table","dl","ol","ul","script","noscript","form","fieldset","iframe","math","style","section","header","footer","nav","article","aside","address","audio","canvas","figure","hgroup","output","video","p"],p=function(l,k,C,L){var j=l;return C.search(/\bmarkdown\b/)!==-1&&(j=C+u.converter.makeHtml(k)+L),` + +\xA8K`+(u.gHtmlBlocks.push(j)-1)+`K + +`};t.backslashEscapesHTMLTags&&(i=i.replace(/\\<(\/?[^>]+?)>/g,function(l,k){return"<"+k+">"}));for(var h=0;h]*>)","im"),T="<"+s[h]+"\\b[^>]*>",b="";(f=r.helper.regexIndexOf(i,g))!==-1;){var w=r.helper.splitAtIndex(i,f),y=r.helper.replaceRecursiveRegExp(w[1],p,T,b,"im");if(y===w[1])break;i=w[0].concat(y)}return i=i.replace(/(\n {0,3}(<(hr)\b([^<>])*?\/?>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(i,t,u)),i=r.helper.replaceRecursiveRegExp(i,function(l){return` + +\xA8K`+(u.gHtmlBlocks.push(l)-1)+`K + +`},"^ {0,3}","gm"),i=i.replace(/(?:\n\n)( {0,3}(?:<([?%])[^\r]*?\2>)[ \t]*(?=\n{2,}))/g,r.subParser("hashElement")(i,t,u)),i=u.converter._dispatch("hashHTMLBlocks.after",i,t,u),i}),r.subParser("hashHTMLSpans",function(i,t,u){"use strict";i=u.converter._dispatch("hashHTMLSpans.before",i,t,u);function s(p){return"\xA8C"+(u.gHtmlSpans.push(p)-1)+"C"}return i=i.replace(/<[^>]+?\/>/gi,function(p){return s(p)}),i=i.replace(/<([^>]+?)>[\s\S]*?<\/\1>/g,function(p){return s(p)}),i=i.replace(/<([^>]+?)\s[^>]+?>[\s\S]*?<\/\1>/g,function(p){return s(p)}),i=i.replace(/<[^>]+?>/gi,function(p){return s(p)}),i=u.converter._dispatch("hashHTMLSpans.after",i,t,u),i}),r.subParser("unhashHTMLSpans",function(i,t,u){"use strict";i=u.converter._dispatch("unhashHTMLSpans.before",i,t,u);for(var s=0;s]*>\\s*]*>","^ {0,3}\\s*
    ","gim"),i=u.converter._dispatch("hashPreCodeTags.after",i,t,u),i}),r.subParser("headers",function(i,t,u){"use strict";i=u.converter._dispatch("headers.before",i,t,u);var s=isNaN(parseInt(t.headerLevelStart))?1:parseInt(t.headerLevelStart),p=t.smoothLivePreview?/^(.+)[ \t]*\n={2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n=+[ \t]*\n+/gm,h=t.smoothLivePreview?/^(.+)[ \t]*\n-{2,}[ \t]*\n+/gm:/^(.+)[ \t]*\n-+[ \t]*\n+/gm;i=i.replace(p,function(T,b){var w=r.subParser("spanGamut")(b,t,u),y=t.noHeaderId?"":' id="'+g(b)+'"',l=s,k=""+w+"";return r.subParser("hashBlock")(k,t,u)}),i=i.replace(h,function(T,b){var w=r.subParser("spanGamut")(b,t,u),y=t.noHeaderId?"":' id="'+g(b)+'"',l=s+1,k=""+w+"";return r.subParser("hashBlock")(k,t,u)});var f=t.requireSpaceBeforeHeadingText?/^(#{1,6})[ \t]+(.+?)[ \t]*#*\n+/gm:/^(#{1,6})[ \t]*(.+?)[ \t]*#*\n+/gm;i=i.replace(f,function(T,b,w){var y=w;t.customizedHeaderId&&(y=w.replace(/\s?\{([^{]+?)}\s*$/,""));var l=r.subParser("spanGamut")(y,t,u),k=t.noHeaderId?"":' id="'+g(w)+'"',C=s-1+b.length,L=""+l+"";return r.subParser("hashBlock")(L,t,u)});function g(T){var b,w;if(t.customizedHeaderId){var y=T.match(/\{([^{]+?)}\s*$/);y&&y[1]&&(T=y[1])}return b=T,r.helper.isString(t.prefixHeaderId)?w=t.prefixHeaderId:t.prefixHeaderId===!0?w="section-":w="",t.rawPrefixHeaderId||(b=w+b),t.ghCompatibleHeaderId?b=b.replace(/ /g,"-").replace(/&/g,"").replace(/¨T/g,"").replace(/¨D/g,"").replace(/[&+$,\/:;=?@"#{}|^¨~\[\]`\\*)(%.!'<>]/g,"").toLowerCase():t.rawHeaderId?b=b.replace(/ /g,"-").replace(/&/g,"&").replace(/¨T/g,"\xA8").replace(/¨D/g,"$").replace(/["']/g,"-").toLowerCase():b=b.replace(/[^\w]/g,"").toLowerCase(),t.rawPrefixHeaderId&&(b=w+b),u.hashLinkCounts[b]?b=b+"-"+u.hashLinkCounts[b]++:u.hashLinkCounts[b]=1,b}return i=u.converter._dispatch("headers.after",i,t,u),i}),r.subParser("horizontalRule",function(i,t,u){"use strict";i=u.converter._dispatch("horizontalRule.before",i,t,u);var s=r.subParser("hashBlock")("
    ",t,u);return i=i.replace(/^ {0,2}( ?-){3,}[ \t]*$/gm,s),i=i.replace(/^ {0,2}( ?\*){3,}[ \t]*$/gm,s),i=i.replace(/^ {0,2}( ?_){3,}[ \t]*$/gm,s),i=u.converter._dispatch("horizontalRule.after",i,t,u),i}),r.subParser("images",function(i,t,u){"use strict";i=u.converter._dispatch("images.before",i,t,u);var s=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,p=/!\[([^\]]*?)][ \t]*()\([ \t]?<([^>]*)>(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(?:(["'])([^"]*?)\6))?[ \t]?\)/g,h=/!\[([^\]]*?)][ \t]*()\([ \t]??(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*(?:(["'])([^"]*?)\6)?[ \t]?\)/g,f=/!\[([^\]]*?)] ?(?:\n *)?\[([\s\S]*?)]()()()()()/g,g=/!\[([^\[\]]+)]()()()()()/g;function T(w,y,l,k,C,L,j,P){return k=k.replace(/\s/g,""),b(w,y,l,k,C,L,j,P)}function b(w,y,l,k,C,L,j,P){var q=u.gUrls,Y=u.gTitles,J=u.gDimensions;if(l=l.toLowerCase(),P||(P=""),w.search(/\(? ?(['"].*['"])?\)$/m)>-1)k="";else if(k===""||k===null)if((l===""||l===null)&&(l=y.toLowerCase().replace(/ ?\n/g," ")),k="#"+l,!r.helper.isUndefined(q[l]))k=q[l],r.helper.isUndefined(Y[l])||(P=Y[l]),r.helper.isUndefined(J[l])||(C=J[l].width,L=J[l].height);else return w;y=y.replace(/"/g,""").replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback),k=k.replace(r.helper.regexes.asteriskDashAndColon,r.helper.escapeCharactersCallback);var D=''+y+'","
    ")}),i=i.replace(/\b__(\S[\s\S]*?)__\b/g,function(p,h){return s(h,"","")}),i=i.replace(/\b_(\S[\s\S]*?)_\b/g,function(p,h){return s(h,"","")})):(i=i.replace(/___(\S[\s\S]*?)___/g,function(p,h){return/\S$/.test(h)?s(h,"",""):p}),i=i.replace(/__(\S[\s\S]*?)__/g,function(p,h){return/\S$/.test(h)?s(h,"",""):p}),i=i.replace(/_([^\s_][\s\S]*?)_/g,function(p,h){return/\S$/.test(h)?s(h,"",""):p})),t.literalMidWordAsterisks?(i=i.replace(/([^*]|^)\B\*\*\*(\S[\s\S]*?)\*\*\*\B(?!\*)/g,function(p,h,f){return s(f,h+"","")}),i=i.replace(/([^*]|^)\B\*\*(\S[\s\S]*?)\*\*\B(?!\*)/g,function(p,h,f){return s(f,h+"","")}),i=i.replace(/([^*]|^)\B\*(\S[\s\S]*?)\*\B(?!\*)/g,function(p,h,f){return s(f,h+"","")})):(i=i.replace(/\*\*\*(\S[\s\S]*?)\*\*\*/g,function(p,h){return/\S$/.test(h)?s(h,"",""):p}),i=i.replace(/\*\*(\S[\s\S]*?)\*\*/g,function(p,h){return/\S$/.test(h)?s(h,"",""):p}),i=i.replace(/\*([^\s*][\s\S]*?)\*/g,function(p,h){return/\S$/.test(h)?s(h,"",""):p})),i=u.converter._dispatch("italicsAndBold.after",i,t,u),i}),r.subParser("lists",function(i,t,u){"use strict";function s(f,g){u.gListLevel++,f=f.replace(/\n{2,}$/,` +`),f+="\xA80";var T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0| {0,3}([*+-]|\d+[.])[ \t]+))/gm,b=/\n[ \t]*\n(?!¨0)/.test(f);return t.disableForced4SpacesIndentedSublists&&(T=/(\n)?(^ {0,3})([*+-]|\d+[.])[ \t]+((\[(x|X| )?])?[ \t]*[^\r]+?(\n{1,2}))(?=\n*(¨0|\2([*+-]|\d+[.])[ \t]+))/gm),f=f.replace(T,function(w,y,l,k,C,L,j){j=j&&j.trim()!=="";var P=r.subParser("outdent")(C,t,u),q="";return L&&t.tasklists&&(q=' class="task-list-item" style="list-style-type: none;"',P=P.replace(/^[ \t]*\[(x|X| )?]/m,function(){var Y='-1?(P=r.subParser("githubCodeBlocks")(P,t,u),P=r.subParser("blockGamut")(P,t,u)):(P=r.subParser("lists")(P,t,u),P=P.replace(/\n$/,""),P=r.subParser("hashHTMLBlocks")(P,t,u),P=P.replace(/\n\n+/g,` + +`),b?P=r.subParser("paragraphs")(P,t,u):P=r.subParser("spanGamut")(P,t,u)),P=P.replace("\xA8A",""),P=""+P+` +`,P}),f=f.replace(/¨0/g,""),u.gListLevel--,g&&(f=f.replace(/\s+$/,"")),f}function p(f,g){if(g==="ol"){var T=f.match(/^ *(\d+)\./);if(T&&T[1]!=="1")return' start="'+T[1]+'"'}return""}function h(f,g,T){var b=t.disableForced4SpacesIndentedSublists?/^ ?\d+\.[ \t]/gm:/^ {0,3}\d+\.[ \t]/gm,w=t.disableForced4SpacesIndentedSublists?/^ ?[*+-][ \t]/gm:/^ {0,3}[*+-][ \t]/gm,y=g==="ul"?b:w,l="";if(f.search(y)!==-1)(function C(L){var j=L.search(y),P=p(f,g);j!==-1?(l+=` + +<`+g+P+`> +`+s(L.slice(0,j),!!T)+" +`,g=g==="ul"?"ol":"ul",y=g==="ul"?b:w,C(L.slice(j))):l+=` + +<`+g+P+`> +`+s(L,!!T)+" +`})(f);else{var k=p(f,g);l=` + +<`+g+k+`> +`+s(f,!!T)+" +`}return l}return i=u.converter._dispatch("lists.before",i,t,u),i+="\xA80",u.gListLevel?i=i.replace(/^(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(f,g,T){var b=T.search(/[*+-]/g)>-1?"ul":"ol";return h(g,b,!0)}):i=i.replace(/(\n\n|^\n?)(( {0,3}([*+-]|\d+[.])[ \t]+)[^\r]+?(¨0|\n{2,}(?=\S)(?![ \t]*(?:[*+-]|\d+[.])[ \t]+)))/gm,function(f,g,T,b){var w=b.search(/[*+-]/g)>-1?"ul":"ol";return h(T,w,!1)}),i=i.replace(/¨0/,""),i=u.converter._dispatch("lists.after",i,t,u),i}),r.subParser("metadata",function(i,t,u){"use strict";if(!t.metadata)return i;i=u.converter._dispatch("metadata.before",i,t,u);function s(p){u.metadata.raw=p,p=p.replace(/&/g,"&").replace(/"/g,"""),p=p.replace(/\n {4}/g," "),p.replace(/^([\S ]+): +([\s\S]+?)$/gm,function(h,f,g){return u.metadata.parsed[f]=g,""})}return i=i.replace(/^\s*«««+(\S*?)\n([\s\S]+?)\n»»»+\n/,function(p,h,f){return s(f),"\xA8M"}),i=i.replace(/^\s*---+(\S*?)\n([\s\S]+?)\n---+\n/,function(p,h,f){return h&&(u.metadata.format=h),s(f),"\xA8M"}),i=i.replace(/¨M/g,""),i=u.converter._dispatch("metadata.after",i,t,u),i}),r.subParser("outdent",function(i,t,u){"use strict";return i=u.converter._dispatch("outdent.before",i,t,u),i=i.replace(/^(\t|[ ]{1,4})/gm,"\xA80"),i=i.replace(/¨0/g,""),i=u.converter._dispatch("outdent.after",i,t,u),i}),r.subParser("paragraphs",function(i,t,u){"use strict";i=u.converter._dispatch("paragraphs.before",i,t,u),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,"");for(var s=i.split(/\n{2,}/g),p=[],h=s.length,f=0;f=0?p.push(g):g.search(/\S/)>=0&&(g=r.subParser("spanGamut")(g,t,u),g=g.replace(/^([ \t]*)/g,"

    "),g+="

    ",p.push(g))}for(h=p.length,f=0;f]*>\s*]*>/.test(b)&&(w=!0)}p[f]=b}return i=p.join(` +`),i=i.replace(/^\n+/g,""),i=i.replace(/\n+$/g,""),u.converter._dispatch("paragraphs.after",i,t,u)}),r.subParser("runExtension",function(i,t,u,s){"use strict";if(i.filter)t=i.filter(t,s.converter,u);else if(i.regex){var p=i.regex;p instanceof RegExp||(p=new RegExp(p,"g")),t=t.replace(p,i.replace)}return t}),r.subParser("spanGamut",function(i,t,u){"use strict";return i=u.converter._dispatch("spanGamut.before",i,t,u),i=r.subParser("codeSpans")(i,t,u),i=r.subParser("escapeSpecialCharsWithinTagAttributes")(i,t,u),i=r.subParser("encodeBackslashEscapes")(i,t,u),i=r.subParser("images")(i,t,u),i=r.subParser("anchors")(i,t,u),i=r.subParser("autoLinks")(i,t,u),i=r.subParser("simplifiedAutoLinks")(i,t,u),i=r.subParser("emoji")(i,t,u),i=r.subParser("underline")(i,t,u),i=r.subParser("italicsAndBold")(i,t,u),i=r.subParser("strikethrough")(i,t,u),i=r.subParser("ellipsis")(i,t,u),i=r.subParser("hashHTMLSpans")(i,t,u),i=r.subParser("encodeAmpsAndAngles")(i,t,u),t.simpleLineBreaks?/\n\n¨K/.test(i)||(i=i.replace(/\n+/g,`
    +`)):i=i.replace(/ +\n/g,`
    +`),i=u.converter._dispatch("spanGamut.after",i,t,u),i}),r.subParser("strikethrough",function(i,t,u){"use strict";function s(p){return t.simplifiedAutoLink&&(p=r.subParser("simplifiedAutoLinks")(p,t,u)),""+p+""}return t.strikethrough&&(i=u.converter._dispatch("strikethrough.before",i,t,u),i=i.replace(/(?:~){2}([\s\S]+?)(?:~){2}/g,function(p,h){return s(h)}),i=u.converter._dispatch("strikethrough.after",i,t,u)),i}),r.subParser("stripLinkDefinitions",function(i,t,u){"use strict";var s=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*\s]+)>?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n+|(?=¨0))/gm,p=/^ {0,3}\[(.+)]:[ \t]*\n?[ \t]*?(?: =([*\d]+[A-Za-z%]{0,4})x([*\d]+[A-Za-z%]{0,4}))?[ \t]*\n?[ \t]*(?:(\n*)["|'(](.+?)["|')][ \t]*)?(?:\n\n|(?=¨0)|(?=\n\[))/gm;i+="\xA80";var h=function(f,g,T,b,w,y,l){return g=g.toLowerCase(),T.match(/^data:.+?\/.+?;base64,/)?u.gUrls[g]=T.replace(/\s/g,""):u.gUrls[g]=r.subParser("encodeAmpsAndAngles")(T,t,u),y?y+l:(l&&(u.gTitles[g]=l.replace(/"|'/g,""")),t.parseImgDimensions&&b&&w&&(u.gDimensions[g]={width:b,height:w}),"")};return i=i.replace(p,h),i=i.replace(s,h),i=i.replace(/¨0/,""),i}),r.subParser("tables",function(i,t,u){"use strict";if(!t.tables)return i;var s=/^ {0,3}\|?.+\|.+\n {0,3}\|?[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*:?[ \t]*(?:[-=]){2,}[\s\S]+?(?:\n\n|¨0)/gm,p=/^ {0,3}\|.+\|[ \t]*\n {0,3}\|[ \t]*:?[ \t]*(?:[-=]){2,}[ \t]*:?[ \t]*\|[ \t]*\n( {0,3}\|.+\|[ \t]*\n)*(?:\n|¨0)/gm;function h(w){return/^:[ \t]*--*$/.test(w)?' style="text-align:left;"':/^--*[ \t]*:[ \t]*$/.test(w)?' style="text-align:right;"':/^:[ \t]*--*[ \t]*:$/.test(w)?' style="text-align:center;"':""}function f(w,y){var l="";return w=w.trim(),(t.tablesHeaderId||t.tableHeaderId)&&(l=' id="'+w.replace(/ /g,"_").toLowerCase()+'"'),w=r.subParser("spanGamut")(w,t,u),""+w+` +`}function g(w,y){var l=r.subParser("spanGamut")(w,t,u);return""+l+` +`}function T(w,y){for(var l=` + + +`,k=w.length,C=0;C + + +`,C=0;C +`;for(var L=0;L +`}return l+=` +
    +`,l}function b(w){var y,l=w.split(` +`);for(y=0;y"+p+""}),i=i.replace(/\b__(\S[\s\S]*?)__\b/g,function(s,p){return""+p+""})):(i=i.replace(/___(\S[\s\S]*?)___/g,function(s,p){return/\S$/.test(p)?""+p+"":s}),i=i.replace(/__(\S[\s\S]*?)__/g,function(s,p){return/\S$/.test(p)?""+p+"":s})),i=i.replace(/(_)/g,r.helper.escapeCharactersCallback),i=u.converter._dispatch("underline.after",i,t,u)),i}),r.subParser("unescapeSpecialChars",function(i,t,u){"use strict";return i=u.converter._dispatch("unescapeSpecialChars.before",i,t,u),i=i.replace(/¨E(\d+)E/g,function(s,p){var h=parseInt(p);return String.fromCharCode(h)}),i=u.converter._dispatch("unescapeSpecialChars.after",i,t,u),i}),r.subParser("makeMarkdown.blockquote",function(i,t){"use strict";var u="";if(i.hasChildNodes())for(var s=i.childNodes,p=s.length,h=0;h "+u.split(` +`).join(` +> `),u}),r.subParser("makeMarkdown.codeBlock",function(i,t){"use strict";var u=i.getAttribute("language"),s=i.getAttribute("precodenum");return"```"+u+` +`+t.preList[s]+"\n```"}),r.subParser("makeMarkdown.codeSpan",function(i){"use strict";return"`"+i.innerHTML+"`"}),r.subParser("makeMarkdown.emphasis",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="*";for(var s=i.childNodes,p=s.length,h=0;h",i.hasAttribute("width")&&i.hasAttribute("height")&&(t+=" ="+i.getAttribute("width")+"x"+i.getAttribute("height")),i.hasAttribute("title")&&(t+=' "'+i.getAttribute("title")+'"'),t+=")"),t}),r.subParser("makeMarkdown.links",function(i,t){"use strict";var u="";if(i.hasChildNodes()&&i.hasAttribute("href")){var s=i.childNodes,p=s.length;u="[";for(var h=0;h",i.hasAttribute("title")&&(u+=' "'+i.getAttribute("title")+'"'),u+=")"}return u}),r.subParser("makeMarkdown.list",function(i,t,u){"use strict";var s="";if(!i.hasChildNodes())return"";for(var p=i.childNodes,h=p.length,f=i.getAttribute("start")||1,g=0;g +`,s.trim()}),r.subParser("makeMarkdown.listItem",function(i,t){"use strict";for(var u="",s=i.childNodes,p=s.length,h=0;h + +`;if(i.nodeType!==1)return"";var p=i.tagName.toLowerCase();switch(p){case"h1":u||(s=r.subParser("makeMarkdown.header")(i,t,1)+` + +`);break;case"h2":u||(s=r.subParser("makeMarkdown.header")(i,t,2)+` + +`);break;case"h3":u||(s=r.subParser("makeMarkdown.header")(i,t,3)+` + +`);break;case"h4":u||(s=r.subParser("makeMarkdown.header")(i,t,4)+` + +`);break;case"h5":u||(s=r.subParser("makeMarkdown.header")(i,t,5)+` + +`);break;case"h6":u||(s=r.subParser("makeMarkdown.header")(i,t,6)+` + +`);break;case"p":u||(s=r.subParser("makeMarkdown.paragraph")(i,t)+` + +`);break;case"blockquote":u||(s=r.subParser("makeMarkdown.blockquote")(i,t)+` + +`);break;case"hr":u||(s=r.subParser("makeMarkdown.hr")(i,t)+` + +`);break;case"ol":u||(s=r.subParser("makeMarkdown.list")(i,t,"ol")+` + +`);break;case"ul":u||(s=r.subParser("makeMarkdown.list")(i,t,"ul")+` + +`);break;case"precode":u||(s=r.subParser("makeMarkdown.codeBlock")(i,t)+` + +`);break;case"pre":u||(s=r.subParser("makeMarkdown.pre")(i,t)+` + +`);break;case"table":u||(s=r.subParser("makeMarkdown.table")(i,t)+` + +`);break;case"code":s=r.subParser("makeMarkdown.codeSpan")(i,t);break;case"em":case"i":s=r.subParser("makeMarkdown.emphasis")(i,t);break;case"strong":case"b":s=r.subParser("makeMarkdown.strong")(i,t);break;case"del":s=r.subParser("makeMarkdown.strikethrough")(i,t);break;case"a":s=r.subParser("makeMarkdown.links")(i,t);break;case"img":s=r.subParser("makeMarkdown.image")(i,t);break;default:s=i.outerHTML+` + +`}return s}),r.subParser("makeMarkdown.paragraph",function(i,t){"use strict";var u="";if(i.hasChildNodes())for(var s=i.childNodes,p=s.length,h=0;h"+t.preList[u]+""}),r.subParser("makeMarkdown.strikethrough",function(i,t){"use strict";var u="";if(i.hasChildNodes()){u+="~~";for(var s=i.childNodes,p=s.length,h=0;htr>th"),h=i.querySelectorAll("tbody>tr"),f,g;for(f=0;fC&&(C=L)}for(f=0;f/g,"\\$1>"),t=t.replace(/^#/gm,"\\#"),t=t.replace(/^(\s*)([-=]{3,})(\s*)$/,"$1\\$2$3"),t=t.replace(/^( {0,3}\d+)\./gm,"$1\\."),t=t.replace(/^( {0,3})([+-])/gm,"$1\\$2"),t=t.replace(/]([\s]*)\(/g,"\\]$1\\("),t=t.replace(/^ {0,3}\[([\S \t]*?)]:/gm,"\\[$1]:"),t});var ue=this;typeof define=="function"&&define.amd?define(function(){"use strict";return r}):typeof Ue!="undefined"&&Ue.exports?Ue.exports=r:ue.showdown=r}).call(Ur)});var pe=H((hl,fe)=>{"use strict";function Gr(e){return typeof e=="undefined"||e===null}function Vu(e){return typeof e=="object"&&e!==null}function Wu(e){return Array.isArray(e)?e:Gr(e)?[]:[e]}function Gu(e,n){var r,a,d,o;if(n)for(o=Object.keys(n),r=0,a=o.length;r{"use strict";function Me(e,n){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=n,this.message=(this.reason||"(unknown reason)")+(this.mark?" "+this.mark.toString():""),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}Me.prototype=Object.create(Error.prototype);Me.prototype.constructor=Me;Me.prototype.toString=function(n){var r=this.name+": ";return r+=this.reason||"(unknown reason)",!n&&this.mark&&(r+=" "+this.mark.toString()),r};Yr.exports=Me});var Zr=H((_l,Jr)=>{"use strict";var Kr=pe();function pr(e,n,r,a,d){this.name=e,this.buffer=n,this.position=r,this.line=a,this.column=d}pr.prototype.getSnippet=function(n,r){var a,d,o,c,m;if(!this.buffer)return null;for(n=n||4,r=r||75,a="",d=this.position;d>0&&`\0\r +\x85\u2028\u2029`.indexOf(this.buffer.charAt(d-1))===-1;)if(d-=1,this.position-d>r/2-1){a=" ... ",d+=5;break}for(o="",c=this.position;cr/2-1){o=" ... ",c-=5;break}return m=this.buffer.slice(d,c),Kr.repeat(" ",n)+a+m+o+` +`+Kr.repeat(" ",n+this.position-d+a.length)+"^"};pr.prototype.toString=function(n){var r,a="";return this.name&&(a+='in "'+this.name+'" '),a+="at line "+(this.line+1)+", column "+(this.column+1),n||(r=this.getSnippet(),r&&(a+=`: +`+r)),a};Jr.exports=pr});var V=H((wl,Xr)=>{"use strict";var Qr=ve(),Ju=["kind","resolve","construct","instanceOf","predicate","represent","defaultStyle","styleAliases"],Zu=["scalar","sequence","mapping"];function Qu(e){var n={};return e!==null&&Object.keys(e).forEach(function(r){e[r].forEach(function(a){n[String(a)]=r})}),n}function Xu(e,n){if(n=n||{},Object.keys(n).forEach(function(r){if(Ju.indexOf(r)===-1)throw new Qr('Unknown option "'+r+'" is met in definition of "'+e+'" YAML type.')}),this.tag=e,this.kind=n.kind||null,this.resolve=n.resolve||function(){return!0},this.construct=n.construct||function(r){return r},this.instanceOf=n.instanceOf||null,this.predicate=n.predicate||null,this.represent=n.represent||null,this.defaultStyle=n.defaultStyle||null,this.styleAliases=Qu(n.styleAliases||null),Zu.indexOf(this.kind)===-1)throw new Qr('Unknown kind "'+this.kind+'" is specified for "'+e+'" YAML type.')}Xr.exports=Xu});var me=H((bl,rn)=>{"use strict";var en=pe(),Ge=ve(),ea=V();function mr(e,n,r){var a=[];return e.include.forEach(function(d){r=mr(d,n,r)}),e[n].forEach(function(d){r.forEach(function(o,c){o.tag===d.tag&&o.kind===d.kind&&a.push(c)}),r.push(d)}),r.filter(function(d,o){return a.indexOf(o)===-1})}function ra(){var e={scalar:{},sequence:{},mapping:{},fallback:{}},n,r;function a(d){e[d.kind][d.tag]=e.fallback[d.tag]=d}for(n=0,r=arguments.length;n{"use strict";var na=V();nn.exports=new na("tag:yaml.org,2002:str",{kind:"scalar",construct:function(e){return e!==null?e:""}})});var tn=H((yl,an)=>{"use strict";var ia=V();an.exports=new ia("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(e){return e!==null?e:[]}})});var on=H((kl,dn)=>{"use strict";var ua=V();dn.exports=new ua("tag:yaml.org,2002:map",{kind:"mapping",construct:function(e){return e!==null?e:{}}})});var Ye=H((Tl,cn)=>{"use strict";var aa=me();cn.exports=new aa({explicit:[un(),tn(),on()]})});var ln=H((xl,sn)=>{"use strict";var ta=V();function da(e){if(e===null)return!0;var n=e.length;return n===1&&e==="~"||n===4&&(e==="null"||e==="Null"||e==="NULL")}function oa(){return null}function ca(e){return e===null}sn.exports=new ta("tag:yaml.org,2002:null",{kind:"scalar",resolve:da,construct:oa,predicate:ca,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"}},defaultStyle:"lowercase"})});var pn=H((Al,fn)=>{"use strict";var sa=V();function la(e){if(e===null)return!1;var n=e.length;return n===4&&(e==="true"||e==="True"||e==="TRUE")||n===5&&(e==="false"||e==="False"||e==="FALSE")}function fa(e){return e==="true"||e==="True"||e==="TRUE"}function pa(e){return Object.prototype.toString.call(e)==="[object Boolean]"}fn.exports=new sa("tag:yaml.org,2002:bool",{kind:"scalar",resolve:la,construct:fa,predicate:pa,represent:{lowercase:function(e){return e?"true":"false"},uppercase:function(e){return e?"TRUE":"FALSE"},camelcase:function(e){return e?"True":"False"}},defaultStyle:"lowercase"})});var hn=H((El,mn)=>{"use strict";var ma=pe(),ha=V();function ga(e){return 48<=e&&e<=57||65<=e&&e<=70||97<=e&&e<=102}function _a(e){return 48<=e&&e<=55}function wa(e){return 48<=e&&e<=57}function ba(e){if(e===null)return!1;var n=e.length,r=0,a=!1,d;if(!n)return!1;if(d=e[r],(d==="-"||d==="+")&&(d=e[++r]),d==="0"){if(r+1===n)return!0;if(d=e[++r],d==="b"){for(r++;r=0?"0b"+e.toString(2):"-0b"+e.toString(2).slice(1)},octal:function(e){return e>=0?"0"+e.toString(8):"-0"+e.toString(8).slice(1)},decimal:function(e){return e.toString(10)},hexadecimal:function(e){return e>=0?"0x"+e.toString(16).toUpperCase():"-0x"+e.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})});var wn=H((Cl,_n)=>{"use strict";var gn=pe(),ka=V(),Ta=new RegExp("^(?:[-+]?(?:0|[1-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\\.[0-9_]*|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function xa(e){return!(e===null||!Ta.test(e)||e[e.length-1]==="_")}function Aa(e){var n,r,a,d;return n=e.replace(/_/g,"").toLowerCase(),r=n[0]==="-"?-1:1,d=[],"+-".indexOf(n[0])>=0&&(n=n.slice(1)),n===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:n===".nan"?NaN:n.indexOf(":")>=0?(n.split(":").forEach(function(o){d.unshift(parseFloat(o,10))}),n=0,a=1,d.forEach(function(o){n+=o*a,a*=60}),r*n):r*parseFloat(n,10)}var Ea=/^[-+]?[0-9]+e/;function Ca(e,n){var r;if(isNaN(e))switch(n){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(n){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(n){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(gn.isNegativeZero(e))return"-0.0";return r=e.toString(10),Ea.test(r)?r.replace("e",".e"):r}function Sa(e){return Object.prototype.toString.call(e)==="[object Number]"&&(e%1!=0||gn.isNegativeZero(e))}_n.exports=new ka("tag:yaml.org,2002:float",{kind:"scalar",resolve:xa,construct:Aa,predicate:Sa,represent:Ca,defaultStyle:"lowercase"})});var hr=H((Sl,bn)=>{"use strict";var La=me();bn.exports=new La({include:[Ye()],implicit:[ln(),pn(),hn(),wn()]})});var gr=H((Ll,vn)=>{"use strict";var Pa=me();vn.exports=new Pa({include:[hr()]})});var xn=H((Pl,Tn)=>{"use strict";var Ma=V(),yn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),kn=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function Ra(e){return e===null?!1:yn.exec(e)!==null||kn.exec(e)!==null}function Ia(e){var n,r,a,d,o,c,m,_=0,x=null,S,A,E;if(n=yn.exec(e),n===null&&(n=kn.exec(e)),n===null)throw new Error("Date resolve error");if(r=+n[1],a=+n[2]-1,d=+n[3],!n[4])return new Date(Date.UTC(r,a,d));if(o=+n[4],c=+n[5],m=+n[6],n[7]){for(_=n[7].slice(0,3);_.length<3;)_+="0";_=+_}return n[9]&&(S=+n[10],A=+(n[11]||0),x=(S*60+A)*6e4,n[9]==="-"&&(x=-x)),E=new Date(Date.UTC(r,a,d,o,c,m,_)),x&&E.setTime(E.getTime()-x),E}function Fa(e){return e.toISOString()}Tn.exports=new Ma("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:Ra,construct:Ia,instanceOf:Date,represent:Fa})});var En=H((Ml,An)=>{"use strict";var ja=V();function Ha(e){return e==="<<"||e===null}An.exports=new ja("tag:yaml.org,2002:merge",{kind:"scalar",resolve:Ha})});var Ln=H((Rl,Sn)=>{"use strict";var he;try{Cn=require,he=Cn("buffer").Buffer}catch(e){}var Cn,za=V(),_r=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`;function Oa(e){if(e===null)return!1;var n,r,a=0,d=e.length,o=_r;for(r=0;r64)){if(n<0)return!1;a+=6}return a%8==0}function Da(e){var n,r,a=e.replace(/[\r\n=]/g,""),d=a.length,o=_r,c=0,m=[];for(n=0;n>16&255),m.push(c>>8&255),m.push(c&255)),c=c<<6|o.indexOf(a.charAt(n));return r=d%4*6,r===0?(m.push(c>>16&255),m.push(c>>8&255),m.push(c&255)):r===18?(m.push(c>>10&255),m.push(c>>2&255)):r===12&&m.push(c>>4&255),he?he.from?he.from(m):new he(m):m}function Na(e){var n="",r=0,a,d,o=e.length,c=_r;for(a=0;a>18&63],n+=c[r>>12&63],n+=c[r>>6&63],n+=c[r&63]),r=(r<<8)+e[a];return d=o%3,d===0?(n+=c[r>>18&63],n+=c[r>>12&63],n+=c[r>>6&63],n+=c[r&63]):d===2?(n+=c[r>>10&63],n+=c[r>>4&63],n+=c[r<<2&63],n+=c[64]):d===1&&(n+=c[r>>2&63],n+=c[r<<4&63],n+=c[64],n+=c[64]),n}function Ba(e){return he&&he.isBuffer(e)}Sn.exports=new za("tag:yaml.org,2002:binary",{kind:"scalar",resolve:Oa,construct:Da,predicate:Ba,represent:Na})});var Mn=H((Il,Pn)=>{"use strict";var qa=V(),$a=Object.prototype.hasOwnProperty,Ua=Object.prototype.toString;function Va(e){if(e===null)return!0;var n=[],r,a,d,o,c,m=e;for(r=0,a=m.length;r{"use strict";var Ga=V(),Ya=Object.prototype.toString;function Ka(e){if(e===null)return!0;var n,r,a,d,o,c=e;for(o=new Array(c.length),n=0,r=c.length;n{"use strict";var Za=V(),Qa=Object.prototype.hasOwnProperty;function Xa(e){if(e===null)return!0;var n,r=e;for(n in r)if(Qa.call(r,n)&&r[n]!==null)return!1;return!0}function et(e){return e!==null?e:{}}Fn.exports=new Za("tag:yaml.org,2002:set",{kind:"mapping",resolve:Xa,construct:et})});var ke=H((Hl,Hn)=>{"use strict";var rt=me();Hn.exports=new rt({include:[gr()],implicit:[xn(),En()],explicit:[Ln(),Mn(),In(),jn()]})});var On=H((zl,zn)=>{"use strict";var nt=V();function it(){return!0}function ut(){}function at(){return""}function tt(e){return typeof e=="undefined"}zn.exports=new nt("tag:yaml.org,2002:js/undefined",{kind:"scalar",resolve:it,construct:ut,predicate:tt,represent:at})});var Nn=H((Ol,Dn)=>{"use strict";var dt=V();function ot(e){if(e===null||e.length===0)return!1;var n=e,r=/\/([gim]*)$/.exec(e),a="";return!(n[0]==="/"&&(r&&(a=r[1]),a.length>3||n[n.length-a.length-1]!=="/"))}function ct(e){var n=e,r=/\/([gim]*)$/.exec(e),a="";return n[0]==="/"&&(r&&(a=r[1]),n=n.slice(1,n.length-a.length-1)),new RegExp(n,a)}function st(e){var n="/"+e.source+"/";return e.global&&(n+="g"),e.multiline&&(n+="m"),e.ignoreCase&&(n+="i"),n}function lt(e){return Object.prototype.toString.call(e)==="[object RegExp]"}Dn.exports=new dt("tag:yaml.org,2002:js/regexp",{kind:"scalar",resolve:ot,construct:ct,predicate:lt,represent:st})});var $n=H((Dl,qn)=>{"use strict";var Ke;try{Bn=require,Ke=Bn("esprima")}catch(e){typeof window!="undefined"&&(Ke=window.esprima)}var Bn,ft=V();function pt(e){if(e===null)return!1;try{var n="("+e+")",r=Ke.parse(n,{range:!0});return!(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")}catch(a){return!1}}function mt(e){var n="("+e+")",r=Ke.parse(n,{range:!0}),a=[],d;if(r.type!=="Program"||r.body.length!==1||r.body[0].type!=="ExpressionStatement"||r.body[0].expression.type!=="ArrowFunctionExpression"&&r.body[0].expression.type!=="FunctionExpression")throw new Error("Failed to resolve function");return r.body[0].expression.params.forEach(function(o){a.push(o.name)}),d=r.body[0].expression.body.range,r.body[0].expression.body.type==="BlockStatement"?new Function(a,n.slice(d[0]+1,d[1]-1)):new Function(a,"return "+n.slice(d[0],d[1]))}function ht(e){return e.toString()}function gt(e){return Object.prototype.toString.call(e)==="[object Function]"}qn.exports=new ft("tag:yaml.org,2002:js/function",{kind:"scalar",resolve:pt,construct:mt,predicate:gt,represent:ht})});var Re=H((Nl,Vn)=>{"use strict";var Un=me();Vn.exports=Un.DEFAULT=new Un({include:[ke()],explicit:[On(),Nn(),$n()]})});var si=H((Bl,Ie)=>{"use strict";var oe=pe(),Wn=ve(),_t=Zr(),Gn=ke(),wt=Re(),ce=Object.prototype.hasOwnProperty,Je=1,Yn=2,Kn=3,Ze=4,wr=1,bt=2,Jn=3,vt=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,yt=/[\x85\u2028\u2029]/,kt=/[,\[\]\{\}]/,Zn=/^(?:!|!!|![a-z\-]+!)$/i,Qn=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function Xn(e){return Object.prototype.toString.call(e)}function ae(e){return e===10||e===13}function ge(e){return e===9||e===32}function X(e){return e===9||e===32||e===10||e===13}function Te(e){return e===44||e===91||e===93||e===123||e===125}function Tt(e){var n;return 48<=e&&e<=57?e-48:(n=e|32,97<=n&&n<=102?n-97+10:-1)}function xt(e){return e===120?2:e===117?4:e===85?8:0}function At(e){return 48<=e&&e<=57?e-48:-1}function ei(e){return e===48?"\0":e===97?"\x07":e===98?"\b":e===116||e===9?" ":e===110?` +`:e===118?"\v":e===102?"\f":e===114?"\r":e===101?"":e===32?" ":e===34?'"':e===47?"/":e===92?"\\":e===78?"\x85":e===95?"\xA0":e===76?"\u2028":e===80?"\u2029":""}function Et(e){return e<=65535?String.fromCharCode(e):String.fromCharCode((e-65536>>10)+55296,(e-65536&1023)+56320)}var ri=new Array(256),ni=new Array(256);for(_e=0;_e<256;_e++)ri[_e]=ei(_e)?1:0,ni[_e]=ei(_e);var _e;function Ct(e,n){this.input=e,this.filename=n.filename||null,this.schema=n.schema||wt,this.onWarning=n.onWarning||null,this.legacy=n.legacy||!1,this.json=n.json||!1,this.listener=n.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=e.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.documents=[]}function ii(e,n){return new Wn(n,new _t(e.filename,e.input,e.position,e.line,e.position-e.lineStart))}function R(e,n){throw ii(e,n)}function Qe(e,n){e.onWarning&&e.onWarning.call(null,ii(e,n))}var ui={YAML:function(n,r,a){var d,o,c;n.version!==null&&R(n,"duplication of %YAML directive"),a.length!==1&&R(n,"YAML directive accepts exactly one argument"),d=/^([0-9]+)\.([0-9]+)$/.exec(a[0]),d===null&&R(n,"ill-formed argument of the YAML directive"),o=parseInt(d[1],10),c=parseInt(d[2],10),o!==1&&R(n,"unacceptable YAML version of the document"),n.version=a[0],n.checkLineBreaks=c<2,c!==1&&c!==2&&Qe(n,"unsupported YAML version of the document")},TAG:function(n,r,a){var d,o;a.length!==2&&R(n,"TAG directive accepts exactly two arguments"),d=a[0],o=a[1],Zn.test(d)||R(n,"ill-formed tag handle (first argument) of the TAG directive"),ce.call(n.tagMap,d)&&R(n,'there is a previously declared suffix for "'+d+'" tag handle'),Qn.test(o)||R(n,"ill-formed tag prefix (second argument) of the TAG directive"),n.tagMap[d]=o}};function se(e,n,r,a){var d,o,c,m;if(n1&&(e.result+=oe.repeat(` +`,n-1))}function St(e,n,r){var a,d,o,c,m,_,x,S,A=e.kind,E=e.result,v;if(v=e.input.charCodeAt(e.position),X(v)||Te(v)||v===35||v===38||v===42||v===33||v===124||v===62||v===39||v===34||v===37||v===64||v===96||(v===63||v===45)&&(d=e.input.charCodeAt(e.position+1),X(d)||r&&Te(d)))return!1;for(e.kind="scalar",e.result="",o=c=e.position,m=!1;v!==0;){if(v===58){if(d=e.input.charCodeAt(e.position+1),X(d)||r&&Te(d))break}else if(v===35){if(a=e.input.charCodeAt(e.position-1),X(a))break}else{if(e.position===e.lineStart&&Xe(e)||r&&Te(v))break;if(ae(v))if(_=e.line,x=e.lineStart,S=e.lineIndent,$(e,!1,-1),e.lineIndent>=n){m=!0,v=e.input.charCodeAt(e.position);continue}else{e.position=c,e.line=_,e.lineStart=x,e.lineIndent=S;break}}m&&(se(e,o,c,!1),vr(e,e.line-_),o=c=e.position,m=!1),ge(v)||(c=e.position+1),v=e.input.charCodeAt(++e.position)}return se(e,o,c,!1),e.result?!0:(e.kind=A,e.result=E,!1)}function Lt(e,n){var r,a,d;if(r=e.input.charCodeAt(e.position),r!==39)return!1;for(e.kind="scalar",e.result="",e.position++,a=d=e.position;(r=e.input.charCodeAt(e.position))!==0;)if(r===39)if(se(e,a,e.position,!0),r=e.input.charCodeAt(++e.position),r===39)a=e.position,e.position++,d=e.position;else return!0;else ae(r)?(se(e,a,d,!0),vr(e,$(e,!1,n)),a=d=e.position):e.position===e.lineStart&&Xe(e)?R(e,"unexpected end of the document within a single quoted scalar"):(e.position++,d=e.position);R(e,"unexpected end of the stream within a single quoted scalar")}function Pt(e,n){var r,a,d,o,c,m;if(m=e.input.charCodeAt(e.position),m!==34)return!1;for(e.kind="scalar",e.result="",e.position++,r=a=e.position;(m=e.input.charCodeAt(e.position))!==0;){if(m===34)return se(e,r,e.position,!0),e.position++,!0;if(m===92){if(se(e,r,e.position,!0),m=e.input.charCodeAt(++e.position),ae(m))$(e,!1,n);else if(m<256&&ri[m])e.result+=ni[m],e.position++;else if((c=xt(m))>0){for(d=c,o=0;d>0;d--)m=e.input.charCodeAt(++e.position),(c=Tt(m))>=0?o=(o<<4)+c:R(e,"expected hexadecimal character");e.result+=Et(o),e.position++}else R(e,"unknown escape sequence");r=a=e.position}else ae(m)?(se(e,r,a,!0),vr(e,$(e,!1,n)),r=a=e.position):e.position===e.lineStart&&Xe(e)?R(e,"unexpected end of the document within a double quoted scalar"):(e.position++,a=e.position)}R(e,"unexpected end of the stream within a double quoted scalar")}function Mt(e,n){var r=!0,a,d=e.tag,o,c=e.anchor,m,_,x,S,A,E={},v,M,F,I;if(I=e.input.charCodeAt(e.position),I===91)_=93,A=!1,o=[];else if(I===123)_=125,A=!0,o={};else return!1;for(e.anchor!==null&&(e.anchorMap[e.anchor]=o),I=e.input.charCodeAt(++e.position);I!==0;){if($(e,!0,n),I=e.input.charCodeAt(e.position),I===_)return e.position++,e.tag=d,e.anchor=c,e.kind=A?"mapping":"sequence",e.result=o,!0;r||R(e,"missed comma between flow collection entries"),M=v=F=null,x=S=!1,I===63&&(m=e.input.charCodeAt(e.position+1),X(m)&&(x=S=!0,e.position++,$(e,!0,n))),a=e.line,Ae(e,n,Je,!1,!0),M=e.tag,v=e.result,$(e,!0,n),I=e.input.charCodeAt(e.position),(S||e.line===a)&&I===58&&(x=!0,I=e.input.charCodeAt(++e.position),$(e,!0,n),Ae(e,n,Je,!1,!0),F=e.result),A?xe(e,o,E,M,v,F):x?o.push(xe(e,null,E,M,v,F)):o.push(v),$(e,!0,n),I=e.input.charCodeAt(e.position),I===44?(r=!0,I=e.input.charCodeAt(++e.position)):r=!1}R(e,"unexpected end of the stream within a flow collection")}function Rt(e,n){var r,a,d=wr,o=!1,c=!1,m=n,_=0,x=!1,S,A;if(A=e.input.charCodeAt(e.position),A===124)a=!1;else if(A===62)a=!0;else return!1;for(e.kind="scalar",e.result="";A!==0;)if(A=e.input.charCodeAt(++e.position),A===43||A===45)wr===d?d=A===43?Jn:bt:R(e,"repeat of a chomping mode identifier");else if((S=At(A))>=0)S===0?R(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):c?R(e,"repeat of an indentation width identifier"):(m=n+S-1,c=!0);else break;if(ge(A)){do A=e.input.charCodeAt(++e.position);while(ge(A));if(A===35)do A=e.input.charCodeAt(++e.position);while(!ae(A)&&A!==0)}for(;A!==0;){for(br(e),e.lineIndent=0,A=e.input.charCodeAt(e.position);(!c||e.lineIndentm&&(m=e.lineIndent),ae(A)){_++;continue}if(e.lineIndentn)&&_!==0)R(e,"bad indentation of a sequence entry");else if(e.lineIndentn)&&(Ae(e,n,Ze,!0,d)&&(M?E=e.result:v=e.result),M||(xe(e,x,S,A,E,v,o,c),A=E=v=null),$(e,!0,-1),I=e.input.charCodeAt(e.position)),e.lineIndent>n&&I!==0)R(e,"bad indentation of a mapping entry");else if(e.lineIndentn?_=1:e.lineIndent===n?_=0:e.lineIndentn?_=1:e.lineIndent===n?_=0:e.lineIndent tag; it should be "scalar", not "'+e.kind+'"'),A=0,E=e.implicitTypes.length;A tag; it should be "'+v.kind+'", not "'+e.kind+'"'),v.resolve(e.result)?(e.result=v.construct(e.result),e.anchor!==null&&(e.anchorMap[e.anchor]=e.result)):R(e,"cannot resolve a node with !<"+e.tag+"> explicit tag")):R(e,"unknown tag !<"+e.tag+">");return e.listener!==null&&e.listener("close",e),e.tag!==null||e.anchor!==null||S}function zt(e){var n=e.position,r,a,d,o=!1,c;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap={},e.anchorMap={};(c=e.input.charCodeAt(e.position))!==0&&($(e,!0,-1),c=e.input.charCodeAt(e.position),!(e.lineIndent>0||c!==37));){for(o=!0,c=e.input.charCodeAt(++e.position),r=e.position;c!==0&&!X(c);)c=e.input.charCodeAt(++e.position);for(a=e.input.slice(r,e.position),d=[],a.length<1&&R(e,"directive name must not be less than one character in length");c!==0;){for(;ge(c);)c=e.input.charCodeAt(++e.position);if(c===35){do c=e.input.charCodeAt(++e.position);while(c!==0&&!ae(c));break}if(ae(c))break;for(r=e.position;c!==0&&!X(c);)c=e.input.charCodeAt(++e.position);d.push(e.input.slice(r,e.position))}c!==0&&br(e),ce.call(ui,a)?ui[a](e,a,d):Qe(e,'unknown document directive "'+a+'"')}if($(e,!0,-1),e.lineIndent===0&&e.input.charCodeAt(e.position)===45&&e.input.charCodeAt(e.position+1)===45&&e.input.charCodeAt(e.position+2)===45?(e.position+=3,$(e,!0,-1)):o&&R(e,"directives end mark is expected"),Ae(e,e.lineIndent-1,Ze,!1,!0),$(e,!0,-1),e.checkLineBreaks&&yt.test(e.input.slice(n,e.position))&&Qe(e,"non-ASCII line breaks are interpreted as content"),e.documents.push(e.result),e.position===e.lineStart&&Xe(e)){e.input.charCodeAt(e.position)===46&&(e.position+=3,$(e,!0,-1));return}if(e.position{"use strict";var Fe=pe(),je=ve(),Nt=Re(),Bt=ke(),li=Object.prototype.toString,fi=Object.prototype.hasOwnProperty,qt=9,He=10,$t=13,Ut=32,Vt=33,Wt=34,pi=35,Gt=37,Yt=38,Kt=39,Jt=42,mi=44,Zt=45,hi=58,Qt=61,Xt=62,ed=63,rd=64,gi=91,_i=93,nd=96,wi=123,id=124,bi=125,K={};K[0]="\\0";K[7]="\\a";K[8]="\\b";K[9]="\\t";K[10]="\\n";K[11]="\\v";K[12]="\\f";K[13]="\\r";K[27]="\\e";K[34]='\\"';K[92]="\\\\";K[133]="\\N";K[160]="\\_";K[8232]="\\L";K[8233]="\\P";var ud=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"];function ad(e,n){var r,a,d,o,c,m,_;if(n===null)return{};for(r={},a=Object.keys(n),d=0,o=a.length;d0?e.charCodeAt(o-1):null,E=E&&ki(c,m)}else{for(o=0;oa&&e[A+1]!==" ",A=o);else if(!Ee(c))return er;m=o>0?e.charCodeAt(o-1):null,E=E&&ki(c,m)}x=x||S&&o-A-1>a&&e[A+1]!==" "}return!_&&!x?E&&!d(e)?xi:Ai:r>9&&Ti(e)?er:x?Ci:Ei}function ld(e,n,r,a){e.dump=function(){if(n.length===0)return"''";if(!e.noCompatMode&&ud.indexOf(n)!==-1)return"'"+n+"'";var d=e.indent*Math.max(1,r),o=e.lineWidth===-1?-1:Math.max(Math.min(e.lineWidth,40),e.lineWidth-d),c=a||e.flowLevel>-1&&r>=e.flowLevel;function m(_){return dd(e,_)}switch(sd(n,c,e.indent,o,m)){case xi:return n;case Ai:return"'"+n.replace(/'/g,"''")+"'";case Ei:return"|"+Si(n,e.indent)+Li(yi(n,d));case Ci:return">"+Si(n,e.indent)+Li(yi(fd(n,o),d));case er:return'"'+pd(n,o)+'"';default:throw new je("impossible error: invalid scalar style")}}()}function Si(e,n){var r=Ti(e)?String(n):"",a=e[e.length-1]===` +`,d=a&&(e[e.length-2]===` +`||e===` +`),o=d?"+":a?"":"-";return r+o+` +`}function Li(e){return e[e.length-1]===` +`?e.slice(0,-1):e}function fd(e,n){for(var r=/(\n+)([^\n]*)/g,a=function(){var x=e.indexOf(` +`);return x=x!==-1?x:e.length,r.lastIndex=x,Pi(e.slice(0,x),n)}(),d=e[0]===` +`||e[0]===" ",o,c;c=r.exec(e);){var m=c[1],_=c[2];o=_[0]===" ",a+=m+(!d&&!o&&_!==""?` +`:"")+Pi(_,n),d=o}return a}function Pi(e,n){if(e===""||e[0]===" ")return e;for(var r=/ [^ ]/g,a,d=0,o,c=0,m=0,_="";a=r.exec(e);)m=a.index,m-d>n&&(o=c>d?c:m,_+=` +`+e.slice(d,o),d=o+1),c=m;return _+=` +`,e.length-d>n&&c>d?_+=e.slice(d,c)+` +`+e.slice(c+1):_+=e.slice(d),_.slice(1)}function pd(e){for(var n="",r,a,d,o=0;o=55296&&r<=56319&&(a=e.charCodeAt(o+1),a>=56320&&a<=57343)){n+=vi((r-55296)*1024+a-56320+65536),o++;continue}d=K[r],n+=!d&&Ee(r)?e[o]:d||vi(r)}return n}function md(e,n,r){var a="",d=e.tag,o,c;for(o=0,c=r.length;o1024&&(S+="? "),S+=e.dump+(e.condenseFlow?'"':"")+":"+(e.condenseFlow?"":" "),!!we(e,n,x,!1,!1)&&(S+=e.dump,a+=S));e.tag=d,e.dump="{"+a+"}"}function _d(e,n,r,a){var d="",o=e.tag,c=Object.keys(r),m,_,x,S,A,E;if(e.sortKeys===!0)c.sort();else if(typeof e.sortKeys=="function")c.sort(e.sortKeys);else if(e.sortKeys)throw new je("sortKeys must be a boolean or a function");for(m=0,_=c.length;m<_;m+=1)E="",(!a||m!==0)&&(E+=yr(e,n)),x=c[m],S=r[x],!!we(e,n+1,x,!0,!0,!0)&&(A=e.tag!==null&&e.tag!=="?"||e.dump&&e.dump.length>1024,A&&(e.dump&&He===e.dump.charCodeAt(0)?E+="?":E+="? "),E+=e.dump,A&&(E+=yr(e,n)),!!we(e,n+1,S,!0,A)&&(e.dump&&He===e.dump.charCodeAt(0)?E+=":":E+=": ",E+=e.dump,d+=E));e.tag=o,e.dump=d||"{}"}function Mi(e,n,r){var a,d,o,c,m,_;for(d=r?e.explicitTypes:e.implicitTypes,o=0,c=d.length;o tag resolver accepts not "'+_+'" style');e.dump=a}return!0}return!1}function we(e,n,r,a,d,o){e.tag=null,e.dump=r,Mi(e,r,!1)||Mi(e,r,!0);var c=li.call(e.dump);a&&(a=e.flowLevel<0||e.flowLevel>n);var m=c==="[object Object]"||c==="[object Array]",_,x;if(m&&(_=e.duplicates.indexOf(r),x=_!==-1),(e.tag!==null&&e.tag!=="?"||x||e.indent!==2&&n>0)&&(d=!1),x&&e.usedDuplicates[_])e.dump="*ref_"+_;else{if(m&&x&&!e.usedDuplicates[_]&&(e.usedDuplicates[_]=!0),c==="[object Object]")a&&Object.keys(e.dump).length!==0?(_d(e,n,e.dump,d),x&&(e.dump="&ref_"+_+e.dump)):(gd(e,n,e.dump),x&&(e.dump="&ref_"+_+" "+e.dump));else if(c==="[object Array]"){var S=e.noArrayIndent&&n>0?n-1:n;a&&e.dump.length!==0?(hd(e,S,e.dump,d),x&&(e.dump="&ref_"+_+e.dump)):(md(e,S,e.dump),x&&(e.dump="&ref_"+_+" "+e.dump))}else if(c==="[object String]")e.tag!=="?"&&ld(e,e.dump,n,o);else{if(e.skipInvalid)return!1;throw new je("unacceptable kind of an object to dump "+c)}e.tag!==null&&e.tag!=="?"&&(e.dump="!<"+e.tag+"> "+e.dump)}return!0}function wd(e,n){var r=[],a=[],d,o;for(Tr(e,r,a),d=0,o=a.length;d{"use strict";var rr=si(),Fi=Ii();function nr(e){return function(){throw new Error("Function "+e+" is deprecated and cannot be used.")}}B.exports.Type=V();B.exports.Schema=me();B.exports.FAILSAFE_SCHEMA=Ye();B.exports.JSON_SCHEMA=hr();B.exports.CORE_SCHEMA=gr();B.exports.DEFAULT_SAFE_SCHEMA=ke();B.exports.DEFAULT_FULL_SCHEMA=Re();B.exports.load=rr.load;B.exports.loadAll=rr.loadAll;B.exports.safeLoad=rr.safeLoad;B.exports.safeLoadAll=rr.safeLoadAll;B.exports.dump=Fi.dump;B.exports.safeDump=Fi.safeDump;B.exports.YAMLException=ve();B.exports.MINIMAL_SCHEMA=Ye();B.exports.SAFE_SCHEMA=ke();B.exports.DEFAULT_SCHEMA=Re();B.exports.scan=nr("scan");B.exports.parse=nr("parse");B.exports.compose=nr("compose");B.exports.addConstructor=nr("addConstructor")});var zi=H((Ul,Hi)=>{"use strict";var vd=ji();Hi.exports=vd});var Ni=H((Vl,Ar)=>{var Oi=zi(),yd="\\ufeff?",kd=typeof process!="undefined"?process.platform:"",Td="^("+yd+"(= yaml =|---)$([\\s\\S]*?)^(?:\\2|\\.\\.\\.)\\s*$"+(kd==="win32"?"\\r?":"")+"(?:\\n)?)",Di=new RegExp(Td,"m");Ar.exports=xd;Ar.exports.test=Cd;function xd(e,n){e=e||"";var r={allowUnsafe:!1};n=n instanceof Object?cr(cr({},r),n):r,n.allowUnsafe=Boolean(n.allowUnsafe);var a=e.split(/(\r?\n)/);return a[0]&&/= yaml =|---/.test(a[0])?Ed(e,n.allowUnsafe):{attributes:{},body:e,bodyBegin:1}}function Ad(e,n){for(var r=1,a=n.indexOf(` +`),d=e.index+e[0].length;a!==-1;){if(a>=d)return r;r++,a=n.indexOf(` +`,a+1)}return r}function Ed(e,n){var r=Di.exec(e);if(!r)return{attributes:{},body:e,bodyBegin:1};var a=n?Oi.load:Oi.safeLoad,d=r[r.length-1].replace(/^\s+|\s+$/g,""),o=a(d)||{},c=e.replace(r[0],""),m=Ad(r,e);return{attributes:o,body:c,bodyBegin:m,frontmatter:d}}function Cd(e){return e=e||"",Di.test(e)}});mu(exports,{default:()=>Lr});var le=Z(require("obsidian"));var ie=Z(require("obsidian")),Hr={cm6RenderAll:!0,renderImages:!0,renderPDF:!0,renderIframe:!1,renderExcalidraw:!1,renderMsgFile:!1,renderRichLink:!1,renderTransclusion:!1,previewOnHoverInternalLink:!1,refreshImagesAfterChange:!1,WYSIWYG:!1},sr=class extends ie.PluginSettingTab{constructor(n,r){super(n,r);this.plugin=r}display(){let{containerEl:n}=this;n.empty(),n.createEl("h1",{text:"Image in Editor Settings"}).addClass("image-in-editor-settings-main-header");let a=n.createDiv("tip");a.addClass("oz-tip-div");let o=a.createEl("a",{href:"https://revolut.me/ozante"}).createEl("img",{attr:{src:"https://raw.githubusercontent.com/ozntel/file-tree-alternative/main/images/tip%20the%20artist_v2.png"}});o.height=55;let c=n.createDiv("coffee");c.addClass("oz-coffee-div");let _=c.createEl("a",{href:"https://ko-fi.com/L3L356V6Q"}).createEl("img",{attr:{src:"https://cdn.ko-fi.com/cdn/kofi2.png?v=3"}});_.height=45;let x=n.createEl("div");x.innerHTML=` +

    + The plugin will add image preview within the "Source Mode" of New Editor. + In case you have Live Preview enabled, the plugin will automatically detect this and won't render additionally to avoid duplication. +

    + `,new ie.Setting(n).setName("Render All").setDesc("Turn off this option if you want to stop rendering images in the editor source mode. Disabling requires vault reload.").addToggle(S=>{S.setValue(this.plugin.settings.cm6RenderAll).onChange(A=>{this.plugin.settings.cm6RenderAll=A,A?this.plugin.loadCM6Extension():this.plugin.unloadCM6Extension(),this.plugin.saveSettings()})}),new ie.Setting(n).setName("Render Images in Editor").setDesc("Turn on this option if you want Image files (jpeg, jpg, png, gif, svg, bmp, webp) to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderImages).onChange(A=>{this.plugin.settings.renderImages=A,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Transclusion in Editor").setDesc("Turn on this option if you want transclusions to be rendered in Editor. Once this is enabled, you will have custom options for transclusions below.").addToggle(S=>S.setValue(this.plugin.settings.renderTransclusion).onChange(A=>{this.plugin.settings.renderTransclusion=A,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render PDFs in Editor").setDesc("Turn on this option if you want also PDF files to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderPDF).onChange(A=>{this.plugin.settings.renderPDF=A,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Iframes in Editor").setDesc("Turn on this option if you want iframes to be rendered in Editor").addToggle(S=>S.setValue(this.plugin.settings.renderIframe).onChange(A=>{this.plugin.settings.renderIframe=A,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Excalidraw in Editor").setDesc(` + Turn on this option if you want drawings to be rendered in Editor. + You need to have "Excalidraw" plugin installed so that this + option works. + `).addToggle(S=>S.setValue(this.plugin.settings.renderExcalidraw).onChange(A=>{this.plugin.settings.renderExcalidraw=A,this.plugin.saveSettings()})),new ie.Setting(n).setName("Render Outlook MSG Files in Editor").setDesc(` + Turn on this option if you want outlook MSG Files to be rendered in Editor. + You need to have "MSG Handler" plugin installed so that + this option works + `).addToggle(S=>S.setValue(this.plugin.settings.renderMsgFile).onChange(A=>{this.plugin.settings.renderMsgFile=A,this.plugin.saveSettings()})),new ie.Setting(n).setName("Preview on Hover for File Links").setDesc("Turn on if you want to trigger preview when you hover on internal links within the rendered transclusion").addToggle(S=>S.setValue(this.plugin.settings.previewOnHoverInternalLink).onChange(A=>{this.plugin.settings.previewOnHoverInternalLink=A,this.plugin.saveSettings(),A?document.on("mouseover",".oz-obsidian-inner-link",this.plugin.filePreviewOnHover):document.off("mouseover",".oz-obsidian-inner-link",this.plugin.filePreviewOnHover)}))}};var Oe=Z(require("obsidian"));var De=(e,n)=>e.getResourcePath(n)+"?"+n.stat.mtime,zr=(e,n,r)=>{r.workspace.openLinkText(n,"/",Oe.Keymap.isModifier(e,"Mod")||e.button===1)},lr=e=>e.replace(/\s|\W|[#$%^&*()]/g,""),Ne=(e,n)=>e.plugins.getPlugin(n),fr=e=>{var n;return(n=e.vault.config)==null?void 0:n.livePreview},Or=()=>{var e;return((e=Oe.Platform)==null?void 0:e.resourcePathPrefix)||"app://local/"};var Dr=Z(require("obsidian"));var Be=e=>{let n=/[^(x|0-9)]/;if(e.match(n))return!1;let r=/[0-9]+x[0-9]+/,a=/[0-9]+/;var d=e.match(r);if(d){var o=d[0].indexOf("x");return{width:parseInt(d[0].substr(0,o)),height:parseInt(d[0].substr(o+1))}}else{var c=e.match(a);if(c)return{width:parseInt(c[0])}}return!1};var Nr=(e,n,r)=>{let a=new Dr.Menu(n.app);return a.addItem(d=>{d.setTitle("Copy Image to Clipboard"),d.setIcon("image-file"),d.onClick(o=>ne(void 0,null,function*(){var c=yield n.app.vault.adapter.readBinary(r.path),m=new Uint8Array(c),_=new Blob([m],{type:"image/png"});let x=new ClipboardItem({"image/png":_});window.navigator.clipboard.write([x])}))}),n.app.workspace.trigger("file-menu",a,r,"file-explorer"),a.showAtPosition({x:e.pageX,y:e.pageY}),!1};var qe=Z(require("@codemirror/state")),$e=Z(require("@codemirror/view"));function gu(){let e=qe.StateEffect.define(),n=qe.StateField.define({create(){return $e.Decoration.none},update(r,a){return a.effects.reduce((d,o)=>o.is(e)?o.value:d,r)},provide:r=>$e.EditorView.decorations.from(r)});return{update:e,field:n}}var Le=gu();var tu=Z(require("@codemirror/view"));var Ce=Z(require("obsidian")),uu=Z(require("@codemirror/state")),au=Z(require("@codemirror/view"));var Br=e=>Ne(e,"obsidian-excalidraw-plugin"),qr=e=>e.extension==="excalidraw"||ExcalidrawAutomate.isExcalidrawFile&&ExcalidrawAutomate.isExcalidrawFile(e),$r=e=>ne(void 0,null,function*(){ExcalidrawAutomate.reset();var n=yield ExcalidrawAutomate.createPNG(e.path);return n});var Bi=Z(Vr());var _u=function(){function e(n,r){for(var a=0;a1?c-1:0),_=1;_0&&Array.isArray(a[0])&&(a=a[0]),this.transformers=a.map(function(o){return typeof o=="function"?o():o}),this.tag}return _u(e,[{key:"interimTag",value:function(r,a){for(var d=arguments.length,o=Array(d>2?d-2:0),c=2;c0&&arguments[0]!==void 0?arguments[0]:"";return{onEndResult:function(a){if(n==="")return a.trim();if(n=n.toLowerCase(),n==="start"||n==="left")return a.replace(/^\s*/,"");if(n==="end"||n==="right")return a.replace(/\s*$/,"");throw new Error("Side not supported: "+n)}}},O=ku;function Tu(e){if(Array.isArray(e)){for(var n=0,r=Array(e.length);n0&&arguments[0]!==void 0?arguments[0]:"initial";return{onEndResult:function(a){if(n==="initial"){var d=a.match(/^[^\S\n]*(?=\S)/gm),o=d&&Math.min.apply(Math,Tu(d.map(function(m){return m.length})));if(o){var c=new RegExp("^.{"+o+"}","gm");return a.replace(c,"")}return a}if(n==="all")return a.replace(/^[^\S\n]+/gm,"");throw new Error("Unknown type: "+n)}}},G=xu;var Au=function(n,r){return{onEndResult:function(d){if(n==null||r==null)throw new Error("replaceResultTransformer requires at least 2 arguments.");return d.replace(n,r)}}},Q=Au;var Eu=function(n,r){return{onSubstitution:function(d,o){if(n==null||r==null)throw new Error("replaceSubstitutionTransformer requires at least 2 arguments.");return d==null?d:d.toString().replace(n,r)}}},de=Eu;var Su={separator:"",conjunction:"",serial:!1},Lu=function(){var n=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Su;return{onSubstitution:function(a,d){if(Array.isArray(a)){var o=a.length,c=n.separator,m=n.conjunction,_=n.serial,x=d.match(/(\n?[^\S\n]+)$/);if(x?a=a.join(c+x[1]):a=a.join(c+" "),m&&o>1){var S=a.lastIndexOf(c);a=a.slice(0,S)+(_?c:"")+" "+m+a.slice(S+1)}}return a}}},N=Lu;var Pu=function(n){return{onSubstitution:function(a,d){if(n!=null&&typeof n=="string")typeof a=="string"&&a.includes(n)&&(a=a.split(n));else throw new Error("You need to specify a string character to split by.");return a}}},be=Pu;var Wr=function(n){return n!=null&&!Number.isNaN(n)&&typeof n!="boolean"},Mu=function(){return{onSubstitution:function(r){return Array.isArray(r)?r.filter(Wr):Wr(r)?r:""}}},Ve=Mu;var No=new z(N({separator:","}),G,O);var Yo=new z(N({separator:",",conjunction:"and"}),G,O);var nc=new z(N({separator:",",conjunction:"or"}),G,O);var fc=new z(be(` +`),Ve,N,G,O);var Ec=new z(be(` +`),N,G,O,de(/&/g,"&"),de(//g,">"),de(/"/g,"""),de(/'/g,"'"),de(/`/g,"`"));var Ic=new z(Q(/(?:\n(?:\s*))+/g," "),O);var Nc=new z(Q(/(?:\n\s*)/g,""),O);var Yc=new z(N({separator:","}),Q(/(?:\s+)/g," "),O);var ns=new z(N({separator:",",conjunction:"or"}),Q(/(?:\s+)/g," "),O);var ss=new z(N({separator:",",conjunction:"and"}),Q(/(?:\s+)/g," "),O);var ws=new z(N,G,O);var Es=new z(N,Q(/(?:\s+)/g," "),O);var Is=new z(G,O);var Uu=new z(G("all"),O),We=Uu;var qi=Z(Ni()),Sd=e=>{let n=e,r=/\[\[.*?\]\]/g,a=n.match(r);if(a){let d=/\[\[.*?(?=(\]|\|))/,o=/\|.*(?=]])/;for(let c of a){let m=c.match(d);if(m){let _=c.match(o),x=Ld(m[0].replace("[[",""),_?_[0].replace("|",""):"");n=n.replace(c,x)}}}return n},Ld=(e,n)=>`[${n}](${encodeURI(e)})`,Pd=/!\[\[(.*)#\^(.*)\]\]/,Md=/!\[\[(.*)#((?!\^).*)\]\]/;var Rd=e=>{let n=e,r=e.match(new RegExp(`(${Pd.source})|(${Md.source})`,"g"));return r==null||r.forEach(a=>n=n.replace(a,a.substring(1))),n},Id=e=>{let n=/( +)#[^\s#]+|^#[^\s#]+/gm,r=e.match(n);if(!r)return e;let a=e;for(let d of r)a=a.replace(d,`${d}`);return a};var Fd=e=>{let n=Id(e);return n=Rd(n),n=Sd(n),n=Od(n),Ki()&&(n=Ud(n)),n},ze=e=>{let n=Fd(e);return new Bi.default.Converter({tables:!0,simpleLineBreaks:!0,strikethrough:!0,tasklists:!0,smartIndentationFix:!0}).makeHtml(n)},$i=(e,n,r)=>{let a=document.createElement("div"),d=r.substr(e,n-e);return a.innerHTML=ze(d),a},Ui=(e,n)=>{let r=document.createElement("div"),a=e.position.start.offset,d=e.position.end.offset,o=n.substr(a,d-a),c=o.indexOf(`^${e.id}`);return c!==-1&&(o=o.slice(0,c)+o.slice(c+e.id.length+1)),r.innerHTML=ze(o),r},ir=(e,n)=>{jd(e),Hd(e,n.app),zd(e,n.app),Dd(e),qd()&&Bd(e),Ki()&&Vd(e)},jd=e=>{e.querySelectorAll("pre > code").forEach(r=>{r.addClass("line-numbers")})},Hd=(e,n)=>{e.querySelectorAll("img").forEach(a=>{if(a.getAttr("src")){let o=n.metadataCache.getFirstLinkpathDest(decodeURI(a.getAttr("src")),"");if(o){let c=De(n.vault,o);a.setAttr("src",c);let m=a.getAttr("alt");if(m){let _=Be(m);_&&(a.width=_.width,_.height&&(a.height=_.height))}}}})},zd=(e,n)=>{e.querySelectorAll("a").forEach(a=>{let d=a.getAttr("href");a.innerText===""&&(a.innerText=decodeURI(d)),d.match(new RegExp(".*#.*"))&&(d=d.match(new RegExp(".*(?=#)"))[0]),n.metadataCache.getFirstLinkpathDest(decodeURI(d),"")&&(a.setAttr("href",decodeURI(d)),a.addClass("oz-obsidian-inner-link")),a.innerText.startsWith("#")&&a.addClass("tag")})},Od=e=>{try{return(0,qi.default)(e).body}catch(n){return e}},Dd=e=>{let n=e.querySelectorAll('code[class*="language-ad-"]');n==null||n.forEach(r=>{let a=r.className,d=/language-ad-.*?(?=\s)/,o=a.match(d),c=o?o[0].replace("language-ad-",""):"Note",m=Nd(c,r.innerHTML);r.parentElement.replaceWith(m)})},Nd=(e,n)=>{let r=Vi[e]?Vi[e]:"68, 138, 255",a=document.createElement("div");a.addClass("oz-admonition"),a.style.cssText=`--oz-admonition-color: ${r};`;let d=a.createEl("div");d.addClass("oz-admonition-title");let o=d.createEl("div");o.addClass("oz-admonition-title-content");let c=o.createEl("div");c.addClass("oz-admonition-title-markdown"),c.innerText=e;let m=a.createEl("div");m.addClass("oz-admonition-content-holder");let _=m.createEl("div");return _.addClass("oz-admonition-content"),_.innerHTML=ze(n),a},Vi={abstract:"0, 176, 255",attention:"255, 145, 0",bug:"245, 0, 87",caution:"255, 145, 0",check:"0, 200, 83",cite:"158, 158, 158",danger:"255, 23, 68",done:"0, 200, 83",error:"255, 23, 68",example:"124, 77, 255",fail:"255, 82, 82",failure:"255, 82, 82",faq:"100, 221, 23",help:"100, 221, 23",hint:"0, 191, 165",important:"0, 191, 165",info:"0, 184, 212",missing:"255, 82, 82",note:"68, 138, 255",question:"100, 221, 23",quote:"158, 158, 158",seealso:"68, 138, 255",success:"0, 200, 83",summary:"0, 176, 255",tip:"0, 191, 165",todo:"0, 184, 212"},Bd=e=>{let n=e.querySelectorAll('code[class*="language-mermaid"]');n.length!==0&&(window.mermaid.initialize($d),n==null||n.forEach(r=>{let a=document.createElement("div"),d=Math.floor(Math.random()*999999);a.id=`mermaid-${d}`,a.innerHTML=r.innerHTML;try{window.mermaid.mermaidAPI.render(`mermaid-${d}`,Gi(r.innerHTML),o=>{a.innerHTML=o}),r.parentElement.replaceWith(a)}catch(o){let c=document.createElement("p");c.addClass("mermaid-error-information"),c.innerText="Syntax Error in Mermaid graph",r.parentElement.prepend(c)}}))},Wi={nbsp:" ",cent:"\xA2",pound:"\xA3",yen:"\xA5",euro:"\u20AC",copy:"\xA9",reg:"\xAE",lt:"<",gt:">",quot:'"',amp:"&",apos:"'"},Gi=e=>e.replace(/\&([^;]+);/g,function(n,r){var a;return r in Wi?Wi[r]:(a=r.match(/^#x([\da-fA-F]+)$/))?String.fromCharCode(parseInt(a[1],16)):(a=r.match(/^#(\d+)$/))?String.fromCharCode(~~a[1]):n}),qd=()=>window.mermaid,$d={startOnLoad:!0,flowchart:{useMaxWidth:!1,htmlLabels:!0,curve:"cardinal"},securityLevel:"loose",theme:"forest",logLevel:5},Ud=e=>{let n=e,r=/\$\$.*?\$\$/gs,a=/\$\$.*?(?=\$\$)/s,d=e.match(r);if(d&&d.length>0)for(let _ of d){let x=_.match(a);!x||(n=n.replace(_,Yi(x[0].replace("$$",""),"newline")))}let o=/\$[^\s].*[^\s]\$/g,c=/\$.*?(?=\$)/,m=e.match(o);if(m&&m.length>0)for(let _ of m){let x=_.match(c);x&&(n=n.replace(_,Yi(x[0].replace("$",""),"inline")))}return n},Yi=(e,n)=>We` +
    +            
    +                ${e}
    +            
    +        
    + `,Vd=e=>{let n=e.querySelectorAll("code.language-mathjax");for(let r=0;r{a.parentElement.replaceWith(o)})}},Wd=(e,n)=>ne(void 0,null,function*(){let r;n==="inline"?(r=document.createElement("span"),r.classList.add("inline-mathjax-block")):n==="newline"&&(r=document.createElement("div"),r.classList.add("newline-mathjax-block"));let a=Gi(e),d=yield window.MathJax.tex2chtmlPromise(a,{display:n!=="inline"}),o=window.MathJax.startup.adaptor;r.innerHTML=o.outerHTML(d);let c=document.createElement("style");return c.innerHTML=o.textContent(window.MathJax.chtmlStylesheet()),r.appendChild(c),r}),Ki=()=>{var e;return(e=window.MathJax)==null?void 0:e.version};var te=Z(require("@codemirror/view"));var ur=e=>te.Decoration.replace({widget:new Ji(e),inclusive:!1}),Er=e=>te.Decoration.replace({widget:new Zi(e),inclusive:!1}),Cr=e=>te.Decoration.replace({widget:new Qi(e),inclusive:!1}),ar=e=>te.Decoration.replace({widget:new Xi(e),inclusive:!1}),Ji=class extends te.WidgetType{constructor({url:n,altText:r,filePath:a}){super();this.url=n,this.altText=r,this.filePath=a}eq(n){return n.altText===this.altText&&n.filePath===this.filePath}toDOM(){let n=document.createElement("div");n.addClass("oz-image-widget-cm6");let r=n.createEl("img");r.src=this.url,r.setAttr("data-path",this.filePath);let a=Be(this.altText);return a&&(r.width=a.width,a.height&&(r.height=a.height)),r.alt=this.altText,n}ignoreEvent(){return!0}},Zi=class extends te.WidgetType{constructor({url:n,filePath:r}){super();this.url=n,this.filePath=r}toDOM(){let n=document.createElement("div");n.addClass("oz-pdf-widget-cm6");let r=n.createEl("embed");return r.src=this.url,r.type="application/pdf",r.width="100%",r.height="800px",n}eq(n){return n.filePath===this.filePath||n.url===this.url}ignoreEvent(){return!0}},Qi=class extends te.WidgetType{constructor({htmlText:n,htmlEl:r}){super();this.htmlText=n,this.htmlEl=r}toDOM(){let n=document.createElement("div");return n.addClass("oz-custom-html-widget-cm6"),this.htmlText?n.innerHTML=this.htmlText.trim():n.appendChild(this.htmlEl),n}eq(n){return n.htmlText===this.htmlText}ignoreEvent(){return!0}},Xi=class extends te.WidgetType{constructor({type:n,htmlDivElement:r,filePath:a,blockRef:d}){super();this.type=n,this.htmlDivElement=r,this.filePath=a,this.blockRef=d}toDOM(){let n=document.createElement("div");return n.addClasses(["oz-transclusion-widget-cm6",this.type]),n.appendChild(this.htmlDivElement),n}eq(n){return n.filePath+n.blockRef===this.filePath+this.blockRef}ignoreEvent(){return!0}};var eu=["file-transclusion","header-transclusion","blockid-transclusion"],ru=e=>{let{lineText:n,plugin:r,sourceFile:a}=e,d=/!\[\[.*?(jpe?g|png|gif|svg|bmp|webp).*?\]\]/,o=n.match(d);if(o){let g=/\[\[.*(jpe?g|png|gif|svg|bmp|webp)/,T=o[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=/\|.*(?=]])/,l=o[0].match(y);return{type:"vault-image",match:o[0],linkText:b,altText:l?l[0].replace("|",""):"",blockRef:"",file:w}}}}let c=/!\[\[.*(pdf)(.*)?\]\]/,m=n.match(c);if(m){let g=/\[\[.*.pdf/,T=m[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=new RegExp("#page=[0-9]+"),l=m[0].match(y);return{type:"pdf-file",match:m[0],linkText:"",altText:"",blockRef:l?l[0]:"",file:w}}}}let _=/!\[(^$|.*)\]\(.*(pdf)(.*)?\)/,x=n.match(_);if(x){let g=/\(.*.pdf/,T=x[0].match(g);if(T){let b=T[0].replace("(",""),w=/(http[s]?:\/\/)([^\/\s]+\/)(.*)/,y=new RegExp("#page=[0-9]+"),l=x[0].match(y);if(w.test(b))return{type:"pdf-link",match:x[0],linkText:b,altText:"",blockRef:l?l[0]:""};{let k=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(k)return{type:"pdf-file",match:x[0],linkText:k.path,altText:"",blockRef:l?l[0]:"",file:k}}}}let S=/(http[s]?:\/\/)([^\/\s]+\/)(.*)/,A=/!\[[^)]*\]\([a-z][a-z0-9+\-.]+:\/[^)]*\)/,E=n.match(A);if(E){let g=/\(.*(?=\))/,T=E[0].match(g);if(T&&T[0].replace("(","").match(S)){let b=/\[(^$|.*)(?=\])/,w=E[0].match(b);return{type:"external-image",match:E[0],linkText:T[0].replace("(",""),altText:w?w[0].replace("[",""):"",blockRef:""}}}let v=/!\[(^$|.*?)\]\(.*?(jpe?g|png|gif|svg|bmp|webp)\)/,M=n.match(v);if(M){let g=/\(.*(jpe?g|png|gif|svg|bmp|webp)/,T=M[0].match(g);if(T){let b=T[0].replace("(",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w){let y=/\[(^$|.*)(?=\])/,l=M[0].match(y);return{type:"vault-image",match:M[0],linkText:b,altText:l?l[0].replace("[",""):"",blockRef:"",file:w}}}}let F=/!\[\[.*(msg|eml)(.*)?\]\]/,I=n.match(F);if(I){let g=/\[\[.*.(msg|eml)/,T=I[0].match(g);if(T){let b=T[0].replace("[[",""),w=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(b),a.path);if(w)return{type:"msg-file",match:I[0],linkText:"",altText:"",blockRef:"",file:w}}}let W=/!\[(^$|.*?)\]\(.*?\)/,ue=/!\[\[.*?\]\]/,i=n.match(W),t=n.match(ue);if(i||t){let g=/\]\(.*?(?=\))/,T=/\[\[.*?((?=\|))|\[\[.*?(?=\]\])/,b=n.match(i?g:T);if(b){let w=b[0].replace("](","").replace("[[",""),y=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(w),a.path);if(y&&Br(r.app)&&qr(y)){let C=i?/\[(^$|.*)(?=\])/:/\|.*(?=]])/,L=n.match(C);return{type:"excalidraw",match:i?i[0]:t[0],linkText:y.path,altText:L?L[0].replace("[","").replace("|",""):"",blockRef:"",file:y}}}if(t){let w=/!\[\[(.*)(?=#)/,y=/!\[\[(.*)#\^(.*)\]\]/,l=n.match(y);if(l){let J=l[0].match(w)[0].replace("![[",""),D=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(J),a.path);if(D&&D.extension==="md"){let U=/#\^.*(?=]])/;return{type:"blockid-transclusion",match:t[0],linkText:D.path,altText:"",blockRef:n.match(U)[0].replace("#^",""),file:D}}}let k=/!\[\[(.*)#((?!\^).*)\]\]/,C=n.match(k);if(C){let J=C[0].match(w)[0].replace("![[",""),D=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(J),a.path);if(D&&D.extension==="md"){let U=/#.*(?=]])/;return{type:"header-transclusion",match:t[0],linkText:D.path,altText:"",blockRef:n.match(U)[0].replace("#",""),file:D}}}let L=/\[\[.*?(?=\]\])/,P=n.match(L)[0].replace("[[",""),q=r.app.metadataCache.getFirstLinkpathDest(decodeURIComponent(P),a.path);if(q&&P!==""&&q.extension==="md")return{type:"file-transclusion",match:t[0],linkText:q.path,altText:"",blockRef:"",file:q}}}let u=/(?:]*)(?:(?:\/>)|(?:>.*?<\/iframe>))/,s=n.match(u);if(s)return{type:"iframe",match:s[0],linkText:"",altText:"",blockRef:""};let p=/!\[(^$|.*)\]\((file\:\/\/\/|app\:\/\/local\/).*(.pdf|.jpe?g|.png|.gif|.svg|.bmp|.webp)(.*)?\)/,h=/(file\:\/\/\/|app\:\/\/local\/).*(.pdf|.jpe?g|.png|.gif|.svg|.bmp|.webp)/,f=n.match(p);if(f){let g=f[0].match(h);if(g){let T=Or(),b=g[0].replace(g[0].startsWith("file:///")?"file:///":"app://local/",T),w=/#page=[0-9]+\)/,y=f[0].match(w),l=/\[(^$|.*)(?=\])/,k=f[0].match(l);return{type:b.endsWith(".pdf")?"local-pdf":"local-image",match:f[0],linkText:decodeURI(b),altText:k?k[0].replace("[",""):"",blockRef:y?y[0].replace(")",""):""}}}return null};var nu=Z(require("@codemirror/language")),iu=(e,n)=>{let r=[];return n.length>0&&(r=Array.from({length:n.lines},(a,d)=>d+1)),r};var Sr=class{constructor(n){this.decoCache={};this.debouncedUpdate=(0,Ce.debounce)(this.updateAsyncDecorations,50,!0);this.editor=n}updateAsyncDecorations(n){return ne(this,null,function*(){let{view:r,state:a,newDoc:d,plugin:o}=n,c=iu(a||r.state,d);if(c.length>0){let m=yield this.getDecorationsForLines({lineNrs:c,view:r,newDoc:d,plugin:o});(m||this.editor.state.field(Le.field).size)&&this.editor.dispatch({effects:Le.update.of(m||au.Decoration.none)})}})}getDecorationsForLines(n){return ne(this,null,function*(){var x;let{newDoc:r,view:a,lineNrs:d,plugin:o}=n,c=new uu.RangeSetBuilder,_=a.state.field(Ce.editorViewField).file;if(d.length>0)for(let S of d){let A=r.line(S),E=null,v=ru({lineText:A.text,plugin:o,sourceFile:_});if(v&&["external-image","local-image"].includes(v.type)&&o.settings.renderImages){let M=v.linkText+v.altText;E=this.decoCache[M],E||(E=this.decoCache[M]=ur({url:v.linkText,altText:v.altText,filePath:v.linkText}))}else if(v&&v.type==="vault-image"&&o.settings.renderImages){let M=v.file.path+v.altText;if(E=this.decoCache[M],!E){let F=De(o.app.vault,v.file);E=this.decoCache[M]=ur({url:F,altText:v.altText,filePath:v.file.path})}}else if(v&&v.type==="excalidraw"&&o.settings.renderExcalidraw){let M=v.file.path+v.altText;if(E=this.decoCache[M],!E){let F=yield $r(v.file);E=this.decoCache[M]=ur({url:URL.createObjectURL(F),altText:v.altText,filePath:v.file.path})}}else if(v&&["pdf-link","local-pdf"].includes(v.type)&&o.settings.renderPDF){let M=v.linkText+v.blockRef;E=this.decoCache[M],E||(E=this.decoCache[M]=Er({url:M,filePath:M}))}else if(v&&v.type==="pdf-file"&&o.settings.renderPDF){let M=v.file.path+v.blockRef;if(E=this.decoCache[M],!E){let F=yield o.app.vault.adapter.readBinary((0,Ce.normalizePath)(v.file.path)),I=new Uint8Array(F),W=new Blob([I],{type:"application/pdf"});E=Er({url:URL.createObjectURL(W)+v.blockRef,filePath:v.file.path})}}else if(o.settings.renderMsgFile&&v&&v.type==="msg-file"){let M=Ne(o.app,"msg-handler");if(M){let F=v.file,I=document.createElement("div");yield M.renderMSG({msgFile:F,targetEl:I}),E=this.decoCache[F.path]=Cr({htmlEl:I})}}else if(v&&eu.contains(v.type)&&o.settings.renderTransclusion){let M=v.file.path+v.blockRef+v.file.stat.mtime;if(E=this.decoCache[M],!E){let F=o.app.metadataCache.getCache(v.file.path),I=yield o.app.vault.cachedRead(v.file);if(v.type==="blockid-transclusion"){let W=v.blockRef;if(F=o.app.metadataCache.getCache(v.file.path),F.blocks&&F.blocks[W]){let ue=F.blocks[W];if(ue){let i=Ui(ue,I);ir(i,o),E=this.decoCache[M]=ar({htmlDivElement:i,type:v.type,filePath:v.file.path,blockRef:v.blockRef})}}}else if(v.type==="header-transclusion"){let W=(x=F.headings)==null?void 0:x.find(ue=>lr(ue.heading)===lr(v.blockRef));if(W){let ue=W.position.start.offset,i=F.headings.indexOf(W),t=I.length;for(let s of F.headings.slice(i+1))if(s.level<=W.level){t=s.position.start.offset;break}let u=$i(ue,t,I);ir(u,o),E=this.decoCache[M]=ar({htmlDivElement:u,type:v.type,filePath:v.file.path,blockRef:v.blockRef})}}else if(v.type==="file-transclusion"&&I!==""){let W=document.createElement("div");W.innerHTML=ze(I),ir(W,o),E=this.decoCache[M]=ar({htmlDivElement:W,type:v.type,filePath:v.file.path,blockRef:v.blockRef})}}}else v&&v.type==="iframe"&&o.settings.renderIframe&&(E=Cr({htmlText:v.match}));E!==null&&c.add(A.to,A.to,E)}return c.finish()})}};var du=e=>{let{plugin:n}=e;return tu.ViewPlugin.fromClass(class{constructor(a){if(this.decoManager=new Sr(a),!fr(n.app)){let d=a.state;this.decoManager.updateAsyncDecorations({view:a,state:d,newDoc:d.doc,plugin:n})}}update(a){if((a.docChanged||a.viewportChanged)&&!fr(n.app)){let d=a.view.state;this.decoManager.updateAsyncDecorations({view:a.view,plugin:n,newDoc:d.doc})}}destroy(){}})};var ou=e=>{let{plugin:n}=e;return[du({plugin:n}),Le.field]};var Lr=class extends le.Plugin{constructor(){super(...arguments);this.editorExtensions=[];this.loadCM6Extension=()=>{let n=ou({plugin:this});this.editorExtensions.push(n),this.app.workspace.updateOptions()};this.unloadCM6Extension=()=>{this.editorExtensions.length=0,this.app.workspace.updateOptions()};this.onImageMenu=(n,r)=>{let a=this.app.vault.getAbstractFileByPath(r.dataset.path);if(a instanceof le.TFile)return n.preventDefault(),n.stopPropagation(),Nr(n,this,a),!1};this.onClickTransclusionLink=(n,r)=>{n.preventDefault(),n.stopPropagation(),zr(n,r.getAttr("href"),this.app)};this.filePreviewOnHover=(n,r)=>{this.app.workspace.trigger("link-hover",{},n.target,r.getAttr("href"),r.getAttr("href"))}}onload(){return ne(this,null,function*(){console.log("Image in Editor Plugin is loaded"),this.addSettingTab(new sr(this.app,this)),yield this.loadSettings(),this.addCommand({id:"toggle-render-all",name:"Toggle Render All (Requires reload of vault)",callback:()=>{this.settings.cm6RenderAll=!this.settings.cm6RenderAll,this.saveSettings()}}),this.addCommand({id:"toggle-render-images",name:"Toggle Render Images",callback:()=>{this.settings.renderImages=!this.settings.renderImages,this.saveSettings()}}),this.addCommand({id:"toggle-render-pdfs",name:"Toggle Render PDF",callback:()=>{this.settings.renderPDF=!this.settings.renderPDF,this.saveSettings()}}),this.addCommand({id:"toggle-render-transclusion",name:"Toggle Render Transclusions",callback:()=>{this.settings.renderTransclusion=!this.settings.renderTransclusion,this.saveSettings()}}),this.addCommand({id:"toggle-render-iframe",name:"Toggle Render Iframes",callback:()=>{this.settings.renderIframe=!this.settings.renderIframe,this.saveSettings()}}),this.addCommand({id:"toggle-render-excalidraw",name:"Toggle Render Excalidraws",callback:()=>{this.settings.renderExcalidraw=!this.settings.renderExcalidraw,this.saveSettings()}});try{(0,le.loadMathJax)(),(0,le.loadMermaid)()}catch(n){console.log(n)}this.registerEditorExtension(this.editorExtensions),this.settings.cm6RenderAll&&this.loadCM6Extension(),document.on("click",".oz-obsidian-inner-link",this.onClickTransclusionLink),document.on("contextmenu","div.oz-image-widget-cm6 img[data-path]",this.onImageMenu,!1),this.settings.previewOnHoverInternalLink&&document.on("mouseover",".oz-obsidian-inner-link",this.filePreviewOnHover)})}onunload(){document.off("contextmenu","div.oz-image-widget-cm6 img[data-path]",this.onImageMenu,!1),document.off("click",".oz-obsidian-inner-link",this.onClickTransclusionLink),document.off("mouseover",".oz-obsidian-inner-link",this.filePreviewOnHover),console.log("Image in Editor Plugin is unloaded")}loadSettings(){return ne(this,null,function*(){this.settings=Object.assign({},Hr,yield this.loadData())})}saveSettings(){return ne(this,null,function*(){yield this.saveData(this.settings)})}}; +/*! showdown v 1.9.1 - 02-11-2019 */ + +/* nosourcemap */ \ No newline at end of file diff --git a/.obsidian/plugins/oz-image-plugin/manifest.json b/.obsidian/plugins/oz-image-plugin/manifest.json new file mode 100644 index 00000000..fb3e6555 --- /dev/null +++ b/.obsidian/plugins/oz-image-plugin/manifest.json @@ -0,0 +1,11 @@ +{ + "id": "oz-image-plugin", + "name": "Image in Editor", + "version": "2.2.6", + "minAppVersion": "0.15.0", + "description": "View Images, Transclusions, iFrames and PDF Files within the Editor without a necessity to switch to Preview.", + "author": "Ozan Tellioglu", + "authorUrl": "https://ozan.pl/aboutme/", + "fundingUrl": "https://ko-fi.com/ozante", + "isDesktopOnly": false +} diff --git a/.obsidian/plugins/oz-image-plugin/styles.css b/.obsidian/plugins/oz-image-plugin/styles.css new file mode 100644 index 00000000..4f7014d8 --- /dev/null +++ b/.obsidian/plugins/oz-image-plugin/styles.css @@ -0,0 +1,349 @@ +/* @settings + +name: Ozan's Image in Editor Plugin +id: oz-image-in-editor-plugin +settings: + + - + id: oz-img-in-editor-max-transclusion-height + title: Transclusion Embed Maximum Height + description: Set the max height of transclusion render in editor as px + type: variable-number + default: 600 + format: px + - + id: oz-img-in-editor-max-msg-height + title: MSG Embed Maximum Height + description: Set the max height of msg render in editor as px + type: variable-number + default: 300 + format: px + - + id: oz-img-in-editor-img-size-xx-small + title: Alt Text "#xx-small" Maximum Image Width + description: Set the max width of images with "#xx-small" alt text + type: variable-number + default: 25 + format: "%" + - + id: oz-img-in-editor-img-size-x-small + title: Alt Text "#x-small" Maximum Image Width + description: Set the max width of images with "#x-small" alt text + type: variable-number + default: 50 + format: "%" + - + id: oz-img-in-editor-img-size-small + title: Alt Text "#small" Maximum Image Width + description: Set the max width of images with "#small" alt text + type: variable-number + default: 75 + format: "%" +*/ + +.theme-light, +.theme-dark { + --oz-img-in-editor-max-msg-height: 300px; + --oz-img-in-editor-max-transclusion-height: 600px; + --oz-img-in-editor-img-size-xx-small: 25%; + --oz-img-in-editor-img-size-x-small: 50%; + --oz-img-in-editor-img-size-small: 75%; +} + +.CodeMirror-linewidget img { + margin-top: 5px; + margin-bottom: 5px; +} + +.theme-dark img[alt$='#invert'], +.theme-dark div.oz-image-widget > img[alt$='#invert'], +.theme-dark div.oz-image-widget-cm6 > img[alt$='#invert'] { + filter: invert(1) hue-rotate(180deg); +} + +.oz-transclusion-widget, +.oz-transclusion-widget-cm6 { + padding: 3px 3px 3px 19px; + border: 0.7px solid var(--text-muted); + max-height: var(oz-img-in-editor-max-transclusion-height); + overflow: auto; + border-radius: 7px; + margin-top: 5px; +} + +.oz-coffee-div, +.oz-tip-div { + text-align: center; + margin-top: 10px; +} + +.oz-tip-div img { + border-radius: 10px; +} + +/* Line Numbers In Editor CodeBlock Renders */ +pre[class*='language-'].line-numbers { + position: relative; + padding-left: 3.8em; + counter-reset: linenumber; +} +pre[class*='language-'].line-numbers > code { + position: relative; + white-space: inherit; +} +.line-numbers .line-numbers-rows { + position: absolute; + pointer-events: none; + top: 0; + font-size: 100%; + left: -3.8em; + width: 3em; /* works for line-numbers below 1000 lines */ + letter-spacing: -1px; + border-right: 1px solid #999; + + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; +} +.line-numbers-rows > span { + display: block; + counter-increment: linenumber; +} +.line-numbers-rows > span:before { + content: counter(linenumber); + color: #999; + display: block; + padding-right: 0.8em; + text-align: right; +} + +.mermaid-error-information { + color: red; + font-size: 14px; + margin-bottom: 3px; +} + +.oz-modal-center { + text-align: center; + margin: 20px 10px 20px 10px; +} + +.oz-modal-title { + text-align: center; +} + +.inline-mathjax-block { + margin-left: 5px; +} + +.oz-image-widget > img, +.oz-image-widget-cm6 > img { + -webkit-user-drag: none; + user-select: none; + -moz-user-select: none; + -webkit-user-select: none; + -ms-user-select: none; +} + +div.oz-transclusion-widget pre, +div.oz-transclusion-widget-cm6 pre { + overflow-x: auto; +} + +.oz-transclusion-widget > *, +.oz-transclusion-widget-cm6 > * { + user-select: text !important; +} + +/* Rich Link Cards */ +/* Credit: https://github.com/dhamaniasad/obsidian-rich-links */ +.oz-rich-link-card { + border: 1px solid var(--background-modifier-border); + border-radius: 3px; + width: 100%; + display: flex; + text-decoration: none; + background-color: var(--background-primary); +} + +.oz-rich-link-card-container { + position: relative; +} + +.oz-rich-link-image-container { + height: 100px; + width: 35%; + min-width: 120px; + overflow: hidden; + border-right: 1px solid var(--background-modifier-border); +} + +.oz-rich-link-image { + background-position: center center; + background-size: cover; + background-repeat: no-repeat; + padding-bottom: 100px; + background-color: var(--background-secondary); +} + +.oz-rich-link-card-text { + padding: 4px; + width: 75%; +} + +.oz-rich-link-card-title { + font-family: sans-serif; + font-size: 16px; + margin: 0 0 4px 0; + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; + color: var(--text-normal); +} + +.oz-rich-link-card-description { + font-family: sans-serif; + font-size: 14px; + margin: 0; + color: var(--text-muted); + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.oz-rich-link-href { + font-family: sans-serif; + font-size: 14px; + margin: 0; + color: var(--text-faint); + display: -webkit-box; + -webkit-line-clamp: 1; + -webkit-box-orient: vertical; + overflow: hidden; +} + +.image-in-editor-settings-main-header { + text-align: center !important; + margin-bottom: 20px; +} + +.image-in-editor-cm-header { + margin-top: 0px; +} + +.image-in-editor-editor-header { + margin-bottom: 5px; +} + +/* Sizing for CM5 and CM6 */ + +div.oz-image-widget > img[alt$='#small'], +div.oz-image-widget-cm6 > img[alt$='#small'] { + max-width: var(--oz-img-in-editor-img-size-small) !important; +} + +div.oz-image-widget > img[alt$='#x-small'], +div.oz-image-widget-cm6 > img[alt$='#x-small'] { + max-width: var(--oz-img-in-editor-img-size-x-small) !important; +} + +div.oz-image-widget > img[alt$='#xx-small'], +div.oz-image-widget-cm6 > img[alt$='#xx-small'] { + max-width: var(--oz-img-in-editor-img-size-xx-small) !important; +} + +/* Style For CM6 */ + +div.oz-image-widget-cm6, +div.oz-custom-html-widget-cm6, +div.oz-pdf-widget-cm6 { + padding-top: 5px; + padding-bottom: 5px; +} + +div.oz-image-widget-cm6 + br, +div.oz-custom-html-widget-cm6 + br, +div.oz-pdf-widget-cm6 + br { + display: none; +} + +.cm-line div.oz-transclusion-widget-cm6 { + padding-top: 10px; + padding-bottom: 10px; +} + +.cm-line div.oz-transclusion-widget-cm6 * { + margin-block-start: 0px !important; + margin-block-end: 0px !important; +} + +/* Legacy Admonition */ + +.oz-admonition { + margin: 1.5em 0; + padding: 0; + overflow: hidden; + page-break-inside: avoid; + border-left: 0.3rem solid rgb(var(--oz-admonition-color)); + border-radius: 0.1rem; + box-shadow: 0 0.2rem 0.5rem rgb(44, 43, 43); +} + +.oz-admonition-title { + position: relative; + padding: 15px 5px 15px 15px; + font-weight: 700; + background-color: rgba(var(--oz-admonition-color), 0.1); +} + +.oz-admonition-title-content { + display: flex; + justify-content: flex-start; + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.oz-admonition-content-holder { + position: relative; + padding-top: 15px; + padding-bottom: 15px; +} + +.oz-admonition-content { + margin: 10px 15px; + position: relative; + overflow-x: auto; +} + +.oz-admonition-title-markdown { + text-transform: capitalize; + display: block; +} + +.oz-transclusion-widget-cm6 span.hashtag { + background-color: var(--tag-background); + border: var(--tag-border-width) solid var(--tag-border-color); + border-radius: var(--tag-radius); + color: var(--tag-color); + font-size: var(--tag-size); + text-decoration: var(--tag-decoration); + padding: var(--tag-padding-y) var(--tag-padding-x); + line-height: 1; +} + +.oz-custom-html-widget-cm6 .msg-handler-plugin-renderer { + max-height: var(--oz-img-in-editor-max-msg-height); + overflow-y: scroll; + border: 0.1px solid var(--text-muted); + padding: 10px; +} + +.cm-line:has(div.is-collapsed) .oz-custom-html-widget-cm6, +.cm-line:has(div.is-collapsed) .oz-image-widget-cm6, +.cm-line:has(div.is-collapsed) .oz-pdf-widget-cm6, +.cm-line:has(div.is-collapsed) .oz-transclusion-widget-cm6 { + display: none; +} diff --git a/.obsidian/plugins/recent-files-obsidian/data.json b/.obsidian/plugins/recent-files-obsidian/data.json index bb8afe19..ed5f737d 100644 --- a/.obsidian/plugins/recent-files-obsidian/data.json +++ b/.obsidian/plugins/recent-files-obsidian/data.json @@ -4,6 +4,34 @@ "basename": "2025-07-17", "path": "01-工作日记/2025-07-17.md" }, + { + "basename": "微信机器人", + "path": "03-学习笔记/微信机器人.md" + }, + { + "basename": "微信公众号RSS", + "path": "03-学习笔记/微信公众号RSS.md" + }, + { + "basename": "OB插件", + "path": "03-学习笔记/OB插件.md" + }, + { + "basename": "Memos", + "path": "03-学习笔记/Memos.md" + }, + { + "basename": "Calibre电子书平台", + "path": "03-学习笔记/Calibre电子书平台.md" + }, + { + "basename": "kyhNGvh5iFc9eYXy2YuYWx_FDF8C04E-22D3-4D4C-9ED0-F52A326B9801", + "path": "50-Memos/2025/07/resources/kyhNGvh5iFc9eYXy2YuYWx_FDF8C04E-22D3-4D4C-9ED0-F52A326B9801.jpg" + }, + { + "basename": "6cb2VU3rkihszQLFDerqA2_2_20250712120414", + "path": "50-Memos/2025/07/resources/6cb2VU3rkihszQLFDerqA2_2_20250712120414.png" + }, { "basename": "第28周总结", "path": "50-Memos/2025/weekly/第28周总结.md" @@ -11,10 +39,6 @@ { "basename": "第29周总结", "path": "50-Memos/2025/weekly/第29周总结.md" - }, - { - "basename": "Calibre电子书平台", - "path": "03-学习笔记/Calibre电子书平台.md" } ], "omittedPaths": [], diff --git a/.obsidian/plugins/rss-reader/data.json b/.obsidian/plugins/rss-reader/data.json index 6865eeed..7cad3873 100644 --- a/.obsidian/plugins/rss-reader/data.json +++ b/.obsidian/plugins/rss-reader/data.json @@ -338,6 +338,28 @@ "image": null, "description": "少数派致力于更好地运用数字产品或科学方法,帮助用户提升工作效率和生活品质", "items": [ + { + "title": "一日一技|曲线救国,让 Android 用上 DoH", + "description": "Matrix首页推荐Matrix是少数派的写作社区,我们主张分享真实的产品体验,有实用价值的经验与思考。我们会不定期挑选Matrix最优质的文章,展示来自用户的最真实的体验和观点。文章代表作者个人观点 ...查看全文", + "content": "Matrix首页推荐Matrix是少数派的写作社区,我们主张分享真实的产品体验,有实用价值的经验与思考。我们会不定期挑选Matrix最优质的文章,展示来自用户的最真实的体验和观点。文章代表作者个人观点 ...查看全文", + "category": "", + "link": "https://sspai.com/post/100874", + "creator": "so1ar", + "pubDate": "Thu, 17 Jul 2025 14:20:59 +0800", + "enclosure": "", + "enclosureType": "", + "image": "", + "id": "", + "language": "zh", + "folder": "资讯", + "feed": "少数派", + "read": false, + "favorite": false, + "created": false, + "tags": [], + "hash": "15a54a9f812c64112fcc7064ca01f5b2", + "highlights": [] + }, { "title": "我们如何优化少数派办公室的无线网络", "description": "本文分上下两篇,基于为少数派办公室优化无线网络的实际经历,介绍了如何分析复杂无线环境中出现的问题,企业级路由和普通家用路由的不同之处,以及优化无线网络的各个常用手段。

    [......]

    查看全文

    本文为会员文章,出自《单篇文章》,订阅后可阅读全文。

    ", @@ -2304,6 +2326,94 @@ "image": null, "description": "知乎日报全文RSS。获取更多全文RSS:https://feedx.net", "items": [ + { + "title": "瞎扯 · 如何正确地吐槽", + "description": "
    \"头图\"/
    \n\n
    \n
    @知乎用户. :有钱人的生活奢侈到什么程度,请看。
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    上流社会这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    奢侈这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    吃香喝辣这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    买柠檬水不用代金券这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    日常这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    存款这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    收入这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    财力雄厚这一块/.
    \n\n
    \n
    @秋天2018 :一看到这个场景,我就想到当年查分数的时候,全家人都非常激动,尤其是我爸,激动的四处找皮带……
    \n
    \n\n
    \n
    @Ksyne0519 :困意储存器。 当你困的时候可以把睡意储存起来, 就变得精神了, 晚上睡不着觉、或者中午想要午休的时候拿出来, 就可以快速入睡了。
    \n
    \n\n
    \n
    @九名 :躺在床上看手机的时候,四岁的女儿凑过来,别玩了,你有孩子要照顾。
    \n
    \n\n
    \n
    @林二丘 :从前我快乐的打着工跟老板称兄道弟,直到有一天:
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
     
    \n
    \n
    \n\n\n
    \n\n\n\n", + "content": "
    \"头图\"/
    \n\n
    \n
    @知乎用户. :有钱人的生活奢侈到什么程度,请看。
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    上流社会这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    奢侈这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    吃香喝辣这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    买柠檬水不用代金券这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    日常这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    存款这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    收入这一块/.
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
    财力雄厚这一块/.
    \n\n
    \n
    @秋天2018 :一看到这个场景,我就想到当年查分数的时候,全家人都非常激动,尤其是我爸,激动的四处找皮带……
    \n
    \n\n
    \n
    @Ksyne0519 :困意储存器。 当你困的时候可以把睡意储存起来, 就变得精神了, 晚上睡不着觉、或者中午想要午休的时候拿出来, 就可以快速入睡了。
    \n
    \n\n
    \n
    @九名 :躺在床上看手机的时候,四岁的女儿凑过来,别玩了,你有孩子要照顾。
    \n
    \n\n
    \n
    @林二丘 :从前我快乐的打着工跟老板称兄道弟,直到有一天:
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \"\"\n
     
    \n
     
    \n
    \n
    \n
    \n
    \n
    \n
    \n
     
    \n
    \n
    \n
     
    \n
    \n
    \n\n\n
    \n\n\n\n", + "category": "", + "link": "https://daily.zhihu.com/story/9782633", + "creator": "", + "pubDate": "Thu, 17 Jul 2025 12:27:03 +0800", + "enclosure": "", + "enclosureType": "", + "image": "", + "id": "", + "language": "", + "folder": "资讯", + "feed": "知乎", + "read": false, + "favorite": false, + "created": false, + "tags": [], + "hash": "4d5790b7bc2a74839b19fd787279c6b3", + "highlights": [] + }, + { + "title": "如何看待费米悖论认为的最可怕的事实是宇宙根本没有外星人?", + "description": "
    \"头图\"/
    \n

    你相信造物主创造物种还是进化论?

    \n

    费米悖论提出至今已经有七十年了。

    \n

    你可以说七十年前的基础物理已经发展到了很高的水平,但当时对宇宙、地球和地球生命的认识实在还处于很原始的水平。

    \n

    当时板块漂移说还没有成为主流。

    \n

    当时还没用同位素法测定地球年龄。

    \n

    当时不知道进化论的完整链条。

    \n

    当时连月球是地球大撞击形成的都不知道。

    \n

    当时连中子星都还没发现。

    \n

    更别提柯伊伯带和彗星成因,以及有机物在宇宙中广泛存在的事实。

    \n

    彼时 dna 发现没多久,连 dna 长啥样都不知道。

    \n

    由于 50 年代的费米对天文、地理、生物知识的匮乏,彼时对进化论的演化图谱一片模糊,所以费米悖论就是瞎猜。

    \n

    结合近十几年的发现,我认为费米悖论的解释已经越来越清晰了。

    \n

    那就是:

    \n

    一、宇宙中原始生命很有可能广泛存在。碳基单细胞生物大概率在十光年内就能发现。

    \n

    二、碳基高等生物的发现概率非常小。从单细胞到脊椎动物,大概隔了十个千分之一概率的过滤器,也就是几千个银河系那么多的恒星,才有可能演化出脊椎动物。

    \n

    三、从脊椎动物演化到人类的难度,远比二要难。整个宇宙也就几百亿光年,我们地球恐怕就是孤例。即使不是孤例,由于光锥隔离,我们也不可能发现别的智能生物星球,哪怕我们掌握了光速飞船也不行。

    \n

    ——————

    \n

    (提醒一下各位看官,以下内容绝大部分都是基于费米悖论提出之后的科学发现。我在后半部分会回答“我们在费米悖论下如何自处”的问题)

    \n

    第一点好解释,

    \n

    我们发现最原始的细菌,是在形成月球的大撞击之后不久就存在了。也就是三十多亿年前差不多四十亿年前。

    \n

    要知道 38 亿年前能完整留下来的岩石证据都不多,在这些最早期的岩石上都能够发现生命痕迹,说明地球生命大概率还能往前追溯。

    \n

    当时地球的环境非常恶劣,有海洋,月球靠近地球形成上千米高的巨浪,地球转的比现在快很多,海底到处都是火山,大气层是剧毒的气体。

    \n

    要知道地球大撞击那是把地球整个液化了的,地球生命起源肯定是在大撞击之后,那么也就是在一个极度恶劣的环境下,差不多是在海洋形成的一瞬间就出现了原始细菌。

    \n

    而这种有大量火山爆发的海洋星球环境并不罕见,十光年内就有类似原始地球的行星。在太阳系内就有几个天体有冰下海洋。

    \n

    所以细菌是非常有可能在宇宙中普遍存在的。

    \n

    而且地球生命是有可能在银河系里广泛传播了的。

    \n

    因为地球在形成细菌后还经历过无数次大撞击,这个过程大概率有陨石携带着地球细菌逃出太阳系,在三十多亿年的时间里在银河系来回传播。

    \n

    目前火星已经干涸,但还有木卫二之类的太阳系天体存在地下海洋。只要地球陨石能带着细菌进到海洋下,大概率在那里也是会传播了的。不过砸开几公里深的冰壳很难,地球细菌还是前往其他恒星系的裸露海洋的概率更大。

    \n

    说到这里,得提到这么一种可能:

    \n

    地球的原始细菌有可能是外来的。因为原始细菌这些东西由于构造简单,生命力就特别顽强,很有可能附着在陨石上跨星际旅行。

    \n

    但就算证实了地球生命外来起源的意义也不大,因为我们发现,地球生物从零进化到人类,最难的不是从零到有,而是由简单到复杂。

    \n

    生命是随着海洋几乎同时形成,然而它演化到高级动物却花了差不多 40 亿年才形成了古猿。40 亿年这个时间长度即使和银河系寿命(最多 130 亿年)及宇宙寿命(135 亿年)比起来都算漫长了。

    \n

    这就是我们的第二点内容:高等动物是很难出现的。

    \n

    和细菌、病毒相比,高等动物首先是不可能被动的跨星际旅行的。难以想象、至今也没发现哪种无脊椎动物可能会随着大撞击被炸到太空还能存活。高等动物必须是在不同行星上独立演化出来的,这和细菌、病毒相比那就难上很多倍了。

    \n

    所以,低等生物所在行星能否提供进化的环境选择压力就很重要了。

    \n

    你看,我之前的讲述基本上是集中在“环境”二字上的,只要有了原材料,那么加上适当的环境,那么生命的演化就是水到渠成的了。

    \n

    与原始地球环境的普遍存在极为不同,地球高等生物演化的环境非常难在其它地方找到。

    \n

    有人会说了,现在地球的环境还不是地球生物造就的,只要原始细菌存在了,那么那个星球自然就可能会被细菌改造成像地球了。

    \n

    这种想法是错误的。

    \n

    事实是,几乎不可能在其它地方找到类似这几十亿年的地球环境。

    \n

    因为孕育出高等生物的星球环境必须是一个受到精巧控制的动态环境。

    \n

    地球环境在生物演化的 40 亿年间发生了巨大且复杂的变化。不考虑生物作用,外在的变化有:

    \n

    银河系发生了很大变化。

    \n

    太阳系附近的恒星际环境发生了很大变化。

    \n

    太阳系天体运动发生了很大变化。

    \n

    太阳发生了很大变化。

    \n

    地月系发生了很大变化。

    \n

    地球地质发生了很大变化。

    \n

    地表化学成分发生了很大变化(非生物影响)

    \n

    以上这七个变化,深入来讲需要七本书。我们通常思考地球生命演化时,习惯性的认为地球环境是一个静态不变的影响因素。实际上不是的,以上七个变化都是翻天地覆的变化。银河系、太阳系、地月系、地质变化都有其周期,这些周期你可以理解成四首连续唱了 40 亿年的歌,四个乐队各唱各的,结果都在几千个关键节点节点赶上了拍子,合成出的歌竟然没跑调。

    \n

    我们通常会看到这样的新闻:”在某个恒星系上发现了有海洋,温度和大小与地球差不多的行星“,大多数人会想:你看,地球也不是那么难找嘛。

    \n

    这就和你第一次摸钢琴,从头到尾把 88 个键音都听完了,于是就说:”OK,我会创作钢琴曲了,赶明儿我就能创作出媲美巴赫的神曲。“

    \n

    实际上你也知道,记住那 88 个音色根本不是重点,重点是这些音组成的曲子。如果一只猴子运气好,可能一年内就能够弹出一段 5、6 秒长的好玩的片段,但要它能弹出一段几分钟的巴赫的曲子,那恐怕就是要几百亿年。

    \n

    你能找到现在看起来宜居的行星(这本身已经是个大过滤器),要它能在几十亿年里对生命演化持续提供压力,那就几乎不可能。这涉及到一个演化压力的机制问题,下面我会解释这个机制的复杂性,总之环境不是越宜居越好,也不是不宜居就好,不能变化太大,也不能没有变化,有时候需要稳定期,有时候就需要紊乱期、

    \n

    你可能在其它地方找到类似海洋、陆地比例的星球,但那个星球很可能就没有板块运动,生命出现后就很快就变成金星那样的环境。

    \n

    你也可能找到有板块运动的星球,但很不幸卫星太小,四季变化和潮汐太微弱。

    \n

    或者在四季、潮汐与地球相似的时期,这个星球的板块运动太过剧烈,超级火山爆发太过频繁。

    \n

    如果找到四季周期、板块运动周期与地球一模一样的行星(这已经几乎不可能了),但这个银河系处于寿命早期,附近恒星密度稍高了一点,引力扰动让这个地球与其它星球相撞。

    \n

    你看,这种周期配合有多难。

    \n

    举几个例子来说明地球环境的特殊性。

    \n

    一、银河系是很特殊的。太阳系在其中的位置也很特殊

    \n

    前面提到过银河系的寿命是 130 亿年,也就是在宇宙起源 5 亿年后就形成了。它的寿命比较长,这就能够让内部的早期恒星有足够时间走完寿命历程,产生足够多的金属元素。我们地球上的重元素是来自于早期的恒星残骸,如果银河系没有足够的寿命,那么就不能产生足够的地热,地球的铁核没那么大的话,也就不能形成地球磁场了。

    \n

    银河系比 80%的已知星系都大,它是常见的盘状漩涡状结构。

    \n

    在这种结构中,绝大部分物质都分布在盘中的高密度区,恒星爆发带来高能辐射,恒星系之间的引力影响也是非常恐怖的。

    \n

    我们太阳系的几大行星的轨道都是非常接近圆形的,这证明我们没有受到过太剧烈的其它恒星引力干扰——这几十亿年要有哪颗恒星稍微接近一下,从半光年的位置掠过,把太阳系外侧行星的轨道变成椭圆。。。那可以说太阳系就要天翻地覆了。要知道最近的比邻星离我们只有 4 光年,这种引力扰动是很有可能发生的。

    \n

    太阳系大约每隔 2 亿年会穿越一次旋臂。旋臂是密度波,届时太阳周边的物质密度会增大,有可能会导致周围发生恒星合并的大爆发事件。穿过旋臂,奥尔特星云里的冰球非常有可能被周边恒星的引力扰动,变成长周期彗星袭向太阳系内侧。星际气体也会导致太阳光照下降进入冰川期。

    \n

    上一次穿过旋臂,就是结束古生代的大灭绝事件,95%的海洋物种消失(整个物种消失,而不是个体消失)。大灭绝之后就是新的物种大爆发,恐龙就是之后兴盛的。

    \n

    在此我们不妨看下地球生物的演化史,周期恒定的稳定期一旦形成,生物的物种演化就会变慢,形成演化的平台期。所以环境绝对不是越恒定越好,而是在生态系统固化后,来一次不导致全体灭绝的大灭绝事件,对生物演化会更有好处。

    \n

    你看太阳系的区位就是如此微妙,如果旋臂的影响再大一点,影响到了行星轨道,那地球就完蛋了。多体系统会把扰动放大,行星相撞的话地球生命是百分百活不成。如果旋臂的影响小一点,没有彗星和冰川期造成大灭绝,那持续了 3.5 亿年的古生代会继续持续下去,也就不会有恐龙和哺乳动物的出现了。

    \n

    二、太阳系在银河系中是很特殊的,

    \n

    前面说过太阳系的金属含量比周边恒星显著的高。

    \n

    如果太阳系的金属占比少,那么具有地球重力的所谓的类地行星将会以碳之类的轻质元素为主(观测到的也是如此),那么碳会优先与氧结合,形成不了硅酸盐。而在实际观测到的石质行星中,碳的占比是要超过硅的,甚至纯碳的行星也不再少数。

    \n

    这证明形成太阳系的上一代恒星团的残骸是非常特殊的。在银河系远离物质密集区,本不应当存在这么大、这么多的恒星。

    \n

    太阳还有一个特殊之处在于它太大了。

    \n

    目前我们发现的恒星 95%都比太阳小。在太阳附近的恒星中 75%都是红矮星。

    \n

    红矮星非常稳定,但宜居带离红矮星太近注定了温度适宜的有海洋的行星会被潮汐锁定。我在《红矮星的方碑》这篇小说里有描述过宜居带行星上面的景象会是什么样子,其实它们是可以很宜居的,但它注定不能让生命演化。因为容量太小,环境过于稳定没有选择压力,作为未来人类的殖民地还不错。

    \n

    太阳另外一个特殊之处就更要命了。它是少见的单星系统。

    \n

    恒星是从一团很大的尘埃气体聚拢形成的。这有一个问题,就像花样滑冰选手旋转时收拢四肢会越转越快,气体聚拢形成的恒星自转速度会变得很大,以至于大概率会被甩开形成多星系统。事实也是如此,98%的恒星在形成时都是多星系统,剩下的一小部分单恒星系统通常都很小。目前银河系可见的单星系统绝大多数是多星系统甩出去的恒星。

    \n

    只有太阳是罕见的又大、又自始至终都是单恒星。

    \n

    多星系统不稳定,其中的主序星没法在宜居带形成轨道稳定的类地行星。这算是目前证据非常强的大过滤器了。

    \n

    三、太阳系内部的行星分布是很特殊的。

    \n

    得益于单星系统,太阳系几大行星的轨道都很圆。

    \n

    但这也是很偶然现象。目前对太阳系行星系统的模拟,有极大概率行星在形成以后出现混乱的景象,由于轨道共振等现象,行星忽然会出现轨道迁移的情况,这个过程充斥着极其暴力的大撞击和行星轨道的椭圆化。

    \n

    我们观测到的大多数情况是,类似太阳的恒星附近大多会有大型气态行星形成(热木星),这些行星会阻碍宜居带上的类地行星形成。金属度在远高于太阳的恒星,它如果在宜居带上或者以内存在的行星,都会是热木星。所以金属度过高过低都不行。

    \n

    前面说过太阳系的金属度决定了它诞生于超大恒星的残骸之上(二型超新星)。这个过程要求太阳系诞生于一个几千颗恒星组成的星团里,但又要在形成行星时从这个星团脱离出去。

    \n

    如果在脱离星团前,原始的太阳附近如果有个太阳 1.5 倍大的恒星,那么它会把形成太阳系行星的气体尘埃给吹走。

    \n

    ————

    \n

    在继续说下去之前,我们先看一下最近二十年对于系外类地行星的发现。

    \n

    目前已经发现了超过 7000 颗左右系外行星,其中最接近地球的一颗是开普勒 452b,它与恒星的距离与地球相当,位于宜居带上。已经在圆轨道上稳定的运行了 60 亿年以上。那款恒星与太阳差不多。

    \n

    但是,这颗行星距离地球 1400 光年,质量有地球的 5 倍大,表面重力接近地球 2 倍。这也意味着它实际上更应该算是一颗迷你海王星,它上面应该是被过于浓密的大气层笼罩,温室效应类似于金星,并不具备高级生命的进化环境。(这与我们上面的推断基本吻合)

    \n

    这已经是 7000 颗行星里最接近地球的行星了。接下来如果我们扩大搜索范围,很有可能会发现更多的行星,因为越接近银河系内侧恒星密度会越高,但发现类地行星的概率会急剧下降,因为 1400 光年已经接近银河系宜居带的宽度,超过这个范围,发现恒星的数量是呈约 2.5 次幂增加,而金属度与太阳系接近的恒星数量与搜索半径的增加是同比例的。

    \n

    也就是说未来类地行星的发现概率将会急剧下降。1/7000 分之一只是个起点。在搜索完 4-5 万光年的类地行星之后,我们才能够接近这个概率下降的终点。

    \n

    补充:

    \n

    目前发现系外行星最多的是开普勒卫星。

    \n

    如图所示,它目前瞄准的是太阳系的运动前进方向,与银心垂直,也就是正对着银河系宜居带的方向(所以外星生命探索是天文观测的最大主题之一啊)

    \n
    \"\"
    \n

    如果它换个角度,朝向银心方向,它会发现比现在多的多的行星,但发现宜居的类地行星概率也会马上大幅下降。

    \n

    ————

    \n

    那么宇宙中最常见的星系是什么样的呢?

    \n

    离我们最近的南门二,就是大名鼎鼎的比邻星所在的星系就是非常典型的星系了。

    \n

    比邻星距离我们 4.5 光年,它位于三颗恒星组成的多星系统之中。这三体系统中的两颗恒星与太阳质量差不多一样大,互相之间的旋转半径在 11AU—17AU 之间,这两颗恒星间不可能存在稳定的行星。

    \n

    比邻星距离两颗恒星有 0.25 光年,是颗红矮星,质量只有太阳的 1/8。这颗红矮星外有三颗已经发现的行星。

    \n

    比邻星 b 是一颗与地球质量接近的行星,位于比邻星的宜居带上,距离红矮星非常近(0.05AU),几乎肯定已经被潮汐锁定。

    \n

    比邻星虽然寿命长,但它的耀斑爆发周期比太阳短的多,太阳 20 年一遇的耀斑它每个月都能来一次。而比邻星 b 离它只有 20 分之一的日地距离,所以红矮星上能照到阳光的一面每隔一个月都能享受到 8000 倍太阳超级耀斑强度的辐射。

    \n

    我们上面的结论还是成立的:比邻星 b 上晨昏线附近是有可能存在温度适宜的环状宜居区,甚至还有海洋,可以供我们人类以后上去定居,但我们必须要搭建能抵挡超级耀斑的构筑物。但这个环状宜居区的规模实在太小了,承载不了复杂的生态系统。

    \n

    比邻星上还有一颗质量是地球 7 倍以上的大行星,更像是一颗海王星的冰冷星球,有着巨大的环状结构。

    \n

    最近发现了比邻星的第三颗行星,离太阳比比邻星 b 还近一半,质量只有地球的四分之一。

    \n

    从南门二里,我们可以直观的看到银河系宜居带里的大部分普遍案例:

    \n

    银河系里 70%的恒星是类似比邻星这样的小质量红矮星。

    \n

    类似太阳的恒星中,90%以上的概率位于类似南门二的多星系统,由于引力扰动过强难以形成稳定的行星。说是 90%以上,那是因为我们说不清楚那剩下的一成大质量单恒星里有多少是多体运动中被甩出去的,实际上大恒星一开始位于多星系统的概率有可能接近 100%。

    \n

    如果我们脱离银河系的宜居带,那么恒星的金属度将大大变化。

    \n

    往银河系中心走,我们会发现绝大部分恒星系都位于高密度区域,(密度随半径平方反比增加),那里的恒星系之间的引力扰动会让奥尔特星云这样的外层结构不可能存在,密度更高的话,连形成类地行星的尘埃盘都不可能存在。而超新星爆发产生的辐射事件也会指数级增加。

    \n

    ————

    \n

    说完了太阳系之外的情况,让我们看看地球。

    \n

    地球是非常特殊的星球。

    \n

    在给定的质量、化学组成的行星上看,地球实在太特别了。

    \n

    它有月球这个不寻常大的卫星。

    \n

    它的水体面积刚刚好。

    \n

    它有板块运动。

    \n

    有两个问题可能很少有人意识到:

    \n

    我们的海水这么少,实在是太特殊了。

    \n

    我们不大不小的海洋规模能大体稳定的维持三十几亿年,实在是太特殊了。

    \n

    如果一个行星存在海洋,那它的海水应该大概率覆盖表面。

    \n

    水在宇宙中其实挺常见的,毕竟氢、氧元素是非常丰富的,这两者之间又容易结合。

    \n

    地球上的水体以海洋为主,它只占了地球总质量的万分之二。那么很容易想象到,一个行星表面,要么完全没有海洋,如果有海洋,那大概率应该是完全覆盖陆地,且厚度非常厚。

    \n

    我们观察太阳系之内,这个结论也是如此。木卫二比月球还小,但海洋深度就超过了 100 公里,海水量是地球的 2-3 倍。木卫三比火星小,它的海洋可能达到 1000 公里深。冥王星的海洋也有上百公里深。而地球那么大,海洋最深处只有 10 公里深。

    \n

    在我们发现可能有海洋的系外类地行星中,海水质量占比也是大概率远超地球的。

    \n

    这里有一个问题:

    \n

    为什么我认为完全覆盖星球表面的海洋,对高等生命的形成是不利因素?

    \n

    如果把高等生命等价为高等动物的话,有一个非常重要的概念——趋同进化。

    \n

    在海洋中高速游动的动物,尽管是差异非常大的物种,都分别进化出了类似于鱼类一样的外形。一是常见的鱼类,二是从陆地返回海洋的鱼龙,三是再次从陆地返回海洋的海洋哺乳动物。

    \n

    从这个现象中我们会发现,有时候对于特定环境的进化结果不是发散的,而是只能有唯一解。包括我们人类设计的高速运行的潜艇,也就只能长成鱼的形状。

    \n

    鱼的形状只是海洋对于高等生物形成的制约之一,鱼毕竟也是挺高级的动物了。过深的海洋对生物的不利因素还远不止于此。

    \n

    海洋生物绝大部分分布于浅海,深海生物密度非常低,而且很多深海生物是依靠洋流带来的浅海生物和营养物质来生存。这是因为海水的透光效果很差,在 20 米以下就几乎衰减完了。

    \n

    在 300 米以上深度,海水的分层效应就逐渐明显,上下层之间的压力、盐度、水温很不一样,上下对流作用不强,浅层海水会缺乏大量微量元素。

    \n

    火山能给生物带来源源不断的营养物质和热量,但是海底火山口只能辐射附近很有限距离的生物群落(几百米到几公里的范围)。

    \n

    陆地的水流能够向入海口带去充足的营养物质和淡水。

    \n

    这就导致海洋里的绝大部分生物量都分布在陆地沿线的浅海之中。地球海洋的大部分 1000 米以上的深海,没有出产多少生物。

    \n

    那么就有个问题了:为啥不在比浅海面积大的多的陆地上进化出高等生物呢?

    \n

    这是因为所谓的高等生物是指多细胞动物。地球生物诞生近 40 亿,其中有 30 亿年都是非常简单的单细胞形态,直到 6-8 亿年前才出现了多细胞生物的大爆发。

    \n

    而单细胞生物是没法在陆地大量繁殖的。所以地球生物进化的主战场就在海岸线附近的浅海。

    \n
    \"\"
    \n

    如上图可见生物量最大的地方在于有群岛点缀、海岸线破碎漫长的浅海地区。深海地区的生物多是随着洋流飘过去的。

    \n

    地球的质量如果多出来万分之一的水,那它的海岸线就大大缩小。如果多出来万分之二的质量是水,那地球的海岸线和浅海地区将会消失,海洋生物量就要下降一个以上的数量级。如果多出来万分之三,地球全都是 1 公里以上的深海,海洋生物量就要下降三个以上数量级,比纯粹的沙漠还要难以进化出多细胞动物。我们马上就能想到的是,深海覆盖着的星球不大可能进化出有光合作用的细菌。没有光合作用的参与,那海洋生物总量又得下降不少。

    \n

    地球海水总量在三十几亿年来大体持平,对比曾经出现过海洋的火星,我们算是幸运的。

    \n

    现在让我们岔开一下话题,思考以下两个假设:

    \n

    那单细胞生物是不是就在这三十亿年虚耗时间,等待某种环境的突变来形成多细胞生物呢?

    \n

    或者说,如果那三十年地球的环境突变得更多,会不会让高等生物的出现更加提前呢?

    \n

    如果上面的两个假设均为肯定的话,那地球生物的进化时间就有可能压缩为原先的一半,甚至三分之一,抵消掉上面层层大过滤器对生物进化带来的不利影响。

    \n

    但我们研究得越多,就越觉得地球生命的进化历程很难压缩。

    \n

    单细胞生物在那三十亿年经历了非常大的变化,原始的细菌就是一层原始的膜包上遗传物质,进化之后,出现了越来越大的细菌,体积越大,就能容纳越多的细胞器和越复杂的结构,现存的所有种类的单细胞生物也都出现了。

    \n

    生物迭代、变异的速度是由分子钟控制的,给定生物总量和时间,那么累积下来的变异速度也是差不多的,不存在单细胞生物在偷懒这种说法。那我们怎么解释大灭绝这种减少生物量但又能让新物种涌现的现象呢?

    \n

    这是因为环境恒定的平台期给大灭绝时代提供了足够多的多样性基因素材,给之后的物种爆发提供了基础。否则大灭绝如果只隔一亿年的话,就不会有那么好的生物大爆发效果了。如果大灭绝只隔一千万年就来一次,怕是物种只会越来越少。

    \n

    我们人类其实就是无数个不同种类的单细胞生物的总和,这些细胞的原型,几乎都是在那三十亿年间出现的,我们身上的基因大部分都是那段时间诞生的。你可以理解为那三十亿年进化出了一万个字以及文字的注解组成了一本厚厚的字典,而后 7 亿年我们人类慢慢用文字组成文章,而我们人类这篇文章的厚度只有字典的十分之一。

    \n

    所以那三十亿年编撰字典花费的时间是很难被压缩的。

    \n

    我们大脑神经突触的起源并不是来自于猿类,而是七亿年前海绵体内两种细胞之间的鞭毛交流,我们有性生殖并不起源于哺乳动物,而是来源于十亿年前的植物减数分裂。我们人类基因组真正独特的部分,只是决定细胞怎么分化组合的少量信息。

    \n

    回到上面的话题,地球海洋提供了三十亿年的演化环境,海水的总量并没有大量减少,其实是很特殊的。

    \n

    我们太阳系很幸运有三个行星位于宜居带,又都具有适当的大小,形成行星的物质也都差不多,按理说应当也具有地球一样大小的海洋,可火星、金星为什么没有呢?

    \n

    火星曾经在三十多亿年起短暂的存在过海洋,但它地磁太弱加上重力太小,太阳风很快把氢吹走了大部分,海洋缩水后温室效应消失,剩下的水也就冻结在地表之下了。

    \n

    金星与地球大小一样,距离也很接近,但上面的水从来没有形成过海洋,因为距离太阳近了 28%,水蒸气形成了超级浓厚的大气层,比现在还厚几十倍。

    \n

    这些水汽对金星造成了灾难性的后果。浓密的大气层形成了强烈的潮汐锁定作用,有说法是金星也可能遭受过大撞击减小过自转,但潮汐作用起到的作用更大。而金星没有地磁,浓厚大气层顶端的氢就逃逸掉了。

    \n

    所以就算有和地球一样的物质构成,但海洋还是很容易受到各种影响而消失的。

    \n

    生物圈生活在地球表面,决定它演化的物质总量包括大气层和海洋只占地球的万分之二,所以一点点的不同都会引起巨大的蝴蝶效应。

    \n

    那么,如果有面积合适的海洋和陆地,单细胞动物在海洋中顺利的发展出多样化的高等生物,这些生物是不是就一定能进化出智慧了呢?

    \n

    地球生物从多细胞生物涌现开始,只用了 7 亿年就进化出了人类这种智慧生物,初看起来似乎地球生命已经通过了最主要的过滤器,进入了进化的快车道。

    \n

    智慧生命进化的主战场在陆地,由于月球的存在,让陆地生物的进化开了挂。

    \n

    月球是非常特殊的。

    \n

    原始地球在形成 5 亿年后就在大撞击中形成了月球,这让地球有足够的时间进化出高等生物。这种撞击会迸发出遮蔽恒星的尘埃,斯皮策太空望远镜观察了 400 颗和当时太阳年龄差不多的恒星,只有一颗出现了类似的尘埃。而考虑到这种撞击不一定能形成大卫星,那这种系外孪生月球的出现概率就更为渺茫了。

    \n

    由于地球的温度适宜,大气层没有像金星那样浓厚得让地球自转方向被锁定,那么它必须要一个大卫星来作为稳定器。

    \n

    一个在太空中旋转的类地天体,由于密度注定是略微分布不均的,那么它的自转轴必定会不定期出现巨大而快速的翻转。

    \n
    \"\"
    \n

    这种太空中物体自转轴翻转的现象是 1985 年苏联宇航员才在空间站中发现的。以往大家都默认在没有外力作用下的太空旋转物体的自转轴是不变的。但贾尼别科夫发现,一颗螺丝在旋转中会时不时翻转。这种倾斜轴的翻转非常剧烈,几乎是一瞬间发生的。

    \n

    火星的自转轴曾经朝太阳翻转了 90 度,在整个星球的绝大部分地区形成了超级冬天,原先的赤道地区被冰川覆盖。

    \n

    而且由于地球这样的固液混合星球密度分布是总在变化的,那么这种自转轴翻转会不定期发生。如果地球的自转轴对准太阳,很短时间内极地的海水会沸腾,朝阳面整个被温室气体覆盖。而背阳面会完全结冰,背面最冷的地方几乎肯定在 150 度以下。这个地轴翻转变化可以在短短几十年内就完成,间隔短则几万年,久则上亿年,陆地上的高等生物几乎肯定会被灭绝,恐怕就是以现在的人类文明都难以抵挡。

    \n

    我们的月球是在逐渐远离地球的,再过 20 亿年就会对地球失去稳定作用,所以其它类地星球要诞生智慧生命,它的大卫星也得能在 40 亿年内对它起到稳定器的作用。

    \n

    月球除了充当稳定器,对地球板块运动的形成是至关重要的。

    \n

    澳大利亚的土地非常贫瘠,通常会认为是因为那里雨水稀少,实际上在澳大利亚湿润的南部地区,土地一样很贫瘠。那里的灌木和草原很有欺骗性,其实那里的植物一旦被砍掉,其生长周期会是中国东南部的四五倍。

    \n

    这是因为澳大利亚大部分地区缺少板块运动,是地球上最古老的大陆,土壤的肥料和养分经过几十亿年的雨水冲刷早就流失掉了。澳大利亚也成为物种持续退化的地区,生态环境非常脆弱,当地的农业是靠外来的化肥在支撑着的。

    \n

    如果没有板块运动,陆地能承载的生物量会很小。除此之外,地球那么大的类地星球没有板块运动的话,会有非常剧烈的火山爆发。

    \n

    金星作为地球的姊妹星,它大气中的二氧化碳几乎等于于地球地下的碳全部释放出来的总量。

    \n

    水星到火星的太阳系内侧行星记录过多次大轰炸(想想月球表面),金星表面却没有保留 30 亿年前的大型撞击坑,它的表面平坦,只留有 7 亿年以内的撞击坑。

    \n

    这就说明金星在 7 亿年前有过一次火山大爆发,涌出的岩浆覆盖了整个星球表面。这是因为金星的地壳比地球厚三倍,而且很均匀。在这层厚厚的地壳下面,放射性元素含量与地球却是大体相同的,产生的热量日积月累,没有像地球那样在板块碰撞的边缘位置不停释放能量,于是每隔一段时间就会产生一次岩浆大爆发,淹没整个星球表面。

    \n

    最新的研究表面金星是有板块的,但它的板块裂缝和地球相差太远,大体上还是像上面的描述那样,火山喷发太过猛烈了,以至于高等生物不可能存活。

    \n

    月球形成初期,地球的地壳被撞击的高温融化变薄。当时月球距离地球很近,只有现在距离的十分之一(想想相当于现在 100 倍大的月亮)。地球一天只有五小时,巨大的潮汐力不止让海水形成巨浪,当时陆地也像海洋一样,形成了高达上千米的潮汐。这种潮汐作用让地球的地壳没有继续变厚。

    \n

    板块运动的形成非常复杂,除了月球以外还有其它必要条件。有说法是大轰炸时期的陨石冲击让地球板块被进一步的冲击破碎,启动了板块运动。还有海洋的贡献也必不可少,一是海水给俯冲的板块提供了润滑作用,二是海水的重量让地壳在海底进一步变薄。

    \n

    月球对板块运动的作用是不可替代的。如果没有月球,我们的陆地生物就缺乏营养来源和多变的气候及地貌,从而没法进化出智慧生物了。

    \n

    地球上的潮汐作用主要由月球贡献。在几亿年前海生生物上岸时期,潮汐是比现在大的。地球生物多样化程度最高的地方,就是海水与淡水交汇的地方,潮汐大小会影响这些交汇区的规模。几亿年后潮汐就会变得很小。

    \n

    板块运动对我们智慧生物的影响是如此之大,有必要再深入的讲一讲。

    \n

    最容易想到的是,没有板块运动,就没有化石能源,因为煤和石油是要在地底形成,然后再抬升起来的。没有化石能源,恐怕工业革命会难上很多倍。

    \n

    不过化石能源倒也不一定是必须的,虽然很难,我们倒不妨可以畅享一种利用生物能,或者日光发展起来的文明,那应该挺有趣。

    \n

    板块运动给我们带来的,最重要的还是可控、缓慢的环境变化。

    \n

    这回到了开头提到的观点:重要的不仅是环境,环境变化的可控、缓慢等特性才是更独特且更重要的。

    \n

    我们很少想到:

    \n

    任何高级、复杂的物种或产品,哪怕是人工设计的,它的生成过程都必须使用进化的方法。

    \n

    也就是多次迭代、多方向尝试、在实际环境中淘汰筛选。

    \n

    举个例子,当今 spacex 制造的星舰就属于一种很复杂的产品。它的诞生过程就属于典型的进化论主导的过程:

    \n

    一、可回收火箭的原型是使用一台梅林引擎的蚱蜢跳小火箭,在 2013 年完成了尝试。在此之前,spacex 论证过伞降回收、隔热垫回收的构型,最终找到可回收火箭的道路。

    \n

    二、2016 年用九台梅林引擎的猎鹰 9 火箭证实了多发并联的中型火箭。之后快速迭代了五个版本,在 2019 年达到成熟。

    \n

    三、之后开始正式开发星舰,2019 年使用一台猛禽引擎实现了星舰原型蚱蜢跳,此时初代猛禽引擎已经迭代过多次,但还没到量产型号。大量试验不同的星舰制造工艺和材料。抛弃碳纤维、铝合金,选择不锈钢。在第一次试跳时已经不同完成度的试制过上百个舰体。

    \n

    四、到 2023 年,星舰第一次试飞,没有分离就被主动炸毁,到现在已经进行了六次发射尝试。这几年星舰的方案经历了很多颠覆,包括用发射台进行回收替代安装在舰体上的起落架,用隔热瓦替代了燃料冷却散热,猛禽引擎的量产工艺迭代了两次。。。。

    \n

    与小步快跑的星舰研发相对的是波音的 sls 和蓝色起源的新格伦火箭,它们力图把做完整舰的设计和论证,在第一次(或头三次)就达到很高的成功率。并没有利用实际发射分阶段整体论证产品。

    \n

    它们在整舰方案上并没有采用进化论的方法进行多次发射测试,也就导致了它们研发的进度比星舰长了很多倍。

    \n

    当然,波音和蓝色起源在设计过程中肯定还是对子系统进行实际地面测试了的,也肯定经过多方案对比和测试淘汰筛选的过程。

    \n

    因为我们不可能不在产品设计中采用这种进化论思维,区别只是贯彻程度而已。贯彻的越好,进化迭代的速度就越快。无论火箭、汽车还是飞机,人类都是在实际使用中不断的迭代中完善优化产品的,不存在一步到位设计出完美产品的可能。

    \n

    一个环境不可能一步到位就从无序中进化出一个高度智能生命。缸中之脑不可能凭空出现,只有可能是先产生能够发育出缸中之脑的简单原型,然后进化迭代出来高级智能。

    \n

    我们已经解答了地球的宜居环境对于生命的出现和维持问题,接下来就到最难的问题:什么样的环境才是适宜进化的环境。

    \n

    这个环境不能有颠覆性的变化,我们在上面已经提到过很多,比如地轴在短时间内翻转、熔浆海洋淹没地表、水分全部流失等极端变化是不能有的。

    \n

    这个环境必须能持续提供适当的筛选压力。也就是它必须持续、速度适中的不极端变化。

    \n

    前面我们提到过分子钟的概念。给定生物量和资源,在一定时间内的变异资源是有限的,生物需要时间来适应环境变化。

    \n

    板块运动的速度就比较适合。地球经历过两次雪球时代,整个表面都被冰雪覆盖,最近一次是 6.5 亿年前,以之为起点,高级生物用这几亿年在陆地上进化出人类。

    \n

    这个过程看似漫长,但是经过几次大撞击导致的大灭绝时代,最近的一次是白垩纪事件,考虑到大灭绝时代的持续时间以及对陆地生物的影响格外严重,这 6.5 亿年的进化速度还是很快的,几乎用尽了生物变异资源的极限。

    \n

    让我们跳去 6.5 亿年的绝大部分时间,以人类诞生的这 650 万年和板块运动的演化关系,来说明环境选择压力是如何耗尽了人类变异资源的。(刚好 650 万年是 6.5 亿年的 1%)因为:一、每个人,包括读者,都熟悉自己的身体构造,二、这段历史离我们很近,研究最充分,有充足的化石证据,三、人类是生命进化的最高成就,在地球生命中最有代表性。

    \n

    ————

    \n

    650 万年的时间里,其实大陆板块运动的变化不大,很容易就可以概括出来。

    \n

    对于南半球来说,南极已经和现在一样被冰雪覆盖,澳大利亚和现在一样干燥贫瘠(毕竟陆地养分已经流失了几十亿年),南美洲缓缓接近北美洲。

    \n

    总之,可以把南半球发生的变化忽略不计。

    \n

    北半球的大陆朝北移动,渐渐的把北冰洋封闭成了一片相对孤立的海洋。这在地球历史上是第一次。北极出现冰川,对地球气候的变化产生着全局性影响。

    \n

    目前认为地球的气候受三个米兰科维奇周期影响,(10 万年,4 万年,2 万年)这其中的关键就在于,高纬度地区(北极)的海洋及冰盖,会放大地轴倾角和日照的变化。

    \n

    在亚非欧三个大陆的挤压下形成了地中海,地中海不断干涸和重新填充,在 600 万年前最后一次干涸,又在 550 万年前重新注入海水,并从此不再干涸。地中海极大的影响着周边环境,冰川不时的向南侵蚀和向北退却。

    \n

    给地球板块运动带来主要动力的是两个超级地幔柱,一个位于南太平洋,一个位于非洲。位于非洲的地幔柱制造了东非大裂谷,在近一千万年来有着地球上最丰富的环境多样性。那里有沙漠、草原和雨林,在赤道地区有着六千米高的雪山。

    \n

    此时欧亚大陆已经基本成型,在现在纬度 38 度的地方形成一条长轴,不同的物种可以在这个宽广的大陆上迁徙。由于海平面不时下降,欧亚大陆上的物种不时的可以进入北美洲。

    \n

    我们可以把这 650 万年间,地球生物的演化简单的描述为:

    \n

    一、东非大裂谷地区在小范围内提供最大的环境多样性,形成各种物种充分竞争的小型实验室。

    \n

    你可以把这里看成是物种设计的草图原型阶段,进化设计师在草图上快速的打着各种草稿,并快速的对比着这些简单的原型,筛选出有发展潜力的概念模型。

    \n

    二、沿横向长轴展开的欧亚大陆提供物种的扩张空间,确保每种气候下的物种都有相当的种群规模。

    \n

    你可以把欧亚大陆看成是大规模量产的市场检验阶段。工厂建立了大规模的生产线,在规模生产中微调着产品,让产品变得非常成熟。

    \n

    三、北极制造冰川期等气候变化,给欧亚大陆的物种进化提供筛选压力。

    \n

    而东非大裂谷的环境相对独立,这个原型工厂一直在出产着各种概念原型。

    \n

    这也是为什么几百万年来人类一次次的从东非出走、在欧亚大陆上扩散的原因。

    \n

    以上三点都是直接受板块运动影响的,哪怕这 650 万年大陆板块只移动了一点点距离,但这种微妙的变化就给气候带来了巨大的影响,毕竟大气层和海洋的质量只占地球质量的万分之二,生态系统只是地球表面一层薄薄的膜,极其脆弱敏感,很容易被影响。

    \n

    南方古猿于 600 万年前在南非出现,当时非洲一部分森林消退,灵长目祖先从树上下来进入草原。

    \n

    那么为什么是树栖的灵长目率先进化出了能双手使用工具并直立行走的智慧生物呢?

    \n

    这是因为在树林间的快速攀缘需要很高的大脑运算能力。树枝之间有复杂的遮挡关系和空间层次,树间的快速攀爬不能只靠反应,而要能预判空间关系,要能在大脑中快速建立三维模型,想象快速运动的下一瞬间哪里是可以攀缘的地方。

    \n

    而四肢协调也需要大脑活动有很高的运算频率和响应速度。

    \n

    至今也只有灵长类动物能做到这一点(猿类远比猫科灵活,猫科动物只能靠夜间视觉捕食猿类)

    \n

    树上的高糖果实和嫩芽能提供足够的能量,支撑高能耗的大脑活动。果实的颜色促进了灵长目三色视觉的形成。

    \n

    树栖生活能支撑大规模的社会性灵长目族群,因为沟通带来的竞争优势很大(预警和繁殖)。

    \n

    灵长目这种高级生物形成的前提是地球上必须进化出茂密的树林。树林对日光的利用效率最高,树冠是能量和营养储存最集中的区域。

    \n

    当南方古猿下到地面生活后,它们原先应付攀缘运动的大脑算力就相对过剩了,毕竟草原只是个二维平面,运动较为简单。

    \n

    在东非大裂谷地区,森林、草原、河流遍布。人类的祖先并不只是简单的从树上走到草原上,而是适应了东非所有多样化的地形,同时具有优秀的攀爬、奔跑、游泳能力。非洲的森林从来没有完全消失,而是在不同地区之间此消彼长。

    \n

    最有适应力的古猿能够获得最大的地盘,也能在灾难降临时有最大生存概率。

    \n

    这里有个问题:

    \n

    是不是地球多几个东非大裂谷这种多样化的小型环境,提供更多的多样性,对进化的促进作用会大于欧亚大陆这种大型环境?

    \n

    实际上人类走出非洲并不是单向的,在冰期来临时,也出现过几次欧亚大陆的人类重返非洲的案例。这时在外面得到的大规模进化优势又带回了非洲。

    \n

    在欧亚大陆最终灭绝的人类亚种,有很多基因还是留了下来。尼安德特人和丹尼索瓦人已经灭绝,但我们每个人身上或多或少都还有他们的基因。

    \n

    欧亚大陆对人类进化的促进作用越到后期越明显,发育越到后面,对自然环境的适应能力越来越不重要,而是对能建立更大规模组织的智慧要求更高。

    \n

    在这六百万年中,人类的竞争优势越来越倚重于智力,脑容量的增长是很明显的。

    \n
    \"\"
    \n

    脑容量并不是衡量智力的单一指标,在不同物种间,不能简单说脑容量越大智力越高,但在人类自身的进化历程是可以大致这么说的。除了脑容量,所有和智力相关的生理因素,如大脑皮层褶皱度、额叶面积、控制语言能力的基因,都指向人类是随着进化越来越聪明的,可以说人类越到后期越靠智力进化获得竞争优势。

    \n

    东非大裂谷快速变化的多样化环境以最高速度筛选进化,然后再扩散出去到欧亚大陆获得规模优势。人类几次走出非洲留下了明确的化石、基因证据。

    \n

    但这个速度不能再快了,因为人类在这个阶段经历过几次大灭绝。

    \n

    其中最严峻一次发生在 90 万年前,当时的干旱和降温让人类数量下降到了 1300 人左右。在今天可以归入极度濒危的范围,几乎都找不到当时非洲人类的化石。

    \n

    还有几次人类数量下降到 2 万到几千不等的数量。最后一次是 5 万年前的气候变化导致尼安德特人灭绝。

    \n

    而我们人类在几百万年间的进化速度,并没有随着这些大灭绝有跳跃式的提升,这基本上说明我们的基因变异资源已经用尽,我们的进化速度达到了可以达到的极限,环境变化再剧烈也刺激不上去了。

    \n

    到了 5 万年前,决定智人语言基因完成了最后突变,彼时的人类与现在的我们,在基因上已经没有太大变化。我们的进步更多的依赖文化和科技的进步。

    \n

    ————

    \n

    前面已经解释了地球生命的进化为什么是独特的。我们有幸几乎以最大速度穿过了层层大过滤器,抢先成为了已知宇宙中的唯一智慧生命。评论区还提出了一些有必要回答的问题,比如“如何确定地球进化路径的唯一性”,但我想留到以后再回答,在下面我想聊聊,在费米悖论下,人类未来应该如何自处。

    \n

    ————

    \n

    搜寻地外生命的努力在费米悖论提出后已经过了七十年。

    \n

    人类的探测技术日新月异,越探测,就越发现人类文明是个幸运的孤例。

    \n

    相比于孤独,我们更应该感到非常幸运。

    \n

    幸运在于广阔的宇宙给我们提供了无限宽广的发展空间,星际殖民会解决我们所有形而上的焦虑:

    \n

    所谓的孤独感、

    \n

    对隐藏着的星际敌人的恐惧、

    \n

    对人类技术发展的不自信、害怕人类被困死在太阳系,

    \n

    害怕人类被自身暴力毁灭、

    \n

    这些都是没必要的。

    \n

    一、星际播种是非常容易的事情。

    \n

    即使只考虑我们现有比较容易实现的技术,我们都可以在几千万年内殖民到银河系的各个角落。

    \n

    前面提到,简单的细菌和病毒是可以跨星际旅行的。

    \n

    我们现有技术可以制造出以百分之一光速航行的微型航天器,向银河系宜居带播种微生物和一些有潜力的多细胞生物,就可以让目标行星减少 30 亿年的进化历程,只用 7 亿年就进化出智慧文明。

    \n

    我们可以让这些微生物携带有地球至今为止的基因信息,控制他们的基因表达,让它们在特定环境下按照指定的方向进化,那就可以让它们避免走不必要的弯路,在外落地后,在几百万年内就发展出地球的整个生态圈。如果我们想,我们就能做到让人类在那个生态圈中进化出来。这不需要依赖人造子宫、冯诺依曼机器人之类的高科技,只需要依赖微生物。

    \n

    银河系的直径只有十万光年,人类以目前的技术,只需要两千万年就可以在所有宜居的系外行星上广泛播撒地球生命的种子。

    \n

    前面说过,我们几乎找不到能进化出智慧生命的星球,但要找到能适宜地球生命生活的星球就容易多了。

    \n

    我们不需要考虑很大规模的生物圈,那么所有红矮星附近有海洋的类地行星都是潜在目标。

    \n

    我们不需要考虑几十亿年的稳定环境,那么不管有没有地磁和板块运动,重力是不是比地球小都是无所谓的,类似原始火星那种短暂存在海洋的星球即可满足要求。

    \n

    银河系宜居带以内高密度的分布着大量恒星,由于受到引力扰动和超新星爆发等极端事件的影响,那里的行星大部分没有超过十亿年的稳定环境,但对于我们播种生命的需求来说这已经足够久了。

    \n

    在一亿年之内,我们以 1/10 光速发射的微型飞船可以在 1000 万光年内的本星系群里广泛播种。

    \n

    在十亿年内,我们已经可以在一亿光年直径的本超星系团里播种完毕,这个范围内有 1000 万亿个太阳质量。

    \n

    这个时间段,还不到地球生命进化史的三分之一。

    \n

    十亿年后,在我们太阳系生命都还没灭绝,本超星系团就已经出现了百万亿个有生命的星球,其中有可能有上亿个星球按照我们的设计进化出有智慧的生命。这些生命经过短则千万年长则几亿年的独立进化,起码在社会形态上已经完全不同,到那时我们是不大可能感到孤独的。

    \n

    各个大陆的人类基因水平高度相似,但不同的宗教、文化和社会制度,已经让各个国家之间存在极大的差异。在一个国家内部,相隔比较远两个省都可能存在文化认同不一的情况。

    \n

    在一亿光年的广袤太空中寻求陌生感是最容易的事了。

    \n

    二、星际旅行并没有想象中难。

    \n

    如果以 10 亿年为期,那么人类的航行范围和播种范围大概率是几乎重叠的。

    \n

    我们讨论星际旅行时,受限于地球上的资源水平,会低估星际飞船的规模。

    \n

    以最慢的速度考虑,人类在一千年内可以开始大规模的太阳系开发,那时起人类应当已经脱离单行星演化的高风险阶段,到十万年后,对奥尔特星云的大开发应当已经完成。

    \n

    以现在地球上的生产力水平来估算彼时的星际航行手段是肯定不对的。

    \n

    届时人类的生产力水平是现在的百万倍以上,已经没有可能受到任何自然或人为灾害的影响而灭绝。水星可能已经被拆解成戴森云,人类已经几乎完全转移到太空,把地球完全留给自然环境。人类则慢慢的广泛生活太阳系的各个角落,产业经济也都早就向地球之外转移了。

    \n

    太阳系被完全开发的情况下,我们建造的飞船是远远超过现在能够想象的水平。从速度上,我们可以弹射接近光速飞行的微型飞船。从规模上,我们可以在柯伊伯带以外建造直径接近月球的环状太空城,这些太空城有重力的生态圈把每层摊开来的表面积可以接近地球表面——地球生态圈的规模其实不大,如果只考虑 50 米深度的陆地表面以及大气层,它只占地球总质量的百万分之一。

    \n

    天王星、海王星的质量相当于地球的 32 倍,如果拆解这两颗行星,利用它们的氢作为聚变原料,那么可以制作出近千万个太空城,每个太空城都有着超过地球的生态圈规模。

    \n

    这些太空城建成时本来就已经在太阳系外侧,建成后如果有十分之一选择向外漂泊,那么最多一万年后就能到达邻近星系,在那里补充资源、建设亿万个新的太空城,进一步飘向远方。

    \n

    这种太空城的规模还可以扩展,或是无数个太空城相隔百万公里的靠近在一起,形成超大规模的城市群。在千万年后,这些城市就像细胞组成复杂生命一样,组成一团城市云,这些城市之间存在海量的光速通讯和物资交换,它们的经济总规模是我们现在无法想象的。

    \n

    在十亿年的时间里,地球起源的人类城市群在本超星系团里就可以遍地开花,它们会和之前播种产生的其它文明形成各种互动。

    \n

    三、星际广播非常容易。

    \n

    依据现有的技术能力已经能向几万光年外发射编制过的电磁信号,接受两百亿光年外的伽马射线暴。

    \n

    如果以一千万年为期,在进行银河系大开发之后,人类只需要消耗几个恒星的质量,就可以向四面八方发射编制过的伽马射线,让相当于 21 世纪人类的智慧文明接受到人类的信息。

    \n

    能进行星际航行的文明显然具有更高级的信息接受能力,所以起码在银河系内部,信息的星际传递是非常活跃的。

    \n

    四、道德的星际普世性

    \n

    不止人类,包括灵长类之类的高等动物都或多或少具有类似道德的善意行为。包括并不限于:

    \n

    a、哺育不同群落甚至不同物种的幼崽,b、跨物种的协作和共生能力,c、不同物种间具有捕猎、协作之外的玩乐关系,d、尽量避免使用暴力

    \n

    人类道德体系的形成有很多生理性(动物性)的起源,不全是理性推理出来。有一些向善的本能是进化出来的。

    \n

    那么为什么人类的那些向善本能会具有进化优势呢?

    \n

    如果我们把考察范围放大到整个地球生物圈,我们会发现社会性动物具有碾压性的竞争优势。

    \n

    不考虑微生物的话,总质量最大的生物第一名是蚂蚁,第二名是人类(有说是牛),第三名是猪,第四名是白蚁,第五名是蜜蜂。

    \n

    猪和牛是人类蓄养的社会性动物,如果不考虑蓄养对它们总质量的放大效应,那么我们可以看到地球总质量最大的生物是人类、蚂蚁、白蚁和蜜蜂,它们的共同点是都是真社会性动物。

    \n

    真社会性起码独立起源了 9 次,它能成立的基础是个体要能主动哺育非自己亲生的后代。协作哺育后代的效率要高于个体独立哺育,有照顾妇幼本能的群体也就具有竞争优势了。

    \n

    真社会性生物的群体选择大于个体选择,起码在同族群之内,暴力征服相对于协作共生并不具有优势。

    \n

    不同物种之间的协作起源(7 亿年前)要远远早于真社会性(白垩纪)的出现。

    \n

    我们可以见到蚂蚁会照顾蚜虫,犀牛鸟会给犀牛剔牙,协作关系是普遍存在的。

    \n

    前面我们说过,单细胞生物在 7 亿年前进化到高等生物。不同种的细菌之间如果开始建立协作,哪怕再微弱,这种协作关系都会趋向加强,因为不同细菌在专门化生产的过程中会弱化自己的适应性,变得越来越依赖集体生存。这就是多细胞生物产生的“棘轮效应”。

    \n

    7 亿年前的海洋中是有很多只顾自己发展的细菌个体,但还是出现了趋向于协作的细菌,它们身上都有产生“棘轮效应”的基因。

    \n

    社会性的哺乳动物表现出复杂的社交行为,它们面对异类时并不总是趋向攻击。因为攻击需要耗费能量,也可能导致自身受伤,而一旦受伤在野外也就意味着死亡,即使是捕食也不会轻易出击。在吃饱喝足后,面对比自身弱小的物种,哺乳动物会有玩乐游戏的行为,一是锻炼能够增强未来的捕猎能力,二是有可能形成跨物种的共生关系。

    \n

    对狗的驯化有可能早在 3 万年之前就成功了,人和狼的社会都有跨种族的友好行为,这也让这两个种族具有强得多的竞争优势——和狼协作的人类部落能在雪地里发现和追踪遥远的大型猎物,这在冰河时期至关重要,从而击败了那些不会和狼共生的部落,向善基因也就在人类身上留存了下来。

    \n

    道德本就起源于动物性,很多时候长期利益是等价于道德的。

    \n

    银河系宜居带的恒星系之间也就间隔几光年,星际航行时间相对于人类个体来说很远,但相对于人类的几万年历史来说就很近了。信息传递也就只需要几年,团结协作带来的收益会更大。

    \n

    星际物种的分布也不会是全都聚集在恒星附近,而是广泛分散在星际空间之中。虽然我们人类大部分生活在大城市里,但在旷野和海洋上也都有人类存在,未来也许人类会大部分靠近恒星生存,但几乎肯定有大量的飞行器和城市飞行在广袤的太空之中,文明之间的无人区不会那么大。

    \n

    这种文明的分布图景几乎肯定和“黑暗森林”法则里描述的图景不同。

    \n

    攻击是生存遭到威胁时的应激行为,对于广泛撒种的星际物种来说,绝对不会面临文明灭绝的风险(十万年后单个人类个体都有可能难以消灭),那种不论三七二十一先打一枪再说的策略实在是很难想象会成立。

    \n

    至于一个文明会不会主动隐瞒自己的存在,那还是有可能的,但文明的规模越大越发达,就越难想象会完全自闭。我们现在具有的天文观测能力能够从几千光年外发现地球不同寻常的大气层,从几万年外受到地球每时每刻发射的无线电。

    \n

    我们现在每时每刻都通过手机泄露着自己的电磁信号,每个人都想保持隐私,但在协作带来的收益面前,似乎我们总是不得不默认选择暴露自己。

    \n

    十万年后大概率是个人就能有星际通讯能力,要长期隐瞒自身存在,怕是这个社会的人口数不能大于 100。

    \n

    所以人类大范围星际播种之后,宇宙应该是个充满无数不同文明、交流频繁的光明世界。未来的世界的局部可能还是会有战争和杀戮,但在进化中形成的道德和秩序也还是会具有竞争优势,永远在高等文明中流传下去。

    \n

    创作不易,更多科幻、科普内容在专栏:

    \n

    正在撰写内容,解释:为什么地球的碳基生物是唯一可能自然产生的生命形态

    \n

    雪树的科幻世界

    \n

    你相信造物主创造物种还是进化论?

    \n
    \n
    \n\n\n\n\n
    \n\n\n\n", + "content": "
    \"头图\"/
    \n

    你相信造物主创造物种还是进化论?

    \n

    费米悖论提出至今已经有七十年了。

    \n

    你可以说七十年前的基础物理已经发展到了很高的水平,但当时对宇宙、地球和地球生命的认识实在还处于很原始的水平。

    \n

    当时板块漂移说还没有成为主流。

    \n

    当时还没用同位素法测定地球年龄。

    \n

    当时不知道进化论的完整链条。

    \n

    当时连月球是地球大撞击形成的都不知道。

    \n

    当时连中子星都还没发现。

    \n

    更别提柯伊伯带和彗星成因,以及有机物在宇宙中广泛存在的事实。

    \n

    彼时 dna 发现没多久,连 dna 长啥样都不知道。

    \n

    由于 50 年代的费米对天文、地理、生物知识的匮乏,彼时对进化论的演化图谱一片模糊,所以费米悖论就是瞎猜。

    \n

    结合近十几年的发现,我认为费米悖论的解释已经越来越清晰了。

    \n

    那就是:

    \n

    一、宇宙中原始生命很有可能广泛存在。碳基单细胞生物大概率在十光年内就能发现。

    \n

    二、碳基高等生物的发现概率非常小。从单细胞到脊椎动物,大概隔了十个千分之一概率的过滤器,也就是几千个银河系那么多的恒星,才有可能演化出脊椎动物。

    \n

    三、从脊椎动物演化到人类的难度,远比二要难。整个宇宙也就几百亿光年,我们地球恐怕就是孤例。即使不是孤例,由于光锥隔离,我们也不可能发现别的智能生物星球,哪怕我们掌握了光速飞船也不行。

    \n

    ——————

    \n

    (提醒一下各位看官,以下内容绝大部分都是基于费米悖论提出之后的科学发现。我在后半部分会回答“我们在费米悖论下如何自处”的问题)

    \n

    第一点好解释,

    \n

    我们发现最原始的细菌,是在形成月球的大撞击之后不久就存在了。也就是三十多亿年前差不多四十亿年前。

    \n

    要知道 38 亿年前能完整留下来的岩石证据都不多,在这些最早期的岩石上都能够发现生命痕迹,说明地球生命大概率还能往前追溯。

    \n

    当时地球的环境非常恶劣,有海洋,月球靠近地球形成上千米高的巨浪,地球转的比现在快很多,海底到处都是火山,大气层是剧毒的气体。

    \n

    要知道地球大撞击那是把地球整个液化了的,地球生命起源肯定是在大撞击之后,那么也就是在一个极度恶劣的环境下,差不多是在海洋形成的一瞬间就出现了原始细菌。

    \n

    而这种有大量火山爆发的海洋星球环境并不罕见,十光年内就有类似原始地球的行星。在太阳系内就有几个天体有冰下海洋。

    \n

    所以细菌是非常有可能在宇宙中普遍存在的。

    \n

    而且地球生命是有可能在银河系里广泛传播了的。

    \n

    因为地球在形成细菌后还经历过无数次大撞击,这个过程大概率有陨石携带着地球细菌逃出太阳系,在三十多亿年的时间里在银河系来回传播。

    \n

    目前火星已经干涸,但还有木卫二之类的太阳系天体存在地下海洋。只要地球陨石能带着细菌进到海洋下,大概率在那里也是会传播了的。不过砸开几公里深的冰壳很难,地球细菌还是前往其他恒星系的裸露海洋的概率更大。

    \n

    说到这里,得提到这么一种可能:

    \n

    地球的原始细菌有可能是外来的。因为原始细菌这些东西由于构造简单,生命力就特别顽强,很有可能附着在陨石上跨星际旅行。

    \n

    但就算证实了地球生命外来起源的意义也不大,因为我们发现,地球生物从零进化到人类,最难的不是从零到有,而是由简单到复杂。

    \n

    生命是随着海洋几乎同时形成,然而它演化到高级动物却花了差不多 40 亿年才形成了古猿。40 亿年这个时间长度即使和银河系寿命(最多 130 亿年)及宇宙寿命(135 亿年)比起来都算漫长了。

    \n

    这就是我们的第二点内容:高等动物是很难出现的。

    \n

    和细菌、病毒相比,高等动物首先是不可能被动的跨星际旅行的。难以想象、至今也没发现哪种无脊椎动物可能会随着大撞击被炸到太空还能存活。高等动物必须是在不同行星上独立演化出来的,这和细菌、病毒相比那就难上很多倍了。

    \n

    所以,低等生物所在行星能否提供进化的环境选择压力就很重要了。

    \n

    你看,我之前的讲述基本上是集中在“环境”二字上的,只要有了原材料,那么加上适当的环境,那么生命的演化就是水到渠成的了。

    \n

    与原始地球环境的普遍存在极为不同,地球高等生物演化的环境非常难在其它地方找到。

    \n

    有人会说了,现在地球的环境还不是地球生物造就的,只要原始细菌存在了,那么那个星球自然就可能会被细菌改造成像地球了。

    \n

    这种想法是错误的。

    \n

    事实是,几乎不可能在其它地方找到类似这几十亿年的地球环境。

    \n

    因为孕育出高等生物的星球环境必须是一个受到精巧控制的动态环境。

    \n

    地球环境在生物演化的 40 亿年间发生了巨大且复杂的变化。不考虑生物作用,外在的变化有:

    \n

    银河系发生了很大变化。

    \n

    太阳系附近的恒星际环境发生了很大变化。

    \n

    太阳系天体运动发生了很大变化。

    \n

    太阳发生了很大变化。

    \n

    地月系发生了很大变化。

    \n

    地球地质发生了很大变化。

    \n

    地表化学成分发生了很大变化(非生物影响)

    \n

    以上这七个变化,深入来讲需要七本书。我们通常思考地球生命演化时,习惯性的认为地球环境是一个静态不变的影响因素。实际上不是的,以上七个变化都是翻天地覆的变化。银河系、太阳系、地月系、地质变化都有其周期,这些周期你可以理解成四首连续唱了 40 亿年的歌,四个乐队各唱各的,结果都在几千个关键节点节点赶上了拍子,合成出的歌竟然没跑调。

    \n

    我们通常会看到这样的新闻:”在某个恒星系上发现了有海洋,温度和大小与地球差不多的行星“,大多数人会想:你看,地球也不是那么难找嘛。

    \n

    这就和你第一次摸钢琴,从头到尾把 88 个键音都听完了,于是就说:”OK,我会创作钢琴曲了,赶明儿我就能创作出媲美巴赫的神曲。“

    \n

    实际上你也知道,记住那 88 个音色根本不是重点,重点是这些音组成的曲子。如果一只猴子运气好,可能一年内就能够弹出一段 5、6 秒长的好玩的片段,但要它能弹出一段几分钟的巴赫的曲子,那恐怕就是要几百亿年。

    \n

    你能找到现在看起来宜居的行星(这本身已经是个大过滤器),要它能在几十亿年里对生命演化持续提供压力,那就几乎不可能。这涉及到一个演化压力的机制问题,下面我会解释这个机制的复杂性,总之环境不是越宜居越好,也不是不宜居就好,不能变化太大,也不能没有变化,有时候需要稳定期,有时候就需要紊乱期、

    \n

    你可能在其它地方找到类似海洋、陆地比例的星球,但那个星球很可能就没有板块运动,生命出现后就很快就变成金星那样的环境。

    \n

    你也可能找到有板块运动的星球,但很不幸卫星太小,四季变化和潮汐太微弱。

    \n

    或者在四季、潮汐与地球相似的时期,这个星球的板块运动太过剧烈,超级火山爆发太过频繁。

    \n

    如果找到四季周期、板块运动周期与地球一模一样的行星(这已经几乎不可能了),但这个银河系处于寿命早期,附近恒星密度稍高了一点,引力扰动让这个地球与其它星球相撞。

    \n

    你看,这种周期配合有多难。

    \n

    举几个例子来说明地球环境的特殊性。

    \n

    一、银河系是很特殊的。太阳系在其中的位置也很特殊

    \n

    前面提到过银河系的寿命是 130 亿年,也就是在宇宙起源 5 亿年后就形成了。它的寿命比较长,这就能够让内部的早期恒星有足够时间走完寿命历程,产生足够多的金属元素。我们地球上的重元素是来自于早期的恒星残骸,如果银河系没有足够的寿命,那么就不能产生足够的地热,地球的铁核没那么大的话,也就不能形成地球磁场了。

    \n

    银河系比 80%的已知星系都大,它是常见的盘状漩涡状结构。

    \n

    在这种结构中,绝大部分物质都分布在盘中的高密度区,恒星爆发带来高能辐射,恒星系之间的引力影响也是非常恐怖的。

    \n

    我们太阳系的几大行星的轨道都是非常接近圆形的,这证明我们没有受到过太剧烈的其它恒星引力干扰——这几十亿年要有哪颗恒星稍微接近一下,从半光年的位置掠过,把太阳系外侧行星的轨道变成椭圆。。。那可以说太阳系就要天翻地覆了。要知道最近的比邻星离我们只有 4 光年,这种引力扰动是很有可能发生的。

    \n

    太阳系大约每隔 2 亿年会穿越一次旋臂。旋臂是密度波,届时太阳周边的物质密度会增大,有可能会导致周围发生恒星合并的大爆发事件。穿过旋臂,奥尔特星云里的冰球非常有可能被周边恒星的引力扰动,变成长周期彗星袭向太阳系内侧。星际气体也会导致太阳光照下降进入冰川期。

    \n

    上一次穿过旋臂,就是结束古生代的大灭绝事件,95%的海洋物种消失(整个物种消失,而不是个体消失)。大灭绝之后就是新的物种大爆发,恐龙就是之后兴盛的。

    \n

    在此我们不妨看下地球生物的演化史,周期恒定的稳定期一旦形成,生物的物种演化就会变慢,形成演化的平台期。所以环境绝对不是越恒定越好,而是在生态系统固化后,来一次不导致全体灭绝的大灭绝事件,对生物演化会更有好处。

    \n

    你看太阳系的区位就是如此微妙,如果旋臂的影响再大一点,影响到了行星轨道,那地球就完蛋了。多体系统会把扰动放大,行星相撞的话地球生命是百分百活不成。如果旋臂的影响小一点,没有彗星和冰川期造成大灭绝,那持续了 3.5 亿年的古生代会继续持续下去,也就不会有恐龙和哺乳动物的出现了。

    \n

    二、太阳系在银河系中是很特殊的,

    \n

    前面说过太阳系的金属含量比周边恒星显著的高。

    \n

    如果太阳系的金属占比少,那么具有地球重力的所谓的类地行星将会以碳之类的轻质元素为主(观测到的也是如此),那么碳会优先与氧结合,形成不了硅酸盐。而在实际观测到的石质行星中,碳的占比是要超过硅的,甚至纯碳的行星也不再少数。

    \n

    这证明形成太阳系的上一代恒星团的残骸是非常特殊的。在银河系远离物质密集区,本不应当存在这么大、这么多的恒星。

    \n

    太阳还有一个特殊之处在于它太大了。

    \n

    目前我们发现的恒星 95%都比太阳小。在太阳附近的恒星中 75%都是红矮星。

    \n

    红矮星非常稳定,但宜居带离红矮星太近注定了温度适宜的有海洋的行星会被潮汐锁定。我在《红矮星的方碑》这篇小说里有描述过宜居带行星上面的景象会是什么样子,其实它们是可以很宜居的,但它注定不能让生命演化。因为容量太小,环境过于稳定没有选择压力,作为未来人类的殖民地还不错。

    \n

    太阳另外一个特殊之处就更要命了。它是少见的单星系统。

    \n

    恒星是从一团很大的尘埃气体聚拢形成的。这有一个问题,就像花样滑冰选手旋转时收拢四肢会越转越快,气体聚拢形成的恒星自转速度会变得很大,以至于大概率会被甩开形成多星系统。事实也是如此,98%的恒星在形成时都是多星系统,剩下的一小部分单恒星系统通常都很小。目前银河系可见的单星系统绝大多数是多星系统甩出去的恒星。

    \n

    只有太阳是罕见的又大、又自始至终都是单恒星。

    \n

    多星系统不稳定,其中的主序星没法在宜居带形成轨道稳定的类地行星。这算是目前证据非常强的大过滤器了。

    \n

    三、太阳系内部的行星分布是很特殊的。

    \n

    得益于单星系统,太阳系几大行星的轨道都很圆。

    \n

    但这也是很偶然现象。目前对太阳系行星系统的模拟,有极大概率行星在形成以后出现混乱的景象,由于轨道共振等现象,行星忽然会出现轨道迁移的情况,这个过程充斥着极其暴力的大撞击和行星轨道的椭圆化。

    \n

    我们观测到的大多数情况是,类似太阳的恒星附近大多会有大型气态行星形成(热木星),这些行星会阻碍宜居带上的类地行星形成。金属度在远高于太阳的恒星,它如果在宜居带上或者以内存在的行星,都会是热木星。所以金属度过高过低都不行。

    \n

    前面说过太阳系的金属度决定了它诞生于超大恒星的残骸之上(二型超新星)。这个过程要求太阳系诞生于一个几千颗恒星组成的星团里,但又要在形成行星时从这个星团脱离出去。

    \n

    如果在脱离星团前,原始的太阳附近如果有个太阳 1.5 倍大的恒星,那么它会把形成太阳系行星的气体尘埃给吹走。

    \n

    ————

    \n

    在继续说下去之前,我们先看一下最近二十年对于系外类地行星的发现。

    \n

    目前已经发现了超过 7000 颗左右系外行星,其中最接近地球的一颗是开普勒 452b,它与恒星的距离与地球相当,位于宜居带上。已经在圆轨道上稳定的运行了 60 亿年以上。那款恒星与太阳差不多。

    \n

    但是,这颗行星距离地球 1400 光年,质量有地球的 5 倍大,表面重力接近地球 2 倍。这也意味着它实际上更应该算是一颗迷你海王星,它上面应该是被过于浓密的大气层笼罩,温室效应类似于金星,并不具备高级生命的进化环境。(这与我们上面的推断基本吻合)

    \n

    这已经是 7000 颗行星里最接近地球的行星了。接下来如果我们扩大搜索范围,很有可能会发现更多的行星,因为越接近银河系内侧恒星密度会越高,但发现类地行星的概率会急剧下降,因为 1400 光年已经接近银河系宜居带的宽度,超过这个范围,发现恒星的数量是呈约 2.5 次幂增加,而金属度与太阳系接近的恒星数量与搜索半径的增加是同比例的。

    \n

    也就是说未来类地行星的发现概率将会急剧下降。1/7000 分之一只是个起点。在搜索完 4-5 万光年的类地行星之后,我们才能够接近这个概率下降的终点。

    \n

    补充:

    \n

    目前发现系外行星最多的是开普勒卫星。

    \n

    如图所示,它目前瞄准的是太阳系的运动前进方向,与银心垂直,也就是正对着银河系宜居带的方向(所以外星生命探索是天文观测的最大主题之一啊)

    \n
    \"\"
    \n

    如果它换个角度,朝向银心方向,它会发现比现在多的多的行星,但发现宜居的类地行星概率也会马上大幅下降。

    \n

    ————

    \n

    那么宇宙中最常见的星系是什么样的呢?

    \n

    离我们最近的南门二,就是大名鼎鼎的比邻星所在的星系就是非常典型的星系了。

    \n

    比邻星距离我们 4.5 光年,它位于三颗恒星组成的多星系统之中。这三体系统中的两颗恒星与太阳质量差不多一样大,互相之间的旋转半径在 11AU—17AU 之间,这两颗恒星间不可能存在稳定的行星。

    \n

    比邻星距离两颗恒星有 0.25 光年,是颗红矮星,质量只有太阳的 1/8。这颗红矮星外有三颗已经发现的行星。

    \n

    比邻星 b 是一颗与地球质量接近的行星,位于比邻星的宜居带上,距离红矮星非常近(0.05AU),几乎肯定已经被潮汐锁定。

    \n

    比邻星虽然寿命长,但它的耀斑爆发周期比太阳短的多,太阳 20 年一遇的耀斑它每个月都能来一次。而比邻星 b 离它只有 20 分之一的日地距离,所以红矮星上能照到阳光的一面每隔一个月都能享受到 8000 倍太阳超级耀斑强度的辐射。

    \n

    我们上面的结论还是成立的:比邻星 b 上晨昏线附近是有可能存在温度适宜的环状宜居区,甚至还有海洋,可以供我们人类以后上去定居,但我们必须要搭建能抵挡超级耀斑的构筑物。但这个环状宜居区的规模实在太小了,承载不了复杂的生态系统。

    \n

    比邻星上还有一颗质量是地球 7 倍以上的大行星,更像是一颗海王星的冰冷星球,有着巨大的环状结构。

    \n

    最近发现了比邻星的第三颗行星,离太阳比比邻星 b 还近一半,质量只有地球的四分之一。

    \n

    从南门二里,我们可以直观的看到银河系宜居带里的大部分普遍案例:

    \n

    银河系里 70%的恒星是类似比邻星这样的小质量红矮星。

    \n

    类似太阳的恒星中,90%以上的概率位于类似南门二的多星系统,由于引力扰动过强难以形成稳定的行星。说是 90%以上,那是因为我们说不清楚那剩下的一成大质量单恒星里有多少是多体运动中被甩出去的,实际上大恒星一开始位于多星系统的概率有可能接近 100%。

    \n

    如果我们脱离银河系的宜居带,那么恒星的金属度将大大变化。

    \n

    往银河系中心走,我们会发现绝大部分恒星系都位于高密度区域,(密度随半径平方反比增加),那里的恒星系之间的引力扰动会让奥尔特星云这样的外层结构不可能存在,密度更高的话,连形成类地行星的尘埃盘都不可能存在。而超新星爆发产生的辐射事件也会指数级增加。

    \n

    ————

    \n

    说完了太阳系之外的情况,让我们看看地球。

    \n

    地球是非常特殊的星球。

    \n

    在给定的质量、化学组成的行星上看,地球实在太特别了。

    \n

    它有月球这个不寻常大的卫星。

    \n

    它的水体面积刚刚好。

    \n

    它有板块运动。

    \n

    有两个问题可能很少有人意识到:

    \n

    我们的海水这么少,实在是太特殊了。

    \n

    我们不大不小的海洋规模能大体稳定的维持三十几亿年,实在是太特殊了。

    \n

    如果一个行星存在海洋,那它的海水应该大概率覆盖表面。

    \n

    水在宇宙中其实挺常见的,毕竟氢、氧元素是非常丰富的,这两者之间又容易结合。

    \n

    地球上的水体以海洋为主,它只占了地球总质量的万分之二。那么很容易想象到,一个行星表面,要么完全没有海洋,如果有海洋,那大概率应该是完全覆盖陆地,且厚度非常厚。

    \n

    我们观察太阳系之内,这个结论也是如此。木卫二比月球还小,但海洋深度就超过了 100 公里,海水量是地球的 2-3 倍。木卫三比火星小,它的海洋可能达到 1000 公里深。冥王星的海洋也有上百公里深。而地球那么大,海洋最深处只有 10 公里深。

    \n

    在我们发现可能有海洋的系外类地行星中,海水质量占比也是大概率远超地球的。

    \n

    这里有一个问题:

    \n

    为什么我认为完全覆盖星球表面的海洋,对高等生命的形成是不利因素?

    \n

    如果把高等生命等价为高等动物的话,有一个非常重要的概念——趋同进化。

    \n

    在海洋中高速游动的动物,尽管是差异非常大的物种,都分别进化出了类似于鱼类一样的外形。一是常见的鱼类,二是从陆地返回海洋的鱼龙,三是再次从陆地返回海洋的海洋哺乳动物。

    \n

    从这个现象中我们会发现,有时候对于特定环境的进化结果不是发散的,而是只能有唯一解。包括我们人类设计的高速运行的潜艇,也就只能长成鱼的形状。

    \n

    鱼的形状只是海洋对于高等生物形成的制约之一,鱼毕竟也是挺高级的动物了。过深的海洋对生物的不利因素还远不止于此。

    \n

    海洋生物绝大部分分布于浅海,深海生物密度非常低,而且很多深海生物是依靠洋流带来的浅海生物和营养物质来生存。这是因为海水的透光效果很差,在 20 米以下就几乎衰减完了。

    \n

    在 300 米以上深度,海水的分层效应就逐渐明显,上下层之间的压力、盐度、水温很不一样,上下对流作用不强,浅层海水会缺乏大量微量元素。

    \n

    火山能给生物带来源源不断的营养物质和热量,但是海底火山口只能辐射附近很有限距离的生物群落(几百米到几公里的范围)。

    \n

    陆地的水流能够向入海口带去充足的营养物质和淡水。

    \n

    这就导致海洋里的绝大部分生物量都分布在陆地沿线的浅海之中。地球海洋的大部分 1000 米以上的深海,没有出产多少生物。

    \n

    那么就有个问题了:为啥不在比浅海面积大的多的陆地上进化出高等生物呢?

    \n

    这是因为所谓的高等生物是指多细胞动物。地球生物诞生近 40 亿,其中有 30 亿年都是非常简单的单细胞形态,直到 6-8 亿年前才出现了多细胞生物的大爆发。

    \n

    而单细胞生物是没法在陆地大量繁殖的。所以地球生物进化的主战场就在海岸线附近的浅海。

    \n
    \"\"
    \n

    如上图可见生物量最大的地方在于有群岛点缀、海岸线破碎漫长的浅海地区。深海地区的生物多是随着洋流飘过去的。

    \n

    地球的质量如果多出来万分之一的水,那它的海岸线就大大缩小。如果多出来万分之二的质量是水,那地球的海岸线和浅海地区将会消失,海洋生物量就要下降一个以上的数量级。如果多出来万分之三,地球全都是 1 公里以上的深海,海洋生物量就要下降三个以上数量级,比纯粹的沙漠还要难以进化出多细胞动物。我们马上就能想到的是,深海覆盖着的星球不大可能进化出有光合作用的细菌。没有光合作用的参与,那海洋生物总量又得下降不少。

    \n

    地球海水总量在三十几亿年来大体持平,对比曾经出现过海洋的火星,我们算是幸运的。

    \n

    现在让我们岔开一下话题,思考以下两个假设:

    \n

    那单细胞生物是不是就在这三十亿年虚耗时间,等待某种环境的突变来形成多细胞生物呢?

    \n

    或者说,如果那三十年地球的环境突变得更多,会不会让高等生物的出现更加提前呢?

    \n

    如果上面的两个假设均为肯定的话,那地球生物的进化时间就有可能压缩为原先的一半,甚至三分之一,抵消掉上面层层大过滤器对生物进化带来的不利影响。

    \n

    但我们研究得越多,就越觉得地球生命的进化历程很难压缩。

    \n

    单细胞生物在那三十亿年经历了非常大的变化,原始的细菌就是一层原始的膜包上遗传物质,进化之后,出现了越来越大的细菌,体积越大,就能容纳越多的细胞器和越复杂的结构,现存的所有种类的单细胞生物也都出现了。

    \n

    生物迭代、变异的速度是由分子钟控制的,给定生物总量和时间,那么累积下来的变异速度也是差不多的,不存在单细胞生物在偷懒这种说法。那我们怎么解释大灭绝这种减少生物量但又能让新物种涌现的现象呢?

    \n

    这是因为环境恒定的平台期给大灭绝时代提供了足够多的多样性基因素材,给之后的物种爆发提供了基础。否则大灭绝如果只隔一亿年的话,就不会有那么好的生物大爆发效果了。如果大灭绝只隔一千万年就来一次,怕是物种只会越来越少。

    \n

    我们人类其实就是无数个不同种类的单细胞生物的总和,这些细胞的原型,几乎都是在那三十亿年间出现的,我们身上的基因大部分都是那段时间诞生的。你可以理解为那三十亿年进化出了一万个字以及文字的注解组成了一本厚厚的字典,而后 7 亿年我们人类慢慢用文字组成文章,而我们人类这篇文章的厚度只有字典的十分之一。

    \n

    所以那三十亿年编撰字典花费的时间是很难被压缩的。

    \n

    我们大脑神经突触的起源并不是来自于猿类,而是七亿年前海绵体内两种细胞之间的鞭毛交流,我们有性生殖并不起源于哺乳动物,而是来源于十亿年前的植物减数分裂。我们人类基因组真正独特的部分,只是决定细胞怎么分化组合的少量信息。

    \n

    回到上面的话题,地球海洋提供了三十亿年的演化环境,海水的总量并没有大量减少,其实是很特殊的。

    \n

    我们太阳系很幸运有三个行星位于宜居带,又都具有适当的大小,形成行星的物质也都差不多,按理说应当也具有地球一样大小的海洋,可火星、金星为什么没有呢?

    \n

    火星曾经在三十多亿年起短暂的存在过海洋,但它地磁太弱加上重力太小,太阳风很快把氢吹走了大部分,海洋缩水后温室效应消失,剩下的水也就冻结在地表之下了。

    \n

    金星与地球大小一样,距离也很接近,但上面的水从来没有形成过海洋,因为距离太阳近了 28%,水蒸气形成了超级浓厚的大气层,比现在还厚几十倍。

    \n

    这些水汽对金星造成了灾难性的后果。浓密的大气层形成了强烈的潮汐锁定作用,有说法是金星也可能遭受过大撞击减小过自转,但潮汐作用起到的作用更大。而金星没有地磁,浓厚大气层顶端的氢就逃逸掉了。

    \n

    所以就算有和地球一样的物质构成,但海洋还是很容易受到各种影响而消失的。

    \n

    生物圈生活在地球表面,决定它演化的物质总量包括大气层和海洋只占地球的万分之二,所以一点点的不同都会引起巨大的蝴蝶效应。

    \n

    那么,如果有面积合适的海洋和陆地,单细胞动物在海洋中顺利的发展出多样化的高等生物,这些生物是不是就一定能进化出智慧了呢?

    \n

    地球生物从多细胞生物涌现开始,只用了 7 亿年就进化出了人类这种智慧生物,初看起来似乎地球生命已经通过了最主要的过滤器,进入了进化的快车道。

    \n

    智慧生命进化的主战场在陆地,由于月球的存在,让陆地生物的进化开了挂。

    \n

    月球是非常特殊的。

    \n

    原始地球在形成 5 亿年后就在大撞击中形成了月球,这让地球有足够的时间进化出高等生物。这种撞击会迸发出遮蔽恒星的尘埃,斯皮策太空望远镜观察了 400 颗和当时太阳年龄差不多的恒星,只有一颗出现了类似的尘埃。而考虑到这种撞击不一定能形成大卫星,那这种系外孪生月球的出现概率就更为渺茫了。

    \n

    由于地球的温度适宜,大气层没有像金星那样浓厚得让地球自转方向被锁定,那么它必须要一个大卫星来作为稳定器。

    \n

    一个在太空中旋转的类地天体,由于密度注定是略微分布不均的,那么它的自转轴必定会不定期出现巨大而快速的翻转。

    \n
    \"\"
    \n

    这种太空中物体自转轴翻转的现象是 1985 年苏联宇航员才在空间站中发现的。以往大家都默认在没有外力作用下的太空旋转物体的自转轴是不变的。但贾尼别科夫发现,一颗螺丝在旋转中会时不时翻转。这种倾斜轴的翻转非常剧烈,几乎是一瞬间发生的。

    \n

    火星的自转轴曾经朝太阳翻转了 90 度,在整个星球的绝大部分地区形成了超级冬天,原先的赤道地区被冰川覆盖。

    \n

    而且由于地球这样的固液混合星球密度分布是总在变化的,那么这种自转轴翻转会不定期发生。如果地球的自转轴对准太阳,很短时间内极地的海水会沸腾,朝阳面整个被温室气体覆盖。而背阳面会完全结冰,背面最冷的地方几乎肯定在 150 度以下。这个地轴翻转变化可以在短短几十年内就完成,间隔短则几万年,久则上亿年,陆地上的高等生物几乎肯定会被灭绝,恐怕就是以现在的人类文明都难以抵挡。

    \n

    我们的月球是在逐渐远离地球的,再过 20 亿年就会对地球失去稳定作用,所以其它类地星球要诞生智慧生命,它的大卫星也得能在 40 亿年内对它起到稳定器的作用。

    \n

    月球除了充当稳定器,对地球板块运动的形成是至关重要的。

    \n

    澳大利亚的土地非常贫瘠,通常会认为是因为那里雨水稀少,实际上在澳大利亚湿润的南部地区,土地一样很贫瘠。那里的灌木和草原很有欺骗性,其实那里的植物一旦被砍掉,其生长周期会是中国东南部的四五倍。

    \n

    这是因为澳大利亚大部分地区缺少板块运动,是地球上最古老的大陆,土壤的肥料和养分经过几十亿年的雨水冲刷早就流失掉了。澳大利亚也成为物种持续退化的地区,生态环境非常脆弱,当地的农业是靠外来的化肥在支撑着的。

    \n

    如果没有板块运动,陆地能承载的生物量会很小。除此之外,地球那么大的类地星球没有板块运动的话,会有非常剧烈的火山爆发。

    \n

    金星作为地球的姊妹星,它大气中的二氧化碳几乎等于于地球地下的碳全部释放出来的总量。

    \n

    水星到火星的太阳系内侧行星记录过多次大轰炸(想想月球表面),金星表面却没有保留 30 亿年前的大型撞击坑,它的表面平坦,只留有 7 亿年以内的撞击坑。

    \n

    这就说明金星在 7 亿年前有过一次火山大爆发,涌出的岩浆覆盖了整个星球表面。这是因为金星的地壳比地球厚三倍,而且很均匀。在这层厚厚的地壳下面,放射性元素含量与地球却是大体相同的,产生的热量日积月累,没有像地球那样在板块碰撞的边缘位置不停释放能量,于是每隔一段时间就会产生一次岩浆大爆发,淹没整个星球表面。

    \n

    最新的研究表面金星是有板块的,但它的板块裂缝和地球相差太远,大体上还是像上面的描述那样,火山喷发太过猛烈了,以至于高等生物不可能存活。

    \n

    月球形成初期,地球的地壳被撞击的高温融化变薄。当时月球距离地球很近,只有现在距离的十分之一(想想相当于现在 100 倍大的月亮)。地球一天只有五小时,巨大的潮汐力不止让海水形成巨浪,当时陆地也像海洋一样,形成了高达上千米的潮汐。这种潮汐作用让地球的地壳没有继续变厚。

    \n

    板块运动的形成非常复杂,除了月球以外还有其它必要条件。有说法是大轰炸时期的陨石冲击让地球板块被进一步的冲击破碎,启动了板块运动。还有海洋的贡献也必不可少,一是海水给俯冲的板块提供了润滑作用,二是海水的重量让地壳在海底进一步变薄。

    \n

    月球对板块运动的作用是不可替代的。如果没有月球,我们的陆地生物就缺乏营养来源和多变的气候及地貌,从而没法进化出智慧生物了。

    \n

    地球上的潮汐作用主要由月球贡献。在几亿年前海生生物上岸时期,潮汐是比现在大的。地球生物多样化程度最高的地方,就是海水与淡水交汇的地方,潮汐大小会影响这些交汇区的规模。几亿年后潮汐就会变得很小。

    \n

    板块运动对我们智慧生物的影响是如此之大,有必要再深入的讲一讲。

    \n

    最容易想到的是,没有板块运动,就没有化石能源,因为煤和石油是要在地底形成,然后再抬升起来的。没有化石能源,恐怕工业革命会难上很多倍。

    \n

    不过化石能源倒也不一定是必须的,虽然很难,我们倒不妨可以畅享一种利用生物能,或者日光发展起来的文明,那应该挺有趣。

    \n

    板块运动给我们带来的,最重要的还是可控、缓慢的环境变化。

    \n

    这回到了开头提到的观点:重要的不仅是环境,环境变化的可控、缓慢等特性才是更独特且更重要的。

    \n

    我们很少想到:

    \n

    任何高级、复杂的物种或产品,哪怕是人工设计的,它的生成过程都必须使用进化的方法。

    \n

    也就是多次迭代、多方向尝试、在实际环境中淘汰筛选。

    \n

    举个例子,当今 spacex 制造的星舰就属于一种很复杂的产品。它的诞生过程就属于典型的进化论主导的过程:

    \n

    一、可回收火箭的原型是使用一台梅林引擎的蚱蜢跳小火箭,在 2013 年完成了尝试。在此之前,spacex 论证过伞降回收、隔热垫回收的构型,最终找到可回收火箭的道路。

    \n

    二、2016 年用九台梅林引擎的猎鹰 9 火箭证实了多发并联的中型火箭。之后快速迭代了五个版本,在 2019 年达到成熟。

    \n

    三、之后开始正式开发星舰,2019 年使用一台猛禽引擎实现了星舰原型蚱蜢跳,此时初代猛禽引擎已经迭代过多次,但还没到量产型号。大量试验不同的星舰制造工艺和材料。抛弃碳纤维、铝合金,选择不锈钢。在第一次试跳时已经不同完成度的试制过上百个舰体。

    \n

    四、到 2023 年,星舰第一次试飞,没有分离就被主动炸毁,到现在已经进行了六次发射尝试。这几年星舰的方案经历了很多颠覆,包括用发射台进行回收替代安装在舰体上的起落架,用隔热瓦替代了燃料冷却散热,猛禽引擎的量产工艺迭代了两次。。。。

    \n

    与小步快跑的星舰研发相对的是波音的 sls 和蓝色起源的新格伦火箭,它们力图把做完整舰的设计和论证,在第一次(或头三次)就达到很高的成功率。并没有利用实际发射分阶段整体论证产品。

    \n

    它们在整舰方案上并没有采用进化论的方法进行多次发射测试,也就导致了它们研发的进度比星舰长了很多倍。

    \n

    当然,波音和蓝色起源在设计过程中肯定还是对子系统进行实际地面测试了的,也肯定经过多方案对比和测试淘汰筛选的过程。

    \n

    因为我们不可能不在产品设计中采用这种进化论思维,区别只是贯彻程度而已。贯彻的越好,进化迭代的速度就越快。无论火箭、汽车还是飞机,人类都是在实际使用中不断的迭代中完善优化产品的,不存在一步到位设计出完美产品的可能。

    \n

    一个环境不可能一步到位就从无序中进化出一个高度智能生命。缸中之脑不可能凭空出现,只有可能是先产生能够发育出缸中之脑的简单原型,然后进化迭代出来高级智能。

    \n

    我们已经解答了地球的宜居环境对于生命的出现和维持问题,接下来就到最难的问题:什么样的环境才是适宜进化的环境。

    \n

    这个环境不能有颠覆性的变化,我们在上面已经提到过很多,比如地轴在短时间内翻转、熔浆海洋淹没地表、水分全部流失等极端变化是不能有的。

    \n

    这个环境必须能持续提供适当的筛选压力。也就是它必须持续、速度适中的不极端变化。

    \n

    前面我们提到过分子钟的概念。给定生物量和资源,在一定时间内的变异资源是有限的,生物需要时间来适应环境变化。

    \n

    板块运动的速度就比较适合。地球经历过两次雪球时代,整个表面都被冰雪覆盖,最近一次是 6.5 亿年前,以之为起点,高级生物用这几亿年在陆地上进化出人类。

    \n

    这个过程看似漫长,但是经过几次大撞击导致的大灭绝时代,最近的一次是白垩纪事件,考虑到大灭绝时代的持续时间以及对陆地生物的影响格外严重,这 6.5 亿年的进化速度还是很快的,几乎用尽了生物变异资源的极限。

    \n

    让我们跳去 6.5 亿年的绝大部分时间,以人类诞生的这 650 万年和板块运动的演化关系,来说明环境选择压力是如何耗尽了人类变异资源的。(刚好 650 万年是 6.5 亿年的 1%)因为:一、每个人,包括读者,都熟悉自己的身体构造,二、这段历史离我们很近,研究最充分,有充足的化石证据,三、人类是生命进化的最高成就,在地球生命中最有代表性。

    \n

    ————

    \n

    650 万年的时间里,其实大陆板块运动的变化不大,很容易就可以概括出来。

    \n

    对于南半球来说,南极已经和现在一样被冰雪覆盖,澳大利亚和现在一样干燥贫瘠(毕竟陆地养分已经流失了几十亿年),南美洲缓缓接近北美洲。

    \n

    总之,可以把南半球发生的变化忽略不计。

    \n

    北半球的大陆朝北移动,渐渐的把北冰洋封闭成了一片相对孤立的海洋。这在地球历史上是第一次。北极出现冰川,对地球气候的变化产生着全局性影响。

    \n

    目前认为地球的气候受三个米兰科维奇周期影响,(10 万年,4 万年,2 万年)这其中的关键就在于,高纬度地区(北极)的海洋及冰盖,会放大地轴倾角和日照的变化。

    \n

    在亚非欧三个大陆的挤压下形成了地中海,地中海不断干涸和重新填充,在 600 万年前最后一次干涸,又在 550 万年前重新注入海水,并从此不再干涸。地中海极大的影响着周边环境,冰川不时的向南侵蚀和向北退却。

    \n

    给地球板块运动带来主要动力的是两个超级地幔柱,一个位于南太平洋,一个位于非洲。位于非洲的地幔柱制造了东非大裂谷,在近一千万年来有着地球上最丰富的环境多样性。那里有沙漠、草原和雨林,在赤道地区有着六千米高的雪山。

    \n

    此时欧亚大陆已经基本成型,在现在纬度 38 度的地方形成一条长轴,不同的物种可以在这个宽广的大陆上迁徙。由于海平面不时下降,欧亚大陆上的物种不时的可以进入北美洲。

    \n

    我们可以把这 650 万年间,地球生物的演化简单的描述为:

    \n

    一、东非大裂谷地区在小范围内提供最大的环境多样性,形成各种物种充分竞争的小型实验室。

    \n

    你可以把这里看成是物种设计的草图原型阶段,进化设计师在草图上快速的打着各种草稿,并快速的对比着这些简单的原型,筛选出有发展潜力的概念模型。

    \n

    二、沿横向长轴展开的欧亚大陆提供物种的扩张空间,确保每种气候下的物种都有相当的种群规模。

    \n

    你可以把欧亚大陆看成是大规模量产的市场检验阶段。工厂建立了大规模的生产线,在规模生产中微调着产品,让产品变得非常成熟。

    \n

    三、北极制造冰川期等气候变化,给欧亚大陆的物种进化提供筛选压力。

    \n

    而东非大裂谷的环境相对独立,这个原型工厂一直在出产着各种概念原型。

    \n

    这也是为什么几百万年来人类一次次的从东非出走、在欧亚大陆上扩散的原因。

    \n

    以上三点都是直接受板块运动影响的,哪怕这 650 万年大陆板块只移动了一点点距离,但这种微妙的变化就给气候带来了巨大的影响,毕竟大气层和海洋的质量只占地球质量的万分之二,生态系统只是地球表面一层薄薄的膜,极其脆弱敏感,很容易被影响。

    \n

    南方古猿于 600 万年前在南非出现,当时非洲一部分森林消退,灵长目祖先从树上下来进入草原。

    \n

    那么为什么是树栖的灵长目率先进化出了能双手使用工具并直立行走的智慧生物呢?

    \n

    这是因为在树林间的快速攀缘需要很高的大脑运算能力。树枝之间有复杂的遮挡关系和空间层次,树间的快速攀爬不能只靠反应,而要能预判空间关系,要能在大脑中快速建立三维模型,想象快速运动的下一瞬间哪里是可以攀缘的地方。

    \n

    而四肢协调也需要大脑活动有很高的运算频率和响应速度。

    \n

    至今也只有灵长类动物能做到这一点(猿类远比猫科灵活,猫科动物只能靠夜间视觉捕食猿类)

    \n

    树上的高糖果实和嫩芽能提供足够的能量,支撑高能耗的大脑活动。果实的颜色促进了灵长目三色视觉的形成。

    \n

    树栖生活能支撑大规模的社会性灵长目族群,因为沟通带来的竞争优势很大(预警和繁殖)。

    \n

    灵长目这种高级生物形成的前提是地球上必须进化出茂密的树林。树林对日光的利用效率最高,树冠是能量和营养储存最集中的区域。

    \n

    当南方古猿下到地面生活后,它们原先应付攀缘运动的大脑算力就相对过剩了,毕竟草原只是个二维平面,运动较为简单。

    \n

    在东非大裂谷地区,森林、草原、河流遍布。人类的祖先并不只是简单的从树上走到草原上,而是适应了东非所有多样化的地形,同时具有优秀的攀爬、奔跑、游泳能力。非洲的森林从来没有完全消失,而是在不同地区之间此消彼长。

    \n

    最有适应力的古猿能够获得最大的地盘,也能在灾难降临时有最大生存概率。

    \n

    这里有个问题:

    \n

    是不是地球多几个东非大裂谷这种多样化的小型环境,提供更多的多样性,对进化的促进作用会大于欧亚大陆这种大型环境?

    \n

    实际上人类走出非洲并不是单向的,在冰期来临时,也出现过几次欧亚大陆的人类重返非洲的案例。这时在外面得到的大规模进化优势又带回了非洲。

    \n

    在欧亚大陆最终灭绝的人类亚种,有很多基因还是留了下来。尼安德特人和丹尼索瓦人已经灭绝,但我们每个人身上或多或少都还有他们的基因。

    \n

    欧亚大陆对人类进化的促进作用越到后期越明显,发育越到后面,对自然环境的适应能力越来越不重要,而是对能建立更大规模组织的智慧要求更高。

    \n

    在这六百万年中,人类的竞争优势越来越倚重于智力,脑容量的增长是很明显的。

    \n
    \"\"
    \n

    脑容量并不是衡量智力的单一指标,在不同物种间,不能简单说脑容量越大智力越高,但在人类自身的进化历程是可以大致这么说的。除了脑容量,所有和智力相关的生理因素,如大脑皮层褶皱度、额叶面积、控制语言能力的基因,都指向人类是随着进化越来越聪明的,可以说人类越到后期越靠智力进化获得竞争优势。

    \n

    东非大裂谷快速变化的多样化环境以最高速度筛选进化,然后再扩散出去到欧亚大陆获得规模优势。人类几次走出非洲留下了明确的化石、基因证据。

    \n

    但这个速度不能再快了,因为人类在这个阶段经历过几次大灭绝。

    \n

    其中最严峻一次发生在 90 万年前,当时的干旱和降温让人类数量下降到了 1300 人左右。在今天可以归入极度濒危的范围,几乎都找不到当时非洲人类的化石。

    \n

    还有几次人类数量下降到 2 万到几千不等的数量。最后一次是 5 万年前的气候变化导致尼安德特人灭绝。

    \n

    而我们人类在几百万年间的进化速度,并没有随着这些大灭绝有跳跃式的提升,这基本上说明我们的基因变异资源已经用尽,我们的进化速度达到了可以达到的极限,环境变化再剧烈也刺激不上去了。

    \n

    到了 5 万年前,决定智人语言基因完成了最后突变,彼时的人类与现在的我们,在基因上已经没有太大变化。我们的进步更多的依赖文化和科技的进步。

    \n

    ————

    \n

    前面已经解释了地球生命的进化为什么是独特的。我们有幸几乎以最大速度穿过了层层大过滤器,抢先成为了已知宇宙中的唯一智慧生命。评论区还提出了一些有必要回答的问题,比如“如何确定地球进化路径的唯一性”,但我想留到以后再回答,在下面我想聊聊,在费米悖论下,人类未来应该如何自处。

    \n

    ————

    \n

    搜寻地外生命的努力在费米悖论提出后已经过了七十年。

    \n

    人类的探测技术日新月异,越探测,就越发现人类文明是个幸运的孤例。

    \n

    相比于孤独,我们更应该感到非常幸运。

    \n

    幸运在于广阔的宇宙给我们提供了无限宽广的发展空间,星际殖民会解决我们所有形而上的焦虑:

    \n

    所谓的孤独感、

    \n

    对隐藏着的星际敌人的恐惧、

    \n

    对人类技术发展的不自信、害怕人类被困死在太阳系,

    \n

    害怕人类被自身暴力毁灭、

    \n

    这些都是没必要的。

    \n

    一、星际播种是非常容易的事情。

    \n

    即使只考虑我们现有比较容易实现的技术,我们都可以在几千万年内殖民到银河系的各个角落。

    \n

    前面提到,简单的细菌和病毒是可以跨星际旅行的。

    \n

    我们现有技术可以制造出以百分之一光速航行的微型航天器,向银河系宜居带播种微生物和一些有潜力的多细胞生物,就可以让目标行星减少 30 亿年的进化历程,只用 7 亿年就进化出智慧文明。

    \n

    我们可以让这些微生物携带有地球至今为止的基因信息,控制他们的基因表达,让它们在特定环境下按照指定的方向进化,那就可以让它们避免走不必要的弯路,在外落地后,在几百万年内就发展出地球的整个生态圈。如果我们想,我们就能做到让人类在那个生态圈中进化出来。这不需要依赖人造子宫、冯诺依曼机器人之类的高科技,只需要依赖微生物。

    \n

    银河系的直径只有十万光年,人类以目前的技术,只需要两千万年就可以在所有宜居的系外行星上广泛播撒地球生命的种子。

    \n

    前面说过,我们几乎找不到能进化出智慧生命的星球,但要找到能适宜地球生命生活的星球就容易多了。

    \n

    我们不需要考虑很大规模的生物圈,那么所有红矮星附近有海洋的类地行星都是潜在目标。

    \n

    我们不需要考虑几十亿年的稳定环境,那么不管有没有地磁和板块运动,重力是不是比地球小都是无所谓的,类似原始火星那种短暂存在海洋的星球即可满足要求。

    \n

    银河系宜居带以内高密度的分布着大量恒星,由于受到引力扰动和超新星爆发等极端事件的影响,那里的行星大部分没有超过十亿年的稳定环境,但对于我们播种生命的需求来说这已经足够久了。

    \n

    在一亿年之内,我们以 1/10 光速发射的微型飞船可以在 1000 万光年内的本星系群里广泛播种。

    \n

    在十亿年内,我们已经可以在一亿光年直径的本超星系团里播种完毕,这个范围内有 1000 万亿个太阳质量。

    \n

    这个时间段,还不到地球生命进化史的三分之一。

    \n

    十亿年后,在我们太阳系生命都还没灭绝,本超星系团就已经出现了百万亿个有生命的星球,其中有可能有上亿个星球按照我们的设计进化出有智慧的生命。这些生命经过短则千万年长则几亿年的独立进化,起码在社会形态上已经完全不同,到那时我们是不大可能感到孤独的。

    \n

    各个大陆的人类基因水平高度相似,但不同的宗教、文化和社会制度,已经让各个国家之间存在极大的差异。在一个国家内部,相隔比较远两个省都可能存在文化认同不一的情况。

    \n

    在一亿光年的广袤太空中寻求陌生感是最容易的事了。

    \n

    二、星际旅行并没有想象中难。

    \n

    如果以 10 亿年为期,那么人类的航行范围和播种范围大概率是几乎重叠的。

    \n

    我们讨论星际旅行时,受限于地球上的资源水平,会低估星际飞船的规模。

    \n

    以最慢的速度考虑,人类在一千年内可以开始大规模的太阳系开发,那时起人类应当已经脱离单行星演化的高风险阶段,到十万年后,对奥尔特星云的大开发应当已经完成。

    \n

    以现在地球上的生产力水平来估算彼时的星际航行手段是肯定不对的。

    \n

    届时人类的生产力水平是现在的百万倍以上,已经没有可能受到任何自然或人为灾害的影响而灭绝。水星可能已经被拆解成戴森云,人类已经几乎完全转移到太空,把地球完全留给自然环境。人类则慢慢的广泛生活太阳系的各个角落,产业经济也都早就向地球之外转移了。

    \n

    太阳系被完全开发的情况下,我们建造的飞船是远远超过现在能够想象的水平。从速度上,我们可以弹射接近光速飞行的微型飞船。从规模上,我们可以在柯伊伯带以外建造直径接近月球的环状太空城,这些太空城有重力的生态圈把每层摊开来的表面积可以接近地球表面——地球生态圈的规模其实不大,如果只考虑 50 米深度的陆地表面以及大气层,它只占地球总质量的百万分之一。

    \n

    天王星、海王星的质量相当于地球的 32 倍,如果拆解这两颗行星,利用它们的氢作为聚变原料,那么可以制作出近千万个太空城,每个太空城都有着超过地球的生态圈规模。

    \n

    这些太空城建成时本来就已经在太阳系外侧,建成后如果有十分之一选择向外漂泊,那么最多一万年后就能到达邻近星系,在那里补充资源、建设亿万个新的太空城,进一步飘向远方。

    \n

    这种太空城的规模还可以扩展,或是无数个太空城相隔百万公里的靠近在一起,形成超大规模的城市群。在千万年后,这些城市就像细胞组成复杂生命一样,组成一团城市云,这些城市之间存在海量的光速通讯和物资交换,它们的经济总规模是我们现在无法想象的。

    \n

    在十亿年的时间里,地球起源的人类城市群在本超星系团里就可以遍地开花,它们会和之前播种产生的其它文明形成各种互动。

    \n

    三、星际广播非常容易。

    \n

    依据现有的技术能力已经能向几万光年外发射编制过的电磁信号,接受两百亿光年外的伽马射线暴。

    \n

    如果以一千万年为期,在进行银河系大开发之后,人类只需要消耗几个恒星的质量,就可以向四面八方发射编制过的伽马射线,让相当于 21 世纪人类的智慧文明接受到人类的信息。

    \n

    能进行星际航行的文明显然具有更高级的信息接受能力,所以起码在银河系内部,信息的星际传递是非常活跃的。

    \n

    四、道德的星际普世性

    \n

    不止人类,包括灵长类之类的高等动物都或多或少具有类似道德的善意行为。包括并不限于:

    \n

    a、哺育不同群落甚至不同物种的幼崽,b、跨物种的协作和共生能力,c、不同物种间具有捕猎、协作之外的玩乐关系,d、尽量避免使用暴力

    \n

    人类道德体系的形成有很多生理性(动物性)的起源,不全是理性推理出来。有一些向善的本能是进化出来的。

    \n

    那么为什么人类的那些向善本能会具有进化优势呢?

    \n

    如果我们把考察范围放大到整个地球生物圈,我们会发现社会性动物具有碾压性的竞争优势。

    \n

    不考虑微生物的话,总质量最大的生物第一名是蚂蚁,第二名是人类(有说是牛),第三名是猪,第四名是白蚁,第五名是蜜蜂。

    \n

    猪和牛是人类蓄养的社会性动物,如果不考虑蓄养对它们总质量的放大效应,那么我们可以看到地球总质量最大的生物是人类、蚂蚁、白蚁和蜜蜂,它们的共同点是都是真社会性动物。

    \n

    真社会性起码独立起源了 9 次,它能成立的基础是个体要能主动哺育非自己亲生的后代。协作哺育后代的效率要高于个体独立哺育,有照顾妇幼本能的群体也就具有竞争优势了。

    \n

    真社会性生物的群体选择大于个体选择,起码在同族群之内,暴力征服相对于协作共生并不具有优势。

    \n

    不同物种之间的协作起源(7 亿年前)要远远早于真社会性(白垩纪)的出现。

    \n

    我们可以见到蚂蚁会照顾蚜虫,犀牛鸟会给犀牛剔牙,协作关系是普遍存在的。

    \n

    前面我们说过,单细胞生物在 7 亿年前进化到高等生物。不同种的细菌之间如果开始建立协作,哪怕再微弱,这种协作关系都会趋向加强,因为不同细菌在专门化生产的过程中会弱化自己的适应性,变得越来越依赖集体生存。这就是多细胞生物产生的“棘轮效应”。

    \n

    7 亿年前的海洋中是有很多只顾自己发展的细菌个体,但还是出现了趋向于协作的细菌,它们身上都有产生“棘轮效应”的基因。

    \n

    社会性的哺乳动物表现出复杂的社交行为,它们面对异类时并不总是趋向攻击。因为攻击需要耗费能量,也可能导致自身受伤,而一旦受伤在野外也就意味着死亡,即使是捕食也不会轻易出击。在吃饱喝足后,面对比自身弱小的物种,哺乳动物会有玩乐游戏的行为,一是锻炼能够增强未来的捕猎能力,二是有可能形成跨物种的共生关系。

    \n

    对狗的驯化有可能早在 3 万年之前就成功了,人和狼的社会都有跨种族的友好行为,这也让这两个种族具有强得多的竞争优势——和狼协作的人类部落能在雪地里发现和追踪遥远的大型猎物,这在冰河时期至关重要,从而击败了那些不会和狼共生的部落,向善基因也就在人类身上留存了下来。

    \n

    道德本就起源于动物性,很多时候长期利益是等价于道德的。

    \n

    银河系宜居带的恒星系之间也就间隔几光年,星际航行时间相对于人类个体来说很远,但相对于人类的几万年历史来说就很近了。信息传递也就只需要几年,团结协作带来的收益会更大。

    \n

    星际物种的分布也不会是全都聚集在恒星附近,而是广泛分散在星际空间之中。虽然我们人类大部分生活在大城市里,但在旷野和海洋上也都有人类存在,未来也许人类会大部分靠近恒星生存,但几乎肯定有大量的飞行器和城市飞行在广袤的太空之中,文明之间的无人区不会那么大。

    \n

    这种文明的分布图景几乎肯定和“黑暗森林”法则里描述的图景不同。

    \n

    攻击是生存遭到威胁时的应激行为,对于广泛撒种的星际物种来说,绝对不会面临文明灭绝的风险(十万年后单个人类个体都有可能难以消灭),那种不论三七二十一先打一枪再说的策略实在是很难想象会成立。

    \n

    至于一个文明会不会主动隐瞒自己的存在,那还是有可能的,但文明的规模越大越发达,就越难想象会完全自闭。我们现在具有的天文观测能力能够从几千光年外发现地球不同寻常的大气层,从几万年外受到地球每时每刻发射的无线电。

    \n

    我们现在每时每刻都通过手机泄露着自己的电磁信号,每个人都想保持隐私,但在协作带来的收益面前,似乎我们总是不得不默认选择暴露自己。

    \n

    十万年后大概率是个人就能有星际通讯能力,要长期隐瞒自身存在,怕是这个社会的人口数不能大于 100。

    \n

    所以人类大范围星际播种之后,宇宙应该是个充满无数不同文明、交流频繁的光明世界。未来的世界的局部可能还是会有战争和杀戮,但在进化中形成的道德和秩序也还是会具有竞争优势,永远在高等文明中流传下去。

    \n

    创作不易,更多科幻、科普内容在专栏:

    \n

    正在撰写内容,解释:为什么地球的碳基生物是唯一可能自然产生的生命形态

    \n

    雪树的科幻世界

    \n

    你相信造物主创造物种还是进化论?

    \n
    \n
    \n\n\n\n\n
    \n\n\n\n", + "category": "", + "link": "https://daily.zhihu.com/story/9782611", + "creator": "", + "pubDate": "Thu, 17 Jul 2025 12:27:03 +0800", + "enclosure": "", + "enclosureType": "", + "image": "", + "id": "", + "language": "", + "folder": "资讯", + "feed": "知乎", + "read": false, + "favorite": false, + "created": false, + "tags": [], + "hash": "2b6ed1913a5cd728400dd3d540ebddd9", + "highlights": [] + }, + { + "title": "联合国文件真的是中文版本的最薄吗?", + "description": "
    \"头图\"/
    \n

    问题只问了薄厚,那只需要统计一下文档的页数就好了。

    \n

    我统计了 2006 年以来的所有联合国安理会决议文件,共计 1099 份。先把结论写在前面:除去有并列最薄的文件后,绝大部分文件,中文是最薄的。

    \n

    中文 页数最少的决议有 391 份。

    \n

    英语 页数最少的决议有 7 份。

    \n

    西班牙语 页数最少的决议有 1 份。

    \n

    其余的,页数一样或者有并列最少的页码。

    \n
    \"\"
    \n

    有哪些文件不是中文最薄呢?

    \n

    决议 1803 中页数最少的语言是 英语,总页数为 7。(内容是伊朗核问题,内容大概是继续要求伊朗暂停铀浓缩等活动)

    \n
    \"\"
    \n

    决议 1877 中页数最少的语言是 英语,总页数为 4。(不好概括,简单来说是有关卢旺达的问题)

    \n
    \"\"
    \n

    决议 1932 中页数最少的语言是 西班牙语,总页数为 3。(这份西班牙语的文本,附件没有单起一页,成了唯一一个中英以外的选手)

    \n
    \"\"
    其他语言的版本,即使上面的空白足够,附件都是新开一页
    \n
    \"\"
    但是西班牙语的却紧随其后了,不知道什么原因
    \n

    决议 1993 中页数最少的语言是 英语,总页数为 2。(关于国际法庭的)

    \n
    \"\"
    \n

    决议 2231 中页数最少的语言是 英语,总页数为 104。(这份是伊核问题最主要的决议之一,同时也是我统计的所有决议中最长的一篇。中文 108 页)

    \n
    \"\"
    \n

    决议 2260 中页数最少的语言是 英语,总页数为 1。(科特迪瓦问题)(中文超出四行,导致分页)

    \n
    \"\"
    \n

    决议 2268 中页数最少的语言是 英语,总页数为 2。(叙利亚问题)

    \n

    决议 2533 中页数最少的语言是 英语,总页数为 1。(叙利亚人道问题)

    \n

    其余有意思的发现各个语言在联合国安理会决议中的平均厚度

    \n

    阿拉伯语:6.29 页

    \n

    中文:4.54 页

    \n

    英语:4.97 页

    \n

    法语:5.47 页

    \n

    俄语:5.99 页

    \n

    西班牙语:5.49 页

    \n

    如果页数能代表语言简略程度,那么第一名是中文,第二名是英文,之后分别是法语,西班牙语,俄语,阿拉伯语

    \n

    领先最多的一篇决议

    \n

    决议 2368,中文 28 页,英文 33 页,比英文少了 5 页(伊黎伊斯兰国(达伊沙)和基地组织制裁名单)

    \n

    如何得出此结论的呢?

    \n

    联合国的文件都在官网上放着,可以抓下来,统计一下的

    \n

    按理说这么久了应该有人做个爬虫把联合国各个决议爬取下来啊,居然没人做,那就我来试试吧

    \n

    前面有些答案提到联合国部分机构翻译的水平不一,所以就先选个大机构,安全理事会,选取近两年的各项决议看看。这些决议有些能直接调动维和部队,应该不会胡乱翻译。

    \n

    各项决议都在这里下载:

    \n
    \"\"
    \n

    比如今年这个 2751 号决议,提供了六种语言的下载,分别为阿拉伯语,中文,英语,法语,俄语,西班牙语(阿拉伯语我不认识,不知道是不是这个)

    \n
    \"\"
    \n

    下载的文件格式为 PDF,打开后大概是这样的:

    \n
    \"\"
    \n

    决议的具体信息对于我们的答案没有什么帮助,有帮助的是下载链接:

    \n
    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=A

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=C

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=E

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=F

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=R

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=S
    \n

    分别是阿拉伯语,中文,英语,法语,俄语,西班牙语的文件,注意到,2751 是决议编号,后面的 Lang=啥就是语言版本。有规律就好办了,写一段 Python 程序,将这些报告逐一下载下来就好啦

    \n

    但是代码我肯定是懒得写的,交给 AI 代劳啦,联合国的服务器太烂,我直接 6 线程同时下载,两分钟就下载完成了 2024 年的所有决议。

    \n
    \"\"
    \n
    \"\"
    \n

    我这网络质量不错,偶尔有下载失败的,手动下载一下就行,下载了这么多,就出现了两次

    \n
    \"\"
    \n

    只下载到了 2006 年的数据,为什么呢?因为宿舍熄灯了

    \n

    接下来是数据分析的内容,首当其冲的就是页数了。Python 有个库,PyPDF2,直接这样就可以输出 PDF 的页数了:

    \n
    \n
    reader = PdfReader(pdf_path)\npage_count = len(reader.pages)\n
    \n
    \n

    下载的时候,我就将文件重命名为决议号 + 语言的文件名形式了,并将同一决议号的文件放在了同一个子文件夹中,很容易分辨出来哪几个文件是属于同一份决议

    \n
    \"\"
    \n

    接下来,写个循环,遍历读取所有文件夹中的文件,依次比较页数大小。

    \n
    \n
     for pdf in pdf_files:\n                    language = pdf.split('_')[1][0]  # 提取语言标识\n                    pdf_path = os.path.join(resolution_path, pdf)\n                    reader = PdfReader(pdf_path)\n                    page_count = len(reader.pages)\n
    \n
    \n

    如果有并列第一的,就会返回超过 1 个的元素,排除一下就行,最后即可得出此结论。

    \n

    附录:完整的代码:

    \n

    以下是下载决议的代码

    \n
    \n
    import os\nimport requests\nfrom concurrent.futures import ThreadPoolExecutor\nimport time\n# 决议编号范围和语言版本\nstart_number = 1738\nend_number = 1652\nlanguages = [\"A\", \"C\", \"E\", \"F\", \"R\", \"S\"]\nbase_url = \"https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/{}&Lang={}\"\n\ndef download_resolution(number):\n    resolution_folder = f\"UN_Resolutions/{number}\"\n    os.makedirs(resolution_folder, exist_ok=True)\n\n    for lang in languages:\n        url = base_url.format(f\"{number}(2006)\", lang)#换成要下载的年份\n        try:\n            response = requests.get(url, proxies={\n                \"http\": \"http://127.0.0.1:7890\",\n                \"https\": \"http://127.0.0.1:7890\"\n            })\n            response.raise_for_status()  # 检查请求是否成功\n\n            file_name = f\"{resolution_folder}/{number}_{lang}.pdf\"\n            with open(file_name, \"wb\") as file:\n                file.write(response.content)\n            print(f\"{file_name} 下载成功!\")\n        except requests.exceptions.RequestException as e:\n            print(f\"{number} - {lang} 版本下载失败:\", e)\n            print(url)\n\n# 使用线程池下载决议\nwith ThreadPoolExecutor(max_workers=25) as executor:\n    executor.map(download_resolution, range(start_number, end_number - 1, -1))\n    time.sleep(1)\n
    \n
    \n

    以下是统计分析的代码

    \n
    \n
    import os\nfrom PyPDF2 import PdfReader\n\ndef count_pages(resolutions_folder):\n    overall_min_counts = {}\n    total_resolutions = 0\n    non_chinese_min_resolutions = []\n    max_chinese_pages = 0\n    max_chinese_resolution = None\n    longest_resolution = None\n    longest_page_count = 0\n    total_language_pages = {}\n    language_count = {}\n    max_diff = 0\n\n    language_names = {\n        'A': '阿拉伯语',\n        'C': '中文',\n        'E': '英语',\n        'F': '法语',\n        'R': '俄语',\n        'S': '西班牙语'\n    }\n\n    for resolution in os.listdir(resolutions_folder):\n        resolution_path = os.path.join(resolutions_folder, resolution)\n        if os.path.isdir(resolution_path):\n            pdf_files = [f for f in os.listdir(resolution_path) if f.endswith('.pdf')]\n            if len(pdf_files) == 6:\n                total_resolutions += 1\n                language_page_count = {}\n                \n                for pdf in pdf_files:\n                    language = pdf.split('_')[1][0]  # 提取语言标识\n                    pdf_path = os.path.join(resolution_path, pdf)\n                    reader = PdfReader(pdf_path)\n                    page_count = len(reader.pages)\n                    \n                    if language not in language_page_count:\n                        language_page_count[language] = 0\n                    language_page_count[language] += page_count\n\n                    # 累加语言总页数和计数\n                    if language not in total_language_pages:\n                        total_language_pages[language] = 0\n                        language_count[language] = 0\n                    total_language_pages[language] += page_count\n                    language_count[language] += 1\n\n                # 更新最长决议\n                total_pages = sum(language_page_count.values())\n                if total_pages > longest_page_count:\n                    longest_page_count = total_pages\n                    longest_resolution = resolution\n\n                # 找出最小页数和出现的语言\n                min_count = min(language_page_count.values())\n                min_languages = [lang for lang, count in language_page_count.items() if count == min_count]\n\n                # 如果最小页数的语言不唯一,跳过该决议\n                if len(min_languages) > 1:\n                    continue\n\n                # 唯一的最小页数语言\n                min_language = min_languages[0]\n\n                # 输出最少页数语言的信息\n                print(f\"决议 {resolution} 中页数最少的语言是 {language_names[min_language]},总页数为 {min_count}。\")\n\n                # 更新最少页数统计\n                if min_language not in overall_min_counts:\n                    overall_min_counts[min_language] = 0\n                overall_min_counts[min_language] += 1\n\n                # 检查中文是否为最少页数\n                if min_language != 'C':\n                    non_chinese_min_resolutions.append(resolution)\n                else:\n                    # 找出第二少的语言页数\n                    sorted_counts = sorted(language_page_count.values())\n                    if len(sorted_counts) > 1:\n                        second_least_count = sorted_counts[1]\n                        diff = min_count - second_least_count\n                        print(f\"决议 {resolution} 中文页数与第二少语言的差值为 {diff}。\")\n                        max_diff = max(max_diff, diff)\n\n                # 记录中文页数最多的决议\n                if 'C' in language_page_count:\n                    if language_page_count['C'] > max_chinese_pages:\n                        max_chinese_pages = language_page_count['C']\n                        max_chinese_resolution = resolution\n\n    # 输出总统计\n    print(f\"\\n 共计统计了 {total_resolutions} 份决议。\")\n    for language, count in overall_min_counts.items():\n        print(f\"{language_names[language]} 页数最少的决议有 {count} 份。\")\n\n    # 输出中文页数不是最少的决议\n    if non_chinese_min_resolutions:\n        print(\"以下决议的中文页数不是最少:\")\n        for res in non_chinese_min_resolutions:\n            print(res)\n\n    # 输出中文页数最多的决议\n    if max_chinese_resolution:\n        print(f\"中文页数最多的决议是 {max_chinese_resolution},总页数为 {max_chinese_pages}。\")\n        print(f\"中文页数与第二少语言的最大差值为 {max_diff}。\")\n\n    # 输出最长的决议\n    if longest_resolution:\n        print(f\"最长的决议是 {longest_resolution},总页数为 {longest_page_count}。\")\n\n    # 计算并输出各语言的平均页数\n    print(\"\\n 各语言的平均页数:\")\n    for language, total_pages in total_language_pages.items():\n        average_pages = total_pages / language_count[language]\n        print(f\"{language_names[language]}:{average_pages:.2f} 页\")\n\n# 调用函数\ncount_pages('UN_Resolutions')\n
    \n
    \n
    \n
    \n\n\n\n\n
    \n\n\n\n", + "content": "
    \"头图\"/
    \n

    问题只问了薄厚,那只需要统计一下文档的页数就好了。

    \n

    我统计了 2006 年以来的所有联合国安理会决议文件,共计 1099 份。先把结论写在前面:除去有并列最薄的文件后,绝大部分文件,中文是最薄的。

    \n

    中文 页数最少的决议有 391 份。

    \n

    英语 页数最少的决议有 7 份。

    \n

    西班牙语 页数最少的决议有 1 份。

    \n

    其余的,页数一样或者有并列最少的页码。

    \n
    \"\"
    \n

    有哪些文件不是中文最薄呢?

    \n

    决议 1803 中页数最少的语言是 英语,总页数为 7。(内容是伊朗核问题,内容大概是继续要求伊朗暂停铀浓缩等活动)

    \n
    \"\"
    \n

    决议 1877 中页数最少的语言是 英语,总页数为 4。(不好概括,简单来说是有关卢旺达的问题)

    \n
    \"\"
    \n

    决议 1932 中页数最少的语言是 西班牙语,总页数为 3。(这份西班牙语的文本,附件没有单起一页,成了唯一一个中英以外的选手)

    \n
    \"\"
    其他语言的版本,即使上面的空白足够,附件都是新开一页
    \n
    \"\"
    但是西班牙语的却紧随其后了,不知道什么原因
    \n

    决议 1993 中页数最少的语言是 英语,总页数为 2。(关于国际法庭的)

    \n
    \"\"
    \n

    决议 2231 中页数最少的语言是 英语,总页数为 104。(这份是伊核问题最主要的决议之一,同时也是我统计的所有决议中最长的一篇。中文 108 页)

    \n
    \"\"
    \n

    决议 2260 中页数最少的语言是 英语,总页数为 1。(科特迪瓦问题)(中文超出四行,导致分页)

    \n
    \"\"
    \n

    决议 2268 中页数最少的语言是 英语,总页数为 2。(叙利亚问题)

    \n

    决议 2533 中页数最少的语言是 英语,总页数为 1。(叙利亚人道问题)

    \n

    其余有意思的发现各个语言在联合国安理会决议中的平均厚度

    \n

    阿拉伯语:6.29 页

    \n

    中文:4.54 页

    \n

    英语:4.97 页

    \n

    法语:5.47 页

    \n

    俄语:5.99 页

    \n

    西班牙语:5.49 页

    \n

    如果页数能代表语言简略程度,那么第一名是中文,第二名是英文,之后分别是法语,西班牙语,俄语,阿拉伯语

    \n

    领先最多的一篇决议

    \n

    决议 2368,中文 28 页,英文 33 页,比英文少了 5 页(伊黎伊斯兰国(达伊沙)和基地组织制裁名单)

    \n

    如何得出此结论的呢?

    \n

    联合国的文件都在官网上放着,可以抓下来,统计一下的

    \n

    按理说这么久了应该有人做个爬虫把联合国各个决议爬取下来啊,居然没人做,那就我来试试吧

    \n

    前面有些答案提到联合国部分机构翻译的水平不一,所以就先选个大机构,安全理事会,选取近两年的各项决议看看。这些决议有些能直接调动维和部队,应该不会胡乱翻译。

    \n

    各项决议都在这里下载:

    \n
    \"\"
    \n

    比如今年这个 2751 号决议,提供了六种语言的下载,分别为阿拉伯语,中文,英语,法语,俄语,西班牙语(阿拉伯语我不认识,不知道是不是这个)

    \n
    \"\"
    \n

    下载的文件格式为 PDF,打开后大概是这样的:

    \n
    \"\"
    \n

    决议的具体信息对于我们的答案没有什么帮助,有帮助的是下载链接:

    \n
    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=A

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=C

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=E

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=F

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=R

    https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/2751(2024)&Lang=S
    \n

    分别是阿拉伯语,中文,英语,法语,俄语,西班牙语的文件,注意到,2751 是决议编号,后面的 Lang=啥就是语言版本。有规律就好办了,写一段 Python 程序,将这些报告逐一下载下来就好啦

    \n

    但是代码我肯定是懒得写的,交给 AI 代劳啦,联合国的服务器太烂,我直接 6 线程同时下载,两分钟就下载完成了 2024 年的所有决议。

    \n
    \"\"
    \n
    \"\"
    \n

    我这网络质量不错,偶尔有下载失败的,手动下载一下就行,下载了这么多,就出现了两次

    \n
    \"\"
    \n

    只下载到了 2006 年的数据,为什么呢?因为宿舍熄灯了

    \n

    接下来是数据分析的内容,首当其冲的就是页数了。Python 有个库,PyPDF2,直接这样就可以输出 PDF 的页数了:

    \n
    \n
    reader = PdfReader(pdf_path)\npage_count = len(reader.pages)\n
    \n
    \n

    下载的时候,我就将文件重命名为决议号 + 语言的文件名形式了,并将同一决议号的文件放在了同一个子文件夹中,很容易分辨出来哪几个文件是属于同一份决议

    \n
    \"\"
    \n

    接下来,写个循环,遍历读取所有文件夹中的文件,依次比较页数大小。

    \n
    \n
     for pdf in pdf_files:\n                    language = pdf.split('_')[1][0]  # 提取语言标识\n                    pdf_path = os.path.join(resolution_path, pdf)\n                    reader = PdfReader(pdf_path)\n                    page_count = len(reader.pages)\n
    \n
    \n

    如果有并列第一的,就会返回超过 1 个的元素,排除一下就行,最后即可得出此结论。

    \n

    附录:完整的代码:

    \n

    以下是下载决议的代码

    \n
    \n
    import os\nimport requests\nfrom concurrent.futures import ThreadPoolExecutor\nimport time\n# 决议编号范围和语言版本\nstart_number = 1738\nend_number = 1652\nlanguages = [\"A\", \"C\", \"E\", \"F\", \"R\", \"S\"]\nbase_url = \"https://daccess-ods.un.org/access.nsf/Get?OpenAgent&DS=s/res/{}&Lang={}\"\n\ndef download_resolution(number):\n    resolution_folder = f\"UN_Resolutions/{number}\"\n    os.makedirs(resolution_folder, exist_ok=True)\n\n    for lang in languages:\n        url = base_url.format(f\"{number}(2006)\", lang)#换成要下载的年份\n        try:\n            response = requests.get(url, proxies={\n                \"http\": \"http://127.0.0.1:7890\",\n                \"https\": \"http://127.0.0.1:7890\"\n            })\n            response.raise_for_status()  # 检查请求是否成功\n\n            file_name = f\"{resolution_folder}/{number}_{lang}.pdf\"\n            with open(file_name, \"wb\") as file:\n                file.write(response.content)\n            print(f\"{file_name} 下载成功!\")\n        except requests.exceptions.RequestException as e:\n            print(f\"{number} - {lang} 版本下载失败:\", e)\n            print(url)\n\n# 使用线程池下载决议\nwith ThreadPoolExecutor(max_workers=25) as executor:\n    executor.map(download_resolution, range(start_number, end_number - 1, -1))\n    time.sleep(1)\n
    \n
    \n

    以下是统计分析的代码

    \n
    \n
    import os\nfrom PyPDF2 import PdfReader\n\ndef count_pages(resolutions_folder):\n    overall_min_counts = {}\n    total_resolutions = 0\n    non_chinese_min_resolutions = []\n    max_chinese_pages = 0\n    max_chinese_resolution = None\n    longest_resolution = None\n    longest_page_count = 0\n    total_language_pages = {}\n    language_count = {}\n    max_diff = 0\n\n    language_names = {\n        'A': '阿拉伯语',\n        'C': '中文',\n        'E': '英语',\n        'F': '法语',\n        'R': '俄语',\n        'S': '西班牙语'\n    }\n\n    for resolution in os.listdir(resolutions_folder):\n        resolution_path = os.path.join(resolutions_folder, resolution)\n        if os.path.isdir(resolution_path):\n            pdf_files = [f for f in os.listdir(resolution_path) if f.endswith('.pdf')]\n            if len(pdf_files) == 6:\n                total_resolutions += 1\n                language_page_count = {}\n                \n                for pdf in pdf_files:\n                    language = pdf.split('_')[1][0]  # 提取语言标识\n                    pdf_path = os.path.join(resolution_path, pdf)\n                    reader = PdfReader(pdf_path)\n                    page_count = len(reader.pages)\n                    \n                    if language not in language_page_count:\n                        language_page_count[language] = 0\n                    language_page_count[language] += page_count\n\n                    # 累加语言总页数和计数\n                    if language not in total_language_pages:\n                        total_language_pages[language] = 0\n                        language_count[language] = 0\n                    total_language_pages[language] += page_count\n                    language_count[language] += 1\n\n                # 更新最长决议\n                total_pages = sum(language_page_count.values())\n                if total_pages > longest_page_count:\n                    longest_page_count = total_pages\n                    longest_resolution = resolution\n\n                # 找出最小页数和出现的语言\n                min_count = min(language_page_count.values())\n                min_languages = [lang for lang, count in language_page_count.items() if count == min_count]\n\n                # 如果最小页数的语言不唯一,跳过该决议\n                if len(min_languages) > 1:\n                    continue\n\n                # 唯一的最小页数语言\n                min_language = min_languages[0]\n\n                # 输出最少页数语言的信息\n                print(f\"决议 {resolution} 中页数最少的语言是 {language_names[min_language]},总页数为 {min_count}。\")\n\n                # 更新最少页数统计\n                if min_language not in overall_min_counts:\n                    overall_min_counts[min_language] = 0\n                overall_min_counts[min_language] += 1\n\n                # 检查中文是否为最少页数\n                if min_language != 'C':\n                    non_chinese_min_resolutions.append(resolution)\n                else:\n                    # 找出第二少的语言页数\n                    sorted_counts = sorted(language_page_count.values())\n                    if len(sorted_counts) > 1:\n                        second_least_count = sorted_counts[1]\n                        diff = min_count - second_least_count\n                        print(f\"决议 {resolution} 中文页数与第二少语言的差值为 {diff}。\")\n                        max_diff = max(max_diff, diff)\n\n                # 记录中文页数最多的决议\n                if 'C' in language_page_count:\n                    if language_page_count['C'] > max_chinese_pages:\n                        max_chinese_pages = language_page_count['C']\n                        max_chinese_resolution = resolution\n\n    # 输出总统计\n    print(f\"\\n 共计统计了 {total_resolutions} 份决议。\")\n    for language, count in overall_min_counts.items():\n        print(f\"{language_names[language]} 页数最少的决议有 {count} 份。\")\n\n    # 输出中文页数不是最少的决议\n    if non_chinese_min_resolutions:\n        print(\"以下决议的中文页数不是最少:\")\n        for res in non_chinese_min_resolutions:\n            print(res)\n\n    # 输出中文页数最多的决议\n    if max_chinese_resolution:\n        print(f\"中文页数最多的决议是 {max_chinese_resolution},总页数为 {max_chinese_pages}。\")\n        print(f\"中文页数与第二少语言的最大差值为 {max_diff}。\")\n\n    # 输出最长的决议\n    if longest_resolution:\n        print(f\"最长的决议是 {longest_resolution},总页数为 {longest_page_count}。\")\n\n    # 计算并输出各语言的平均页数\n    print(\"\\n 各语言的平均页数:\")\n    for language, total_pages in total_language_pages.items():\n        average_pages = total_pages / language_count[language]\n        print(f\"{language_names[language]}:{average_pages:.2f} 页\")\n\n# 调用函数\ncount_pages('UN_Resolutions')\n
    \n
    \n
    \n
    \n\n\n\n\n
    \n\n\n\n", + "category": "", + "link": "https://daily.zhihu.com/story/9782621", + "creator": "", + "pubDate": "Thu, 17 Jul 2025 12:27:03 +0800", + "enclosure": "", + "enclosureType": "", + "image": "", + "id": "", + "language": "", + "folder": "资讯", + "feed": "知乎", + "read": false, + "favorite": false, + "created": false, + "tags": [], + "hash": "192365ae8e45cd8faffe4ed124a8ed0f", + "highlights": [] + }, + { + "title": "哪个瞬间你突然觉得读书真有用?", + "description": "
    \"头图\"/
    \n

    当我发现我看懂了《郑伯克段于鄢》,我才明白,读书是真有用啊。

    \n

    《郑伯克段于鄢》这篇文章,有很高的历史地位和文学地位。

    \n
    \"\"
    \n

    中国人为什么重视历史,第一当然是因为我们历史长,历史中有足够多的故事,能给我们足够多的经验和教训,不像某些国家只有几百年的历史,历史太短,就不能全面地总结规律;第二是因为,中国的历史都是血的教训,意义重大,只不过,我们在语文课本里、历史课本里学的时候,因为没有社会阅历,看不懂。等我们步入社会,再回头来看历史,才发现中国的历史真是字字泣血,句句如山,早已经把一切都告诉我们了。

    \n

    扯远了,还是谈一谈《郑伯克段于鄢》中,作者到底给我们讲了一个怎样的故事吧。

    \n

    一、【原文第一段】

    \n

    初,郑武公娶于申,曰武姜,生庄公及共叔段。庄公寤生,惊姜氏,故名曰寤生,遂恶之。爱共叔段,欲立之。亟请于武公,公弗许。

    \n

    直译就是,姬姓国郑国的国君(名叫姬掘突,也就是)郑武公娶了(姜姓国)申国国君申侯的女儿,这个女人被称作“武姜”,生了两个儿子,一个就是后来的庄公,一个是共叔段。武姜在生庄公的时候,庄公难产,武姜受了很大的惊吓,所以给大儿子庄公起了个小名,叫寤生,而且,武姜对这个大儿子很反感。相反,武姜喜欢自己的小儿子共叔段,想立他为储君,也就是想让小儿子郑武公的接班人。多次向郑武公请示这个想法,郑武公不答应。

    \n

    这段话里面就有很有意思的故事。

    \n

    1. 要先讲讲郑国的来历。

    \n

    郑武公的父亲郑桓公,是郑国的开国国君,名叫姬友(不要想歪了啊,人家真叫这个名字,姬姓,郑氏,名友,受封前称王子友),是周宣王同父异母的弟弟。郑桓公在公元前 806 年,被分封到荥阳这个地方,建立郑国。根据《史记·卷四十二·郑世家第十二》记载“宣王立二十二年,友初封于郑。封三十三岁,百姓皆便爱之。”这位姬友同志挺有政治手腕的,作为开国国君,治理国家能够得到人民的爱戴。于是呢,被自己的侄子周幽王(也就是烽火戏诸侯的主角)召回王室,担任司徒。

    \n

    这位司徒回到周王室,发现自己这个侄子不大行啊,宠爱褒姒,而且诸侯逐渐开始有反叛的苗头。所以,郑桓公开始给自己留后路了。具体做了两件事:第一件是把郑国向东迁到虢、郐这个地方,这两个地方的国君向这位朝中大佬、天子的亲叔叔献上了十座城池,于是郑国就在这个地方扎下根来。第二件事,郑桓公让自己的儿子姬掘突向当时的太子宜臼靠拢。后面我们就能看到郑桓公的英明之处,这位开国国君指导自己儿子玩儿政治投机是一把好手。

    \n

    2. 郑武公是一个什么样的人。

    \n

    老国君郑桓公安排完后路,第二年,周幽王就惹出了乱子。为了赢得美人褒姒的一笑,烽火戏诸侯,并且还要废黜了申侯的女儿王后、外孙太子姬宜臼,而改立褒姒母子为王后和太子,所以申侯一气之下,起兵反叛,联合缯国、犬戎攻打周幽王。在这场叛乱中,周幽王和郑桓公一同被杀。郑桓公去世之后,儿子郑武公继位,正式登上政治舞台。这位郑武公上任干的第一件大事,就是联合秦襄公、晋文侯、卫武公拨乱反正,拥立原来的太子宜臼登基,史称“周平王”。郑武公号召郑国的国民,帮助周平王将王室向东搬迁到洛邑,从此,中国历史进入了东周时代。

    \n

    郑武公这么卖力给周平王干活,得到了什么好处呢?郑武公又被封为司徒,也就是继承了老父亲的官职。郑武公和自己的儿子郑庄公都被周王室封为卿士,可以说,这里郑国的权力有点“挟天子以令诸侯”的感觉了。这里就能看出提前下注的好处了吧。

    \n

    3. 郑武公为什么要娶武姜?

    \n

    申国国君也就是申侯,这个人把犬戎人引进镐京,干掉了自己的女婿周幽王和郑桓公,自己的外孙还当上了周王。因为犬戎人把周王室祸害的太厉害了,老百姓都对申侯这个人比较反感。郑武公呢,不用说了,自己的杀父仇人,不共戴天之仇啊。

    \n

    那郑武公岂不是娶了杀父仇人的女儿?

    \n

    理论上来讲,确实是这样的。史书对这件事没有详细的描述。我想,这肯定是一场政治婚姻,周平王为了控制和约束郑武公,用亲上加亲的借口,让自己的亲姨妈嫁给了自己的叔叔郑武公。这下好了,郑武公给周平王既当叔叔又当姨夫,你还好意思欺负自己的外甥兼侄儿吗?周王都给你指婚了,你说你姬掘突同志能推辞不?所以大概率,郑武公对这桩婚事是不满的,不过为了大局考虑,只能捏着鼻子认了。这估计也为后来郑武公跟周平王交恶埋下了种子。

    \n

    4. 武姜仗着娘家背景强大,骄横跋扈,对郑国指手画脚。

    \n

    第一,从一个正常人的角度,母亲生儿子的时候因为难产险些丧命,所以厌恶自己的这个儿子,这也还能理解,但是给自己的儿子起个小名叫“难产”(寤生),是不是就有点过分了?可想而知,后来的郑庄公,对自己这位母后是什么感官了。

    \n

    第二,在分封制的体制下,立长立嫡,是国家传承的基本原则。西周时代,在立谁为储君的问题上,已有公论。正常情况下,只要庄公没什么大毛病,肯定就是储君的天然人选,哪轮得到武姜一个妇人在这儿说三道四的。在立储这么敏感的问题上,武姜就因为自己的喜好,就想扶小儿子上位,而且,还是屡次请求没有得到准许。

    \n

    各位看到这儿,大概已经明白,国君的意思已经很清楚了,就是要立自己的大儿子。你武姜请示一次被拒绝后,还不赶快夹起尾巴好好做人,去找自己的大儿子未来的国君弥补一下关系,反而屡次向郑武公提请求,这分明是不把郑武公放在眼里啊。

    \n

    这说明,郑国上层,存在两个山头,一派是郑武公为首,大儿子郑庄公坚定站自己老爸;另一派是武姜为首,政治诉求是拥立自己的小儿子共叔段当国君,这很有可能是来自武姜的外甥周平王的授意和支持。如果武姜能够成功,其实就相当于周平王这一系实际掌控住了郑国,也就不怕郑国臣大欺君了。

    \n

    5. 郑国咽不下被干涉内政这口气。

    \n

    郑武公好歹也是一路杀出来的一代雄主,干了不少大事:护送周平王东迁,攻灭东虢国和郐国,吞并周边鄢、蔽、补、丹、依、弢、历、莘八邑。现在看到自己当年拼了老命保下来的周平王不但不对自己这个叔叔感恩戴德,还想着将我郑国纳入你周王室的控制之下,这哪能忍得了?老子现在搞不动你,等老子的儿子搞你。在郑武公的培养之下,儿子郑庄公最终成为一代霸主。

    \n

    所以就有了《古文观止》的第二篇《周郑交质》。这个故事我们下次再讲,看郑庄公是怎么狠狠打脸周平王的。

    \n

    二、【原文第二段】

    \n

    及庄公即位,为之请制。公曰:“制,岩邑也,虢叔死焉,他邑命。”请京,使居之,谓之京城大叔。祭仲曰:“都城过百雉,国之害也。先王之制:大都不过参国之一,中五之一,小九之一。今京不度,非制也,君将不堪。”公曰:“姜氏欲之,焉辟害?”对曰:“姜氏何厌之有!不如早为之所,无使滋蔓,蔓难图也。蔓草犹不可除,况君之宠弟乎!”公曰:“多行不义,必自毙,子姑待之。”

    \n

    大白话翻译一下:

    \n

    武姜在郑庄公继位之后,还不死心,想让郑庄公把“制”这个城池分封给自己的小儿子共叔段当领地。郑庄公找了个理由:制这个城池,是险要之地,虢叔就是死在那个地方的,兆头不好,你给弟弟另挑个别的地儿,我都答应。武姜于是请求把京邑分封给共叔段,庄公答应了,于是人们称共叔段为京城太叔。

    \n

    这时候一位叫祭仲的大臣看不过去了,私底下跟庄公说:一个都市的城墙超过三百丈,这个都市就太大了,将危害到国家安全。按照以前的制度,大的城池不能超过国都的三分之一,中等城池的城墙不能超过国都的五分之一,小城池的城墙不能超过国都的九分之一。现在京邑太大了,分封给共叔段不符合制度,恐怕会给你造成隐患。

    \n

    庄公手一摊:母后姜氏想这么干,我有什么办法,有害也只能承受了。祭仲说:姜氏胃口太大,没有满足的时候,不如早做谋划,不要让他们的势力膨胀起来,膨胀起来将像藤蔓到处滋生一样难以铲除了。藤蔓都除不干净,更不用说你的亲弟弟了。郑庄公大手一挥:多行不义必自毙,你等着看(我怎么收拾他)就行了。

    \n

    这段话又讲了什么故事呢?

    \n

    1. 第一个交锋在于,武姜请求封共叔段到制这个地方。

    \n

    你武姜是不是有点太蹬鼻子上脸了?太子登基之前你想着废太子,太子登基之后,你仗着自己是太后,不但不夹起尾巴做人,反而找新君给自己小儿子请求封赏,还是一个如此要害的城池,这是想干嘛呀?这不是拿郑庄公当傻子么?

    \n

    注意了,朋友们,郑庄公继位的时候,只有 13 岁。13 岁的一个孩子, 武姜不拿他当回事儿,也就可以理解了,可能是觉得小孩子好糊弄。

    \n

    但是,郑庄公能成为春秋一霸,政治天分可能早早就开发出来了。《毛泽东 1959 年 12 月至 1960 年 2 月读苏联政治经济学(教科书)的谈话记录》中记载,毛泽东曾说:春秋时候有个郑庄公,此人很厉害,他对国内斗争和国际斗争都很懂得策略。所以,就是这个 13 岁的孩子,一眼就看穿了武姜的图谋。

    \n
    \"\"
    \n

    按郑庄公的说法:制,是一个险要的地方。这个地方险要到什么程度呢?地处郑国最北端,北依黄河 ,岸如绝壁,控此一地可制郑国全境,又是东方诸侯通向周王朝首都洛邑的必经之地,是郑国商业发展的重要关口,后世称之为“虎牢关”。

    \n

    虎牢关这个名字大家可能更熟悉一些,刘邦死守这里连项羽都打不进去,刘邦和项羽在此地“大战七十,小战四十”,三英战吕布也发生在这里,李世民也是在虎牢关一战拿下王世充、窦建德。

    \n

    1944 年,日本人动用铃木旅团步骑五六千人,炮二十余门,战车及装甲车七八十辆,想要攻打虎牢关,被路云亭率领一个营的兵力阻击七天七夜,最后路云亭部以伤亡四百余人的代价,歼敌 2500 人。(详见荥阳网《虎牢阻击战——虎牢关最后一场大战》)

    \n

    虎牢关北面是黄河,南边是嵩山,能够通行大军的路就只有一段狭长的河谷地。这么险要的地方,郑庄公心里有数,肯定是不可能给自己这个亲弟弟的。所以“虢叔死焉”,不吉利,只是个堵武姜嘴的借口罢了。我要是给了你这个城池,将来打不下来可怎么办。

    \n

    郑庄公还来了一句“他邑唯命”,意思是其他地方你指哪儿就是哪儿,都听你的。各位,如果国君跟一个大臣说“我都听你的”,这个大臣就要掂量掂量自己能不能活到明天早上了,你敢给国君下“命”令?

    \n

    武姜也不知道真傻还是假傻,愣是没听出来郑庄公话语中的不满,再一次向作死的路上迈出了一大步。《古文观止》的作者吴楚材和吴调侯点评“他邑唯命”,说是“四字毒甚”。

    \n

    2. 第二次交锋在于,武姜请求封共叔段到京邑。

    \n

    京邑是个什么地方呢?很有可能是整个郑国除了都城新郑之外,最大的城池。城池越大,人口越多,赋税、粮草越多,能够供养的兵马也就越强。所以,武姜之心,简直是路人皆知。更神奇的操作来了,郑庄公同意了这个请求。这里就是郑庄公政治手腕儿高超的地方了。我们一层一层来分析。

    \n

    第一层,表面上看起来,郑庄公话都已经说出口了:其他地方随便挑。这时候人家真好意思挑最大的地方了,你要是说不给吧,好像国君有点不守承诺的意思,都说君无戏言嘛。所以,看起来,郑庄公是被自己的话逼到了墙角。

    \n

    第二层,郑庄公通过装傻充愣,瞒过了武姜和共叔段,也养成了共叔段骄傲自大的心理。郑庄公什么都看破了,但是就是不说,也不表现出来,武姜自然被蒙在鼓里,觉得自己这个儿子还是很好拿捏的嘛,连带着,武姜的小儿子也渐渐看不起自己这个哥哥了,觉得自己实力强了之后,完全能够拿下郑国。郑庄公这一下拿捏了人性,骄人之心,把武姜和共叔段吃得死死的。

    \n

    第三层,郑庄公不是不知道京邑的重要性,这从后面他跟祭仲的对话就能看出来。为什么他还同意把共叔段封到京邑呢?为了郑国表面上的和谐和稳定。要知道,武姜这一派山头可不仅仅是武姜和共叔段两个人,上头还有个周天子呢,下面可能还有支持武姜的文武大臣等势力。一旦这时候就跟武姜撕破脸,两方斗起来,才 13 岁的郑庄公能不能服众还不知道呢,避免不了郑国混乱衰弱的局面,反而容易让周王室看到机会。所以,也可以称郑庄公这一招是以空间换时间。

    \n

    第四层,从小被郑武公教育大,郑庄公深刻知道,要执政,最重要的是民心。郑庄公通过忍让,退步,让老百姓和中立派向自己靠拢。老百姓会觉得,人家国君都这么忍让了,你们武姜母子俩还这么得寸进尺,公然违反国家制度(先王之制),实在是太欺负人了。自然而然,时间一长,民意就站在了郑庄公一边。同时,在国际上也拥有了良好的声誉,大家都知道,郑庄公是个孝顺的国君。这样,人设也就立起来了。

    \n

    相较于这些收获,一个随时能拿回来的京邑,根本什么都不算。为什么说随时能拿回来的京邑呢?我们后面再讨论这个问题。

    \n

    3. 祭仲与郑庄公的讨论。

    \n

    祭仲何许人也?这位春秋第一权臣,一生辅佐了郑国的五位国君,他的政治履历长达半个世纪,在郑庄公死之后,祭仲可谓是权势滔天,权力上升到了可以废立国君的地步。

    \n

    这样一个大臣,私下来向国君阐述自己的忧虑,并指出京城太叔违反了“先王之制”,要求国君早做谋划,除掉京城太叔。看起来像是一个忠诚到不能再忠诚的忠臣。

    \n

    实际上呢?

    \n

    我认为,这更像君臣之间的一次试探。都在这玩儿狼人杀呢。

    \n

    大臣明面上是在讲自己为国家担忧,实际上是在投石问路,看看你郑庄公究竟是个什么水平。要是京城太叔这事你都看不出来,没点城府,大臣一讲完你就大惊失色,大呼“这可如何是好”,那人家大臣就明白了,你国君就是个草包而已,指不定这个权臣现在就能放手做大。

    \n

    这边国君呢,还保持着自己无辜受害者的人设,回了一句:母后想要这样,我有啥办法?你看,一句话,既表明了自己是被动的,是受害者,又暗示了“我知道这是怎么回事儿,就是演给他们看看”。

    \n

    祭仲这时候已经把握住了国君的心态,又更近一步:要不咱现在就开始谋划着,除掉他们?这句话,其实是废话。既然郑庄公已经意识到了危害,不可能不严加防备,用不着你祭仲来多这句嘴。那祭仲这句话是表达什么意思呢?一方面,站队表忠心,向国君提出这个建议以表明自己不是武姜的人。另一方面呢,试图进入国君的决策圈子,要是国君能让我来执行这件事,咱祭仲不就成了国君的心腹了吗,帮国君背锅要是成了,可就简在帝心了哇。

    \n

    4. 郑庄公的经典回答。

    \n

    郑庄公是怎么回答祭仲的呢?“多行不义必自毙,子姑待之。”这也成为一个中国经典成语。

    \n

    这句话真的太经典了,很值得细细品味。

    \n

    第一,郑庄公告诉祭仲,我心里有数,你等着看戏就行了。这句话既显示了帝王的城府,又没有把自己的安排向手下人和盘托出,保持了神秘感。

    \n

    第二,在这种心机深沉的帝王面前,祭仲把不准脉,就不敢放肆。后来庄公在世时,祭仲老老实实地干活,到了郑庄公死后才敢出来蹦跶。

    \n

    第三,这时候郑庄公可还没充分信任你祭仲呢,哪敢让你知道或者参与这么大的事情,用人不疑疑人不用可是基本原则。后来的光绪皇帝就是没有学明白郑庄公这个经验,轻信袁世凯能帮他拿下慈禧,最终身陷囹圄,死得也不明不白。

    \n

    三、【原文第三段】

    \n

    既而大叔命西鄙、北鄙贰于己。公子吕曰:“国不堪贰,君将若之何?欲与大叔,臣请事之;若弗与,则请除之。无生民心。”公曰:“无庸,将自及。”大叔又收贰以为己邑,至于廪延。子封曰:“可矣,厚将得众。”公曰:“不义不昵,厚将崩。”

    \n

    翻译大意:

    \n

    太叔让西鄙北鄙这两个城邑也向自己效忠,甚至最后把这两个城邑收归自己所有,地盘扩大到了廪延这个地方。这时候大臣们都看不过去了,公子吕向郑庄公进言:这个国家都快要有两个主人了,共叔段得到了更多的物资和地盘,能够武装更多的人马,不能再忍让了,该出手了。郑庄公说:没事儿,不要着急,让他作吧,光有物资可笼络不住那么多的人马,你看他是怎么玩儿完的。

    \n
    \"\"
    \n

    1. 共叔段的势力膨胀到了什么地步?

    \n

    “鄙”是春秋时期边邑的称呼,《说文解字》云:“五酂为鄙,百家为酂”,因此一​鄙​约为五百家。如果这个说法是靠谱的,那么西鄙北鄙加起来至少有 1000 户,如果平均一户 5 口人,一户人家能出 1 人作战的话,共叔段从西鄙北鄙这里就能得到一支 1000 人的军队。

    \n

    汉朝的刘向编写了《战国策书录 - 叙》,其中讲:战国晚世,万乘之国七,千乘之国五,敌哞争权,盖国战国。意思是拥有万乘兵车的大国七个(战国七雄),拥有千乘兵车的有五个国家(鲁,宋,中山,卫,郑)。要知道,郑国这时才立国三代,还处在春秋前期,估计还称不上是个千乘之国。

    \n

    古代的作战单位,一乘,指一辆战车、四匹马、三个甲士,战车周围还要配备一定数量的步卒。如果按照一乘 20 个人来算,1000 个人也能组个 50 乘了。这可还没算上京邑能动员的兵力。所以大致估算,共叔段怎么也该有个 100-200 乘以上的兵力了。

    \n

    2. 公子吕表态意味着什么?

    \n

    公子吕是新出场的人物,他是何许人也?

    \n

    公子吕是郑武公的弟弟,姓姬名吕,字子封,公子吕也就是郑庄公的叔叔。作为郑国国君的“皇叔”,他能代表的可不只是他一个人的意见,而是整个郑国公室的意见。公子吕出来跟郑庄公讲话,这就说明除掉共叔段,拿下武姜,摆脱周天子钳制,已经成为郑国公室的一致意见。

    \n

    公子吕第一次出场,还是用激将法,催庄公下决心,免得老百姓无所适从。但是庄公确实是对自己有信心,稳坐钓鱼台:不着急,让他继续作,他快作到头了。

    \n

    公子吕第二次出场,就更直接了一些:到时候了,再让他武装起来,咱可就对付不了了。这里说明,郑国公室,对于郑庄公确实是鼎力支持了,很可能支持了军队。但是大概这个军队数量并不是很多。公子吕可能觉得,凭自己手里的军队,现在对付共叔段还行,要是共叔段手里人更多的话,可能就对付不了了。说白了,冷兵器时代,没那么多花哨的战术,在没法玩儿太多阴谋的情况下,比人数是最直接的。这里也能看出,共叔段确实可能拥有超过 100 乘的军事力量。

    \n

    3. 为什么庄公这么有底气?

    \n

    第一,庄公本来的用意,就是通过表现得宽容、退让,获得民心和公卿大臣们的支持。等的时间越长,共叔段造反的迹象越明显,也就能让庄公获得更多人的效忠,也更能看明白哪些人是一定要站在我对立面的、将来一定要铲除的人。所谓大势在我,时间站在自己这一边,当然庄公不会着急。

    \n

    第二,庄公可以借此探一探郑国公室的底。我上位这么长时间了,母后和弟弟这么欺负我,你们这些叔伯长辈就这么看着,也不说出来支持一下,现在坐不住了,想出来维持局面了,那也得咱国君点头不是?你想动弹可以啊,给咱交个底,你们手里有多少能动用的力量,都交给我来指挥。咱国君不允许有不听话的军事力量存在。

    \n

    第三,庄公有自己的底牌,能够确保自己不会输,局势还在自己的掌控之中。这个底牌我们前面提过一句,这里先略过,后面再讲。

    \n

    第四,现阶段就打击共叔段,不一定能一击致命。虽然共叔段做得不合规矩,但是毕竟是国君的亲弟弟,只要还没有确凿的证据证明他谋反,武姜求求情,说不定共叔段就被保下来了呢?而且,这样也不可能抓到武姜的把柄,不可能把武姜拉下来,砸碎她的势力,斩断周天子的触手。

    \n

    四、【原文第四段】

    \n

    大叔完聚,缮甲兵,具卒乘,将袭郑。夫人将启之。公闻其期,曰:“可矣!”命子封帅车二百乘以伐京。京叛大叔段,段入于鄢,公伐诸鄢。五月辛丑,大叔出奔共。

    \n

    翻译:太叔这边做好了充分的准备,厉兵秣马,准备好偷袭新郑了,武姜都要做内应给太叔开门了。郑庄公听说了他们发动的日期,做出判断:时机成熟了,动吧。于是公子吕率领二百乘去讨伐京邑。京邑背叛了太叔,太叔只好跑到鄢这个地方。庄公又讨伐鄢,于是五月二十三日,太叔逃到了国外(共国)。

    \n

    这个部分虽然简短,却是整个故事的高潮部分,寥寥数笔,共叔段要偷袭,共叔段失败了,共叔段逃跑了,故事讲完了。春秋如椽大笔,确实笔力雄健,不服不行。真正有意思的细节,也在这一段中。

    \n

    1. 共叔段到底是什么水平。

    \n

    其实,纵观全文,共叔段都没有正面出场过,都是在庄公与大臣们对话的场景下,作为背景介绍出现的。我们确实无从知道共叔段的政治手腕。但是,作为一个要造反的主,自己的一举一动都摆在君王的眼皮子底下,连大臣都知道你要干什么,也能看出,至少共叔段是一点保密意识都没有,轻易就能被外人获知信息。“事以密成,语以泄败”的常识都没有,不死才怪。

    \n

    再者,共叔段不懂民心和政治规矩。你越想夺权,越想上位,越不能表现出一副咄咄逼人的样子,相反,你要学王莽,推辞、低调、谦虚才行。你手里没有啥实力的时候,就仗着武姜撑腰,一副郑国要跟我姓的姿态,难免会惹人反感。

    \n

    2. 庄公掀开了底牌。

    \n

    其实说到这里,相信大家已经看出来了,庄公早就在京邑埋下了自己的伏笔,留下了关键的后手。从什么时候开始的呢?至少是庄公说“多行不义必自毙”这句话之前。要知道,郑伯克段于鄢这个战斗发生在郑庄公二十三年,也就是说,庄公这个伏笔,硬生生埋了二十多年,一直忍到王师来的那一天。所以,才有子封伐京,京马上就“叛太叔段”。而且,这应该不是一个人,很可能是一股势力,或者一个组织、一个集团,扎根在京邑。

    \n

    如果说这是老国君郑武公给儿子留下的死忠,那也就罢了。如果是十三岁的小君王就懂得笼络人心,还能让人死心塌地在敌营中待了二十二年,那这就太可怕了。

    \n

    此外,庄公在武姜身边,同样埋有间谍,所以,庄公才能准确获知共叔段的偷袭日期。这是一定的,不然,庄公不可能这么有把握,这么有底气。军国大事,碰运气可不行,肯定是存在万全的准备才敢这么玩儿的。

    \n

    3. 共叔段死没死?

    \n

    共叔段应该是本来被称为“叔段”,到跑到共国之后,才被世人称为共叔段。共叔段跑到共国之后的事情,《左氏春秋》没有继续交代,我们也无从得知。没有写出来,就是留白,给大家自己想象的空间,都有可能。但是,我认为,就郑庄公这个腹黑加老谋深算的性格来说,不太可能给自己留下这么一个明显的隐患。春秋战国时期,买凶杀人的故事史书上讲得多了,多郑庄公一个不多,少他一个不少。

    \n

    五、【原文第五段】

    \n

    书曰:“郑伯克段于鄢。”段不弟,故不言弟;如二君,故曰克;称郑伯,讥失教也;谓之郑志。不言出奔,难之也。

    \n

    这一段是《左氏春秋》对春秋的注解。这一整篇文章,对应《春秋》原文就六个字“郑伯克段于鄢”。《左氏春秋》对这六个字展开讲解,就拓展成了这一篇文章,现在是来讲:“郑伯”意味着啥、“克”意味着啥、“段”有啥含义、“于鄢”又是出于什么考虑,体现的是《春秋》的微言大义,用什么字都很有讲究。

    \n

    如果比照《春秋》对其他君主的称呼,这里应该是“庄公”而不是“郑伯”,之所以用“郑伯”,是为了讥讽庄公,点明他是大哥,对于弟弟有管教的责任,但庄公没有尽到管教的义务。克,一般用来形容平级之间的对抗,胜利的一方“克”失败的一方,这儿虽然庄公和共叔段不是平级,但是类似于两个国君在斗争,所以用“克”,而不用“征”“讨”“伐”之类的词。共叔段自身也有做错的地方,没有尽到自己做弟弟的义务,所以不合格,这里就不用“弟”,而用“段”来称呼。“于鄢”指的是,这件事只写到共叔段在鄢这个地方失败了,没有写他跑出国及以后的事,可能是《春秋》感到后面的事儿不好下笔,于是就只讲到“于鄢”这里。

    \n

    六、【原文第六段】

    \n

    遂置姜氏于城颍,而誓之曰:“不及黄泉,无相见也。”既而悔之。颍考叔为颍谷封人,闻之,有献于公,公赐之食,食舍肉。公问之,对曰:“小人有母,皆尝小人之食矣,未尝君之羹,请以遗之。”公曰:“尔有母遗,繄我独无!”颍考叔曰:“敢问何谓也?”公语之故,且告之悔。对曰:“君何患焉?若阙地及泉,隧而相见,其谁曰不然?”公从之。公入而赋:“大隧之中,其乐也融融!”姜出而赋:“大隧之外,其乐也泄泄。”遂为母子如初。

    \n

    翻译:凯旋而归的郑庄公恼怒母亲武姜,就将其放逐到了城颍,并发誓说:不到黄泉,咱们就别相见了。后来呢,郑庄公又后悔了。颍考叔为颍谷的边将,听说了这件事,就献给庄公一些礼物。庄公请他吃饭,他把肉留下不吃。庄公问他原因,他说:“小人有母亲,小人的食物她都尝过,但没尝过君主的肉羹,请允许我把肉羹带给她。”庄公说:“你有母亲可孝敬,就我没有!”颍考叔说:“请问你这话是什么意思?”庄公对他说了原因,并说现在很后悔。在这种情况下,颍考叔建议,何不挖一条地下隧道,取名为“黄泉”,然后母子在此相会。郑庄公大喜,就命人挖了一条可见地下水的隧道,并请母亲前来。郑庄公见到母亲后,非常高兴,说:大隧之中,其乐也融融。武姜随之回应道:大隧之外,其乐也泄泄。这就是成语“其乐融融”的来历。母子两个和好如初了。

    \n

    看上去合家欢的大结局,背后透露出了什么信息呢?

    \n

    1. 为什么要置姜氏与城颖?

    \n

    按理来讲,武姜都失败了,已经被抓到错处了,直接打入冷宫软禁起来不就可以了吗?何必多此一举,流放到城颖?有可能出于以下三种考虑:

    \n

    第一,郑庄公要向国人表明态度,武姜是共叔段叛乱的重要同犯,并不是无辜的,所以要流放给大家看。

    \n

    第二,郑庄公趁机清洗了武姜留下来的势力,斩断周平王的干扰,从而把郑国的两派力量捏合成了一个整体。

    \n

    第三,出于个人感情,确实对这个厌恶自己的母亲反感了,想着眼不见心不烦了。

    \n

    2. 庄公为什么要后悔?

    \n

    从《左氏春秋》的角度来讲,肯定是郑庄公渴望母爱,孝子的心发作了,所以后悔了。

    \n

    政治人物考虑事情哪有这么简单。最大的可能是,郑庄公从胜利的欣喜中冷静了下来,忙完了之后发现,这件事产生了很不好的政治影响。

    \n

    无论国内国外,都可能会攻击庄公:你郑庄公不孝啊,竟然把自己的母亲流放了,还永不相见。随着时间的流逝,大家只会记得庄公流放了武姜,谁还能记得因为啥流放武姜呢?

    \n

    所以庄公出于政治考虑,想着挽回一下影响。

    \n

    3. 演员颍考叔出场。

    \n

    这是一段很有意思的互动,我们可以好好研究一下。

    \n

    颍考叔是郑国大夫,得知了这件事,就来给庄公送礼,两个演员就此碰面。庄公赏赐颍考叔吃饭,颍考叔把肉挑出来,准备带回家。庄公问,你这是几个意思?颍考叔说,我家里有老母亲,没吃过国君赏赐的肉,我带回去给她尝尝。都是千年的狐狸了,还玩儿什么聊斋呀,庄公自然知道这位大臣是冲着什么来的了,于是也就演上了:唉,你能孝敬母亲,但是我不能。

    \n

    注意,颍考叔的下一句话情商很高,确实是个好演员:国君这是何出此言呢?

    \n

    你看,你颍考叔就是冲着这件事儿来的,但是你不能在国君面前表现得你什么都知道。不然领导会想,怎么滴,你平时对我的八卦很感兴趣吗?领导后悔了是领导的事,你替领导说出来,那可就是你的不对了。颍考叔人精,自然不会犯这种错误。

    \n

    于是两个人就能继续演下去,庄公诉苦,颍考叔出主意,庄公采纳。

    \n

    从此之后,颍考叔就进入了国君的视野,你看,多棒的演出。

    \n

    4. 庄公与武姜的对手戏。

    \n

    颍考叔导演都已经给出剧本来了,庄公也答应演出了,台阶给到武姜了,请问你武姜肯不肯顺坡下驴呢?武姜这时候也知道大势已去,再硬挺着,下半辈子只能在城颖被软禁到死了,于是,武姜也服软了。

    \n

    在设置好的场景中,庄公出场,还做了首诗:隧道之中,真开心啊;武姜也配合得很好,应和一首:隧道之外,也很开心。

    \n

    这样在外人面前,双方都找到了台阶下,就和好如初了。

    \n

    可是,武姜和庄公心里都清楚,随着共叔段的出走,庄公“他邑唯命”的阶段已经过去了,该轮到你武姜“唯命是从”了。

    \n

    七、升华与总结

    \n

    【原文第七段】君子曰:“颍考叔,纯孝也,爱其母,施及庄公。《诗》曰:‘孝子不匮,永锡尔类。’其是之谓乎!”

    \n

    这就是《左氏春秋》闭着眼睛硬给这篇文章上价值了,大家都要学习孝子颍考叔,孝敬父母。魏禧《左传经世钞》点评颍考叔“敏妙”,真是火眼金睛啊。

    \n

    从这篇文章中,我们能学到什么东西呢?

    \n
      \n
    1. 当你实力不足的时候,千万不要轻举妄动,要忍辱负重,静待时机。
    2. \n
    \n

    2. 形象很重要,特别是弱势的形象,能够争取大家的同情,建立统一战线,孤立对手。

    \n

    3. 对于部下来说,在重大的抉择面前,有些废话你必须说。你说了,才能表明你的态度,不说,就不能站队。

    \n

    4. 古人写书,用了太多的春秋笔法,这也是个门槛。你能看透利益关系,你就能发现字里行间的血迹和“吃人”;如果你看不透,你就会觉得这篇文章真是一个生动的案例,武姜那么欺负人,庄公最后还是这么孝顺,太感人了,看来孝心是人的本能,然后你就会被儒家思想逐渐洗脑。

    \n

    5. 庄公这么做,是不是太过分了?从《春秋》的立场来看,觉得庄公和共叔段太不讲兄弟情谊,双方都有错误,各打五十大板。但是,从郑国国家利益的角度来看,庄公通过老辣的政治手腕,稳稳地控制局面,防止了国家分裂和社会动荡,将郑国的损失降到最小,最大程度保留和整合了郑国的力量,这简直是大大的有功好吧。

    \n

    6. 当二把手推你出来跟一把手唱对台戏的时候,如果一把手轻易地退让了,你可千万别欣喜若狂,自觉老子天下第一。注意谨慎、低调,向一把手表现出自己的身不由己,心底里时刻警惕来自一把手的打击报复。不然的话,人家捧杀你,你还不知道,你肯定要被人家算计到死。

    \n

    第二、三、四篇也写出来了,请大家批评指正!

    \n

    经常看书的人和不看书的人有什么区别?执白:《谏逐客书》背后的故事为什么网友都说董宇辉善良、老实,从哪里看出来的?你见过哪些父母惊艳到你的教育方式?

    \n

    码字不易,欢迎大家点赞关注评论收藏。

    \n

    征集令:大家想看春秋战国期间的哪个历史故事的深度解读?欢迎发到评论区。每一条评论我都会看,我会尽力先写大家想看的那段故事。发出来之后会专门艾特想看的朋友哦!

    \n
    \n
    \n\n\n\n\n
    \n\n\n\n", + "content": "
    \"头图\"/
    \n

    当我发现我看懂了《郑伯克段于鄢》,我才明白,读书是真有用啊。

    \n

    《郑伯克段于鄢》这篇文章,有很高的历史地位和文学地位。

    \n
    \"\"
    \n

    中国人为什么重视历史,第一当然是因为我们历史长,历史中有足够多的故事,能给我们足够多的经验和教训,不像某些国家只有几百年的历史,历史太短,就不能全面地总结规律;第二是因为,中国的历史都是血的教训,意义重大,只不过,我们在语文课本里、历史课本里学的时候,因为没有社会阅历,看不懂。等我们步入社会,再回头来看历史,才发现中国的历史真是字字泣血,句句如山,早已经把一切都告诉我们了。

    \n

    扯远了,还是谈一谈《郑伯克段于鄢》中,作者到底给我们讲了一个怎样的故事吧。

    \n

    一、【原文第一段】

    \n

    初,郑武公娶于申,曰武姜,生庄公及共叔段。庄公寤生,惊姜氏,故名曰寤生,遂恶之。爱共叔段,欲立之。亟请于武公,公弗许。

    \n

    直译就是,姬姓国郑国的国君(名叫姬掘突,也就是)郑武公娶了(姜姓国)申国国君申侯的女儿,这个女人被称作“武姜”,生了两个儿子,一个就是后来的庄公,一个是共叔段。武姜在生庄公的时候,庄公难产,武姜受了很大的惊吓,所以给大儿子庄公起了个小名,叫寤生,而且,武姜对这个大儿子很反感。相反,武姜喜欢自己的小儿子共叔段,想立他为储君,也就是想让小儿子郑武公的接班人。多次向郑武公请示这个想法,郑武公不答应。

    \n

    这段话里面就有很有意思的故事。

    \n

    1. 要先讲讲郑国的来历。

    \n

    郑武公的父亲郑桓公,是郑国的开国国君,名叫姬友(不要想歪了啊,人家真叫这个名字,姬姓,郑氏,名友,受封前称王子友),是周宣王同父异母的弟弟。郑桓公在公元前 806 年,被分封到荥阳这个地方,建立郑国。根据《史记·卷四十二·郑世家第十二》记载“宣王立二十二年,友初封于郑。封三十三岁,百姓皆便爱之。”这位姬友同志挺有政治手腕的,作为开国国君,治理国家能够得到人民的爱戴。于是呢,被自己的侄子周幽王(也就是烽火戏诸侯的主角)召回王室,担任司徒。

    \n

    这位司徒回到周王室,发现自己这个侄子不大行啊,宠爱褒姒,而且诸侯逐渐开始有反叛的苗头。所以,郑桓公开始给自己留后路了。具体做了两件事:第一件是把郑国向东迁到虢、郐这个地方,这两个地方的国君向这位朝中大佬、天子的亲叔叔献上了十座城池,于是郑国就在这个地方扎下根来。第二件事,郑桓公让自己的儿子姬掘突向当时的太子宜臼靠拢。后面我们就能看到郑桓公的英明之处,这位开国国君指导自己儿子玩儿政治投机是一把好手。

    \n

    2. 郑武公是一个什么样的人。

    \n

    老国君郑桓公安排完后路,第二年,周幽王就惹出了乱子。为了赢得美人褒姒的一笑,烽火戏诸侯,并且还要废黜了申侯的女儿王后、外孙太子姬宜臼,而改立褒姒母子为王后和太子,所以申侯一气之下,起兵反叛,联合缯国、犬戎攻打周幽王。在这场叛乱中,周幽王和郑桓公一同被杀。郑桓公去世之后,儿子郑武公继位,正式登上政治舞台。这位郑武公上任干的第一件大事,就是联合秦襄公、晋文侯、卫武公拨乱反正,拥立原来的太子宜臼登基,史称“周平王”。郑武公号召郑国的国民,帮助周平王将王室向东搬迁到洛邑,从此,中国历史进入了东周时代。

    \n

    郑武公这么卖力给周平王干活,得到了什么好处呢?郑武公又被封为司徒,也就是继承了老父亲的官职。郑武公和自己的儿子郑庄公都被周王室封为卿士,可以说,这里郑国的权力有点“挟天子以令诸侯”的感觉了。这里就能看出提前下注的好处了吧。

    \n

    3. 郑武公为什么要娶武姜?

    \n

    申国国君也就是申侯,这个人把犬戎人引进镐京,干掉了自己的女婿周幽王和郑桓公,自己的外孙还当上了周王。因为犬戎人把周王室祸害的太厉害了,老百姓都对申侯这个人比较反感。郑武公呢,不用说了,自己的杀父仇人,不共戴天之仇啊。

    \n

    那郑武公岂不是娶了杀父仇人的女儿?

    \n

    理论上来讲,确实是这样的。史书对这件事没有详细的描述。我想,这肯定是一场政治婚姻,周平王为了控制和约束郑武公,用亲上加亲的借口,让自己的亲姨妈嫁给了自己的叔叔郑武公。这下好了,郑武公给周平王既当叔叔又当姨夫,你还好意思欺负自己的外甥兼侄儿吗?周王都给你指婚了,你说你姬掘突同志能推辞不?所以大概率,郑武公对这桩婚事是不满的,不过为了大局考虑,只能捏着鼻子认了。这估计也为后来郑武公跟周平王交恶埋下了种子。

    \n

    4. 武姜仗着娘家背景强大,骄横跋扈,对郑国指手画脚。

    \n

    第一,从一个正常人的角度,母亲生儿子的时候因为难产险些丧命,所以厌恶自己的这个儿子,这也还能理解,但是给自己的儿子起个小名叫“难产”(寤生),是不是就有点过分了?可想而知,后来的郑庄公,对自己这位母后是什么感官了。

    \n

    第二,在分封制的体制下,立长立嫡,是国家传承的基本原则。西周时代,在立谁为储君的问题上,已有公论。正常情况下,只要庄公没什么大毛病,肯定就是储君的天然人选,哪轮得到武姜一个妇人在这儿说三道四的。在立储这么敏感的问题上,武姜就因为自己的喜好,就想扶小儿子上位,而且,还是屡次请求没有得到准许。

    \n

    各位看到这儿,大概已经明白,国君的意思已经很清楚了,就是要立自己的大儿子。你武姜请示一次被拒绝后,还不赶快夹起尾巴好好做人,去找自己的大儿子未来的国君弥补一下关系,反而屡次向郑武公提请求,这分明是不把郑武公放在眼里啊。

    \n

    这说明,郑国上层,存在两个山头,一派是郑武公为首,大儿子郑庄公坚定站自己老爸;另一派是武姜为首,政治诉求是拥立自己的小儿子共叔段当国君,这很有可能是来自武姜的外甥周平王的授意和支持。如果武姜能够成功,其实就相当于周平王这一系实际掌控住了郑国,也就不怕郑国臣大欺君了。

    \n

    5. 郑国咽不下被干涉内政这口气。

    \n

    郑武公好歹也是一路杀出来的一代雄主,干了不少大事:护送周平王东迁,攻灭东虢国和郐国,吞并周边鄢、蔽、补、丹、依、弢、历、莘八邑。现在看到自己当年拼了老命保下来的周平王不但不对自己这个叔叔感恩戴德,还想着将我郑国纳入你周王室的控制之下,这哪能忍得了?老子现在搞不动你,等老子的儿子搞你。在郑武公的培养之下,儿子郑庄公最终成为一代霸主。

    \n

    所以就有了《古文观止》的第二篇《周郑交质》。这个故事我们下次再讲,看郑庄公是怎么狠狠打脸周平王的。

    \n

    二、【原文第二段】

    \n

    及庄公即位,为之请制。公曰:“制,岩邑也,虢叔死焉,他邑命。”请京,使居之,谓之京城大叔。祭仲曰:“都城过百雉,国之害也。先王之制:大都不过参国之一,中五之一,小九之一。今京不度,非制也,君将不堪。”公曰:“姜氏欲之,焉辟害?”对曰:“姜氏何厌之有!不如早为之所,无使滋蔓,蔓难图也。蔓草犹不可除,况君之宠弟乎!”公曰:“多行不义,必自毙,子姑待之。”

    \n

    大白话翻译一下:

    \n

    武姜在郑庄公继位之后,还不死心,想让郑庄公把“制”这个城池分封给自己的小儿子共叔段当领地。郑庄公找了个理由:制这个城池,是险要之地,虢叔就是死在那个地方的,兆头不好,你给弟弟另挑个别的地儿,我都答应。武姜于是请求把京邑分封给共叔段,庄公答应了,于是人们称共叔段为京城太叔。

    \n

    这时候一位叫祭仲的大臣看不过去了,私底下跟庄公说:一个都市的城墙超过三百丈,这个都市就太大了,将危害到国家安全。按照以前的制度,大的城池不能超过国都的三分之一,中等城池的城墙不能超过国都的五分之一,小城池的城墙不能超过国都的九分之一。现在京邑太大了,分封给共叔段不符合制度,恐怕会给你造成隐患。

    \n

    庄公手一摊:母后姜氏想这么干,我有什么办法,有害也只能承受了。祭仲说:姜氏胃口太大,没有满足的时候,不如早做谋划,不要让他们的势力膨胀起来,膨胀起来将像藤蔓到处滋生一样难以铲除了。藤蔓都除不干净,更不用说你的亲弟弟了。郑庄公大手一挥:多行不义必自毙,你等着看(我怎么收拾他)就行了。

    \n

    这段话又讲了什么故事呢?

    \n

    1. 第一个交锋在于,武姜请求封共叔段到制这个地方。

    \n

    你武姜是不是有点太蹬鼻子上脸了?太子登基之前你想着废太子,太子登基之后,你仗着自己是太后,不但不夹起尾巴做人,反而找新君给自己小儿子请求封赏,还是一个如此要害的城池,这是想干嘛呀?这不是拿郑庄公当傻子么?

    \n

    注意了,朋友们,郑庄公继位的时候,只有 13 岁。13 岁的一个孩子, 武姜不拿他当回事儿,也就可以理解了,可能是觉得小孩子好糊弄。

    \n

    但是,郑庄公能成为春秋一霸,政治天分可能早早就开发出来了。《毛泽东 1959 年 12 月至 1960 年 2 月读苏联政治经济学(教科书)的谈话记录》中记载,毛泽东曾说:春秋时候有个郑庄公,此人很厉害,他对国内斗争和国际斗争都很懂得策略。所以,就是这个 13 岁的孩子,一眼就看穿了武姜的图谋。

    \n
    \"\"
    \n

    按郑庄公的说法:制,是一个险要的地方。这个地方险要到什么程度呢?地处郑国最北端,北依黄河 ,岸如绝壁,控此一地可制郑国全境,又是东方诸侯通向周王朝首都洛邑的必经之地,是郑国商业发展的重要关口,后世称之为“虎牢关”。

    \n

    虎牢关这个名字大家可能更熟悉一些,刘邦死守这里连项羽都打不进去,刘邦和项羽在此地“大战七十,小战四十”,三英战吕布也发生在这里,李世民也是在虎牢关一战拿下王世充、窦建德。

    \n

    1944 年,日本人动用铃木旅团步骑五六千人,炮二十余门,战车及装甲车七八十辆,想要攻打虎牢关,被路云亭率领一个营的兵力阻击七天七夜,最后路云亭部以伤亡四百余人的代价,歼敌 2500 人。(详见荥阳网《虎牢阻击战——虎牢关最后一场大战》)

    \n

    虎牢关北面是黄河,南边是嵩山,能够通行大军的路就只有一段狭长的河谷地。这么险要的地方,郑庄公心里有数,肯定是不可能给自己这个亲弟弟的。所以“虢叔死焉”,不吉利,只是个堵武姜嘴的借口罢了。我要是给了你这个城池,将来打不下来可怎么办。

    \n

    郑庄公还来了一句“他邑唯命”,意思是其他地方你指哪儿就是哪儿,都听你的。各位,如果国君跟一个大臣说“我都听你的”,这个大臣就要掂量掂量自己能不能活到明天早上了,你敢给国君下“命”令?

    \n

    武姜也不知道真傻还是假傻,愣是没听出来郑庄公话语中的不满,再一次向作死的路上迈出了一大步。《古文观止》的作者吴楚材和吴调侯点评“他邑唯命”,说是“四字毒甚”。

    \n

    2. 第二次交锋在于,武姜请求封共叔段到京邑。

    \n

    京邑是个什么地方呢?很有可能是整个郑国除了都城新郑之外,最大的城池。城池越大,人口越多,赋税、粮草越多,能够供养的兵马也就越强。所以,武姜之心,简直是路人皆知。更神奇的操作来了,郑庄公同意了这个请求。这里就是郑庄公政治手腕儿高超的地方了。我们一层一层来分析。

    \n

    第一层,表面上看起来,郑庄公话都已经说出口了:其他地方随便挑。这时候人家真好意思挑最大的地方了,你要是说不给吧,好像国君有点不守承诺的意思,都说君无戏言嘛。所以,看起来,郑庄公是被自己的话逼到了墙角。

    \n

    第二层,郑庄公通过装傻充愣,瞒过了武姜和共叔段,也养成了共叔段骄傲自大的心理。郑庄公什么都看破了,但是就是不说,也不表现出来,武姜自然被蒙在鼓里,觉得自己这个儿子还是很好拿捏的嘛,连带着,武姜的小儿子也渐渐看不起自己这个哥哥了,觉得自己实力强了之后,完全能够拿下郑国。郑庄公这一下拿捏了人性,骄人之心,把武姜和共叔段吃得死死的。

    \n

    第三层,郑庄公不是不知道京邑的重要性,这从后面他跟祭仲的对话就能看出来。为什么他还同意把共叔段封到京邑呢?为了郑国表面上的和谐和稳定。要知道,武姜这一派山头可不仅仅是武姜和共叔段两个人,上头还有个周天子呢,下面可能还有支持武姜的文武大臣等势力。一旦这时候就跟武姜撕破脸,两方斗起来,才 13 岁的郑庄公能不能服众还不知道呢,避免不了郑国混乱衰弱的局面,反而容易让周王室看到机会。所以,也可以称郑庄公这一招是以空间换时间。

    \n

    第四层,从小被郑武公教育大,郑庄公深刻知道,要执政,最重要的是民心。郑庄公通过忍让,退步,让老百姓和中立派向自己靠拢。老百姓会觉得,人家国君都这么忍让了,你们武姜母子俩还这么得寸进尺,公然违反国家制度(先王之制),实在是太欺负人了。自然而然,时间一长,民意就站在了郑庄公一边。同时,在国际上也拥有了良好的声誉,大家都知道,郑庄公是个孝顺的国君。这样,人设也就立起来了。

    \n

    相较于这些收获,一个随时能拿回来的京邑,根本什么都不算。为什么说随时能拿回来的京邑呢?我们后面再讨论这个问题。

    \n

    3. 祭仲与郑庄公的讨论。

    \n

    祭仲何许人也?这位春秋第一权臣,一生辅佐了郑国的五位国君,他的政治履历长达半个世纪,在郑庄公死之后,祭仲可谓是权势滔天,权力上升到了可以废立国君的地步。

    \n

    这样一个大臣,私下来向国君阐述自己的忧虑,并指出京城太叔违反了“先王之制”,要求国君早做谋划,除掉京城太叔。看起来像是一个忠诚到不能再忠诚的忠臣。

    \n

    实际上呢?

    \n

    我认为,这更像君臣之间的一次试探。都在这玩儿狼人杀呢。

    \n

    大臣明面上是在讲自己为国家担忧,实际上是在投石问路,看看你郑庄公究竟是个什么水平。要是京城太叔这事你都看不出来,没点城府,大臣一讲完你就大惊失色,大呼“这可如何是好”,那人家大臣就明白了,你国君就是个草包而已,指不定这个权臣现在就能放手做大。

    \n

    这边国君呢,还保持着自己无辜受害者的人设,回了一句:母后想要这样,我有啥办法?你看,一句话,既表明了自己是被动的,是受害者,又暗示了“我知道这是怎么回事儿,就是演给他们看看”。

    \n

    祭仲这时候已经把握住了国君的心态,又更近一步:要不咱现在就开始谋划着,除掉他们?这句话,其实是废话。既然郑庄公已经意识到了危害,不可能不严加防备,用不着你祭仲来多这句嘴。那祭仲这句话是表达什么意思呢?一方面,站队表忠心,向国君提出这个建议以表明自己不是武姜的人。另一方面呢,试图进入国君的决策圈子,要是国君能让我来执行这件事,咱祭仲不就成了国君的心腹了吗,帮国君背锅要是成了,可就简在帝心了哇。

    \n

    4. 郑庄公的经典回答。

    \n

    郑庄公是怎么回答祭仲的呢?“多行不义必自毙,子姑待之。”这也成为一个中国经典成语。

    \n

    这句话真的太经典了,很值得细细品味。

    \n

    第一,郑庄公告诉祭仲,我心里有数,你等着看戏就行了。这句话既显示了帝王的城府,又没有把自己的安排向手下人和盘托出,保持了神秘感。

    \n

    第二,在这种心机深沉的帝王面前,祭仲把不准脉,就不敢放肆。后来庄公在世时,祭仲老老实实地干活,到了郑庄公死后才敢出来蹦跶。

    \n

    第三,这时候郑庄公可还没充分信任你祭仲呢,哪敢让你知道或者参与这么大的事情,用人不疑疑人不用可是基本原则。后来的光绪皇帝就是没有学明白郑庄公这个经验,轻信袁世凯能帮他拿下慈禧,最终身陷囹圄,死得也不明不白。

    \n

    三、【原文第三段】

    \n

    既而大叔命西鄙、北鄙贰于己。公子吕曰:“国不堪贰,君将若之何?欲与大叔,臣请事之;若弗与,则请除之。无生民心。”公曰:“无庸,将自及。”大叔又收贰以为己邑,至于廪延。子封曰:“可矣,厚将得众。”公曰:“不义不昵,厚将崩。”

    \n

    翻译大意:

    \n

    太叔让西鄙北鄙这两个城邑也向自己效忠,甚至最后把这两个城邑收归自己所有,地盘扩大到了廪延这个地方。这时候大臣们都看不过去了,公子吕向郑庄公进言:这个国家都快要有两个主人了,共叔段得到了更多的物资和地盘,能够武装更多的人马,不能再忍让了,该出手了。郑庄公说:没事儿,不要着急,让他作吧,光有物资可笼络不住那么多的人马,你看他是怎么玩儿完的。

    \n
    \"\"
    \n

    1. 共叔段的势力膨胀到了什么地步?

    \n

    “鄙”是春秋时期边邑的称呼,《说文解字》云:“五酂为鄙,百家为酂”,因此一​鄙​约为五百家。如果这个说法是靠谱的,那么西鄙北鄙加起来至少有 1000 户,如果平均一户 5 口人,一户人家能出 1 人作战的话,共叔段从西鄙北鄙这里就能得到一支 1000 人的军队。

    \n

    汉朝的刘向编写了《战国策书录 - 叙》,其中讲:战国晚世,万乘之国七,千乘之国五,敌哞争权,盖国战国。意思是拥有万乘兵车的大国七个(战国七雄),拥有千乘兵车的有五个国家(鲁,宋,中山,卫,郑)。要知道,郑国这时才立国三代,还处在春秋前期,估计还称不上是个千乘之国。

    \n

    古代的作战单位,一乘,指一辆战车、四匹马、三个甲士,战车周围还要配备一定数量的步卒。如果按照一乘 20 个人来算,1000 个人也能组个 50 乘了。这可还没算上京邑能动员的兵力。所以大致估算,共叔段怎么也该有个 100-200 乘以上的兵力了。

    \n

    2. 公子吕表态意味着什么?

    \n

    公子吕是新出场的人物,他是何许人也?

    \n

    公子吕是郑武公的弟弟,姓姬名吕,字子封,公子吕也就是郑庄公的叔叔。作为郑国国君的“皇叔”,他能代表的可不只是他一个人的意见,而是整个郑国公室的意见。公子吕出来跟郑庄公讲话,这就说明除掉共叔段,拿下武姜,摆脱周天子钳制,已经成为郑国公室的一致意见。

    \n

    公子吕第一次出场,还是用激将法,催庄公下决心,免得老百姓无所适从。但是庄公确实是对自己有信心,稳坐钓鱼台:不着急,让他继续作,他快作到头了。

    \n

    公子吕第二次出场,就更直接了一些:到时候了,再让他武装起来,咱可就对付不了了。这里说明,郑国公室,对于郑庄公确实是鼎力支持了,很可能支持了军队。但是大概这个军队数量并不是很多。公子吕可能觉得,凭自己手里的军队,现在对付共叔段还行,要是共叔段手里人更多的话,可能就对付不了了。说白了,冷兵器时代,没那么多花哨的战术,在没法玩儿太多阴谋的情况下,比人数是最直接的。这里也能看出,共叔段确实可能拥有超过 100 乘的军事力量。

    \n

    3. 为什么庄公这么有底气?

    \n

    第一,庄公本来的用意,就是通过表现得宽容、退让,获得民心和公卿大臣们的支持。等的时间越长,共叔段造反的迹象越明显,也就能让庄公获得更多人的效忠,也更能看明白哪些人是一定要站在我对立面的、将来一定要铲除的人。所谓大势在我,时间站在自己这一边,当然庄公不会着急。

    \n

    第二,庄公可以借此探一探郑国公室的底。我上位这么长时间了,母后和弟弟这么欺负我,你们这些叔伯长辈就这么看着,也不说出来支持一下,现在坐不住了,想出来维持局面了,那也得咱国君点头不是?你想动弹可以啊,给咱交个底,你们手里有多少能动用的力量,都交给我来指挥。咱国君不允许有不听话的军事力量存在。

    \n

    第三,庄公有自己的底牌,能够确保自己不会输,局势还在自己的掌控之中。这个底牌我们前面提过一句,这里先略过,后面再讲。

    \n

    第四,现阶段就打击共叔段,不一定能一击致命。虽然共叔段做得不合规矩,但是毕竟是国君的亲弟弟,只要还没有确凿的证据证明他谋反,武姜求求情,说不定共叔段就被保下来了呢?而且,这样也不可能抓到武姜的把柄,不可能把武姜拉下来,砸碎她的势力,斩断周天子的触手。

    \n

    四、【原文第四段】

    \n

    大叔完聚,缮甲兵,具卒乘,将袭郑。夫人将启之。公闻其期,曰:“可矣!”命子封帅车二百乘以伐京。京叛大叔段,段入于鄢,公伐诸鄢。五月辛丑,大叔出奔共。

    \n

    翻译:太叔这边做好了充分的准备,厉兵秣马,准备好偷袭新郑了,武姜都要做内应给太叔开门了。郑庄公听说了他们发动的日期,做出判断:时机成熟了,动吧。于是公子吕率领二百乘去讨伐京邑。京邑背叛了太叔,太叔只好跑到鄢这个地方。庄公又讨伐鄢,于是五月二十三日,太叔逃到了国外(共国)。

    \n

    这个部分虽然简短,却是整个故事的高潮部分,寥寥数笔,共叔段要偷袭,共叔段失败了,共叔段逃跑了,故事讲完了。春秋如椽大笔,确实笔力雄健,不服不行。真正有意思的细节,也在这一段中。

    \n

    1. 共叔段到底是什么水平。

    \n

    其实,纵观全文,共叔段都没有正面出场过,都是在庄公与大臣们对话的场景下,作为背景介绍出现的。我们确实无从知道共叔段的政治手腕。但是,作为一个要造反的主,自己的一举一动都摆在君王的眼皮子底下,连大臣都知道你要干什么,也能看出,至少共叔段是一点保密意识都没有,轻易就能被外人获知信息。“事以密成,语以泄败”的常识都没有,不死才怪。

    \n

    再者,共叔段不懂民心和政治规矩。你越想夺权,越想上位,越不能表现出一副咄咄逼人的样子,相反,你要学王莽,推辞、低调、谦虚才行。你手里没有啥实力的时候,就仗着武姜撑腰,一副郑国要跟我姓的姿态,难免会惹人反感。

    \n

    2. 庄公掀开了底牌。

    \n

    其实说到这里,相信大家已经看出来了,庄公早就在京邑埋下了自己的伏笔,留下了关键的后手。从什么时候开始的呢?至少是庄公说“多行不义必自毙”这句话之前。要知道,郑伯克段于鄢这个战斗发生在郑庄公二十三年,也就是说,庄公这个伏笔,硬生生埋了二十多年,一直忍到王师来的那一天。所以,才有子封伐京,京马上就“叛太叔段”。而且,这应该不是一个人,很可能是一股势力,或者一个组织、一个集团,扎根在京邑。

    \n

    如果说这是老国君郑武公给儿子留下的死忠,那也就罢了。如果是十三岁的小君王就懂得笼络人心,还能让人死心塌地在敌营中待了二十二年,那这就太可怕了。

    \n

    此外,庄公在武姜身边,同样埋有间谍,所以,庄公才能准确获知共叔段的偷袭日期。这是一定的,不然,庄公不可能这么有把握,这么有底气。军国大事,碰运气可不行,肯定是存在万全的准备才敢这么玩儿的。

    \n

    3. 共叔段死没死?

    \n

    共叔段应该是本来被称为“叔段”,到跑到共国之后,才被世人称为共叔段。共叔段跑到共国之后的事情,《左氏春秋》没有继续交代,我们也无从得知。没有写出来,就是留白,给大家自己想象的空间,都有可能。但是,我认为,就郑庄公这个腹黑加老谋深算的性格来说,不太可能给自己留下这么一个明显的隐患。春秋战国时期,买凶杀人的故事史书上讲得多了,多郑庄公一个不多,少他一个不少。

    \n

    五、【原文第五段】

    \n

    书曰:“郑伯克段于鄢。”段不弟,故不言弟;如二君,故曰克;称郑伯,讥失教也;谓之郑志。不言出奔,难之也。

    \n

    这一段是《左氏春秋》对春秋的注解。这一整篇文章,对应《春秋》原文就六个字“郑伯克段于鄢”。《左氏春秋》对这六个字展开讲解,就拓展成了这一篇文章,现在是来讲:“郑伯”意味着啥、“克”意味着啥、“段”有啥含义、“于鄢”又是出于什么考虑,体现的是《春秋》的微言大义,用什么字都很有讲究。

    \n

    如果比照《春秋》对其他君主的称呼,这里应该是“庄公”而不是“郑伯”,之所以用“郑伯”,是为了讥讽庄公,点明他是大哥,对于弟弟有管教的责任,但庄公没有尽到管教的义务。克,一般用来形容平级之间的对抗,胜利的一方“克”失败的一方,这儿虽然庄公和共叔段不是平级,但是类似于两个国君在斗争,所以用“克”,而不用“征”“讨”“伐”之类的词。共叔段自身也有做错的地方,没有尽到自己做弟弟的义务,所以不合格,这里就不用“弟”,而用“段”来称呼。“于鄢”指的是,这件事只写到共叔段在鄢这个地方失败了,没有写他跑出国及以后的事,可能是《春秋》感到后面的事儿不好下笔,于是就只讲到“于鄢”这里。

    \n

    六、【原文第六段】

    \n

    遂置姜氏于城颍,而誓之曰:“不及黄泉,无相见也。”既而悔之。颍考叔为颍谷封人,闻之,有献于公,公赐之食,食舍肉。公问之,对曰:“小人有母,皆尝小人之食矣,未尝君之羹,请以遗之。”公曰:“尔有母遗,繄我独无!”颍考叔曰:“敢问何谓也?”公语之故,且告之悔。对曰:“君何患焉?若阙地及泉,隧而相见,其谁曰不然?”公从之。公入而赋:“大隧之中,其乐也融融!”姜出而赋:“大隧之外,其乐也泄泄。”遂为母子如初。

    \n

    翻译:凯旋而归的郑庄公恼怒母亲武姜,就将其放逐到了城颍,并发誓说:不到黄泉,咱们就别相见了。后来呢,郑庄公又后悔了。颍考叔为颍谷的边将,听说了这件事,就献给庄公一些礼物。庄公请他吃饭,他把肉留下不吃。庄公问他原因,他说:“小人有母亲,小人的食物她都尝过,但没尝过君主的肉羹,请允许我把肉羹带给她。”庄公说:“你有母亲可孝敬,就我没有!”颍考叔说:“请问你这话是什么意思?”庄公对他说了原因,并说现在很后悔。在这种情况下,颍考叔建议,何不挖一条地下隧道,取名为“黄泉”,然后母子在此相会。郑庄公大喜,就命人挖了一条可见地下水的隧道,并请母亲前来。郑庄公见到母亲后,非常高兴,说:大隧之中,其乐也融融。武姜随之回应道:大隧之外,其乐也泄泄。这就是成语“其乐融融”的来历。母子两个和好如初了。

    \n

    看上去合家欢的大结局,背后透露出了什么信息呢?

    \n

    1. 为什么要置姜氏与城颖?

    \n

    按理来讲,武姜都失败了,已经被抓到错处了,直接打入冷宫软禁起来不就可以了吗?何必多此一举,流放到城颖?有可能出于以下三种考虑:

    \n

    第一,郑庄公要向国人表明态度,武姜是共叔段叛乱的重要同犯,并不是无辜的,所以要流放给大家看。

    \n

    第二,郑庄公趁机清洗了武姜留下来的势力,斩断周平王的干扰,从而把郑国的两派力量捏合成了一个整体。

    \n

    第三,出于个人感情,确实对这个厌恶自己的母亲反感了,想着眼不见心不烦了。

    \n

    2. 庄公为什么要后悔?

    \n

    从《左氏春秋》的角度来讲,肯定是郑庄公渴望母爱,孝子的心发作了,所以后悔了。

    \n

    政治人物考虑事情哪有这么简单。最大的可能是,郑庄公从胜利的欣喜中冷静了下来,忙完了之后发现,这件事产生了很不好的政治影响。

    \n

    无论国内国外,都可能会攻击庄公:你郑庄公不孝啊,竟然把自己的母亲流放了,还永不相见。随着时间的流逝,大家只会记得庄公流放了武姜,谁还能记得因为啥流放武姜呢?

    \n

    所以庄公出于政治考虑,想着挽回一下影响。

    \n

    3. 演员颍考叔出场。

    \n

    这是一段很有意思的互动,我们可以好好研究一下。

    \n

    颍考叔是郑国大夫,得知了这件事,就来给庄公送礼,两个演员就此碰面。庄公赏赐颍考叔吃饭,颍考叔把肉挑出来,准备带回家。庄公问,你这是几个意思?颍考叔说,我家里有老母亲,没吃过国君赏赐的肉,我带回去给她尝尝。都是千年的狐狸了,还玩儿什么聊斋呀,庄公自然知道这位大臣是冲着什么来的了,于是也就演上了:唉,你能孝敬母亲,但是我不能。

    \n

    注意,颍考叔的下一句话情商很高,确实是个好演员:国君这是何出此言呢?

    \n

    你看,你颍考叔就是冲着这件事儿来的,但是你不能在国君面前表现得你什么都知道。不然领导会想,怎么滴,你平时对我的八卦很感兴趣吗?领导后悔了是领导的事,你替领导说出来,那可就是你的不对了。颍考叔人精,自然不会犯这种错误。

    \n

    于是两个人就能继续演下去,庄公诉苦,颍考叔出主意,庄公采纳。

    \n

    从此之后,颍考叔就进入了国君的视野,你看,多棒的演出。

    \n

    4. 庄公与武姜的对手戏。

    \n

    颍考叔导演都已经给出剧本来了,庄公也答应演出了,台阶给到武姜了,请问你武姜肯不肯顺坡下驴呢?武姜这时候也知道大势已去,再硬挺着,下半辈子只能在城颖被软禁到死了,于是,武姜也服软了。

    \n

    在设置好的场景中,庄公出场,还做了首诗:隧道之中,真开心啊;武姜也配合得很好,应和一首:隧道之外,也很开心。

    \n

    这样在外人面前,双方都找到了台阶下,就和好如初了。

    \n

    可是,武姜和庄公心里都清楚,随着共叔段的出走,庄公“他邑唯命”的阶段已经过去了,该轮到你武姜“唯命是从”了。

    \n

    七、升华与总结

    \n

    【原文第七段】君子曰:“颍考叔,纯孝也,爱其母,施及庄公。《诗》曰:‘孝子不匮,永锡尔类。’其是之谓乎!”

    \n

    这就是《左氏春秋》闭着眼睛硬给这篇文章上价值了,大家都要学习孝子颍考叔,孝敬父母。魏禧《左传经世钞》点评颍考叔“敏妙”,真是火眼金睛啊。

    \n

    从这篇文章中,我们能学到什么东西呢?

    \n
      \n
    1. 当你实力不足的时候,千万不要轻举妄动,要忍辱负重,静待时机。
    2. \n
    \n

    2. 形象很重要,特别是弱势的形象,能够争取大家的同情,建立统一战线,孤立对手。

    \n

    3. 对于部下来说,在重大的抉择面前,有些废话你必须说。你说了,才能表明你的态度,不说,就不能站队。

    \n

    4. 古人写书,用了太多的春秋笔法,这也是个门槛。你能看透利益关系,你就能发现字里行间的血迹和“吃人”;如果你看不透,你就会觉得这篇文章真是一个生动的案例,武姜那么欺负人,庄公最后还是这么孝顺,太感人了,看来孝心是人的本能,然后你就会被儒家思想逐渐洗脑。

    \n

    5. 庄公这么做,是不是太过分了?从《春秋》的立场来看,觉得庄公和共叔段太不讲兄弟情谊,双方都有错误,各打五十大板。但是,从郑国国家利益的角度来看,庄公通过老辣的政治手腕,稳稳地控制局面,防止了国家分裂和社会动荡,将郑国的损失降到最小,最大程度保留和整合了郑国的力量,这简直是大大的有功好吧。

    \n

    6. 当二把手推你出来跟一把手唱对台戏的时候,如果一把手轻易地退让了,你可千万别欣喜若狂,自觉老子天下第一。注意谨慎、低调,向一把手表现出自己的身不由己,心底里时刻警惕来自一把手的打击报复。不然的话,人家捧杀你,你还不知道,你肯定要被人家算计到死。

    \n

    第二、三、四篇也写出来了,请大家批评指正!

    \n

    经常看书的人和不看书的人有什么区别?执白:《谏逐客书》背后的故事为什么网友都说董宇辉善良、老实,从哪里看出来的?你见过哪些父母惊艳到你的教育方式?

    \n

    码字不易,欢迎大家点赞关注评论收藏。

    \n

    征集令:大家想看春秋战国期间的哪个历史故事的深度解读?欢迎发到评论区。每一条评论我都会看,我会尽力先写大家想看的那段故事。发出来之后会专门艾特想看的朋友哦!

    \n
    \n
    \n\n\n\n\n
    \n\n\n\n", + "category": "", + "link": "https://daily.zhihu.com/story/9782626", + "creator": "", + "pubDate": "Thu, 17 Jul 2025 12:27:03 +0800", + "enclosure": "", + "enclosureType": "", + "image": "", + "id": "", + "language": "", + "folder": "资讯", + "feed": "知乎", + "read": false, + "favorite": false, + "created": false, + "tags": [], + "hash": "7abcb308697f7f873d2ea758d4a0aed0", + "highlights": [] + }, { "title": "瞎扯 · 如何正确地吐槽", "description": "
    \"头图\"/
    \n\n
    \n
    @小队长 :你这话说的,就算全世界国家都提倡吃屎健康,老子也不会吃。
    \n
    \n\n
    \n
    @定序王子 :很明显的造谣,编都不会编,非常低级的那种。 8 亿只是什么概念? 2023 年 ,广东常住人口达 1.27 亿人,算下来平均一人一年只吃 6 只鸡。 改成 300 亿就比较可信了。
    \n
    \n\n
    \n
    @宠物王大拿 :被公司辞退了!! 越想越气!! 然后跑到公司楼下把公司里的小流浪猫打劫走了!!!
    \n
    \n\n
    \n
    @Anjicn :儿子第一次喝可乐,说:就像蜘蛛在舌头上织网。
    \n
    \n\n
    \n
    @摸摸狗头 :有个大胆的想法:每年把珠穆朗玛峰加高 4cm ,是不是就相当于月球就没离开?
    \n
    \n
    \n
    \n\n\n
    \n\n\n\n

    ", @@ -3716,28 +3826,6 @@ "hash": "99b651d543cad1d20b6bf4c9c9210913", "highlights": [] }, - { - "title": "进攻性叫牌与防守性叫牌——波兹南的牌局", - "description": "桥牌其实也一样,只不过桥牌的“进攻”和“防守”,有多重的意义,除了简单的在桥牌打法中表现为做庄与防守外,还有在叫牌中也分为自己抢过来打的“进攻性叫牌”和放给对方打或者叫得较低的“防守性叫牌”。", - "content": "
    \n

    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n
    \n \n \n 新朋友\n \n \n \n \n \n
    \n
    \n

    \n \n \n 点击\n \n \n \n 标兵桥牌\n \n \n \n

    \n

    \n \n \n 关注微信\n \n \n

    \n
    \n
    \n \n \n 老朋友\n \n \n
    \n
    \n

    \n \n \n 点击\n \n \n \n 右上角\n \n \n \n

    \n

    \n \n \n 分享本文\n \n \n

    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n NBA有句格言,叫做“赢球靠进攻、夺冠靠防守”,其实足球、橄榄球等等基本上都一样,防守虽然观赏性不强,但对于成功是非常有帮助的。\n \n

    \n

    \n \n 桥牌其实也一样,只不过桥牌的“进攻”和“防守”,有多重的意义,除了简单的在桥牌打法中表现为做庄与防守外,还有在叫牌中也分为自己抢过来打的“\n \n 进攻性叫牌\n \n ”和放给对方打或者叫得较低的\n \n “防守性叫牌”\n \n 。一般来说,实力强的一方,通常会选择进攻性叫牌,因为只有完成满贯和成局定约,才能获得更高的分数,但也有例外的时候,就是当对方持弱牌介入叫牌、意图干扰时,此时强牌一方就同时了有抢过来自己打的“进攻性叫牌”,和加倍对方或者叫的较低的“防守性叫牌”两个选择。\n \n

    \n

    \n \n 一般来说,牌手们都会“进攻性叫牌”,也就是高叫,但往往忽视“防守性叫牌”的得分能力,特别是在比分落后时,往往“进攻性叫牌”会越输越多,而“防守性叫牌”则是很好的追分办法。\n \n

    \n

    \n \n 6月30日结束的欧洲公开桥牌锦标赛公开团体赛首轮淘汰赛64进32的比赛中,罗森塔尔队就上演了依靠“防守性叫牌”翻盘的一场好戏。\n \n

    \n

    \n \n 4节的比赛打完3节,预赛第2的罗森塔尔队面对第44名的哥本哈根队,落后18IMP,14副牌的比赛虽说这个比分不算多,可是要想扳回也不容易。\n \n

    \n

    \n \n 来看这副牌:\n \n

    \n
    \n
    \n \n
    \n
    \n \n 6♣还可以\n \n
    \n
    \n

    \n \n 南北方是哥本哈根队的保尔森和尼尔森,东西方是罗森塔尔队的舒尔茨和韦兰肯,这副牌是第26副,整场比赛的倒数第3副,此时罗森塔尔队已慢慢将比分赶上,还有6分的差距。\n \n

    \n

    \n \n 西家开叫3♠,北家加倍,东家4♠,南家4NT显示两套牌,北家实力超强,5♠扣叫挺进满贯,他们达到6♣定约。\n \n

    \n

    \n \n 联手牌看起来还不错,只要♦A在西家,就有很大的机会完成定约,即使♦A在东家,也还有双张♦J、♥3-3等机会,综合看起来这个满贯还不错。\n \n

    \n

    \n \n 北家A吃进首攻,然后拔♣A,噩耗传来:\n \n

    \n
    \n
    \n \n
    \n
    \n \n 将牌是5-0,完不成定约了\n \n
    \n
    \n

    \n \n 将牌居然是5-0分布,看上去不错的满贯就此垮掉。\n \n

    \n

    \n \n 全手牌如下:\n \n

    \n
    \n
    \n \n
    \n
    \n \n 东西可以做成4♠\n \n
    \n
    \n

    \n \n 东西方可以做成4♠,南家第一次的判断非常正确,原本他只有5-4两套,而且在低花上只有2个点,计划防守是个合理的选择,因为这副牌在60桌上很多桌都是加倍东西方的4♠而做成,从这一点来说,南家的“进攻性叫牌”选对了。\n \n

    \n

    \n \n 不过,北家并不知道南家的牌如此不堪,他也选择了“进攻性叫牌”,如果南北方在对方阻击叫后因为存在分布的不理想而稍微保守一些,就会得到很好的收益。\n \n

    \n

    \n \n 在另一桌,轮到了东西方采取了“进攻性叫牌”:\n \n

    \n
    \n
    \n \n
    \n
    \n \n 南北方选择加倍对方5♠\n \n
    \n
    \n

    \n \n 西家在第三家的开叫非常进取,他一定是秉承“12张套一定要在4阶以上叫牌”的原则,北家当然加倍,东家进一步挺进5♠,南家布格兰德这牌无疑是“防守性”,所以他Pass静观其变,当巴克再次加倍时,布格兰德选择罚放,他们吃到了200分的正分。\n \n

    \n

    \n \n 这副牌就是典型的实力更强一方需要采取“防守性叫牌”的一例。这副牌罗森塔尔队赢9IMP,一举反先,最后2副牌都在加倍中度过,罗森塔尔队最后赢了18IMP,如果哥本哈根队的南北方停在5♣上并且做成,他们这副牌会赢得9IMP,总比分就会战成平手,那时,谁输谁赢就很难讲了。\n \n

    \n

    \n \n 可谓“会进攻是徒弟、会防守才是师傅”。\n \n

    \n

    \n \n
    \n
    \n

    \n
    \n \n \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n
    \n
    \n

    \n

    \n \n 相关链接:\n \n 技惊四座的Deep Finesse打法\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲公开桥牌锦标赛第一阶段结束、弗姆队获得欧洲混团冠军\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲混团赛场上一副牌的两次安全打法\n \n \n

    \n

    \n \n 相关链接:\n \n 第11届欧洲公开桥牌锦标赛混团预赛结束\n \n \n

    \n

    \n \n 相关链接:\n \n 第11届欧洲桥牌公开锦标赛\n \n \n

    \n

    \n \n 相关链接:\n \n 2023年欧洲公开桥牌锦标赛每日一牌——韦尔萨切的失误,还是对手的高明?\n \n \n

    \n

    \n \n 相关链接:\n \n 第10届欧洲桥牌公开锦标赛\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲公开桥牌锦标赛结束\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲公开赛结束、土耳其人获得公开双人赛冠军\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲冬季运动会结束,奥卡队获得冠军\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲冬季桥牌运动会开赛在即\n \n \n

    \n

    \n \n 相关链接:\n \n 劳伦特当选欧洲桥联主席、期待开启新时代\n \n \n \n
    \n
    \n

    \n

    \n \n 相关链接:\n \n 欧洲桥牌新纪元——欧洲桥牌团体锦标赛回顾\n \n \n

    \n
    \n
    \n
    \n
    \n
    \n

    \n \n 往期推荐\n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n \n 2022年欧洲桥牌团体锦标赛即将开赛\n \n \n

    \n
    \n
    \n
    \n
    \n

    \n \n \n 荷兰加冕欧洲之王\n \n \n

    \n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n \n \n \n \n \n 点击\n \n \n \n \n 阅读原文\n \n \n \n \n \n
    \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n
    \n \n \n
    \n

    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n
    \n

    \n \n \n 别忘了点个在看哦!转发那就太好了!\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n \n

    \n
    \n", - "category": "", - "link": "https://mp.weixin.qq.com/s/MlG5afey3PhW8jkCKRLwNA", - "creator": "标兵桥牌", - "pubDate": "Wed, 02 Jul 2025 00:00:00 ", - "enclosure": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/iauJ3TcMNYDQoJpic0ibsIxaF7GAQVwVTT6eGyFJ2u6u8uRPPuRgRemxz9bYpyyQ9DDobFOOPU8ndsqr7ibKoF7EOQ/0?wx_fmt=jpeg", - "enclosureType": "image/jpeg", - "image": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/iauJ3TcMNYDQoJpic0ibsIxaF7GAQVwVTT6eGyFJ2u6u8uRPPuRgRemxz9bYpyyQ9DDobFOOPU8ndsqr7ibKoF7EOQ/0?wx_fmt=jpeg", - "id": "2247512660_1", - "language": "", - "folder": "桥牌", - "feed": "标兵1桥牌", - "read": false, - "favorite": false, - "created": false, - "tags": [], - "hash": "8cf9f3254a25c91aade7bc229bc8c13b", - "highlights": [] - }, { "title": "美国国家队名单出炉", "description": "5月26日当地时间,美国国家队选拔赛老年团体赛2025年6月1日,美国桥牌协会(USBF)公布了参加2025年世界桥牌团体锦标赛的8支美国队参赛名单。由于美国选拔赛允许一名选手报名多项比赛,因此在选拔赛全部结束后,各个美国国家队进行了调整。", @@ -3759,28 +3847,6 @@ "tags": [], "hash": "904cfda1cd5a396451f15015355b3b1e", "highlights": [] - }, - { - "title": "亚太赛每日一牌回顾:有趣的四红心", - "description": "亚太锦标赛结束了,中国男队夺得冠军,在比赛期间所写的“每日一牌”,比赛期间并没有发出,从今天开始,给桥友们提供迟到的每日一牌。", - "content": "
    \n

    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n \n \n 新朋友\n \n \n \n \n \n
    \n

    \n \n \n 点击\n \n \n \n 标兵桥牌\n \n \n \n

    \n

    \n \n \n 关注微信\n \n \n

    \n
    \n \n \n 老朋友\n \n \n
    \n

    \n \n \n 点击\n \n \n \n 右上角\n \n \n \n

    \n

    \n \n \n 分享本文\n \n \n

    \n
    \n \n \n \n
    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n \n 亚太锦标赛结束了,中国男队夺得冠军,在比赛期间所写的“每日一牌”,比赛期间并没有发出,从今天开始,给桥友们提供迟到的每日一牌。\n \n \n

    \n
    \n

    \n \n 5月17日每日一牌:有趣的4♥\n \n

    \n

    \n \n 在主打时,需要制定计划,找到看似不可能发生但能够完成定约的路线,而找到一条路线时,需要反复确认,是否可行。\n \n

    \n

    \n \n 下面是亚太锦标赛第一循环中国男队对韩国队的一副牌:\n \n

    \n
    \n
    \n \n
    \n
    \n \n 南家主打4♥加倍定约\n \n
    \n
    \n

    \n \n 东家开叫1♦,至少4张以上,南家争叫4♥,转到东家加倍,成为最后定约。\n \n

    \n

    \n \n 南家主打4♥加倍定约,西家首攻♦7,明手的牌看起来没什么用,先摆小,东家A吃, 马上出♦,现在庄家怎么办?\n \n

    \n
    \n
    \n \n
    \n
    \n \n 首攻♦到A,东家再出♦\n \n
    \n
    \n

    \n \n 将牌足够结实,不怕对方提升将牌,♦和将牌各有一个输墩,♠上面的输墩如何逃脱?如果自己手中出♠,至少要输两墩。\n \n

    \n

    \n \n 庄家发现,对方只有3张将牌,而且除了A之外,都是小将牌,假如将牌2-1分布,庄家就是铁牌了。他可以大将吃♦,打小将牌,如果西家是Ax两张,无论他出哪一张,明手都可以进手兑现♦赢墩,并且从明手出♠。\n \n

    \n

    \n \n 再进行下一步行动之前,先考虑一下对方是什么牌,西家是否确定是2张将牌。\n \n

    \n

    \n \n 西家没有叫4♠,不像有4张以上的♠,假如西家是单张♦,同时也只有2张将牌,那么他就是3-2-1-7牌型,他是否会选择叫5♣?如果西家的高花更短,他的♣相应更长,也更不容易Pass。\n \n

    \n

    \n \n 如果大将吃♦,打小将牌到明手的路线成功,需要西家是2张将牌、2张♦、不超过3张♠。\n \n

    \n

    \n \n 实战中,中国男队的庄家决定采取将牌2-1分布的路线,他大将吃♦,打小将牌,西家先跟小,明手将牌9大,发现将牌3-0,只好从明手出♠,东家不知为何抢上♠A,替庄家解决了♠问题,定约做成。\n \n

    \n

    \n \n 全手牌如下:\n \n

    \n
    \n
    \n \n
    \n
    \n \n 东家犯错,完成定约\n \n
    \n
    \n

    \n \n 这副牌在另一室的叫牌也是南家直接争叫4♥,但连若旸没有选择Pass准备罚放,而是直接加倍希望同伴叫牌,同伴叫出5♣,还赚了一个加倍。这副牌中国队两边成局,获得16IMP。\n \n

    \n

    \n \n 顺便谈一下东家的防守,虽然明显的♠A不应该马上出,但在第一墩♦A吃进后,它并不能确定同伴是单张♦,贸然继续♦,一旦庄家单张♦,可能损失惨重,更好的出牌还是试试♣,从同伴Pass 4♥并没有叫4♠来看,庄家的♠有一定的长度,他的♣较短,如果庄家是AQ双张♣,他至少还有4张♠,♦几乎肯定是单张了,所以出♦更不安全。\n \n

    \n

    \n \n
    \n
    \n

    \n
    \n \n \n
    \n

    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n \n \n \n \n \n 点击\n \n \n \n \n 阅读原文\n \n \n \n \n \n
    \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n
    \n \n \n
    \n

    \n \n
    \n
    \n

    \n
    \n
    \n
    \n
    \n
    \n

    \n \n \n 别忘了点个在看哦!转发那就太好了!\n \n \n

    \n
    \n
    \n
    \n \n
    \n
    \n
    \n
    \n
    \n \n \n \n
    \n
    \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n 相关链接:\n \n 风雨十四载、再夺亚太冠\n \n \n

    \n

    \n \n 相关链接:\n \n 荏苒十四载、再战亚太赛\n \n \n

    \n

    \n \n 相关链接:\n \n 十四年归来仍是追风少年\n \n \n

    \n

    \n \n 相关链接:\n \n 曼谷重启亚太大赛\n \n \n

    \n

    \n \n 相关链接:\n \n 第53届亚太桥牌锦标赛落幕,欧公赛决赛法国内战\n \n \n

    \n

    \n \n 相关链接:\n \n 中国桥牌队亚太锦标赛大四喜,欧公赛女子团体冠军产生\n \n \n

    \n

    \n \n 相关链接:\n \n 欧公赛公团齐老板被淘汰、亚太赛迎来最后高潮\n \n \n

    \n

    \n \n 相关链接:\n \n 欧公赛公团结束首轮淘汰赛、亚太赛接近尾声\n \n \n

    \n

    \n \n 相关链接:\n \n 欧洲公开桥牌锦标赛公团预赛结束、亚太赛完成上半程比赛\n \n \n

    \n

    \n \n 相关链接:\n \n 亚太桥牌锦标赛结束女团、混团第一循环比赛\n \n \n \n
    \n
    \n

    \n

    \n \n 相关链接:\n \n 欧洲公开桥牌锦标赛公团女团开赛,亚太赛中国占据三项第一\n \n \n

    \n

    \n \n 相关链接:\n \n 亚太赛第一天中国女队占优,欧洲公开桥牌锦标赛混团冠军产生\n \n \n

    \n

    \n \n 相关链接:\n \n 亚太桥牌锦标赛开幕,欧洲公开桥牌锦标赛产生老年团体冠军\n \n \n

    \n

    \n \n 相关链接:\n \n 第53届亚太桥牌锦标赛即将开赛\n \n \n

    \n

    \n \n 相关链接:\n \n 第四届亚洲杯结束、中国香港捧起“宁波杯”\n \n \n

    \n

    \n \n 相关链接:\n \n 2022年亚洲杯开赛\n \n \n

    \n

    \n \n 相关链接:\n \n 第三届亚洲杯桥牌赛开幕\n \n \n

    \n

    \n \n \n

    \n
    \n", - "category": "", - "link": "https://mp.weixin.qq.com/s/fs-IXTIprP-cFsg1E2bafQ", - "creator": "标兵桥牌", - "pubDate": "Thu, 29 May 2025 00:00:00 ", - "enclosure": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/iauJ3TcMNYDTH0sTiajz6mMGDUjHnftbibdib7FEvMaiahjxG8C2mKODhpuRaUtBEnLTyDUl3T8iciaqCAYSUSymeB1ZA/0?wx_fmt=jpeg", - "enclosureType": "image/jpeg", - "image": "https://mmbiz.qpic.cn/sz_mmbiz_jpg/iauJ3TcMNYDTH0sTiajz6mMGDUjHnftbibdib7FEvMaiahjxG8C2mKODhpuRaUtBEnLTyDUl3T8iciaqCAYSUSymeB1ZA/0?wx_fmt=jpeg", - "id": "2247512565_1", - "language": "", - "folder": "桥牌", - "feed": "标兵1桥牌", - "read": false, - "favorite": false, - "created": false, - "tags": [], - "hash": "b2ba7615ea76a0fee1a3212e0c63f7bd", - "highlights": [] } ], "folder": "双语", @@ -4323,28 +4389,6 @@ "hash": "b2ba7615ea76a0fee1a3212e0c63f7bd", "highlights": [] }, - { - "title": "自学python必看的书籍《Python编程:从入门到实践》", - "description": "内容简介本书是一本针对所有层次的Python 读者而作的Python 入门书。", - "content": "
    \n

    \n \n
    \n
    \n

    \n

    \n \n \"图片\"\n \n

    \n

    \n \n \n 内容简介\n \n \n

    \n

    \n \n 本书是一本针对所有层次的Python 读者而作的Python 入门书。全书分两部分:\n \n

    \n

    \n \n 第一部分介绍用Python 编程所必须了解的基本概念,包括matplotlib、NumPy 和Pygal 等强大的Python 库和工具介绍,以及列表、字典、if 语句、类、文件与异常、代码测试等内容;\n \n

    \n

    \n \n 第二部分将理论付诸实践,讲解如何开发三个项目,包括简单的Python 2D 游戏开发如何利用数据生成交互式的信息图,以及创建和定制简单的Web 应用,并帮读者解决常见编程问题和困惑。\n \n

    \n

    \n \n
    \n
    \n

    \n

    \n \n \n 目录\n \n \n

    \n

    \n \n
    \n
    \n

    \n
    \n \n \"图片\"\n \n
    \n
    \n \n \"图片\"\n \n
    \n
    \n \n \"图片\"\n \n
    \n
    \n \n \"图片\"\n \n
    \n
    \n \n \"图片\"\n \n
    \n
    \n \n \"图片\"\n \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n \n 书籍的分享格式为PDF电子版,小伙伴们手机也可以阅读学习哦!\n \n \n

    \n

    \n \n \n 书籍终归只是辅助,想要真的深入学习python,当然还要有系统的学习方法和学习教程才可以让你在学习的路上一帆风顺哦!\n \n \n

    \n

    \n \n \n 本套视频一共400集,本套视频共分3季:\n \n \n

    \n

    \n \n 第一季 【基础篇】Python基础 (115集)\n \n

    \n

    \n \n 第二季 【提高篇】Python深入和扩展(100集)\n \n

    \n

    \n \n 第三季 【扩展篇】网络编程、多线程、扩展库(85集)\n \n

    \n

    \n \n 第四季 【高手篇】算法、Python源码、函数式编程、手工实现神经网络(100集)\n \n

    \n

    \n \n
    \n
    \n

    \n

    \n \n
    \n
    \n

    \n
    \n \n \"图片\"\n \n
    \n

    \n \n
    \n
    \n

    \n

    \n \n \n 以上这些教程我已经为大家打包准备好了,希望对正在学习的你有所帮助!\n \n \n

    \n
      \n
    1. \n

      \n \n \n \n 获取方式:公众号私信回复“学习”即可\n \n \n \n

      \n
    2. \n
    3. \n

      \n \n \n \n 需要的小伙伴可以多多点赞转发 让更多的人看到\n \n \n \n

      \n
    4. \n
    \n
    \n \n
    \n
    \n
    \n

    \n \n \n

    \n
    \n", - "category": "", - "link": "https://mp.weixin.qq.com/s/c_5LNvw3SAjwBdMs9TRztQ", - "creator": "python开发工程师", - "pubDate": "Sat, 05 Jul 2025 06:00:00 ", - "enclosure": "https://mmbiz.qpic.cn/mmbiz_jpg/Nc53lZXDjZxW21P2Wlme8ePMGec1BlUXOFYxYplAyK6CLl2x2bH4d2ZWosUWkQlGPFHSr7MpMNoggFfhVnvzag/0?wx_fmt=jpeg", - "enclosureType": "image/jpeg", - "image": "https://mmbiz.qpic.cn/mmbiz_jpg/Nc53lZXDjZxW21P2Wlme8ePMGec1BlUXOFYxYplAyK6CLl2x2bH4d2ZWosUWkQlGPFHSr7MpMNoggFfhVnvzag/0?wx_fmt=jpeg", - "id": "2247511294_2", - "language": "", - "folder": "IT技术", - "feed": "python开发工程师", - "read": false, - "favorite": false, - "created": false, - "tags": [], - "hash": "7dcfc8e3ce8ac73a506470cf4f75b40b", - "highlights": [] - }, { "title": "自学python必看的书籍《Python编程:从入门到实践》PDF版拿走不谢", "description": "内容简介本书是一本针对所有层次的Python 读者而作的Python 入门书。", diff --git a/.obsidian/workspace.json b/.obsidian/workspace.json index 98a0a673..fe727b80 100644 --- a/.obsidian/workspace.json +++ b/.obsidian/workspace.json @@ -8,17 +8,7 @@ "type": "tabs", "children": [ { - "id": "cc8df56bd1c94fa9", - "type": "leaf", - "state": { - "type": "calibre-view", - "state": {}, - "icon": "lucide-file", - "title": "CALIBRE" - } - }, - { - "id": "693c9255fec93d51", + "id": "29cac36b77315b74", "type": "leaf", "state": { "type": "markdown", @@ -31,8 +21,7 @@ "title": "2025-07-17" } } - ], - "currentTab": 1 + ] } ], "direction": "vertical" @@ -95,8 +84,19 @@ "icon": "clock", "title": "Recent Files" } + }, + { + "id": "5b20dc67eb1dc6ae", + "type": "leaf", + "state": { + "type": "file-tree-view", + "state": {}, + "icon": "sheets-in-box", + "title": "File Tree" + } } - ] + ], + "currentTab": 4 }, { "id": "94be401a6e7f4b2e", @@ -310,25 +310,30 @@ "memos-ai-sync:Sync Memos": false, "obsidian-wordpress:发布到 WordPress": false, "ob-smm:create a smm mindmap": true, - "periodic-notes:Open today": false + "periodic-notes:Open today": false, + "diary-ics:日记日历订阅": false, + "cubox-sync:Cubox": false, + "file-tree-alternative:File Tree Alternative Plugin": false } }, - "active": "693c9255fec93d51", + "active": "29cac36b77315b74", "lastOpenFiles": [ - "50-Memos/2025/weekly/第28周总结.md", - "50-Memos/2025/weekly/第29周总结.md", + "03-学习笔记/微信机器人.md", + "03-学习笔记/微信公众号RSS.md", + "03-学习笔记/OB插件.md", + "03-学习笔记/Memos.md", "03-学习笔记/Calibre电子书平台.md", "01-工作日记/2025-07-17.md", + "50-Memos/2025/07/resources/kyhNGvh5iFc9eYXy2YuYWx_FDF8C04E-22D3-4D4C-9ED0-F52A326B9801.jpg", + "50-Memos/2025/07/resources/6cb2VU3rkihszQLFDerqA2_2_20250712120414.png", + "50-Memos/2025/weekly/第28周总结.md", + "50-Memos/2025/weekly/第29周总结.md", "00-待办计划/2025-07 待办事宜.md", "02-技术评测/笔记软件评测.md", "10-WebClipper/开源/AList的开源替代:OpenList.md", "10-WebClipper/知识体系/(74 封私信) Obsidian知识管理体系搭建实战指南 - 知乎.md", "10-WebClipper/知识体系/让笔记流动起来——Obsidian重塑知识体系 - 少数派.md", "10-WebClipper/知识体系/Obsidian 知识体系搭建:入门篇 (一)_牛客网.md", - "03-学习笔记/Memos.md", - "03-学习笔记/OB插件.md", - "03-学习笔记/微信机器人.md", - "03-学习笔记/微信公众号RSS.md", "04-博客发布/041-人文历史/使用Obsidian打造个人图书馆! -转自知乎.md", "08-Inbox/2025-07-04.md", "20-我的收藏夹/21-浏览器收藏/智能家居/【新提醒】『HomeAssistant』综合讨论区 - 『瀚思彼岸』» 智能家居技术论坛 - Powered by Discuz!.md", @@ -340,7 +345,6 @@ "60-DevonThink/一个测试.md", "02-技术评测/关于RSS.md", "80-日记归档/README-归档.md", - "01-工作日记/2025-07-16.md", "10-WebClipper/健康休闲", "10-WebClipper/桥牌", "10-WebClipper/人文历史", @@ -356,8 +360,6 @@ "80-笔记归档/82-待办计划/2025", "80-笔记归档/81-工作日记/202508", "08-Inbox/assets/68691ee74ca1b.png", - "50-Memos/2025/07/resources/kyhNGvh5iFc9eYXy2YuYWx_FDF8C04E-22D3-4D4C-9ED0-F52A326B9801.jpg", - "50-Memos/2025/07/resources/6cb2VU3rkihszQLFDerqA2_2_20250712120414.png", "04-博客发布/0743-Bridge/assets/640.jpeg", "04-博客发布/0743-Bridge/assets/640 2.jpeg", "04-博客发布/0743-Bridge/assets/642 1.jpeg", diff --git a/01-工作日记/2025-07-17.md b/01-工作日记/2025-07-17.md index 9ebd4f39..61533c0b 100644 --- a/01-工作日记/2025-07-17.md +++ b/01-工作日记/2025-07-17.md @@ -6,7 +6,9 @@ tags: rating: ⭐️ excerpt: createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期四, 七月 17日 2025, 9:51:08 上午 -date modified: 星期四, 七月 17日 2025, 3:29:05 下午 +date modified: 星期四, 七月 17日 2025, 4:02:08 下午 +createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期四, 七月 17日 2025, 9:51:08 上午 +createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期四, 七月 17日 2025, 9:51:08 上午 createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期四, 七月 17日 2025, 9:51:08 上午 createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期四, 七月 17日 2025, 9:51:08 上午 --- @@ -18,7 +20,10 @@ createDate: <% tp.file.creation_date("YYYY-MM-DD HH:mm")%>: 星期四, 七月 17 ## 2 Tracking - 整理calibre书库,进行一个合理的分类 -- +- podcast插件:Issues#119 没人搭理我 +https://github.com/chhoumann/PodNotes/issues/119 +- 学习下OB同步 +https://help.obsidian.md/sync-notes ## 3 Tips - 已确认Obsidian互动肯定存在问题,有可能是文件或者目录名是汉字