vault backup: 2026-09-30 16:44:15
This commit is contained in:
1 parent
a8cc12c644
commit
876b8998a5
4 files changed
+123
-1
No files matched your search
+51
@@ -0,0 +1,51 @@
|
||||
"use strict";var t=require("obsidian");function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,n={},i={};var a,o,s={},l={};function u(){if(a)return l;a=1,Object.defineProperty(l,"__esModule",{value:!0}),l.PrioritizedList=void 0;var t=function(){function t(){this.items=[],this.items=[]}return t.prototype[Symbol.iterator]=function(){var t=0,e=this.items;return{next:function(){return{value:e[t++],done:t>e.length}}}},t.prototype.add=function(e,r){void 0===r&&(r=t.DEFAULTPRIORITY);var n=this.items.length;do{n--}while(n>=0&&r<this.items[n].priority);return this.items.splice(n+1,0,{item:e,priority:r}),e},t.prototype.remove=function(t){var e=this.items.length;do{e--}while(e>=0&&this.items[e].item!==t);e>=0&&this.items.splice(e,1)},t.DEFAULTPRIORITY=5,t}();return l.PrioritizedList=t,l}var h,d,p={};function T(){if(h)return p;return h=1,Object.defineProperty(p,"__esModule",{value:!0}),p.retryAfter=p.handleRetriesFor=void 0,p.handleRetriesFor=function(t){return new Promise(function e(r,n){try{r(t())}catch(t){t.retry&&t.retry instanceof Promise?t.retry.then(function(){return e(r,n)}).catch(function(t){return n(t)}):t.restart&&t.restart.isCallback?MathJax.Callback.After(function(){return e(r,n)},t.restart):n(t)}})},p.retryAfter=function(t){var e=new Error("MathJax retry");throw e.retry=t,e},p}function f(){return d||(d=1,function(t){Object.defineProperty(t,"__esModule",{value:!0}),t.mathjax=void 0;var e=(r||(r=1,Object.defineProperty(i,"__esModule",{value:!0}),i.VERSION=void 0,i.VERSION="3.2.2"),i),n=function(){if(o)return s;o=1;var t,e=s&&s.__extends||(t=function(e,r){return t=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var r in e)Object.prototype.hasOwnProperty.call(e,r)&&(t[r]=e[r])},t(e,r)},function(e,r){if("function"!=typeof r&&null!==r)throw new TypeError("Class extends value "+String(r)+" is not a constructor or null");function n(){this.constructor=e}t(e,r),e.prototype=null===r?Object.create(r):(n.prototype=r.prototype,new n)}),r=s&&s.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(s,"__esModule",{value:!0}),s.HandlerList=void 0;var n=function(t){function n(){return null!==t&&t.apply(this,arguments)||this}return e(n,t),n.prototype.register=function(t){return this.add(t,t.priority)},n.prototype.unregister=function(t){this.remove(t)},n.prototype.handlesDocument=function(t){var e,n;try{for(var i=r(this),a=i.next();!a.done;a=i.next()){var o=a.value.item;if(o.handlesDocument(t))return o}}catch(t){e={error:t}}finally{try{a&&!a.done&&(n=i.return)&&n.call(i)}finally{if(e)throw e.error}}throw new Error("Can't find handler for document")},n.prototype.document=function(t,e){return void 0===e&&(e=null),this.handlesDocument(t).create(t,e)},n}(u().PrioritizedList);return s.HandlerList=n,s}(),a=T();t.mathjax={version:e.VERSION,handlers:new n.HandlerList,document:function(e,r){return t.mathjax.handlers.document(e,r)},handleRetriesFor:a.handleRetriesFor,retryAfter:a.retryAfter,asyncLoad:null}}(n)),n}var Q,g=f(),y={},m={},v={};function b(){return Q||(Q=1,function(t){var e=v&&v.__values||function(t){var e="function"==typeof Symbol&&Symbol.iterator,r=e&&t[e],n=0;if(r)return r.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&n>=t.length&&(t=void 0),{value:t&&t[n++],done:!t}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")},r=v&&v.__read||function(t,e){var r="function"==typeof Symbol&&t[Symbol.iterator];if(!r)return t;var n,i,a=r.call(t),o=[];try{for(;(void 0===e||e-- >0)&&!(n=a.next()).done;)o.push(n.value)}catch(t){i={error:t}}finally{try{n&&!n.done&&(r=a.return)&&r.call(a)}finally{if(i)throw i.error}}return o},n=v&&v.__spreadArray||function(t,e,r){if(r||2===arguments.length)for(var n,i=0,a=e.length;i<a;i++)!n&&i in e||(n||(n=Array.prototype.slice.call(e,0,i)),n[i]=e[i]);return t.concat(n||Array.prototype.slice.call(e))};Object.defineProperty(t,"__esModule",{value:!0}),t.lookup=t.separateOptions=t.selectOptionsFromKeys=t.selectOptions=t.userOptions=t.defaultOptions=t.insert=t.copy=t.keys=t.makeArray=t.expandable=t.Expandable=t.OPTIONS=t.REMOVE=t.APPEND=t.isObject=void 0;var i={}.constructor;function a(t){return"object"==typeof t&&null!==t&&(t.constructor===i||t.constructor===o)}t.isObject=a,t.APPEND="[+]",t.REMOVE="[-]",t.OPTIONS={invalidOption:"warn",optionError:function(e,r){if("fatal"===t.OPTIONS.invalidOption)throw new Error(e);console.warn("MathJax: "+e)}};var o=function(){};function s(t){return Object.assign(Object.create(o.prototype),t)}function l(t){return t?Object.keys(t).concat(Object.getOwnPropertySymbols(t)):[]}function c(t){var r,n,i={};try{for(var h=e(l(t)),d=h.next();!d.done;dLine truncated
|
||||
/*!
|
||||
*************************************************************************
|
||||
*
|
||||
* mhchemParser.ts
|
||||
* 4.2.1
|
||||
*
|
||||
* Parser for the \ce command and \pu command for MathJax and Co.
|
||||
*
|
||||
* mhchem's \ce is a tool for writing beautiful chemical equations easily.
|
||||
* mhchem's \pu is a tool for writing physical units easily.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* Copyright (c) 2015-2023 Martin Hensel
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
* ----------------------------------------------------------------------
|
||||
*
|
||||
* https://github.com/mhchem/mhchemParser
|
||||
*
|
||||
*/
|
||||
Object.defineProperty(rd,"__esModule",{value:!0}),rd.mhchemParser=void 0;var t=function(){function t(){}return t.toTex=function(t,e){return n.go(r.go(t,e),"tex"!==e)},t}();function e(t){var e,r,n={};for(e in t)for(r in t[e]){var i=r.split("|");t[e][r].stateArray=i;for(var a=0;a<i.length;a++)n[i[a]]=[]}for(e in t)for(r in t[e])for(i=t[e][r].stateArray||[],a=0;a<i.length;a++){var o=t[e][r];o.action_=[].concat(o.action_);for(var s=0;s<o.action_.length;s++)"string"==typeof o.action_[s]&&(o.action_[s]={type_:o.action_[s]});for(var l=e.split("|"),c=0;c<l.length;c++)if("*"===i[a]){var u=void 0;for(u in n)n[u].push({pattern:l[c],task:o})}else n[i[a]].push({pattern:l[c],task:o})}return n}rd.mhchemParser=t;var r={go:function(t,e){if(!t)return[];void 0===e&&(e="ce");var n,i="0",a={parenthesisLevel:0};t=(t=(t=t.replace(/\n/g," ")).replace(/[\u2212\u2013\u2014\u2010]/g,"-")).replace(/[\u2026]/g,"...");for(var o=10,s=[];;){n!==t?(o=10,n=t):o--;var l=r.stateMachines[e],c=l.transitions[i]||l.transitions["*"];t:for(var u=0;u<c.length;u++){var h=r.patterns.match_(c[u].pattern,t);if(h){for(var d=c[u].task,p=0;p<d.action_.length;p++){var T=void 0;if(l.actions[d.action_[p].type_])T=l.actions[d.action_[p].type_](a,h.match_,d.action_[p].option);else{if(!r.actions[d.action_[p].type_])throw["MhchemBugA","mhchem bug A. Please report. ("+d.action_[p].type_+")"];T=r.actions[d.action_[p].type_](a,h.match_,d.action_[p].option)}r.concatArray(s,T)}if(i=d.nextState||i,!(t.length>0))return s;if(d.revisit||(t=h.remainder),!d.toContinue)break t}}if(o<=0)throw["MhchemBugU","mhchem bug U. Please report."]}},concatArray:function(t,e){if(e)if(Array.isArray(e))for(var r=0;r<e.length;r++)t.push(e[r]);else t.push(e)},patterns:{patterns:{empty:/^$/,else:/^./,else2:/^./,space:/^\s/,"space A":/^\s(?=[A-Z\\$])/,space$:/^\s$/,"a-z":/^[a-z]/,x:/^x/,x$:/^x$/,i$:/^i$/,letters:/^(?:[a-zA-Z\u03B1-\u03C9\u0391-\u03A9?@]|(?:\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))))+/,"\\greek":/^\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega|Gamma|Delta|Theta|Lambda|Xi|Pi|Sigma|Upsilon|Phi|Psi|Omega)(?:\s+|\{\}|(?![a-zA-Z]))/,"one lowercase latin letter $":/^(?:([a-z])(?:$|[^a-zA-Z]))$/,"$one lowercase latin letter$ $":/^\$(?:([a-z])(?:$|[^a-zA-Z]))\$$/,"one lowercase greek letter $":/^(?:\$?[\u03B1-\u03C9]\$?|\$?\\(?:alpha|beta|gamma|delta|epsilon|zeta|eta|theta|iota|kappa|lambda|mu|nu|xi|omicron|pi|rho|sigma|tau|upsilon|phi|chi|psi|omega)\s*\$?)(?:\s+|\{\}|(?![a-zA-Z]))$/,digits:/^[0-9]+/,"-9.,9":/^[+\-]?(?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))/,"-9.,9 no missing 0":/^[+\-]?[0-9]+(?:[.,][0-9]+)?/,"(-)(9.,9)(e)(99)":function(t){var e=t.match(/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))?(\((?:[0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+))\))?(?:(?:([eE])|\s*(\*|x|\\times|\u00D7)\s*10\^)([+\-]?[0-9]+|\{[+\-]?[0-9]+\}))?/);return e&&e[0]?{match_:e.slice(1),remainder:t.substr(e[0].length)}:null},"(-)(9)^(-9)":/^(\+\-|\+\/\-|\+|\-|\\pm\s?)?([0-9]+(?:[,.][0-9]+)?|[0-9]*(?:\.[0-9]+)?)\^([+\-]?[0-9]+|\{[+\-]?[0-9]+\})/,"state of aggregation $":function(t){var e=r.patterns.findObserveGroups(t,"",/^\([a-z]{1,3}(?=[\),])/,")","");if(e&&e.remainder.match(/^($|[\s,;\)\]\}])/))return e;var n=t.match(/^(?:\((?:\\ca\s?)?\$[amothc]\$\))/);return n?{match_:n[0],remainder:t.substr(n[0].length)}:null},"_{(state of aggregation)}$":/^_\{(\([a-z]{1,3}\))\}/,"{[(":/^(?:\\\{|\[|\()/,")]}":/^(?:\)|\]|\\\})/,", ":/^[,;]\s*/,",":/^[,;]/,".":/^[.]/,". __* ":/^([.\u22C5\u00B7\u2022]|[*])\s*/,"...":/^\.\.\.(?=$|[^.])/,"^{(...)}":function(t){return r.patterns.findObserveGroups(t,"^{","","","}")},"^($...$)":function(t){return r.patterns.findObserveGroups(t,"^","$","$","")},"^a":/^\^([0-9]+|[^\\_])/,"^\\x{}{}":function(t){return r.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"^\\x{}":function(t){return r.patterns.findObserveGroups(t,"^",/^\\[a-zA-Z]+\{/,"}","")},"^\\x":/^\^(\\[a-zA-Z]+)\s*/,"^(-1)":/^\^(-?\d+)/,"'":/^'/,"_{(...)}":function(t){return r.patterns.findObserveGroups(t,"_{","","","}")},"_($...$)":function(t){return r.patterns.findObserveGroups(t,"_","$","$","")},_9:/^_([+\-]?[0-9]+|[^\\])/,"_\\x{}{}":function(t){return r.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","","","{","}","",!0)},"_\\x{}":function(t){return r.patterns.findObserveGroups(t,"_",/^\\[a-zA-Z]+\{/,"}","")},"_\\x":/^_(\\[a-zA-Z]+)\s*/,"^_":/^(?:\^(?=_)|\_(?=\^)|[\^_]$)/,"{}^":/^\{\}(?=\^)/,"{}":/^\{\}/,"{...}":function(t){return r.patterns.findObserveGroups(t,"","{","}","")},"{(...)}":function(t){return r.patterns.findObserveGroups(t,"{","","","}")},"$...$":function(t){return r.patterns.findObserveGroups(t,"","$","$","")},"${(...)}$__$(...)$":function(t){return r.patterns.findObserveGroups(t,"${","","","}$")||r.patLine truncated
|
||||
/*! @license DOMPurify 3.4.14 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.4.14/LICENSE */
|
||||
function PT(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function VT(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var n,i,a,o,s=[],l=!0,c=!1;try{if(a=(r=r.call(t)).next,0===e);else for(;!(l=(n=a.call(r)).done)&&(s.push(n.value),s.length!==e);l=!0);}catch(t){c=!0,i=t}finally{try{if(!l&&null!=r.return&&(o=r.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return PT(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?PT(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}const DT=Object.entries,BT=Object.setPrototypeOf,$T=Object.isFrozen,FT=Object.getPrototypeOf,jT=Object.getOwnPropertyDescriptor;let zT=Object.freeze,GT=Object.seal,qT=Object.create,WT="undefined"!=typeof Reflect&&Reflect,UT=WT.apply,YT=WT.construct;zT||(zT=function(t){return t}),GT||(GT=function(t){return t}),UT||(UT=function(t,e){for(var r=arguments.length,n=new Array(r>2?r-2:0),i=2;i<r;i++)n[i-2]=arguments[i];return t.apply(e,n)}),YT||(YT=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];return new t(...r)});const XT=yf(Array.prototype.forEach),ZT=yf(Array.prototype.lastIndexOf),KT=yf(Array.prototype.pop),JT=yf(Array.prototype.push),tf=yf(Array.prototype.splice),ef=Array.isArray,rf=yf(String.prototype.toLowerCase),nf=yf(String.prototype.toString),af=yf(String.prototype.match),of=yf(String.prototype.replace),sf=yf(String.prototype.indexOf),lf=yf(String.prototype.trim),cf=yf(Number.prototype.toString),uf=yf(Boolean.prototype.toString),hf="undefined"==typeof BigInt?null:yf(BigInt.prototype.toString),df="undefined"==typeof Symbol?null:yf(Symbol.prototype.toString),pf=yf(Object.prototype.hasOwnProperty),Tf=yf(Object.prototype.toString),ff=yf(RegExp.prototype.test),Qf=(gf=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return YT(gf,e)});var gf;function yf(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return UT(t,e,n)}}function mf(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:rf;if(BT&&BT(t,null),!ef(e))return t;let n=e.length;for(;n--;){let i=e[n];if("string"==typeof i){const t=r(i);t!==i&&($T(e)||(e[n]=t),i=t)}t[i]=!0}return t}function vf(t){for(let e=0;e<t.length;e++){pf(t,e)||(t[e]=null)}return t}function bf(t){const e=qT(null);for(const n of DT(t)){var r=VT(n,2);const i=r[0],a=r[1];pf(t,i)&&(ef(a)?e[i]=vf(a):a&&"object"==typeof a&&a.constructor===Object?e[i]=bf(a):e[i]=a)}return e}function xf(t,e){for(;null!==t;){const r=jT(t,e);if(r){if(r.get)return yf(r.get);if("function"==typeof r.value)return yf(r.value)}t=FT(t)}return function(){return null}}const Lf=zT(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","search","section","select","shadow","slot","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),wf=zT(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),_f=zT(["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"]),kf=zT(["animate","color-profile","cursor","discard","font-face","font-face-format","fonLine truncated
|
||||
/*! Check if previously processed */
|
||||
/*!
|
||||
* Wait for document loaded before starting the execution
|
||||
*/
|
||||
const pF=t=>t.replace(/\s*!important\s*$/i,"").trim(),TF=(t,e)=>{let r=e;for(;r<t.length&&/\s/.test(t[r]);)r+=1;const n=r;for(;r<t.length&&/[a-z-]/i.test(t[r]);)r+=1;if(r===n)return!1;for(;r<t.length&&/\s/.test(t[r]);)r+=1;return":"===t[r]},fF=t=>{const e=[];let r=0;for(;r<t.length;){for(;r<t.length&&/[\s;,]/.test(t[r]);)r+=1;if(r>=t.length)break;const n=r;for(;r<t.length&&":"!==t[r]&&";"!==t[r]&&","!==t[r];)r+=1;if(r>=t.length||":"!==t[r])break;const i=t.substring(n,r).trim().toLowerCase();r+=1;const a=r;let o=0,s=null;for(;r<t.length;){const e=t[r];if(s)e===s&&"\\"!==t[r-1]&&(s=null),r+=1;else if('"'!==e&&"'"!==e)if("("!==e)if(")"!==e){if(0===o){if(";"===e||","===e)break;if(/\s/.test(e)&&TF(t,r))break}r+=1}else o=Math.max(0,o-1),r+=1;else o+=1,r+=1;else s=e,r+=1}const l=pF(t.substring(a,r));i&&l&&e.push({property:i,value:l}),r<t.length&&(";"===t[r]||","===t[r])&&(r+=1)}return e},QF=t=>{const e=pF(t);if(!e)return!1;if("undefined"!=typeof CSS&&"function"==typeof CSS.supports)return CSS.supports("color",e);if("undefined"!=typeof document){const t=document.createElement("div");return t.style.color="",t.style.color=e,""!==t.style.color}return!1},gF=(t,e)=>{const r=t.getAttribute("style");return r&&fF(r).find(t=>t.property===e)?.value||""},yF=(...t)=>{for(const e of t){const t=pF(e||"");if(QF(t))return t}},mF=(t,e)=>{const r=t.querySelector("text, foreignObject, div, span, p")||t,n=yF(r.getAttribute?.("fill"),gF(r,"fill"),r.style?.fill);if(n)return n;const i=yF(r.getAttribute?.("color"),gF(r,"color"),r.style?.color);if(i)return i;const a=yF(e);return a||void 0},vF=(t,e,r)=>{switch(e){case dp.FILL:case dp.STROKE:QF(r)&&(t[e]=r);break;case dp.STROKE_WIDTH:case dp.STROKE_DASHARRAY:t[e]=r}},bF=(t,e,r)=>{e===hp.COLOR&&QF(r)&&(t[hp.COLOR]=r)},xF=(t,e,r)=>{t&&fF(t).forEach(({property:t,value:n})=>{vF(e,t,n),bF(r,t,n)})},LF=(t,e)=>{t&&fF(t).forEach(({property:t,value:r})=>{"fill"===t&&QF(r)?e[hp.COLOR]=r:bF(e,t,r)})},wF=(t,e)=>{if(!t)return;[[dp.FILL,t.getAttribute("fill")],[dp.STROKE,t.getAttribute("stroke")],[dp.STROKE_WIDTH,t.getAttribute("stroke-width")],[dp.STROKE_DASHARRAY,t.getAttribute("stroke-dasharray")]].forEach(([t,r])=>{const n=pF(r||"");n&&vF(e,t,n)})},_F=(t,e)=>{if(!t)return;const r=t.getAttribute("fill")||t.getAttribute("color"),n=pF(r||"");QF(n)&&(e[hp.COLOR]=n)},kF=(t,e,r,n)=>{if(!(e instanceof Map))return;const i=e.get(t);i&&(i.styles?.forEach(t=>{fF(t).forEach(({property:t,value:e})=>{vF(r,t,e),bF(n,t,e)})}),i.textStyles?.forEach(t=>{fF(t).forEach(({property:t,value:e})=>{bF(n,t,e)})}))},EF=(t,e,r)=>{const n=e.querySelector(`[id*="${t.domId}"]`);if(!n)return;let i;"a"===n.parentElement?.tagName.toLowerCase()&&(i=n.parentElement.getAttribute("xlink:href"));const a=SF(i?n.parentElement:n,e),o=n.getBBox(),s={width:o.width,height:o.height},l={},c={};t.classes&&r instanceof Map&&(Array.isArray(t.classes)?t.classes:[t.classes]).forEach(t=>{kF(t,r,l,c)}),t.styles?.forEach(t=>{xF(t,l,c)});const u=n.querySelector(".label-container");xF(u?.getAttribute("style"),l,c),wF(u,l);return Array.from(n.querySelectorAll(".label, .nodeLabel, .label text, .label tspan, .label span, .label div")).forEach(t=>{LF(t.getAttribute("style"),c),_F(t,c)}),{id:t.id,labelType:t.labelType,text:Gp(t.text||""),type:t.type,link:i||void 0,...a,...s,containerStyle:l,labelStyle:c}},SF=(t,e)=>{if(!t)throw new Error("Element not found");let r=t.parentElement?.parentElement;const n=t.childNodes[0];let i={x:0,y:0};if(n){const{transformX:t,transformY:e}=qp(n),r=n.getBBox();i={x:Number(n.getAttribute("x"))||t+r.x||0,y:Number(n.getAttribute("y"))||e+r.y||0}}const{transformX:a,transformY:o}=qp(t),s={x:a+i.x,y:o+i.y};for(;r&&r.id!==e.id;){if("root"===r.classList.value&&r.hasAttribute("transform")){const{transformX:t,transformY:e}=qp(r);s.x+=t,s.y+=e}r=r.parentElement}return s},CF=(t,e)=>{const r=t.getVertices(),n=t.getEdges(),i=t.getSubGraphs(),a=t.getClasses(),o={},s=a instanceof Map?a:{};r instanceof Map?r.forEach((t,r)=>{o[r]=EF(t,e,s)}):"object"==typeof r&&null!==r&&Object.entries(r).forEach(([t,r])=>{o[t]=EF(r,e,s)});const l=new Map,c=(Array.isArray(n)?n:[]).map(t=>{if(!e.querySelector(`[id*="${t.id}"]`))return null;const r=`${t.start}-${t.end}`,n=l.get(r)||0;return l.set(r,n+1),((t,e,r)=>{const n=r.querySelector(`[id*="${t.id}"]`);if(!n)throw new Error("Edge element not found");const i=SF(n,r),a=Zp(n,i);return t.length=void 0,{...t,...a,text:Gp(t.text)}})(t,0,e)}).filter(t=>null!==t&&t.reflectionPoints.length>1),u=(Array.isArray(i)?i:[]).map(t=>((t,e,r)=>{const n=t.nodes.map(t=>t.startsWith("flowchart-")?t.split("-")[1]:t),i=e.querySelector(`[id='${t.id}']`);if(!i)throw new Error("SubGraph element not found");const a=SF(i,e),o=i.getBBox(),s={width:o.width,height:o.height},l={},c={},u=i.querySelector(":scope > rect, :scope > path, :scope > polygon, :scope > ellipse")||i.querySelector(".cluster > rect, .cluster > path, .cluster > polygon, .cluster > ellipse")||i.querySelector("rect, path, polygon, ellipse");xF(i.getAttribute("style"),l,c),xF(Line truncated
|
||||
/*!
|
||||
Embeddable Minimum Strictly-Compliant Promises/A+ 1.1.1 Thenable
|
||||
Copyright (c) 2013-2014 Ralf S. Engelschall (http://engelschall.com)
|
||||
Licensed under The MIT License (http://opensource.org/licenses/MIT)
|
||||
*/
|
||||
var n0=function(t){if(!(this instanceof n0))return new n0(t);this.id="Thenable/1.0.7",this.state=0,this.fulfillValue=void 0,this.rejectReason=void 0,this.onFulfilled=[],this.onRejected=[],this.proxy={then:this.then.bind(this)},"function"==typeof t&&t.call(this,this.fulfill.bind(this),this.reject.bind(this))};n0.prototype={fulfill:function(t){return i0(this,1,"fulfillValue",t)},reject:function(t){return i0(this,2,"rejectReason",t)},then:function(t,e){var r=this,n=new n0;return r.onFulfilled.push(s0(t,n,"fulfill")),r.onRejected.push(s0(e,n,"reject")),a0(r),n.proxy}};var i0=function(t,e,r,n){return 0===t.state&&(t.state=e,t[r]=n,a0(t)),t},a0=function(t){1===t.state?o0(t,"onFulfilled",t.fulfillValue):2===t.state&&o0(t,"onRejected",t.rejectReason)},o0=function(t,e,r){if(0!==t[e].length){var n=t[e];t[e]=[];var i=function(){for(var t=0;t<n.length;t++)n[t](r)};"function"==typeof setImmediate?setImmediate(i):setTimeout(i,0)}},s0=function(t,e,r){return function(n){if("function"!=typeof t)e[r].call(e,n);else{var i;try{i=t(n)}catch(t){return void e.reject(t)}l0(e,i)}}},l0=function(t,e){if(t!==e&&t.proxy!==e){var r;if("object"===w1(e)&&null!==e||"function"==typeof e)try{r=e.then}catch(e){return void t.reject(e)}if("function"!=typeof r)t.fulfill(e);else{var n=!1;try{r.call(e,function(r){n||(n=!0,r===e?t.reject(new TypeError("circular thenable chain")):l0(t,r))},function(e){n||(n=!0,t.reject(e))})}catch(e){n||t.reject(e)}}}else t.reject(new TypeError("cannot resolve promise with itself"))};n0.all=function(t){return new n0(function(e,r){for(var n=new Array(t.length),i=0,a=function(r,a){n[r]=a,++i===t.length&&e(n)},o=0;o<t.length;o++)(function(e){var n=t[e];null!=n&&null!=n.then?n.then(function(t){a(e,t)},function(t){r(t)}):a(e,n)})(o)})},n0.resolve=function(t){return new n0(function(e,r){e(t)})},n0.reject=function(t){return new n0(function(e,r){r(t)})};var c0="undefined"!=typeof Promise?Promise:n0,u0=function(t,e,r){var n=Q2(t),i=!n,a=this._private=H2({duration:1e3},e,r);if(a.target=t,a.style=a.style||a.css,a.started=!1,a.playing=!1,a.hooked=!1,a.applying=!1,a.progress=0,a.completes=[],a.frames=[],a.complete&&l2(a.complete)&&a.completes.push(a.complete),i){var o=t.position();a.startPosition=a.startPosition||{x:o.x,y:o.y},a.startStyle=a.startStyle||t.cy().style().getAnimationStartStyle(t,a.style)}if(n){var s=t.pan();a.startPan={x:s.x,y:s.y},a.startZoom=t.zoom()}this.length=1,this[0]=this},h0=u0.prototype;H2(h0,{instanceString:function(){return"animation"},hook:function(){var t=this._private;if(!t.hooked){var e=t.target._private.animation;(t.queue?e.queue:e.current).push(this),p2(t.target)&&t.target.cy().addToAnimationPool(t.target),t.hooked=!0}return this},play:function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},playing:function(){return this._private.playing},apply:function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},applying:function(){return this._private.applying},pause:function(){var t=this._private;return t.playing=!1,t.started=!1,this},stop:function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},rewind:function(){return this.progress(0)},fastforward:function(){return this.progress(1)},time:function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},progress:function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},completed:function(){return 1===this._private.progress},reverse:function(){var t=this._private,e=t.playing;e&&this.pause(),t.progress=1-t.progress,t.started=!1;var r=function(e,r){var n=t[e];null!=n&&(t[e]=t[r],t[r]=n)};if(r("zoom","startZoom"),r("pan","startPan"),r("position","startPosition"),t.style)for(var n=0;n<t.style.length;n++){var i=t.style[n],a=i.name,o=t.startStyle[a];t.startStyle[a]=i,t.style[n]=o}return e&&this.play(),this},promise:function(t){var e,r=this._private;if("frame"===t)e=r.frames;else e=r.completes;return new c0(function(t,r){e.push(function(){t()})})}}),h0.complete=h0.completed,h0.run=h0.play,h0.running=h0.playing;var d0,p0,T0,f0,Q0,g0,y0,m0,v0,b0,x0,L0,w0,_0,k0,E0,S0,C0,A0,M0,H0,O0,N0,I0,R0,P0,V0,D0,B0,$0,F0,j0,z0,G0,q0,W0,U0,Y0,X0,Z0,K0,J0,t5,e5,r5,n5,i5,a5,o5,s5,l5,c5,u5,h5,d5,p5,T5,f5,Q5,g5,y5,m5,v5,b5,x5,L5,w5,_5,k5,E5,S5,C5,A5,M5,H5,O5,N5,I5,R5,P5,V5,D5,B5,$5,F5,j5,z5={animated:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return!1;var r=e[0];return r?r._private.animation.current.length>0:void 0}},clearQueue:function(){return function(){var t=this,e=void 0!==t.length?t:[t];if(!(this._private.cy||this).styleEnabled())return this;for(var r=0;r<e.length;r++){e[r]._private.animation.queue=[]}return this}},delay:function(){return function(t,e){return(this._private.cy||this).styleEnabled()?this.animate({delay:t,duration:t,complete:e}):this}},delayAnimation:funLine truncated
|
||||
/*! Bezier curve function generator. Copyright Gaetan Renaudeau. MIT License: http://en.wikipedia.org/wiki/MIT_License */function itt(t,e,r,n){var i=.1,a="undefined"!=typeof Float32Array;if(4!==arguments.length)return!1;for(var o=0;o<4;++o)if("number"!=typeof arguments[o]||isNaN(arguments[o])||!isFinite(arguments[o]))return!1;t=Math.min(t,1),r=Math.min(r,1),t=Math.max(t,0),r=Math.max(r,0);var s=a?new Float32Array(11):new Array(11);function l(t,e){return 1-3*e+3*t}function c(t,e){return 3*e-6*t}function u(t){return 3*t}function h(t,e,r){return((l(e,r)*t+c(e,r))*t+u(e))*t}function d(t,e,r){return 3*l(e,r)*t*t+2*c(e,r)*t+u(e)}function p(e){for(var n=0,a=1;10!==a&&s[a]<=e;++a)n+=i;--a;var o=n+(e-s[a])/(s[a+1]-s[a])*i,l=d(o,t,r);return l>=.001?function(e,n){for(var i=0;i<4;++i){var a=d(n,t,r);if(0===a)return n;n-=(h(n,t,r)-e)/a}return n}(e,o):0===l?o:function(e,n,i){var a,o,s=0;do{(a=h(o=n+(i-n)/2,t,r)-e)>0?i=o:n=o}while(Math.abs(a)>1e-7&&++s<10);return o}(e,n,n+i)}var T=!1;function f(){T=!0,t===e&&r===n||function(){for(var e=0;e<11;++e)s[e]=h(e*i,t,r)}()}var Q=function(i){return T||f(),t===e&&r===n?i:0===i?0:1===i?1:h(p(i),e,n)};Q.getControlPoints=function(){return[{x:t,y:e},{x:r,y:n}]};var g="generateBezier("+[t,e,r,n]+")";return Q.toString=function(){return g},Q}
|
||||
/*! Runge-Kutta spring physics function generator. Adapted from Framer.js, copyright Koen Bok. MIT License: http://en.wikipedia.org/wiki/MIT_License */var att=function(){function t(t){return-t.tension*t.x-t.friction*t.v}function e(e,r,n){var i={x:e.x+n.dx*r,v:e.v+n.dv*r,tension:e.tension,friction:e.friction};return{dx:i.v,dv:t(i)}}function r(r,n){var i={dx:r.v,dv:t(r)},a=e(r,.5*n,i),o=e(r,.5*n,a),s=e(r,n,o),l=1/6*(i.dx+2*(a.dx+o.dx)+s.dx),c=1/6*(i.dv+2*(a.dv+o.dv)+s.dv);return r.x=r.x+l*n,r.v=r.v+c*n,r}return function t(e,n,i){var a,o,s,l={x:-1,v:0,tension:null,friction:null},c=[0],u=0,h=1e-4;for(e=parseFloat(e)||500,n=parseFloat(n)||20,i=i||null,l.tension=e,l.friction=n,o=(a=null!==i)?(u=t(e,n))/i*.016:.016;s=r(s||l,o),c.push(1+s.x),u+=16,Math.abs(s.x)>h&&Math.abs(s.v)>h;);return a?function(t){return c[t*(c.length-1)|0]}:u}}(),ott=function(t,e,r,n){var i=itt(t,e,r,n);return function(t,e,r){return t+(e-t)*i(r)}},stt={linear:function(t,e,r){return t+(e-t)*r},ease:ott(.25,.1,.25,1),"ease-in":ott(.42,0,1,1),"ease-out":ott(0,0,.58,1),"ease-in-out":ott(.42,0,.58,1),"ease-in-sine":ott(.47,0,.745,.715),"ease-out-sine":ott(.39,.575,.565,1),"ease-in-out-sine":ott(.445,.05,.55,.95),"ease-in-quad":ott(.55,.085,.68,.53),"ease-out-quad":ott(.25,.46,.45,.94),"ease-in-out-quad":ott(.455,.03,.515,.955),"ease-in-cubic":ott(.55,.055,.675,.19),"ease-out-cubic":ott(.215,.61,.355,1),"ease-in-out-cubic":ott(.645,.045,.355,1),"ease-in-quart":ott(.895,.03,.685,.22),"ease-out-quart":ott(.165,.84,.44,1),"ease-in-out-quart":ott(.77,0,.175,1),"ease-in-quint":ott(.755,.05,.855,.06),"ease-out-quint":ott(.23,1,.32,1),"ease-in-out-quint":ott(.86,0,.07,1),"ease-in-expo":ott(.95,.05,.795,.035),"ease-out-expo":ott(.19,1,.22,1),"ease-in-out-expo":ott(1,0,0,1),"ease-in-circ":ott(.6,.04,.98,.335),"ease-out-circ":ott(.075,.82,.165,1),"ease-in-out-circ":ott(.785,.135,.15,.86),spring:function(t,e,r){if(0===r)return stt.linear;var n=att(t,e,r);return function(t,e,r){return t+(e-t)*n(r)}},"cubic-bezier":ott};function ltt(t,e,r,n,i){if(1===n)return r;if(e===r)return r;var a=i(e,r,n);return null==t||((t.roundValue||t.color)&&(a=Math.round(a)),void 0!==t.min&&(a=Math.max(a,t.min)),void 0!==t.max&&(a=Math.min(a,t.max))),a}function ctt(t,e){return null!=t.pfValue||null!=t.value?null==t.pfValue||null!=e&&"%"===e.type.units?t.value:t.pfValue:t}function utt(t,e,r,n,i){var a=null!=i?i.type:null;r<0?r=0:r>1&&(r=1);var o=ctt(t,i),s=ctt(e,i);if(h2(o)&&h2(s))return ltt(a,o,s,r,n);if(c2(o)&&c2(s)){for(var l=[],c=0;c<s.length;c++){var u=o[c],h=s[c];if(null!=u&&null!=h){var d=ltt(a,u,h,r,n);l.push(d)}else l.push(h)}return l}}function htt(t,e,r,n){var i=!n,a=t._private,o=e._private,s=o.easing,l=o.startTime,c=(n?t:t.cy()).style();if(!o.easingImpl)if(null==s)o.easingImpl=stt.linear;else{var u,h,d;if(s2(s))u=c.parse("transition-timing-function",s).value;else u=s;s2(u)?(h=u,d=[]):(h=u[1],d=u.slice(2).map(function(t){return+t})),d.length>0?("spring"===h&&d.push(o.duration),o.easingImpl=stt[h].apply(null,d)):o.easingImpl=stt[h]}var p,T=o.easingImpl;if(p=0===o.duration?1:(r-l)/o.duration,o.applying&&(p=o.progress),p<0?p=0:p>1&&(p=1),null==o.delay){var f=o.startPosition,Q=o.position;if(Q&&i&&!t.locked()){var g={};dtt(f.x,Q.x)&&(g.x=utt(f.x,Q.x,p,T)),dtt(f.y,Q.y)&&(g.y=utt(f.y,Q.y,p,T)),t.position(g)}var y=o.startPan,m=o.pan,v=a.pan,b=null!=m&&n;b&&(dtt(y.x,m.x)&&(v.x=utt(y.x,m.x,p,T)),dtt(y.y,m.y)&&(v.y=utt(y.y,m.y,p,T)),t.emit("pan"));var x=o.startZoom,L=o.zoom,w=null!=L&&n;w&&(dtt(x,L)&&(a.zoom=T4(a.minZoom,utt(x,L,p,T),a.maxZoom)),t.emit("zoom")),(b||w)&&t.emit("viewport");var _=o.style;if(_&&_.length>0&&i){for(var k=0;k<_.length;k++){var E=_[k],S=E.name,C=E,A=o.startStyle[S],M=utt(A,C,p,T,c.properties[A.name]);c.overrideBypass(t,S,M)}t.emit("style")}}return o.progress=p,p}function dtt(t,e){return null!=t&&null!=e&&(!(!h2(t)||!h2(e))||!(!t||!e))}function ptt(t,e,r,n){var i=e._private;i.started=!0,i.startTime=r-i.progress*i.duration}function Ttt(t,e){var r=e._private.aniEles,n=[];function i(e,r){var i=e._private,a=i.animation.current,o=i.animation.queue,s=!1;if(0===a.length){var l=o.shift();l&&a.push(l)}for(var c=function(t){for(var e=t.length-1;e>=0;e--){(0,t[e])()}t.splice(0,t.length)},u=a.length-1;u>=0;u--){var h=a[u],d=h._private;d.stopped?(a.splice(u,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.frames)):(d.playing||d.applying)&&(d.playing&&d.applying&&(d.applying=!1),d.started||ptt(0,h,t),htt(e,h,t,r),d.applying&&(d.applying=!1),c(d.frames),null!=d.step&&d.step(t),h.completed()&&(a.splice(u,1),d.hooked=!1,d.playing=!1,d.started=!1,c(d.completes)),s=!0)}return r||0!==a.length||0!==o.length||n.push(e),s}for(var a=!1,o=0;o<r.length;o++){var s=i(r[o]);a=a||s}var l=i(e,!0);(a||l)&&(r.length>0?e.notify("draw",r):e.notify("draw")),r.unmerge(n),e.emit("step")}var ftt={animate:I7.animate(),animation:I7.animation(),animated:I7.animated(),clearQueue:I7.clearQueue(),delay:I7.delay(),delayAnimation:I7.delayAnimation(),stop:I7.stop(),addToAnimationPool:function(t){this.styleEnablLine truncated
|
||||
|
||||
/* nosourcemap */
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"id": "excalidraw-extras",
|
||||
"name": "Excalidraw Extras",
|
||||
"version": "0.1.0",
|
||||
"minAppVersion": "1.8.7",
|
||||
"description": "Companion plugin for Excalidraw high-privilege and large components.",
|
||||
"author": "Zsolt Viczian",
|
||||
"authorUrl": "https://github.com/zsviczian",
|
||||
"isDesktopOnly": false
|
||||
}
|
||||
+60
@@ -0,0 +1,60 @@
|
||||
.excalidraw-LatexPrompt {
|
||||
.cm-editor {
|
||||
margin-top: var(--size-4-2);
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
/* this is safe, if unsupported, will be ignored */
|
||||
anchor-name: --latex-editor;
|
||||
|
||||
& > .cm-scroller, & > .cm-announcment {
|
||||
align-self: start;
|
||||
width: 100%
|
||||
}
|
||||
|
||||
/* taken from Obsidian, doesn't apply automatically,
|
||||
because the rule does not have :focus-within */
|
||||
&.cm-focused {
|
||||
border-color: var(--background-modifier-border-focus);
|
||||
transition: box-shadow 0.15s ease-in-out, border 0.15s ease-in-out;
|
||||
box-shadow: 0 0 0 var(--input-border-width-focus) var(--background-modifier-border-focus);
|
||||
}
|
||||
|
||||
/* centering the popup */
|
||||
& .cm-tooltip-cursor.cm-tooltip {
|
||||
left: unset !important;
|
||||
|
||||
& .cm-tooltip-arrow {
|
||||
left: 50% !important;
|
||||
transform: translateX(-50%);
|
||||
}
|
||||
}
|
||||
|
||||
[jax="CHTML"][display="true"] {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.cm-content {
|
||||
caret-color: var(--caret-color);
|
||||
}
|
||||
}
|
||||
|
||||
@supports (anchor-name: --test) {
|
||||
.excalidraw-LatexPrompt .cm-editor .cm-tooltip-cursor.cm-tooltip {
|
||||
position: fixed !important;
|
||||
position-anchor: --latex-editor;
|
||||
top: unset !important;
|
||||
max-width: calc(100vw - var(--size-4-4));
|
||||
margin: var(--size-4-2) 0;
|
||||
overflow-x: clip;
|
||||
|
||||
&.cm-tooltip-above {
|
||||
bottom: anchor(top);
|
||||
}
|
||||
|
||||
&.cm-tooltip-below {
|
||||
top: anchor(bottom) !important;
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user