|
|
var e=function(t,A){return e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var A in t)Object.prototype.hasOwnProperty.call(t,A)&&(e[A]=t[A])},e(t,A)};function t(t,A){if("function"!=typeof A&&null!==A)throw new TypeError("Class extends value "+String(A)+" is not a constructor or null");function i(){this.constructor=t}e(t,A),t.prototype=null===A?Object.create(A):(i.prototype=A.prototype,new i)}var A=function(){return A=Object.assign||function(e){for(var t,A=1,i=arguments.length;A<i;A++)for(var n in t=arguments[A])Object.prototype.hasOwnProperty.call(t,n)&&(e[n]=t[n]);return e},A.apply(this,arguments)};function i(e,t,A,i){return new(A||(A=Promise))((function(n,a){function r(e){try{o(i.next(e))}catch(e){a(e)}}function s(e){try{o(i.throw(e))}catch(e){a(e)}}function o(e){var t;e.done?n(e.value):(t=e.value,t instanceof A?t:new A((function(e){e(t)}))).then(r,s)}o((i=i.apply(e,t||[])).next())}))}function n(e,t){var A,i,n,a,r={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(a){return function(s){return function(a){if(A)throw new TypeError("Generator is already executing.");for(;r;)try{if(A=1,i&&(n=2&a[0]?i.return:a[0]?i.throw||((n=i.return)&&n.call(i),0):i.next)&&!(n=n.call(i,a[1])).done)return n;switch(i=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return r.label++,{value:a[1],done:!1};case 5:r.label++,i=a[1],a=[0];continue;case 7:a=r.ops.pop(),r.trys.pop();continue;default:if(!((n=(n=r.trys).length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){r=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]<n[3])){r.label=a[1];break}if(6===a[0]&&r.label<n[1]){r.label=n[1],n=a;break}if(n&&r.label<n[2]){r.label=n[2],r.ops.push(a);break}n[2]&&r.ops.pop(),r.trys.pop();continue}a=t.call(e,r)}catch(e){a=[6,e],i=0}finally{A=n=0}if(5&a[0])throw a[1];return{value:a[0]?a[1]:void 0,done:!0}}([a,s])}}}function a(e,t,A){if(A||2===arguments.length)for(var i,n=0,a=t.length;n<a;n++)!i&&n in t||(i||(i=Array.prototype.slice.call(t,0,n)),i[n]=t[n]);return e.concat(i||t)}for(var r=function(){function e(e,t,A,i){this.left=e,this.top=t,this.width=A,this.height=i}return e.prototype.add=function(t,A,i,n){return new e(this.left+t,this.top+A,this.width+i,this.height+n)},e.fromClientRect=function(t,A){return new e(A.left+t.windowBounds.left,A.top+t.windowBounds.top,A.width,A.height)},e.fromDOMRectList=function(t,A){var i=Array.from(A).find((function(e){return 0!==e.width}));return i?new e(i.left+t.windowBounds.left,i.top+t.windowBounds.top,i.width,i.height):e.EMPTY},e.EMPTY=new e(0,0,0,0),e}(),s=function(e,t){return r.fromClientRect(e,t.getBoundingClientRect())},o=function(e){for(var t=[],A=0,i=e.length;A<i;){var n=e.charCodeAt(A++);if(n>=55296&&n<=56319&&A<i){var a=e.charCodeAt(A++);56320==(64512&a)?t.push(((1023&n)<<10)+(1023&a)+65536):(t.push(n),A--)}else t.push(n)}return t},l=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var A=e.length;if(!A)return"";for(var i=[],n=-1,a="";++n<A;){var r=e[n];r<=65535?i.push(r):(r-=65536,i.push(55296+(r>>10),r%1024+56320)),(n+1===A||i.length>16384)&&(a+=String.fromCharCode.apply(String,i),i.length=0)}return a},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",d="undefined"==typeof Uint8Array?[]:new Uint8Array(256),h=0;h<c.length;h++)d[c.charCodeAt(h)]=h;for(var u="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",g="undefined"==typeof Uint8Array?[]:new Uint8Array(256),p=0;p<u.length;p++)g[u.charCodeAt(p)]=p;for(var m=function(e,t,A){return e.slice?e.slice(t,A):new Uint16Array(Array.prototype.slice.call(e,t,A))},w=function(){function e(e,t,A,i,n,a){this.initialValue=e,this.errorValue=t,this.highStart=A,this.highValueIndex=i,this.index=n,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),f="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E="undefined"==typeof Uint8Array?[]:new Uint8Array(256),B=0;B<f.length;B++)E[f.charCodeAt(B)]=B;var b=10,v=13,C=15,y=17,F=18,x=19,T=20,S=21,I=22,M=24,k=25,U=26,Q=27,O=28,L=30,N=32,D=33,R=34,H=35,P=37,V=38,K=39,G=40,W=42,z=[9001,65288],X="×",Y="÷",j=function(e,t){var A=function(e){var t,A,i,n,a,r=.75*e.length,s=e.length,o=0;"="===e[e.length-1]&&(r--,"="===e[e.length-2]&&r--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(r):new Array(r),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)A=g[e.charCodeAt(t)],i=g[e.charCodeAt(t+1)],n=g[e.charCodeAt(t+2)],a=g[e.charCodeAt(t+3)],c[o++]=A<<2|i>>4,c[o++]=(15&i)<<4|n>>2,c[o++]=(3&n)<<6|63&a;return l}(e),i=Array.isArray(A)?function(e){for(var t=e.length,A=[],i=0;i<t;i+=4)A.push(e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]);return A}(A):new Uint32Array(A),n=Array.isArray(A)?function(e){for(var t=e.length,A=[],i=0;i<t;i+=2)A.push(e[i+1]<<8|e[i]);return A}(A):new Uint16Array(A),a=m(n,12,i[4]/2),r=2===i[5]?m(n,(24+i[4])/2):function(e,t,A){return e.slice?e.slice(t,A):new Uint32Array(Array.prototype.slice.call(e,t,A))}(i,Math.ceil((24+i[4])/4));return new w(i[0],i[1],i[2],i[3],a,r)}("KwAAAAAAAAAACA4AUD0AADAgAAACAAAAAAAIABAAGABAAEgAUABYAGAAaABgAGgAYgBqAF8AZwBgAGgAcQB5AHUAfQCFAI0AlQCdAKIAqgCyALoAYABoAGAAaABgAGgAwgDKAGAAaADGAM4A0wDbAOEA6QDxAPkAAQEJAQ8BFwF1AH0AHAEkASwBNAE6AUIBQQFJAVEBWQFhAWgBcAF4ATAAgAGGAY4BlQGXAZ8BpwGvAbUBvQHFAc0B0wHbAeMB6wHxAfkBAQIJAvEBEQIZAiECKQIxAjgCQAJGAk4CVgJeAmQCbAJ0AnwCgQKJApECmQKgAqgCsAK4ArwCxAIwAMwC0wLbAjAA4wLrAvMC+AIAAwcDDwMwABcDHQMlAy0DNQN1AD0DQQNJA0kDSQNRA1EDVwNZA1kDdQB1AGEDdQBpA20DdQN1AHsDdQCBA4kDkQN1AHUAmQOhA3UAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AKYDrgN1AHUAtgO+A8YDzgPWAxcD3gPjA+sD8wN1AHUA+wMDBAkEdQANBBUEHQQlBCoEFwMyBDgEYABABBcDSARQBFgEYARoBDAAcAQzAXgEgASIBJAEdQCXBHUAnwSnBK4EtgS6BMIEyAR1AHUAdQB1AHUAdQCVANAEYABgAGAAYABgAGAAYABgANgEYADcBOQEYADsBPQE/AQEBQwFFAUcBSQFLAU0BWQEPAVEBUsFUwVbBWAAYgVgAGoFcgV6BYIFigWRBWAAmQWfBaYFYABgAGAAYABgAKoFYACxBbAFuQW6BcEFwQXHBcEFwQXPBdMF2wXjBeoF8gX6BQIGCgYSBhoGIgYqBjIGOgZgAD4GRgZMBmAAUwZaBmAAYABgAGAAYABgAGAAYABgAGAAYABgAGIGYABpBnAGYABgAGAAYABgAGAAYABgAGAAYAB4Bn8GhQZgAGAAYAB1AHcDFQSLBmAAYABgAJMGdQA9A3UAmwajBqsGqwaVALMGuwbDBjAAywbSBtIG1QbSBtIG0gbSBtIG0gbdBuMG6wbzBvsGAwcLBxMHAwcbByMHJwcsBywHMQcsB9IGOAdAB0gHTgfSBkgHVgfSBtIG0gbSBtIG0gbSBtIG0gbSBiwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdgAGAALAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAdbB2MHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB2kH0gZwB64EdQB1AHUAdQB1AHUAdQB1AHUHfQdgAIUHjQd1AHUAlQedB2AAYAClB6sHYACzB7YHvgfGB3UAzgfWBzMB3gfmB1EB7gf1B/0HlQENAQUIDQh1ABUIHQglCBcDLQg1CD0IRQhNCEEDUwh1AHUAdQBbCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIaQhjCGQIZQhmCGcIaAhpCGMIZAhlCGYIZwhoCGkIYwhkCGUIZghnCGgIcAh3CHoIMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIgggwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAALAcsBywHLAcsBywHLAcsBywHLAcsB4oILAcsB44I0gaWCJ4Ipgh1AHUAqgiyCHUAdQB1AHUAdQB1AHUAdQB1AHUAtwh8AXUAvwh1AMUIyQjRCNkI4AjoCHUAdQB1AO4I9gj+CAYJDgkTCS0HGwkjCYIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiCCIIIggiAAIAAAAFAAYABgAGIAXwBgAHEAdQBFAJUAogCyAKAAYABgAEIA4ABGANMA4QDxAMEBDwE1AFwBLAE6AQEBUQF4QkhCmEKoQrhCgAHIQsAB0MLAAcABwAHAAeDC6ABoAHDCwMMAAcABwAHAAdDDGMMAAcAB6MM4wwjDWMNow3jDaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAGgAaABoAEjDqABWw6bDqABpg6gAaABoAHcDvwOPA+gAaABfA/8DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DvwO/A78DpcPAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcAB9cPKwkyCToJMAB1AHUAdQBCCUoJTQl1AFUJXAljCWcJawkwADAAMAAwAHMJdQB2CX4JdQCECYoJjgmWCXUAngkwAGAAYABxAHUApgn3A64JtAl1ALkJdQDACTAAMAAwADAAdQB1AHUAdQB1AHUAdQB1AHUAowYNBMUIMAAwADAAMADICcsJ0wnZCRUE4QkwAOkJ8An4CTAAMAB1AAAKvwh1AAgKDwoXCh8KdQAwACcKLgp1ADYKqAmICT4KRgowADAAdQB1AE4KMAB1AFYKdQBeCnUAZQowADAAMAAwADAAMAAwADAAMAAVBHUAbQowADAAdQC5CXUKMAAwAHwBxAijBogEMgF9CoQKiASMCpQKmgqIBKIKqgquCogEDQG2Cr4KxgrLCjAAMADTCtsKCgHjCusK8Qr5CgELMAAwADAAMAB1AIsECQsRC3UANAEZCzAAMAAwADAAMAB1ACELKQswAHUANAExCzkLdQBBC0kLMABRC1kLMAAwADAAMAAwADAAdQBhCzAAMAAwAGAAYABpC3ELdwt/CzAAMACHC4sLkwubC58Lpwt1AK4Ltgt1APsDMAAwADAAMAAwADAAMAAwAL4LwwvLC9IL1wvdCzAAMADlC+kL8Qv5C/8LSQswADAAMAAwADAAMAAwADAAMAAHDDAAMAAwADAAMAAODBYMHgx1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1ACYMMAAwADAAdQB1AHUALgx1AHUAdQB1AHUAdQA2DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AD4MdQBGDHUAdQB1AHUAdQB1AEkMdQB1AHUAdQB1AFAMMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQBYDHUAdQB1AF8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUA+wMVBGcMMAAwAHwBbwx1AHcMfwyHDI8MMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAYABgAJcMMAAwADAAdQB1AJ8MlQClDDAAMACtDCwHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsB7UMLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHdQB1AHUAdQB1AHUAdQB1AHUAdQB1AHUAdQB1AA0EMAC9DDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAsBywHLAcsBywHLAcsBywHLQcwAMEMyAwsBywHLAcsBywHLAcsBywHLAcsBywHzAwwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwAHUAdQB1ANQM2QzhDDAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMABgAGAAYABgAGAAYABgAOkMYADxDGAA+AwADQYNYABhCWAAYAAODTAAMAAwADAAFg1gAGAAHg37AzAAMAAwADAAYABgACYNYAAsDTQNPA1gAEMNPg1LDWAAYABgAGAAYABgAGAAYABgAGAAUg1aDYsGVglhDV0NcQBnDW0NdQ15DWAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAlQCBDZUAiA2PDZcNMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAnw2nDTAAMAAwADAAMAAwAHUArw23DTAAMAAwADAAMAAwADAAMAAwADAAMAB1AL8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAB1AHUAdQB1AHUAdQDHDTAAYABgAM8NMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA1w11ANwNMAAwAD0B5A0wADAAMAAwADAAMADsDfQN/A0EDgwOFA4wABsOMAAwADAAMAAwADAAMAAwANIG0gbSBtIG0gbSBtIG0gYjDigOwQUuDsEFMw7SBjoO0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGQg5KDlIOVg7SBtIGXg5lDm0OdQ7SBtIGfQ6EDooOjQ6UDtIGmg6hDtIG0gaoDqwO0ga0DrwO0gZgAGAAYADEDmAAYAAkBtIGzA5gANIOYADaDokO0gbSBt8O5w7SBu8O0gb1DvwO0gZgAGAAxA7SBtIG0gbSBtIGYABgAGAAYAAED2AAsAUMD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHJA8sBywHLAcsBywHLAccDywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywPLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAc0D9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAccD9IG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIGFA8sBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHLAcsBywHPA/SBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gbSBtIG0gYUD0QPlQCVAJUAMAAwADAAMACVAJUAlQCVAJUAlQCVAEwPMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAA//8EAAQABAAEAAQABAAEAAQABAANAAMAAQABAAIABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQACgATABcAHgAbABoAHgAXABYAEgAeABsAGAAPABgAHABLAEsASwBLAEsASwBLAEsASwBLABgAGAAeAB4AHgATAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABYAGwASAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWAA0AEQAeAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAFAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJABYAGgAbABsAGwAeAB0AHQAeAE8AFwAeAA0AHgAeABoAGwBPAE8ADgBQAB0AHQAdAE8ATwAXAE8ATwBPABYAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AHgAeAFAATwBAAE8ATwBPAEAATwBQAFAATwBQAB4AHgAeAB4AHgAeAB0AHQAdAB0AHgAdAB4ADgBQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgBQAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAJAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAkACQAJAAkACQAJAAkABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAFAAHgAeAB4AKwArAFAAUABQAFAAGABQACsAKwArACsAHgAeAFAAHgBQAFAAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUAAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAYAA0AKwArAB4AHgAbACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAB4ABAAEAB4ABAAEABMABAArACsAKwArACsAKwArACsAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAKwArACsAKwBWAFYAVgBWAB4AHgArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AGgAaABoAGAAYAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQAEwAEACsAEwATAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABLAEsASwBLAEsASwBLAEsASwBLABoAGQAZAB4AUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQABMAUAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABABQAFAABAAEAB4ABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUAAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAFAABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQAUABQAB4AHgAYABMAUAArACsABAAbABsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAFAABAAEAAQABAAEAFAABAAEAAQAUAAEAAQABAAEAAQAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArACsAHgArAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAUAAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEAA0ADQBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUAArACsAKwBQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABABQACsAKwArACsAKwArACsAKwAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUAAaABoAUABQAFAAUABQAEwAHgAbAFAAHgAEACsAKwAEAAQABAArAFAAUABQAFAAUABQACsAKwArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQACsAUABQACsAKwAEACsABAAEAAQABAAEACsAKwArACsABAAEACsAKwAEAAQABAArACsAKwAEACsAKwArACsAKwArACsAUABQAFAAUAArAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLAAQABABQAFAAUAAEAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsAKwAEAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAArACsAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AGwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAKwArACsAKwArAAQABAAEACsAKwArACsAUABQACsAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAAQAUAArAFAAUABQAFAAUABQACsAKwArAFAAUABQACsAUABQAFAAUAArACsAKwBQAFAAKwBQACsAUABQACsAKwArAFAAUAArACsAKwBQAFAAUAArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArAAQABAAEAAQABAArACsAKwAEAAQABAArAAQABAAEAAQAKwArAFAAKwArACsAKwArACsABAArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAHgAeAB4AHgAeAB4AGwAeACsAKwArACsAKwAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAUABQAFAAKwArACsAKwArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwAOAFAAUABQAFAAUABQAFAAHgBQAAQABAAEAA4AUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAKwArAAQAUAAEAAQABAAEAAQABAAEACsABAAEAAQAKwAEAAQABAAEACsAKwArACsAKwArACsABAAEACsAKwArACsAKwArACsAUAArAFAAUAAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAFAABAAEAAQABAAEAAQABAArAAQABAAEACsABAAEAAQABABQAB4AKwArACsAKwBQAFAAUAAEAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQABoAUABQAFAAUABQAFAAKwAEAAQABAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQACsAUAArACsAUABQAFAAUABQAFAAUAArACsAKwAEACsAKwArACsABAAEAAQABAAEAAQAKwAEACsABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArAAQABAAeACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAXAAqACoAKgAqACoAKgAqACsAKwArACsAGwBcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAeAEsASwBLAEsASwBLAEsASwBLAEsADQANACsAKwArACsAKwBcAFwAKwBcACsAXABcAFwAXABcACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAXAArAFwAXABcAFwAXABcAFwAXABcAFwAKgBcAFwAKgAqACoAKgAqACoAKgAqACoAXAArACsAXABcAFwAXABcACsAXAArACoAKgAqACoAKgAqACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwBcAFwAXABcAFAADgAOAA4ADgAeAA4ADgAJAA4ADgANAAkAEwATABMAEwATAAkAHgATAB4AHgAeAAQABAAeAB4AHgAeAB4AHgBLAEsASwBLAEsASwBLAEsASwBLAFAAUABQAFAAUABQAFAAUABQAFAADQAEAB4ABAAeAAQAFgARABYAEQAEAAQAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQADQAEAAQABAAEAAQADQAEAAQAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAA0ADQAeAB4AHgAeAB4AHgAEAB4AHgAeAB4AHgAeACsAHgAeAA4ADgANAA4AHgAeAB4AHgAeAAkACQArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgBcAEsASwBLAEsASwBLAEsASwBLAEsADQANAB4AHgAeAB4AXABcAFwAXABcAFwAKgAqACoAKgBcAFwAXABcACoAKgAqAFwAKgAqACoAXABcACoAKgAqACoAKgAqACoAXABcAFwAKgAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKgAqAFwAKgBLAEsASwBLAEsASwBLAEsASwBLACoAKgAqACoAKgAqAFAAUABQAFAAUABQACsAUAArACsAKwArACsAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAKwBQACsAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsABAAEAAQAHgANAB4AHgAeAB4AHgAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUAArACsADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAWABEAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQANAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAANAA0AKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUAArAAQABAArACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqAA0ADQAVAFwADQAeAA0AGwBcACoAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwAeAB4AEwATAA0ADQAOAB4AEwATAB4ABAAEAAQACQArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAHgArACsAKwATABMASwBLAEsASwBLAEsASwBLAEsASwBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAXABcAFwAXABcACsAKwArACsAKwArACsAKwArACsAKwBcAFwAXABcAFwAXABcAFwAXABcAFwAXAArACsAKwArAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAXAArACsAKwAqACoAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAArACsAHgAeAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcACoAKgAqACoAKgAqACoAKgAqACoAKwAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKwArAAQASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACoAKgAqACoAKgAqACoAXAAqACoAKgAqACoAKgArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABABQAFAAUABQAFAAUABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwANAA0AHgANAA0ADQANAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAEAAQABAAEAAQAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwAeAB4AHgAeAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArAA0ADQANAA0ADQBLAEsASwBLAEsASwBLAEsASwBLACsAKwArAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAA0ADQBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUAAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArAAQABAAEAB4ABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAAQAUABQAFAAUABQAFAABABQAFAABAAEAAQAUAArACsAKwArACsABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQACsAUAArAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAFAAUABQACsAHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQACsAKwAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQACsAHgAeAB4AHgAeAB4AHgAOAB4AKwANAA0ADQANAA0ADQANAAkADQANAA0ACAAEAAsABAAEAA0ACQANAA0ADAAdAB0AHgAXABcAFgAXABcAFwAWABcAHQAdAB4AHgAUABQAFAANAAEAAQAEAAQABAAEAAQACQAaABoAGgAaABoAGgAaABoAHgAXABcAHQAVABUAHgAeAB4AHgAeAB4AGAAWABEAFQAVABUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ADQAeAA0ADQANAA0AHgANAA0ADQAHAB4AHgAeAB4AKwAEAAQABAAEAAQABAAEAAQABAAEAFAAUAArACsATwBQAFAAUABQAFAAHgAeAB4AFgARAE8AUABPAE8ATwBPAFAAUABQAFAAUAAeAB4AHgAWABEAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArABsAGwAbABsAGwAbABsAGgAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGgAbABsAGwAbABoAGwAbABoAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbABsAGwAbAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAHgAeAFAAGgAeAB0AHgBQAB4AGgAeAB4AHgAeAB4AHgAeAB4AHgBPAB4AUAAbAB4AHgBQAFAAUABQAFAAHgAeAB4AHQAdAB4AUAAeAFAAHgBQAB4AUABPAFAAUAAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAHgBQAFAAUABQAE8ATwBQAFAAUABQAFAATwBQAFAATwBQAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAUABQAFAATwBPAE8ATwBPAE8ATwBPAE8ATwBQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABPAB4AHgArACsAKwArAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHQAdAB4AHgAeAB0AHQAeAB4AHQAeAB4AHgAdAB4AHQAbABsAHgAdAB4AHgAeAB4AHQAeAB4AHQAdAB0AHQAeAB4AHQAeAB0AHgAdAB0AHQAdAB0AHQAeAB0AHgAeAB4AHgAeAB0AHQAdAB0AHgAeAB4AHgAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB4AHgAeAB0AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAeAB0AHQAdAB0AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAdAB4AHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAWABEAHgAeAB4AHgAeAB4AHQAeAB4AHgAeAB4AHgAeACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAWABEAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAFAAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAeAB4AHQAdAB0AHQAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB0AHQAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB0AHQAeAB4AHQAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AHQAdAB0AHgAeAB0AHgAeAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlAB4AHQAdAB4AHgAdAB4AHgAeAB4AHQAdAB4AHgAeAB4AJQAlAB0AHQAlAB4AJQAlACUAIAAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAeAB4AHgAeAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHgAdAB0AHQAeAB0AJQAdAB0AHgAdAB0AHgAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHQAdAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAdAB0AHQAdACUAHgAlACUAJQAdACUAJQAdAB0AHQAlACUAHQAdACUAHQAdACUAJQAlAB4AHQAeAB4AHgAeAB0AHQAlAB0AHQAdAB0AHQAdACUAJQAlACUAJQAdACUAJQAgACUAHQAdACUAJQAlACUAJQAlACUAJQAeAB4AHgAlACUAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB0AHgAeAB4AFwAXABcAFwAXABcAHgATABMAJQAeAB4AHgAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARABYAEQAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAWABEAFgARABYAEQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAWABEAFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AFgARAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAdAB0AHQAdAB0AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAFAAUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAEAAQABAAeAB4AKwArACsAKwArABMADQANAA0AUAATAA0AUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUAANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAA0ADQANAA0ADQANAA0ADQAeAA0AFgANAB4AHgAXABcAHgAeABcAFwAWABEAFgARABYAEQAWABEADQANAA0ADQATAFAADQANAB4ADQANAB4AHgAeAB4AHgAMAAwADQANAA0AHgANAA0AFgANAA0ADQANAA0ADQANAA0AHgANAB4ADQANAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArACsAKwArACsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArAA0AEQARACUAJQBHAFcAVwAWABEAFgARABYAEQAWABEAFgARACUAJQAWABEAFgARABYAEQAWABEAFQAWABEAEQAlAFcAVwBXAFcAVwBXAFcAVwBXAAQABAAEAAQABAAEACUAVwBXAFcAVwA2ACUAJQBXAFcAVwBHAEcAJQAlACUAKwBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBRAFcAUQBXAFEAVwBXAFcAVwBXAFcAUQBXAFcAVwBXAFcAVwBRAFEAKwArAAQABAAVABUARwBHAFcAFQBRAFcAUQBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFEAVwBRAFcAUQBXAFcAVwBXAFcAVwBRAFcAVwBXAFcAVwBXAFEAUQBXAFcAVwBXABUAUQBHAEcAVwArACsAKwArACsAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwAlACUAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACsAKwArACsAKwArACsAKwArACsAKwArAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAUQBRAFEAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBPAE8ATwBPAE8ATwBPAE8AJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADQATAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABLAEsASwBLAEsASwBLAEsASwBLAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAABAAEAAQABAAeAAQABAAEAAQABAAEAAQABAAEAAQAHgBQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUABQAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAeAA0ADQANAA0ADQArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AUAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAB4AHgAeAB4AHgAeAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AUABQAFAAUABQAFAAUABQAFAAUABQAAQAUABQAFAABABQAFAAUABQAAQAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAeAB4AHgAeAAQAKwArACsAUABQAFAAUABQAFAAHgAeABoAHgArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAADgAOABMAEwArACsAKwArACsAKwArACsABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwANAA0ASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUAAeAB4AHgBQAA4AUABQAAQAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArAB4AWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYAFgAWABYACsAKwArAAQAHgAeAB4AHgAeAB4ADQANAA0AHgAeAB4AHgArAFAASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArAB4AHgBcAFwAXABcAFwAKgBcAFwAXABcAFwAXABcAFwAXABcAEsASwBLAEsASwBLAEsASwBLAEsAXABcAFwAXABcACsAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAFAAUABQAAQAUABQAFAAUABQAFAAUABQAAQABAArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAHgANAA0ADQBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKgAqACoAXAAqACoAKgBcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXAAqAFwAKgAqACoAXABcACoAKgBcAFwAXABcAFwAKgAqAFwAKgBcACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFwAXABcACoAKgBQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAA0ADQBQAFAAUAAEAAQAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQADQAEAAQAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAVABVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBUAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVAFUAVQBVACsAKwArACsAKwArACsAKwArACsAKwArAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAWQBZAFkAKwArACsAKwBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAWgBaAFoAKwArACsAKwAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYABgAGAAYAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAKwArACsAKwArAFYABABWAFYAVgBWAFYAVgBWAFYAVgBWAB4AVgBWAFYAVgBWAFYAVgBWAFYAVgBWAFYAVgArAFYAVgBWAFYAVgArAFYAKwBWAFYAKwBWAFYAKwBWAFYAVgBWAFYAVgBWAFYAVgBWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAEQAWAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAaAB4AKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAGAARABEAGAAYABMAEwAWABEAFAArACsAKwArACsAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACUAJQAlACUAJQAWABEAFgARABYAEQAWABEAFgARABYAEQAlACUAFgARACUAJQAlACUAJQAlACUAEQAlABEAKwAVABUAEwATACUAFgARABYAEQAWABEAJQAlACUAJQAlACUAJQAlACsAJQAbABoAJQArACsAKwArAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAcAKwATACUAJQAbABoAJQAlABYAEQAlACUAEQAlABEAJQBXAFcAVwBXAFcAVwBXAFcAVwBXABUAFQAlACUAJQATACUAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXABYAJQARACUAJQAlAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAWACUAEQAlABYAEQARABYAEQARABUAVwBRAFEAUQBRAFEAUQBRAFEAUQBRAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAEcARwArACsAVwBXAFcAVwBXAFcAKwArAFcAVwBXAFcAVwBXACsAKwBXAFcAVwBXAFcAVwArACsAVwBXAFcAKwArACsAGgAbACUAJQAlABsAGwArAB4AHgAeAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwAEAAQABAAQAB0AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsADQANAA0AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAA0AUABQAFAAUAArACsAKwArAFAAUABQAFAAUABQAFAAUAANAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwArAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwBQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwANAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAB4AUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAUABQAFAAUABQAAQABAAEACsABAAEACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAKwBQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAA0ADQANAA0ADQANAA0ADQAeACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAArACsAKwArAFAAUABQAFAAUAANAA0ADQANAA0ADQAUACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsADQANAA0ADQANAA0ADQBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAB4AHgAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArAAQABAANACsAKwBQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAB4AHgAeAB4AHgArACsAKwArACsAKwAEAAQABAAEAAQABAAEAA0ADQAeAB4AHgAeAB4AKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwAeACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEACsASwBLAEsASwBLAEsASwBLAEsASwANAA0ADQANAFAABAAEAFAAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAeAA4AUAArACsAKwArACsAKwArACsAKwAEAFAAUABQAFAADQANAB4ADQAEAAQABAAEAB4ABAAEAEsASwBLAEsASwBLAEsASwBLAEsAUAAOAFAADQANAA0AKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAANAA0AHgANAA0AHgAEACsAUABQAFAAUABQAFAAUAArAFAAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAA0AKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsABAAEAAQABAArAFAAUABQAFAAUABQAFAAUAArACsAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQACsABAAEAFAABAAEAAQABAAEAAQABAArACsABAAEACsAKwAEAAQABAArACsAUAArACsAKwArACsAKwAEACsAKwArACsAKwBQAFAAUABQAFAABAAEACsAKwAEAAQABAAEAAQABAAEACsAKwArAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsABAAEAAQABAAEAAQABABQAFAAUABQAA0ADQANAA0AHgBLAEsASwBLAEsASwBLAEsASwBLAA0ADQArAB4ABABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAFAAUAAeAFAAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABAAEAAQADgANAA0AEwATAB4AHgAeAA0ADQANAA0ADQANAA0ADQANAA0ADQANAA0ADQANAFAAUABQAFAABAAEACsAKwAEAA0ADQAeAFAAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAFAAKwArACsAKwArACsAKwBLAEsASwBLAEsASwBLAEsASwBLACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAXABcAFwAKwArACoAKgAqACoAKgAqACoAKgAqACoAKgAqACoAKgAqACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBcAFwADQANAA0AKgBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAKwArAFAAKwArAFAAUABQAFAAUABQAFAAUAArAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQAKwAEAAQAKwArAAQABAAEAAQAUAAEAFAABAAEAA0ADQANACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAArACsABAAEAAQABAAEAAQABABQAA4AUAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAABAAEAAQABAAEAAQABAAEAAQABABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAFAABAAEAAQABAAOAB4ADQANAA0ADQAOAB4ABAArACsAKwArACsAKwArACsAUAAEAAQABAAEAAQABAAEAAQABAAEAAQAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAA0ADQANAFAADgAOAA4ADQANACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAEAAQABAAEACsABAAEAAQABAAEAAQABAAEAFAADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAOABMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQACsAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAArACsAKwAEACsABAAEACsABAAEAAQABAAEAAQABABQAAQAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAUABQAFAAUABQAFAAKwBQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAUAArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAABAAEAAQABAAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAaABoAGgAaAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArAA0AUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsADQANAA0ADQANACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABIAEgAQwBDAEMAUABQAFAAUABDAFAAUABQAEgAQwBIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAASABDAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwAJAAkACQAJAAkACQAJABYAEQArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABIAEMAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwANAA0AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArAAQABAAEAAQABAANACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEAA0ADQANAB4AHgAeAB4AHgAeAFAAUABQAFAADQAeACsAKwArACsAKwArACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAANAA0AHgAeACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwAEAFAABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwAEAAQABAAEAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAARwBHABUARwAJACsAKwArACsAKwArACsAKwArACsAKwAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUQBRAFEAKwArACsAKwArACsAKwArACsAKwArACsAKwBRAFEAUQBRACsAKwArACsAKwArACsAKwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUAArACsAHgAEAAQADQAEAAQABAAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAAQABAAEAAQABAAeAB4AHgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAB4AHgAEAAQABAAEAAQABAAEAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4ABAAEAAQAHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwArACsAKwArACsAKwArACsAKwArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAKwArAFAAKwArAFAAUAArACsAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACsAUAArAFAAUABQAFAAUABQAFAAKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwBQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAHgAeAFAAUABQAFAAUAArAFAAKwArACsAUABQAFAAUABQAFAAUAArAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAB4AHgAeAB4AHgAeAB4AHgAeACsAKwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAEsASwBLAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAeAB4AHgAeAB4AHgAeAB4ABAAeAB4AHgAeAB4AHgAeAB4AHgAeAAQAHgAeAA0ADQANAA0AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQAKwAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArAAQABAAEAAQABAAEAAQAKwAEAAQAKwAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwAEAAQABAAEAAQABAAEAFAAUABQAFAAUABQAFAAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwBQAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArABsAUABQAFAAUABQACsAKwBQAFAAUABQAFAAUABQAFAAUAAEAAQABAAEAAQABAAEACsAKwArACsAKwArACsAKwArAB4AHgAeAB4ABAAEAAQABAAEAAQABABQACsAKwArACsASwBLAEsASwBLAEsASwBLAEsASwArACsAKwArABYAFgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAGgBQAFAAUAAaAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAeAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQACsAKwBQAFAAUABQACsAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUAArACsAKwArACsAKwBQACsAKwArACsAUAArAFAAKwBQACsAUABQAFAAKwBQAFAAKwBQACsAKwBQACsAUAArAFAAKwBQACsAUAArAFAAUAArAFAAKwArAFAAUABQAFAAKwBQAFAAUABQAFAAUABQACsAUABQAFAAUAArAFAAUABQAFAAKwBQACsAUABQAFAAUABQAFAAUABQAFAAUAArAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAArACsAKwArACsAUABQAFAAKwBQAFAAUABQAFAAKwBQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwAeAB4AKwArACsAKwArACsAKwArACsAKwArACsAKwArAE8ATwBPAE8ATwBPAE8ATwBPAE8ATwBPAE8AJQAlACUAHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHgAeAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB4AHgAeACUAJQAlAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAdAB0AHQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAKQApACkAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAlACUAJQAlACUAHgAlACUAJQAlACUAIAAgACAAJQAlACAAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACEAIQAhACEAIQAlACUAIAAgACUAJQAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlACUAIAAlACUAJQAlACAAIAAgACUAIAAgACAAJQAlACUAJQAlACUAJQAgACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAlAB4AJQAeACUAJQAlACUAJQAgACUAJQAlACUAHgAlAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAgACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACAAIAAgACAAIAAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeABcAFwAXABUAFQAVAB4AHgAeAB4AJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAgACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlACUAJQAeAB4AHgAeAB4AHgAeAB4AHgAeACUAJQAlACUAJQAlAB4AHgAeAB4AHgAeAB4AHgAlACUAJQAlACUAJQAlACUAHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAgACUAJQAgACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAJQAlACUAJQAlACUAIAAlACUAJQAlACUAJQAlACUAJQAgACAAIAAgACAAIAAgACAAIAAgACUAJQAgACAAIAAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACAAIAAlACAAIAAlACAAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAgACAAIAAlACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAJQAlAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AKwAeAB4AHgAeAB4AHgAeAB4AHgAeAB4AHgArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAEsASwBLAEsASwBLAEsASwBLAEsAKwArACsAKwArACsAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwArAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwAlACUAJQAlACUAJQAlACUAJQAlACUAVwBXACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQBXAFcAVwBXAFcAVwBXAFcAVwBXAFcAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAJQAlACUAKwAEACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArACsAKwArAA=="),_=[L,36],J=[1,2,3,5],Z=[b,8],q=[Q,U],$=J.concat(Z),ee=[V,K,G,R,H],te=[C,v],Ae=function(e,t,A,i){var n=i[A];if(Array.isArray(e)?-1!==e.indexOf(n):e===n)for(var a=A;a<=i.length;){if((o=i[++a])===t)return!0;if(o!==b)break}if(n===b)for(a=A;a>0;){var r=i[--a];if(Array.isArray(e)?-1!==e.indexOf(r):e===r)for(var s=A;s<=i.length;){var o;if((o=i[++s])===t)return!0;if(o!==b)break}if(r!==b)break}return!1},ie=function(e,t){for(var A=e;A>=0;){var i=t[A];if(i!==b)return i;A--}return 0},ne=function(e,t,A,i,n){if(0===A[i])return X;var a=i-1;if(Array.isArray(n)&&!0===n[a])return X;var r=a-1,s=a+1,o=t[a],l=r>=0?t[r]:0,c=t[s];if(2===o&&3===c)return X;if(-1!==J.indexOf(o))return"!";if(-1!==J.indexOf(c))return X;if(-1!==Z.indexOf(c))return X;if(8===ie(a,t))return Y;if(11===j.get(e[a]))return X;if((o===N||o===D)&&11===j.get(e[s]))return X;if(7===o||7===c)return X;if(9===o)return X;if(-1===[b,v,C].indexOf(o)&&9===c)return X;if(-1!==[y,F,x,M,O].indexOf(c))return X;if(ie(a,t)===I)return X;if(Ae(23,I,a,t))return X;if(Ae([y,F],S,a,t))return X;if(Ae(12,12,a,t))return X;if(o===b)return Y;if(23===o||23===c)return X;if(16===c||16===o)return Y;if(-1!==[v,C,S].indexOf(c)||14===o)return X;if(36===l&&-1!==te.indexOf(o))return X;if(o===O&&36===c)return X;if(c===T)return X;if(-1!==_.indexOf(c)&&o===k||-1!==_.indexOf(o)&&c===k)return X;if(o===Q&&-1!==[P,N,D].indexOf(c)||-1!==[P,N,D].indexOf(o)&&c===U)return X;if(-1!==_.indexOf(o)&&-1!==q.indexOf(c)||-1!==q.indexOf(o)&&-1!==_.indexOf(c))return X;if(-1!==[Q,U].indexOf(o)&&(c===k||-1!==[I,C].indexOf(c)&&t[s+1]===k)||-1!==[I,C].indexOf(o)&&c===k||o===k&&-1!==[k,O,M].indexOf(c))return X;if(-1!==[k,O,M,y,F].indexOf(c))for(var d=a;d>=0;){if((h=t[d])===k)return X;if(-1===[O,M].indexOf(h))break;d--}if(-1!==[Q,U].indexOf(c))for(d=-1!==[y,F].indexOf(o)?r:a;d>=0;){var h;if((h=t[d])===k)return X;if(-1===[O,M].indexOf(h))break;d--}if(V===o&&-1!==[V,K,R,H].indexOf(c)||-1!==[K,R].indexOf(o)&&-1!==[K,G].indexOf(c)||-1!==[G,H].indexOf(o)&&c===G)return X;if(-1!==ee.indexOf(o)&&-1!==[T,U].indexOf(c)||-1!==ee.indexOf(c)&&o===Q)return X;if(-1!==_.indexOf(o)&&-1!==_.indexOf(c))return X;if(o===M&&-1!==_.indexOf(c))return X;if(-1!==_.concat(k).indexOf(o)&&c===I&&-1===z.indexOf(e[s])||-1!==_.concat(k).indexOf(c)&&o===F)return X;if(41===o&&41===c){for(var u=A[a],g=1;u>0&&41===t[--u];)g++;if(g%2!=0)return X}return o===N&&c===D?X:Y},ae=function(e,t){t||(t={lineBreak:"normal",wordBreak:"normal"});var A=function(e,t){void 0===t&&(t="strict");var A=[],i=[],n=[];return e.forEach((function(e,a){var r=j.get(e);if(r>50?(n.push(!0),r-=50):n.push(!1),-1!==["normal","auto","loose"].indexOf(t)&&-1!==[8208,8211,12316,12448].indexOf(e))return i.push(a),A.push(16);if(4===r||11===r){if(0===a)return i.push(a),A.push(L);var s=A[a-1];return-1===$.indexOf(s)?(i.push(i[a-1]),A.push(s)):(i.push(a),A.push(L))}return i.push(a),31===r?A.push("strict"===t?S:P):r===W||29===r?A.push(L):43===r?e>=131072&&e<=196605||e>=196608&&e<=262141?A.push(P):A.push(L):void A.push(r)})),[i,A,n]}(e,t.lineBreak),i=A[0],n=A[1],a=A[2];"break-all"!==t.wordBreak&&"break-word"!==t.wordBreak||(n=n.map((function(e){return-1!==[k,L,W].indexOf(e)?P:e})));var r="keep-all"===t.wordBreak?a.map((function(t,A){return t&&e[A]>=19968&&e[A]<=40959})):void 0;return[i,n,r]},re=function(){function e(e,t,A,i){this.codePoints=e,this.required="!"===t,this.start=A,this.end=i}return e.prototype.slice=function(){return l.apply(void 0,this.codePoints.slice(this.start,this.end))},e}(),se=45,oe=43,le=-1,ce=function(e){return e>=48&&e<=57},de=function(e){return ce(e)||e>=65&&e<=70||e>=97&&e<=102},he=function(e){return 10===e||9===e||32===e},ue=function(e){return function(e){return function(e){return e>=97&&e<=122}(e)||function(e){return e>=65&&e<=90}(e)}(e)||function(e){return e>=128}(e)||95===e},ge=function(e){return ue(e)||ce(e)||e===se},pe=function(e){return e>=0&&e<=8||11===e||e>=14&&e<=31||127===e},me=function(e,t){return 92===e&&10!==t},we=function(e,t,A){return e===se?ue(t)||me(t,A):!!ue(e)||!(92!==e||!me(e,t))},fe=function(e,t,A){return e===oe||e===se?!!ce(t)||46===t&&ce(A):ce(46===e?t:e)},Ee=function(e){var t=0,A=1;e[t]!==oe&&e[t]!==se||(e[t]===se&&(A=-1),t++);for(var i=[];ce(e[t]);)i.push(e[t++]);var n=i.length?parseInt(l.apply(void 0,i),10):0;46===e[t]&&t++;for(var a=[];ce(e[t]);)a.push(e[t++]);var r=a.length,s=r?parseInt(l.apply(void 0,a),10):0;69!==e[t]&&101!==e[t]||t++;var o=1;e[t]!==oe&&e[t]!==se||(e[t]===se&&(o=-1),t++);for(var c=[];ce(e[t]);)c.push(e[t++]);var d=c.length?parseInt(l.apply(void 0,c),10):0;return A*(n+s*Math.pow(10,-r))*Math.pow(10,o*d)},Be={type:2},be={type:3},ve={type:4},Ce={type:13},ye={type:8},Fe={type:21},xe={type:9},Te={type:10},Se={type:11},Ie={type:12},Me={type:14},ke={type:23},Ue={type:1},Qe={type:25},Oe={type:24},Le={type:26},Ne={type:27},De={type:28},Re={type:29},He={type:31},Pe={type:32},Ve=function(){function e(){this._value=[]}return e.prototype.write=function(e){this._value=this._value.concat(o(e))},e.prototype.read=function(){for(var e=[],t=this.consumeToken();t!==Pe;)e.push(t),t=this.consumeToken();return e},e.prototype.consumeToken=function(){var e=this.consumeCodePoint();switch(e){case 34:return this.consumeStringToken(34);case 35:var t=this.peekCodePoint(0),A=this.peekCodePoint(1),i=this.peekCodePoint(2);if(ge(t)||me(A,i)){var n=we(t,A,i)?2:1;return{type:5,value:this.consumeName(),flags:n}}break;case 36:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Ce;break;case 39:return this.consumeStringToken(39);case 40:return Be;case 41:return be;case 42:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Me;break;case oe:if(fe(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 44:return ve;case se:var a=e,r=this.peekCodePoint(0),s=this.peekCodePoint(1);if(fe(a,r,s))return this.reconsumeCodePoint(e),this.consumeNumericToken();if(we(a,r,s))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();if(r===se&&62===s)return this.consumeCodePoint(),this.consumeCodePoint(),Oe;break;case 46:if(fe(e,this.peekCodePoint(0),this.peekCodePoint(1)))return this.reconsumeCodePoint(e),this.consumeNumericToken();break;case 47:if(42===this.peekCodePoint(0))for(this.consumeCodePoint();;){var o=this.consumeCodePoint();if(42===o&&47===(o=this.consumeCodePoint()))return this.consumeToken();if(o===le)return this.consumeToken()}break;case 58:return Le;case 59:return Ne;case 60:if(33===this.peekCodePoint(0)&&this.peekCodePoint(1)===se&&this.peekCodePoint(2)===se)return this.consumeCodePoint(),this.consumeCodePoint(),Qe;break;case 64:var c=this.peekCodePoint(0),d=this.peekCodePoint(1),h=this.peekCodePoint(2);if(we(c,d,h))return{type:7,value:this.consumeName()};break;case 91:return De;case 92:if(me(e,this.peekCodePoint(0)))return this.reconsumeCodePoint(e),this.consumeIdentLikeToken();break;case 93:return Re;case 61:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),ye;break;case 123:return Se;case 125:return Ie;case 117:case 85:var u=this.peekCodePoint(0),g=this.peekCodePoint(1);return u!==oe||!de(g)&&63!==g||(this.consumeCodePoint(),this.consumeUnicodeRangeToken()),this.reconsumeCodePoint(e),this.consumeIdentLikeToken();case 124:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),xe;if(124===this.peekCodePoint(0))return this.consumeCodePoint(),Fe;break;case 126:if(61===this.peekCodePoint(0))return this.consumeCodePoint(),Te;break;case le:return Pe}return he(e)?(this.consumeWhiteSpace(),He):ce(e)?(this.reconsumeCodePoint(e),this.consumeNumericToken()):ue(e)?(this.reconsumeCodePoint(e),this.consumeIdentLikeToken()):{type:6,value:l(e)}},e.prototype.consumeCodePoint=function(){var e=this._value.shift();return void 0===e?-1:e},e.prototype.reconsumeCodePoint=function(e){this._value.unshift(e)},e.prototype.peekCodePoint=function(e){return e>=this._value.length?-1:this._value[e]},e.prototype.consumeUnicodeRangeToken=function(){for(var e=[],t=this.consumeCodePoint();de(t)&&e.length<6;)e.push(t),t=this.consumeCodePoint();for(var A=!1;63===t&&e.length<6;)e.push(t),t=this.consumeCodePoint(),A=!0;if(A)return{type:30,start:parseInt(l.apply(void 0,e.map((function(e){return 63===e?48:e}))),16),end:parseInt(l.apply(void 0,e.map((function(e){return 63===e?70:e}))),16)};var i=parseInt(l.apply(void 0,e),16);if(this.peekCodePoint(0)===se&&de(this.peekCodePoint(1))){this.consumeCodePoint(),t=this.consumeCodePoint();for(var n=[];de(t)&&n.length<6;)n.push(t),t=this.consumeCodePoint();return{type:30,start:i,end:parseInt(l.apply(void 0,n),16)}}return{type:30,start:i,end:i}},e.prototype.consumeIdentLikeToken=function(){var e=this.consumeName();return"url"===e.toLowerCase()&&40===this.peekCodePoint(0)?(this.consumeCodePoint(),this.consumeUrlToken()):40===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:19,value:e}):{type:20,value:e}},e.prototype.consumeUrlToken=function(){var e=[];if(this.consumeWhiteSpace(),this.peekCodePoint(0)===le)return{type:22,value:""};var t=this.peekCodePoint(0);if(39===t||34===t){var A=this.consumeStringToken(this.consumeCodePoint());return 0===A.type&&(this.consumeWhiteSpace(),this.peekCodePoint(0)===le||41===this.peekCodePoint(0))?(this.consumeCodePoint(),{type:22,value:A.value}):(this.consumeBadUrlRemnants(),ke)}for(;;){var i=this.consumeCodePoint();if(i===le||41===i)return{type:22,value:l.apply(void 0,e)};if(he(i))return this.consumeWhiteSpace(),this.peekCodePoint(0)===le||41===this.peekCodePoint(0)?(this.consumeCodePoint(),{type:22,value:l.apply(void 0,e)}):(this.consumeBadUrlRemnants(),ke);if(34===i||39===i||40===i||pe(i))return this.consumeBadUrlRemnants(),ke;if(92===i){if(!me(i,this.peekCodePoint(0)))return this.consumeBadUrlRemnants(),ke;e.push(this.consumeEscapedCodePoint())}else e.push(i)}},e.prototype.consumeWhiteSpace=function(){for(;he(this.peekCodePoint(0));)this.consumeCodePoint()},e.prototype.consumeBadUrlRemnants=function(){for(;;){var e=this.consumeCodePoint();if(41===e||e===le)return;me(e,this.peekCodePoint(0))&&this.consumeEscapedCodePoint()}},e.prototype.consumeStringSlice=function(e){for(var t="";e>0;){var A=Math.min(5e4,e);t+=l.apply(void 0,this._value.splice(0,A)),e-=A}return this._value.shift(),t},e.prototype.consumeStringToken=function(e){for(var t="",A=0;;){var i=this._value[A];if(i===le||void 0===i||i===e)return{type:0,value:t+=this.consumeStringSlice(A)};if(10===i)return this._value.splice(0,A),Ue;if(92===i){var n=this._value[A+1];n!==le&&void 0!==n&&(10===n?(t+=this.consumeStringSlice(A),A=-1,this._value.shift()):me(i,n)&&(t+=this.consumeStringSlice(A),t+=l(this.consumeEscapedCodePoint()),A=-1))}A++}},e.prototype.consumeNumber=function(){var e=[],t=4,A=this.peekCodePoint(0);for(A!==oe&&A!==se||e.push(this.consumeCodePoint());ce(this.peekCodePoint(0));)e.push(this.consumeCodePoint());A=this.peekCodePoint(0);var i=this.peekCodePoint(1);if(46===A&&ce(i))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;ce(this.peekCodePoint(0));)e.push(this.consumeCodePoint());A=this.peekCodePoint(0),i=this.peekCodePoint(1);var n=this.peekCodePoint(2);if((69===A||101===A)&&((i===oe||i===se)&&ce(n)||ce(i)))for(e.push(this.consumeCodePoint(),this.consumeCodePoint()),t=8;ce(this.peekCodePoint(0));)e.push(this.consumeCodePoint());return[Ee(e),t]},e.prototype.consumeNumericToken=function(){var e=this.consumeNumber(),t=e[0],A=e[1],i=this.peekCodePoint(0),n=this.peekCodePoint(1),a=this.peekCodePoint(2);return we(i,n,a)?{type:15,number:t,flags:A,unit:this.consumeName()}:37===i?(this.consumeCodePoint(),{type:16,number:t,flags:A}):{type:17,number:t,flags:A}},e.prototype.consumeEscapedCodePoint=function(){var e=this.consumeCodePoint();if(de(e)){for(var t=l(e);de(this.peekCodePoint(0))&&t.length<6;)t+=l(this.consumeCodePoint());he(this.peekCodePoint(0))&&this.consumeCodePoint();var A=parseInt(t,16);return 0===A||function(e){return e>=55296&&e<=57343}(A)||A>1114111?65533:A}return e===le?65533:e},e.prototype.consumeName=function(){for(var e="";;){var t=this.consumeCodePoint();if(ge(t))e+=l(t);else{if(!me(t,this.peekCodePoint(0)))return this.reconsumeCodePoint(t),e;e+=l(this.consumeEscapedCodePoint())}}},e}(),Ke=function(){function e(e){this._tokens=e}return e.create=function(t){var A=new Ve;return A.write(t),new e(A.read())},e.parseValue=function(t){return e.create(t).parseComponentValue()},e.parseValues=function(t){return e.create(t).parseComponentValues()},e.prototype.parseComponentValue=function(){for(var e=this.consumeToken();31===e.type;)e=this.consumeToken();if(32===e.type)throw new SyntaxError("Error parsing CSS component value, unexpected EOF");this.reconsumeToken(e);var t=this.consumeComponentValue();do{e=this.consumeToken()}while(31===e.type);if(32===e.type)return t;throw new SyntaxError("Error parsing CSS component value, multiple values found when expecting only one")},e.prototype.parseComponentValues=function(){for(var e=[];;){var t=this.consumeComponentValue();if(32===t.type)return e;e.push(t),e.push()}},e.prototype.consumeComponentValue=function(){var e=this.consumeToken();switch(e.type){case 11:case 28:case 2:return this.consumeSimpleBlock(e.type);case 19:return this.consumeFunction(e)}return e},e.prototype.consumeSimpleBlock=function(e){for(var t={type:e,values:[]},A=this.consumeToken();;){if(32===A.type||Ze(A,e))return t;this.reconsumeToken(A),t.values.push(this.consumeComponentValue()),A=this.consumeToken()}},e.prototype.consumeFunction=function(e){for(var t={name:e.value,values:[],type:18};;){var A=this.consumeToken();if(32===A.type||3===A.type)return t;this.reconsumeToken(A),t.values.push(this.consumeComponentValue())}},e.prototype.consumeToken=function(){var e=this._tokens.shift();return void 0===e?Pe:e},e.prototype.reconsumeToken=function(e){this._tokens.unshift(e)},e}(),Ge=function(e){return 15===e.type},We=function(e){return 17===e.type},ze=function(e){return 20===e.type},Xe=function(e){return 0===e.type},Ye=function(e,t){return ze(e)&&e.value===t},je=function(e){return 31!==e.type},_e=function(e){return 31!==e.type&&4!==e.type},Je=function(e){var t=[],A=[];return e.forEach((function(e){if(4===e.type){if(0===A.length)throw new Error("Error parsing function args, zero tokens for arg");return t.push(A),void(A=[])}31!==e.type&&A.push(e)})),A.length&&t.push(A),t},Ze=function(e,t){return 11===t&&12===e.type||28===t&&29===e.type||2===t&&3===e.type},qe=function(e){return 17===e.type||15===e.type},$e=function(e){return 16===e.type||qe(e)},et=function(e){return e.length>1?[e[0],e[1]]:[e[0]]},tt={type:17,number:0,flags:4},At={type:16,number:50,flags:4},it={type:16,number:100,flags:4},nt=function(e,t,A){var i=e[0],n=e[1];return[at(i,t),at(void 0!==n?n:i,A)]},at=function(e,t){if(16===e.type)return e.number/100*t;if(Ge(e))switch(e.unit){case"rem":case"em":return 16*e.number;default:return e.number}return e.number},rt="grad",st="turn",ot=function(e,t){if(15===t.type)switch(t.unit){case"deg":return Math.PI*t.number/180;case rt:return Math.PI/200*t.number;case"rad":return t.number;case st:return 2*Math.PI*t.number}throw new Error("Unsupported angle type")},lt=function(e){return 15===e.type&&("deg"===e.unit||e.unit===rt||"rad"===e.unit||e.unit===st)},ct=function(e){switch(e.filter(ze).map((function(e){return e.value})).join(" ")){case"to bottom right":case"to right bottom":case"left top":case"top left":return[tt,tt];case"to top":case"bottom":return dt(0);case"to bottom left":case"to left bottom":case"right top":case"top right":return[tt,it];case"to right":case"left":return dt(90);case"to top left":case"to left top":case"right bottom":case"bottom right":return[it,it];case"to bottom":case"top":return dt(180);case"to top right":case"to right top":case"left bottom":case"bottom left":return[it,tt];case"to left":case"right":return dt(270)}return 0},dt=function(e){return Math.PI*e/180},ht=function(e,t){if(18===t.type){var A=Bt[t.name];if(void 0===A)throw new Error('Attempting to parse an unsupported color function "'+t.name+'"');return A(e,t.values)}if(5===t.type){if(3===t.value.length){var i=t.value.substring(0,1),n=t.value.substring(1,2),a=t.value.substring(2,3);return pt(parseInt(i+i,16),parseInt(n+n,16),parseInt(a+a,16),1)}if(4===t.value.length){i=t.value.substring(0,1),n=t.value.substring(1,2),a=t.value.substring(2,3);var r=t.value.substring(3,4);return pt(parseInt(i+i,16),parseInt(n+n,16),parseInt(a+a,16),parseInt(r+r,16)/255)}if(6===t.value.length)return i=t.value.substring(0,2),n=t.value.substring(2,4),a=t.value.substring(4,6),pt(parseInt(i,16),parseInt(n,16),parseInt(a,16),1);if(8===t.value.length)return i=t.value.substring(0,2),n=t.value.substring(2,4),a=t.value.substring(4,6),r=t.value.substring(6,8),pt(parseInt(i,16),parseInt(n,16),parseInt(a,16),parseInt(r,16)/255)}if(20===t.type){var s=vt[t.value.toUpperCase()];if(void 0!==s)return s}return vt.TRANSPARENT},ut=function(e){return 0==(255&e)},gt=function(e){var t=255&e,A=255&e>>8,i=255&e>>16,n=255&e>>24;return t<255?"rgba("+n+","+i+","+A+","+t/255+")":"rgb("+n+","+i+","+A+")"},pt=function(e,t,A,i){return(e<<24|t<<16|A<<8|Math.round(255*i)<<0)>>>0},mt=function(e,t){if(17===e.type)return e.number;if(16===e.type){var A=3===t?1:255;return 3===t?e.number/100*A:Math.round(e.number/100*A)}return 0},wt=function(e,t){var A=t.filter(_e);if(3===A.length){var i=A.map(mt),n=i[0],a=i[1],r=i[2];return pt(n,a,r,1)}if(4===A.length){var s=A.map(mt),o=(n=s[0],a=s[1],r=s[2],s[3]);return pt(n,a,r,o)}return 0};function ft(e,t,A){return A<0&&(A+=1),A>=1&&(A-=1),A<1/6?(t-e)*A*6+e:A<.5?t:A<2/3?6*(t-e)*(2/3-A)+e:e}var Et=function(e,t){var A=t.filter(_e),i=A[0],n=A[1],a=A[2],r=A[3],s=(17===i.type?dt(i.number):ot(e,i))/(2*Math.PI),o=$e(n)?n.number/100:0,l=$e(a)?a.number/100:0,c=void 0!==r&&$e(r)?at(r,1):1;if(0===o)return pt(255*l,255*l,255*l,1);var d=l<=.5?l*(o+1):l+o-l*o,h=2*l-d,u=ft(h,d,s+1/3),g=ft(h,d,s),p=ft(h,d,s-1/3);return pt(255*u,255*g,255*p,c)},Bt={hsl:Et,hsla:Et,rgb:wt,rgba:wt},bt=function(e,t){return ht(e,Ke.create(t).parseComponentValue())},vt={ALICEBLUE:4042850303,ANTIQUEWHITE:4209760255,AQUA:16777215,AQUAMARINE:2147472639,AZURE:4043309055,BEIGE:4126530815,BISQUE:4293182719,BLACK:255,BLANCHEDALMOND:4293643775,BLUE:65535,BLUEVIOLET:2318131967,BROWN:2771004159,BURLYWOOD:3736635391,CADETBLUE:1604231423,CHARTREUSE:2147418367,CHOCOLATE:3530104575,CORAL:4286533887,CORNFLOWERBLUE:1687547391,CORNSILK:4294499583,CRIMSON:3692313855,CYAN:16777215,DARKBLUE:35839,DARKCYAN:9145343,DARKGOLDENROD:3095837695,DARKGRAY:2846468607,DARKGREEN:6553855,DARKGREY:2846468607,DARKKHAKI:3182914559,DARKMAGENTA:2332068863,DARKOLIVEGREEN:1433087999,DARKORANGE:4287365375,DARKORCHID:2570243327,DARKRED:2332033279,DARKSALMON:3918953215,DARKSEAGREEN:2411499519,DARKSLATEBLUE:1211993087,DARKSLATEGRAY:793726975,DARKSLATEGREY:793726975,DARKTURQUOISE:13554175,DARKVIOLET:2483082239,DEEPPINK:4279538687,DEEPSKYBLUE:12582911,DIMGRAY:1768516095,DIMGREY:1768516095,DODGERBLUE:512819199,FIREBRICK:2988581631,FLORALWHITE:4294635775,FORESTGREEN:579543807,FUCHSIA:4278255615,GAINSBORO:3705462015,GHOSTWHITE:4177068031,GOLD:4292280575,GOLDENROD:3668254975,GRAY:2155905279,GREEN:8388863,GREENYELLOW:2919182335,GREY:2155905279,HONEYDEW:4043305215,HOTPINK:4285117695,INDIANRED:3445382399,INDIGO:1258324735,IVORY:4294963455,KHAKI:4041641215,LAVENDER:3873897215,LAVENDERBLUSH:4293981695,LAWNGREEN:2096890111,LEMONCHIFFON:4294626815,LIGHTBLUE:2916673279,LIGHTCORAL:4034953471,LIGHTCYAN:3774873599,LIGHTGOLDENRODYELLOW:4210742015,LIGHTGRAY:3553874943,LIGHTGREEN:2431553791,LIGHTGREY:3553874943,LIGHTPINK:4290167295,LIGHTSALMON:4288707327,LIGHTSEAGREEN:548580095,LIGHTSKYBLUE:2278488831,LIGHTSLATEGRAY:2005441023,LIGHTSLATEGREY:2005441023,LIGHTSTEELBLUE:2965692159,LIGHTYELLOW:4294959359,LIME:16711935,LIMEGREEN:852308735,LINEN:4210091775,MAGENTA:4278255615,MAROON:2147483903,MEDIUMAQUAMARINE:1724754687,MEDIUMBLUE:52735,MEDIUMORCHID:3126187007,MEDIUMPURPLE:2473647103,MEDIUMSEAGREEN:1018393087,MEDIUMSLATEBLUE:2070474495,MEDIUMSPRINGGREEN:16423679,MEDIUMTURQUOISE:1221709055,MEDIUMVIOLETRED:3340076543,MIDNIGHTBLUE:421097727,MINTCREAM:4127193855,MISTYROSE:4293190143,MOCCASIN:4293178879,NAVAJOWHITE:4292783615,NAVY:33023,OLDLACE:4260751103,OLIVE:2155872511,OLIVEDRAB:1804477439,ORANGE:4289003775,ORANGERED:4282712319,ORCHID:3664828159,PALEGOLDENROD:4008225535,PALEGREEN:2566625535,PALETURQUOISE:2951671551,PALEVIOLETRED:3681588223,PAPAYAWHIP:4293907967,PEACHPUFF:4292524543,PERU:3448061951,PINK:4290825215,PLUM:3718307327,POWDERBLUE:2967529215,PURPLE:2147516671,REBECCAPURPLE:1714657791,RED:4278190335,ROSYBROWN:3163525119,ROYALBLUE:1097458175,SADDLEBROWN:2336560127,SALMON:4202722047,SANDYBROWN:4104413439,SEAGREEN:780883967,SEASHELL:4294307583,SIENNA:2689740287,SILVER:3233857791,SKYBLUE:2278484991,SLATEBLUE:1784335871,SLATEGRAY:1887473919,SLATEGREY:1887473919,SNOW:4294638335,SPRINGGREEN:16744447,STEELBLUE:1182971135,TAN:3535047935,TEAL:8421631,THISTLE:3636451583,TOMATO:4284696575,TRANSPARENT:0,TURQUOISE:1088475391,VIOLET:4001558271,WHEAT:4125012991,WHITE:4294967295,WHITESMOKE:4126537215,YELLOW:4294902015,YELLOWGREEN:2597139199},Ct={name:"background-clip",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(ze(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},yt={name:"background-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},Ft=function(e,t){var A=ht(e,t[0]),i=t[1];return i&&$e(i)?{color:A,stop:i}:{color:A,stop:null}},xt=function(e,t){var A=e[0],i=e[e.length-1];null===A.stop&&(A.stop=tt),null===i.stop&&(i.stop=it);for(var n=[],a=0,r=0;r<e.length;r++){var s=e[r].stop;if(null!==s){var o=at(s,t);o>a?n.push(o):n.push(a),a=o}else n.push(null)}var l=null;for(r=0;r<n.length;r++){var c=n[r];if(null===c)null===l&&(l=r);else if(null!==l){for(var d=r-l,h=(c-n[l-1])/(d+1),u=1;u<=d;u++)n[l+u-1]=h*u;l=null}}return e.map((function(e,A){return{color:e.color,stop:Math.max(Math.min(1,n[A]/t),0)}}))},Tt=function(e,t,A){var i="number"==typeof e?e:function(e,t,A){var i=t/2,n=A/2,a=at(e[0],t)-i,r=n-at(e[1],A);return(Math.atan2(r,a)+2*Math.PI)%(2*Math.PI)}(e,t,A),n=Math.abs(t*Math.sin(i))+Math.abs(A*Math.cos(i)),a=t/2,r=A/2,s=n/2,o=Math.sin(i-Math.PI/2)*s,l=Math.cos(i-Math.PI/2)*s;return[n,a-l,a+l,r-o,r+o]},St=function(e,t){return Math.sqrt(e*e+t*t)},It=function(e,t,A,i,n){return[[0,0],[0,t],[e,0],[e,t]].reduce((function(e,t){var a=t[0],r=t[1],s=St(A-a,i-r);return(n?s<e.optimumDistance:s>e.optimumDistance)?{optimumCorner:t,optimumDistance:s}:e}),{optimumDistance:n?1/0:-1/0,optimumCorner:null}).optimumCorner},Mt=function(e,t){var A=dt(180),i=[];return Je(t).forEach((function(t,n){if(0===n){var a=t[0];if(20===a.type&&-1!==["top","left","right","bottom"].indexOf(a.value))return void(A=ct(t));if(lt(a))return void(A=(ot(e,a)+dt(270))%dt(360))}var r=Ft(e,t);i.push(r)})),{angle:A,stops:i,type:1}},kt="closest-side",Ut="farthest-side",Qt="closest-corner",Ot="farthest-corner",Lt="circle",Nt="ellipse",Dt="cover",Rt="contain",Ht=function(e,t){var A=0,i=3,n=[],a=[];return Je(t).forEach((function(t,r){var s=!0;if(0===r?s=t.reduce((function(e,t){if(ze(t))switch(t.value){case"center":return a.push(At),!1;case"top":case"left":return a.push(tt),!1;case"right":case"bottom":return a.push(it),!1}else if($e(t)||qe(t))return a.push(t),!1;return e}),s):1===r&&(s=t.reduce((function(e,t){if(ze(t))switch(t.value){case Lt:return A=0,!1;case Nt:return A=1,!1;case Rt:case kt:return i=0,!1;case Ut:return i=1,!1;case Qt:return i=2,!1;case Dt:case Ot:return i=3,!1}else if(qe(t)||$e(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),s)),s){var o=Ft(e,t);n.push(o)}})),{size:i,shape:A,stops:n,position:a,type:2}},Pt=function(e,t){if(22===t.type){var A={url:t.value,type:0};return e.cache.addImage(t.value),A}if(18===t.type){var i=Kt[t.name];if(void 0===i)throw new Error('Attempting to parse an unsupported image function "'+t.name+'"');return i(e,t.values)}throw new Error("Unsupported image type "+t.type)};var Vt,Kt={"linear-gradient":function(e,t){var A=dt(180),i=[];return Je(t).forEach((function(t,n){if(0===n){var a=t[0];if(20===a.type&&"to"===a.value)return void(A=ct(t));if(lt(a))return void(A=ot(e,a))}var r=Ft(e,t);i.push(r)})),{angle:A,stops:i,type:1}},"-moz-linear-gradient":Mt,"-ms-linear-gradient":Mt,"-o-linear-gradient":Mt,"-webkit-linear-gradient":Mt,"radial-gradient":function(e,t){var A=0,i=3,n=[],a=[];return Je(t).forEach((function(t,r){var s=!0;if(0===r){var o=!1;s=t.reduce((function(e,t){if(o)if(ze(t))switch(t.value){case"center":return a.push(At),e;case"top":case"left":return a.push(tt),e;case"right":case"bottom":return a.push(it),e}else($e(t)||qe(t))&&a.push(t);else if(ze(t))switch(t.value){case Lt:return A=0,!1;case Nt:return A=1,!1;case"at":return o=!0,!1;case kt:return i=0,!1;case Dt:case Ut:return i=1,!1;case Rt:case Qt:return i=2,!1;case Ot:return i=3,!1}else if(qe(t)||$e(t))return Array.isArray(i)||(i=[]),i.push(t),!1;return e}),s)}if(s){var l=Ft(e,t);n.push(l)}})),{size:i,shape:A,stops:n,position:a,type:2}},"-moz-radial-gradient":Ht,"-ms-radial-gradient":Ht,"-o-radial-gradient":Ht,"-webkit-radial-gradient":Ht,"-webkit-gradient":function(e,t){var A=dt(180),i=[],n=1;return Je(t).forEach((function(t,A){var a=t[0];if(0===A){if(ze(a)&&"linear"===a.value)return void(n=1);if(ze(a)&&"radial"===a.value)return void(n=2)}if(18===a.type)if("from"===a.name){var r=ht(e,a.values[0]);i.push({stop:tt,color:r})}else if("to"===a.name)r=ht(e,a.values[0]),i.push({stop:it,color:r});else if("color-stop"===a.name){var s=a.values.filter(_e);if(2===s.length){r=ht(e,s[1]);var o=s[0];We(o)&&i.push({stop:{type:16,number:100*o.number,flags:o.flags},color:r})}}})),1===n?{angle:(A+dt(180))%dt(360),stops:i,type:n}:{size:3,shape:0,stops:i,position:[],type:n}}},Gt={name:"background-image",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var A=t[0];return 20===A.type&&"none"===A.value?[]:t.filter((function(e){return _e(e)&&function(e){return!(20===e.type&&"none"===e.value||18===e.type&&!Kt[e.name])}(e)})).map((function(t){return Pt(e,t)}))}},Wt={name:"background-origin",initialValue:"border-box",prefix:!1,type:1,parse:function(e,t){return t.map((function(e){if(ze(e))switch(e.value){case"padding-box":return 1;case"content-box":return 2}return 0}))}},zt={name:"background-position",initialValue:"0% 0%",type:1,prefix:!1,parse:function(e,t){return Je(t).map((function(e){return e.filter($e)})).map(et)}},Xt={name:"background-repeat",initialValue:"repeat",prefix:!1,type:1,parse:function(e,t){return Je(t).map((function(e){return e.filter(ze).map((function(e){return e.value})).join(" ")})).map(Yt)}},Yt=function(e){switch(e){case"no-repeat":return 1;case"repeat-x":case"repeat no-repeat":return 2;case"repeat-y":case"no-repeat repeat":return 3;default:return 0}};!function(e){e.AUTO="auto",e.CONTAIN="contain",e.COVER="cover"}(Vt||(Vt={}));var jt,_t={name:"background-size",initialValue:"0",prefix:!1,type:1,parse:function(e,t){return Je(t).map((function(e){return e.filter(Jt)}))}},Jt=function(e){return ze(e)||$e(e)},Zt=function(e){return{name:"border-"+e+"-color",initialValue:"transparent",prefix:!1,type:3,format:"color"}},qt=Zt("top"),$t=Zt("right"),eA=Zt("bottom"),tA=Zt("left"),AA=function(e){return{name:"border-radius-"+e,initialValue:"0 0",prefix:!1,type:1,parse:function(e,t){return et(t.filter($e))}}},iA=AA("top-left"),nA=AA("top-right"),aA=AA("bottom-right"),rA=AA("bottom-left"),sA=function(e){return{name:"border-"+e+"-style",initialValue:"solid",prefix:!1,type:2,parse:function(e,t){switch(t){case"none":return 0;case"dashed":return 2;case"dotted":return 3;case"double":return 4}return 1}}},oA=sA("top"),lA=sA("right"),cA=sA("bottom"),dA=sA("left"),hA=function(e){return{name:"border-"+e+"-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Ge(t)?t.number:0}}},uA=hA("top"),gA=hA("right"),pA=hA("bottom"),mA=hA("left"),wA={name:"color",initialValue:"transparent",prefix:!1,type:3,format:"color"},fA={name:"direction",initialValue:"ltr",prefix:!1,type:2,parse:function(e,t){return"rtl"===t?1:0}},EA={name:"display",initialValue:"inline-block",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).reduce((function(e,t){return e|BA(t.value)}),0)}},BA=function(e){switch(e){case"block":case"-webkit-box":return 2;case"inline":return 4;case"run-in":return 8;case"flow":return 16;case"flow-root":return 32;case"table":return 64;case"flex":case"-webkit-flex":return 128;case"grid":case"-ms-grid":return 256;case"ruby":return 512;case"subgrid":return 1024;case"list-item":return 2048;case"table-row-group":return 4096;case"table-header-group":return 8192;case"table-footer-group":return 16384;case"table-row":return 32768;case"table-cell":return 65536;case"table-column-group":return 131072;case"table-column":return 262144;case"table-caption":return 524288;case"ruby-base":return 1048576;case"ruby-text":return 2097152;case"ruby-base-container":return 4194304;case"ruby-text-container":return 8388608;case"contents":return 16777216;case"inline-block":return 33554432;case"inline-list-item":return 67108864;case"inline-table":return 134217728;case"inline-flex":return 268435456;case"inline-grid":return 536870912}return 0},bA={name:"float",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"left":return 1;case"right":return 2;case"inline-start":return 3;case"inline-end":return 4}return 0}},vA={name:"letter-spacing",initialValue:"0",prefix:!1,type:0,parse:function(e,t){return 20===t.type&&"normal"===t.value?0:17===t.type||15===t.type?t.number:0}};!function(e){e.NORMAL="normal",e.STRICT="strict"}(jt||(jt={}));var CA,yA={name:"line-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"strict"===t?jt.STRICT:jt.NORMAL}},FA={name:"line-height",initialValue:"normal",prefix:!1,type:4},xA=function(e,t){return ze(e)&&"normal"===e.value?1.2*t:17===e.type?t*e.number:$e(e)?at(e,t):t},TA={name:"list-style-image",initialValue:"none",type:0,prefix:!1,parse:function(e,t){return 20===t.type&&"none"===t.value?null:Pt(e,t)}},SA={name:"list-style-position",initialValue:"outside",prefix:!1,type:2,parse:function(e,t){return"inside"===t?0:1}},IA={name:"list-style-type",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"disc":return 0;case"circle":return 1;case"square":return 2;case"decimal":return 3;case"cjk-decimal":return 4;case"decimal-leading-zero":return 5;case"lower-roman":return 6;case"upper-roman":return 7;case"lower-greek":return 8;case"lower-alpha":return 9;case"upper-alpha":return 10;case"arabic-indic":return 11;case"armenian":return 12;case"bengali":return 13;case"cambodian":return 14;case"cjk-earthly-branch":return 15;case"cjk-heavenly-stem":return 16;case"cjk-ideographic":return 17;case"devanagari":return 18;case"ethiopic-numeric":return 19;case"georgian":return 20;case"gujarati":return 21;case"gurmukhi":case"hebrew":return 22;case"hiragana":return 23;case"hiragana-iroha":return 24;case"japanese-formal":return 25;case"japanese-informal":return 26;case"kannada":return 27;case"katakana":return 28;case"katakana-iroha":return 29;case"khmer":return 30;case"korean-hangul-formal":return 31;case"korean-hanja-formal":return 32;case"korean-hanja-informal":return 33;case"lao":return 34;case"lower-armenian":return 35;case"malayalam":return 36;case"mongolian":return 37;case"myanmar":return 38;case"oriya":return 39;case"persian":return 40;case"simp-chinese-formal":return 41;case"simp-chinese-informal":return 42;case"tamil":return 43;case"telugu":return 44;case"thai":return 45;case"tibetan":return 46;case"trad-chinese-formal":return 47;case"trad-chinese-informal":return 48;case"upper-armenian":return 49;case"disclosure-open":return 50;case"disclosure-closed":return 51;default:return-1}}},MA=function(e){return{name:"margin-"+e,initialValue:"0",prefix:!1,type:4}},kA=MA("top"),UA=MA("right"),QA=MA("bottom"),OA=MA("left"),LA={name:"overflow",initialValue:"visible",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).map((function(e){switch(e.value){case"hidden":return 1;case"scroll":return 2;case"clip":return 3;case"auto":return 4;default:return 0}}))}},NA={name:"overflow-wrap",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){return"break-word"===t?"break-word":"normal"}},DA=function(e){return{name:"padding-"+e,initialValue:"0",prefix:!1,type:3,format:"length-percentage"}},RA=DA("top"),HA=DA("right"),PA=DA("bottom"),VA=DA("left"),KA={name:"text-align",initialValue:"left",prefix:!1,type:2,parse:function(e,t){switch(t){case"right":return 2;case"center":case"justify":return 1;default:return 0}}},GA={name:"position",initialValue:"static",prefix:!1,type:2,parse:function(e,t){switch(t){case"relative":return 1;case"absolute":return 2;case"fixed":return 3;case"sticky":return 4}return 0}},WA={name:"text-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Ye(t[0],"none")?[]:Je(t).map((function(t){for(var A={color:vt.TRANSPARENT,offsetX:tt,offsetY:tt,blur:tt},i=0,n=0;n<t.length;n++){var a=t[n];qe(a)?(0===i?A.offsetX=a:1===i?A.offsetY=a:A.blur=a,i++):A.color=ht(e,a)}return A}))}},zA={name:"text-transform",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"uppercase":return 2;case"lowercase":return 1;case"capitalize":return 3}return 0}},XA={name:"transform",initialValue:"none",prefix:!0,type:0,parse:function(e,t){if(20===t.type&&"none"===t.value)return null;if(18===t.type){var A=YA[t.name];if(void 0===A)throw new Error('Attempting to parse an unsupported transform function "'+t.name+'"');return A(t.values)}return null}},YA={matrix:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number}));return 6===t.length?t:null},matrix3d:function(e){var t=e.filter((function(e){return 17===e.type})).map((function(e){return e.number})),A=t[0],i=t[1];t[2],t[3];var n=t[4],a=t[5];t[6],t[7],t[8],t[9],t[10],t[11];var r=t[12],s=t[13];return t[14],t[15],16===t.length?[A,i,n,a,r,s]:null}},jA={type:16,number:50,flags:4},_A=[jA,jA],JA={name:"transform-origin",initialValue:"50% 50%",prefix:!0,type:1,parse:function(e,t){var A=t.filter($e);return 2!==A.length?_A:[A[0],A[1]]}},ZA={name:"visible",initialValue:"none",prefix:!1,type:2,parse:function(e,t){switch(t){case"hidden":return 1;case"collapse":return 2;default:return 0}}};!function(e){e.NORMAL="normal",e.BREAK_ALL="break-all",e.KEEP_ALL="keep-all"}(CA||(CA={}));for(var qA={name:"word-break",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"break-all":return CA.BREAK_ALL;case"keep-all":return CA.KEEP_ALL;default:return CA.NORMAL}}},$A={name:"z-index",initialValue:"auto",prefix:!1,type:0,parse:function(e,t){if(20===t.type)return{auto:!0,order:0};if(We(t))return{auto:!1,order:t.number};throw new Error("Invalid z-index number parsed")}},ei={name:"time",parse:function(e,t){if(15===t.type)switch(t.unit.toLowerCase()){case"s":return 1e3*t.number;case"ms":return t.number}throw new Error("Unsupported time type")}},ti={name:"opacity",initialValue:"1",type:0,prefix:!1,parse:function(e,t){return We(t)?t.number:1}},Ai={name:"text-decoration-color",initialValue:"transparent",prefix:!1,type:3,format:"color"},ii={name:"text-decoration-line",initialValue:"none",prefix:!1,type:1,parse:function(e,t){return t.filter(ze).map((function(e){switch(e.value){case"underline":return 1;case"overline":return 2;case"line-through":return 3;case"none":return 4}return 0})).filter((function(e){return 0!==e}))}},ni={name:"font-family",initialValue:"",prefix:!1,type:1,parse:function(e,t){var A=[],i=[];return t.forEach((function(e){switch(e.type){case 20:case 0:A.push(e.value);break;case 17:A.push(e.number.toString());break;case 4:i.push(A.join(" ")),A.length=0}})),A.length&&i.push(A.join(" ")),i.map((function(e){return-1===e.indexOf(" ")?e:"'"+e+"'"}))}},ai={name:"font-size",initialValue:"0",prefix:!1,type:3,format:"length"},ri={name:"font-weight",initialValue:"normal",type:0,prefix:!1,parse:function(e,t){return We(t)?t.number:ze(t)&&"bold"===t.value?700:400}},si={name:"font-variant",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return t.filter(ze).map((function(e){return e.value}))}},oi={name:"font-style",initialValue:"normal",prefix:!1,type:2,parse:function(e,t){switch(t){case"oblique":return"oblique";case"italic":return"italic";default:return"normal"}}},li=function(e,t){return 0!=(e&t)},ci={name:"content",initialValue:"none",type:1,prefix:!1,parse:function(e,t){if(0===t.length)return[];var A=t[0];return 20===A.type&&"none"===A.value?[]:t}},di={name:"counter-increment",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var A=t[0];if(20===A.type&&"none"===A.value)return null;for(var i=[],n=t.filter(je),a=0;a<n.length;a++){var r=n[a],s=n[a+1];if(20===r.type){var o=s&&We(s)?s.number:1;i.push({counter:r.value,increment:o})}}return i}},hi={name:"counter-reset",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return[];for(var A=[],i=t.filter(je),n=0;n<i.length;n++){var a=i[n],r=i[n+1];if(ze(a)&&"none"!==a.value){var s=r&&We(r)?r.number:0;A.push({counter:a.value,reset:s})}}return A}},ui={name:"duration",initialValue:"0s",prefix:!1,type:1,parse:function(e,t){return t.filter(Ge).map((function(t){return ei.parse(e,t)}))}},gi={name:"quotes",initialValue:"none",prefix:!0,type:1,parse:function(e,t){if(0===t.length)return null;var A=t[0];if(20===A.type&&"none"===A.value)return null;var i=[],n=t.filter(Xe);if(n.length%2!=0)return null;for(var a=0;a<n.length;a+=2){var r=n[a].value,s=n[a+1].value;i.push({open:r,close:s})}return i}},pi=function(e,t,A){if(!e)return"";var i=e[Math.min(t,e.length-1)];return i?A?i.open:i.close:""},mi={name:"box-shadow",initialValue:"none",type:1,prefix:!1,parse:function(e,t){return 1===t.length&&Ye(t[0],"none")?[]:Je(t).map((function(t){for(var A={color:255,offsetX:tt,offsetY:tt,blur:tt,spread:tt,inset:!1},i=0,n=0;n<t.length;n++){var a=t[n];Ye(a,"inset")?A.inset=!0:qe(a)?(0===i?A.offsetX=a:1===i?A.offsetY=a:2===i?A.blur=a:A.spread=a,i++):A.color=ht(e,a)}return A}))}},wi={name:"paint-order",initialValue:"normal",prefix:!1,type:1,parse:function(e,t){var A=[];return t.filter(ze).forEach((function(e){switch(e.value){case"stroke":A.push(1);break;case"fill":A.push(0);break;case"markers":A.push(2)}})),[0,1,2].forEach((function(e){-1===A.indexOf(e)&&A.push(e)})),A}},fi={name:"-webkit-text-stroke-color",initialValue:"currentcolor",prefix:!1,type:3,format:"color"},Ei={name:"-webkit-text-stroke-width",initialValue:"0",type:0,prefix:!1,parse:function(e,t){return Ge(t)?t.number:0}},Bi=function(){function e(e,t){var A,i;this.animationDuration=Ci(e,ui,t.animationDuration),this.backgroundClip=Ci(e,Ct,t.backgroundClip),this.backgroundColor=Ci(e,yt,t.backgroundColor),this.backgroundImage=Ci(e,Gt,t.backgroundImage),this.backgroundOrigin=Ci(e,Wt,t.backgroundOrigin),this.backgroundPosition=Ci(e,zt,t.backgroundPosition),this.backgroundRepeat=Ci(e,Xt,t.backgroundRepeat),this.backgroundSize=Ci(e,_t,t.backgroundSize),this.borderTopColor=Ci(e,qt,t.borderTopColor),this.borderRightColor=Ci(e,$t,t.borderRightColor),this.borderBottomColor=Ci(e,eA,t.borderBottomColor),this.borderLeftColor=Ci(e,tA,t.borderLeftColor),this.borderTopLeftRadius=Ci(e,iA,t.borderTopLeftRadius),this.borderTopRightRadius=Ci(e,nA,t.borderTopRightRadius),this.borderBottomRightRadius=Ci(e,aA,t.borderBottomRightRadius),this.borderBottomLeftRadius=Ci(e,rA,t.borderBottomLeftRadius),this.borderTopStyle=Ci(e,oA,t.borderTopStyle),this.borderRightStyle=Ci(e,lA,t.borderRightStyle),this.borderBottomStyle=Ci(e,cA,t.borderBottomStyle),this.borderLeftStyle=Ci(e,dA,t.borderLeftStyle),this.borderTopWidth=Ci(e,uA,t.borderTopWidth),this.borderRightWidth=Ci(e,gA,t.borderRightWidth),this.borderBottomWidth=Ci(e,pA,t.borderBottomWidth),this.borderLeftWidth=Ci(e,mA,t.borderLeftWidth),this.boxShadow=Ci(e,mi,t.boxShadow),this.color=Ci(e,wA,t.color),this.direction=Ci(e,fA,t.direction),this.display=Ci(e,EA,t.display),this.float=Ci(e,bA,t.cssFloat),this.fontFamily=Ci(e,ni,t.fontFamily),this.fontSize=Ci(e,ai,t.fontSize),this.fontStyle=Ci(e,oi,t.fontStyle),this.fontVariant=Ci(e,si,t.fontVariant),this.fontWeight=Ci(e,ri,t.fontWeight),this.letterSpacing=Ci(e,vA,t.letterSpacing),this.lineBreak=Ci(e,yA,t.lineBreak),this.lineHeight=Ci(e,FA,t.lineHeight),this.listStyleImage=Ci(e,TA,t.listStyleImage),this.listStylePosition=Ci(e,SA,t.listStylePosition),this.listStyleType=Ci(e,IA,t.listStyleType),this.marginTop=Ci(e,kA,t.marginTop),this.marginRight=Ci(e,UA,t.marginRight),this.marginBottom=Ci(e,QA,t.marginBottom),this.marginLeft=Ci(e,OA,t.marginLeft),this.opacity=Ci(e,ti,t.opacity);var n=Ci(e,LA,t.overflow);this.overflowX=n[0],this.overflowY=n[n.length>1?1:0],this.overflowWrap=Ci(e,NA,t.overflowWrap),this.paddingTop=Ci(e,RA,t.paddingTop),this.paddingRight=Ci(e,HA,t.paddingRight),this.paddingBottom=Ci(e,PA,t.paddingBottom),this.paddingLeft=Ci(e,VA,t.paddingLeft),this.paintOrder=Ci(e,wi,t.paintOrder),this.position=Ci(e,GA,t.position),this.textAlign=Ci(e,KA,t.textAlign),this.textDecorationColor=Ci(e,Ai,null!==(A=t.textDecorationColor)&&void 0!==A?A:t.color),this.textDecorationLine=Ci(e,ii,null!==(i=t.textDecorationLine)&&void 0!==i?i:t.textDecoration),this.textShadow=Ci(e,WA,t.textShadow),this.textTransform=Ci(e,zA,t.textTransform),this.transform=Ci(e,XA,t.transform),this.transformOrigin=Ci(e,JA,t.transformOrigin),this.visibility=Ci(e,ZA,t.visibility),this.webkitTextStrokeColor=Ci(e,fi,t.webkitTextStrokeColor),this.webkitTextStrokeWidth=Ci(e,Ei,t.webkitTextStrokeWidth),this.wordBreak=Ci(e,qA,t.wordBreak),this.zIndex=Ci(e,$A,t.zIndex)}return e.prototype.isVisible=function(){return this.display>0&&this.opacity>0&&0===this.visibility},e.prototype.isTransparent=function(){return ut(this.backgroundColor)},e.prototype.isTransformed=function(){return null!==this.transform},e.prototype.isPositioned=function(){return 0!==this.position},e.prototype.isPositionedWithZIndex=function(){return this.isPositioned()&&!this.zIndex.auto},e.prototype.isFloating=function(){return 0!==this.float},e.prototype.isInlineLevel=function(){return li(this.display,4)||li(this.display,33554432)||li(this.display,268435456)||li(this.display,536870912)||li(this.display,67108864)||li(this.display,134217728)},e}(),bi=function(e,t){this.content=Ci(e,ci,t.content),this.quotes=Ci(e,gi,t.quotes)},vi=function(e,t){this.counterIncrement=Ci(e,di,t.counterIncrement),this.counterReset=Ci(e,hi,t.counterReset)},Ci=function(e,t,A){var i=new Ve,n=null!=A?A.toString():t.initialValue;i.write(n);var a=new Ke(i.read());switch(t.type){case 2:var r=a.parseComponentValue();return t.parse(e,ze(r)?r.value:t.initialValue);case 0:return t.parse(e,a.parseComponentValue());case 1:return t.parse(e,a.parseComponentValues());case 4:return a.parseComponentValue();case 3:switch(t.format){case"angle":return ot(e,a.parseComponentValue());case"color":return ht(e,a.parseComponentValue());case"image":return Pt(e,a.parseComponentValue());case"length":var s=a.parseComponentValue();return qe(s)?s:tt;case"length-percentage":var o=a.parseComponentValue();return $e(o)?o:tt;case"time":return ei.parse(e,a.parseComponentValue())}}},yi=function(e,t){var A=function(e){switch(e.getAttribute("data-html2canvas-debug")){case"all":return 1;case"clone":return 2;case"parse":return 3;case"render":return 4;default:return 0}}(e);return 1===A||t===A},Fi=function(e,t){this.context=e,this.textNodes=[],this.elements=[],this.flags=0,yi(t,3),this.styles=new Bi(e,window.getComputedStyle(t,null)),Mn(t)&&(this.styles.animationDuration.some((function(e){return e>0}))&&(t.style.animationDuration="0s"),null!==this.styles.transform&&(t.style.transform="none")),this.bounds=s(this.context,t),yi(t,4)&&(this.flags|=16)},xi="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ti="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Si=0;Si<xi.length;Si++)Ti[xi.charCodeAt(Si)]=Si;for(var Ii=function(e,t,A){return e.slice?e.slice(t,A):new Uint16Array(Array.prototype.slice.call(e,t,A))},Mi=function(){function e(e,t,A,i,n,a){this.initialValue=e,this.errorValue=t,this.highStart=A,this.highValueIndex=i,this.index=n,this.data=a}return e.prototype.get=function(e){var t;if(e>=0){if(e<55296||e>56319&&e<=65535)return t=((t=this.index[e>>5])<<2)+(31&e),this.data[t];if(e<=65535)return t=((t=this.index[2048+(e-55296>>5)])<<2)+(31&e),this.data[t];if(e<this.highStart)return t=2080+(e>>11),t=this.index[t],t+=e>>5&63,t=((t=this.index[t])<<2)+(31&e),this.data[t];if(e<=1114111)return this.data[this.highValueIndex]}return this.errorValue},e}(),ki="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Ui="undefined"==typeof Uint8Array?[]:new Uint8Array(256),Qi=0;Qi<ki.length;Qi++)Ui[ki.charCodeAt(Qi)]=Qi;var Oi,Li=8,Ni=9,Di=11,Ri=12,Hi=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];if(String.fromCodePoint)return String.fromCodePoint.apply(String,e);var A=e.length;if(!A)return"";for(var i=[],n=-1,a="";++n<A;){var r=e[n];r<=65535?i.push(r):(r-=65536,i.push(55296+(r>>10),r%1024+56320)),(n+1===A||i.length>16384)&&(a+=String.fromCharCode.apply(String,i),i.length=0)}return a},Pi=function(e,t){var A=function(e){var t,A,i,n,a,r=.75*e.length,s=e.length,o=0;"="===e[e.length-1]&&(r--,"="===e[e.length-2]&&r--);var l="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof Uint8Array&&void 0!==Uint8Array.prototype.slice?new ArrayBuffer(r):new Array(r),c=Array.isArray(l)?l:new Uint8Array(l);for(t=0;t<s;t+=4)A=Ti[e.charCodeAt(t)],i=Ti[e.charCodeAt(t+1)],n=Ti[e.charCodeAt(t+2)],a=Ti[e.charCodeAt(t+3)],c[o++]=A<<2|i>>4,c[o++]=(15&i)<<4|n>>2,c[o++]=(3&n)<<6|63&a;return l}(e),i=Array.isArray(A)?function(e){for(var t=e.length,A=[],i=0;i<t;i+=4)A.push(e[i+3]<<24|e[i+2]<<16|e[i+1]<<8|e[i]);return A}(A):new Uint32Array(A),n=Array.isArray(A)?function(e){for(var t=e.length,A=[],i=0;i<t;i+=2)A.push(e[i+1]<<8|e[i]);return A}(A):new Uint16Array(A),a=Ii(n,12,i[4]/2),r=2===i[5]?Ii(n,(24+i[4])/2):function(e,t,A){return e.slice?e.slice(t,A):new Uint32Array(Array.prototype.slice.call(e,t,A))}(i,Math.ceil((24+i[4])/4));return new Mi(i[0],i[1],i[2],i[3],a,r)}("AAAAAAAAAAAAEA4AGBkAAFAaAAACAAAAAAAIABAAGAAwADgACAAQAAgAEAAIABAACAAQAAgAEAAIABAACAAQAAgAEAAIABAAQABIAEQATAAIABAACAAQAAgAEAAIABAAVABcAAgAEAAIABAACAAQAGAAaABwAHgAgACIAI4AlgAIABAAmwCjAKgAsAC2AL4AvQDFAMoA0gBPAVYBWgEIAAgACACMANoAYgFkAWwBdAF8AX0BhQGNAZUBlgGeAaMBlQGWAasBswF8AbsBwwF0AcsBYwHTAQgA2wG/AOMBdAF8AekB8QF0AfkB+wHiAHQBfAEIAAMC5gQIAAsCEgIIAAgAFgIeAggAIgIpAggAMQI5AkACygEIAAgASAJQAlgCYAIIAAgACAAKBQoFCgUTBRMFGQUrBSsFCAAIAAgACAAIAAgACAAIAAgACABdAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABoAmgCrwGvAQgAbgJ2AggAHgEIAAgACADnAXsCCAAIAAgAgwIIAAgACAAIAAgACACKAggAkQKZAggAPADJAAgAoQKkAqwCsgK6AsICCADJAggA0AIIAAgACAAIANYC3gIIAAgACAAIAAgACABAAOYCCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAkASoB+QIEAAgACAA8AEMCCABCBQgACABJBVAFCAAIAAgACAAIAAgACAAIAAgACABTBVoFCAAIAFoFCABfBWUFCAAIAAgACAAIAAgAbQUIAAgACAAIAAgACABzBXsFfQWFBYoFigWKBZEFigWKBYoFmAWfBaYFrgWxBbkFCAAIAAgACAAIAAgACAAIAAgACAAIAMEFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAMgFCADQBQgACAAIAAgACAAIAAgACAAIAAgACAAIAO4CCAAIAAgAiQAIAAgACABAAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAD0AggACAD8AggACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIANYFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAMDvwAIAAgAJAIIAAgACAAIAAgACAAIAAgACwMTAwgACAB9BOsEGwMjAwgAKwMyAwsFYgE3A/MEPwMIAEUDTQNRAwgAWQOsAGEDCAAIAAgACAAIAAgACABpAzQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFOgU0BTUFNgU3BTgFOQU6BTQFNQU2BTcFOAU5BToFNAU1BTYFNwU4BTkFIQUoBSwFCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABtAwgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABMAEwACAAIAAgACAAIABgACAAIAAgACAC/AAgACAAyAQgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACAAIAAwAAgACAAIAAgACAAIAAgACAAIAAAARABIAAgACAAIABQASAAIAAgAIABwAEAAjgCIABsAqAC2AL0AigDQAtwC+IJIQqVAZUBWQqVAZUBlQGVAZUBlQGrC5UBlQGVAZUBlQGVAZUBlQGVAXsKlQGVAbAK6wsrDGUMpQzlDJUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAZUBlQGVAfAKAAuZA64AtwCJALoC6ADwAAgAuACgA/oEpgO6AqsD+AAIAAgAswMIAAgACAAIAIkAuwP5AfsBwwPLAwgACAAIAAgACADRA9kDCAAIAOED6QMIAAgACAAIAAgACADuA/YDCAAIAP4DyQAIAAgABgQIAAgAXQAOBAgACAAIAAgACAAIABMECAAIAAgACAAIAAgACAD8AAQBCAAIAAgAGgQiBCoECAExBAgAEAEIAAgACAAIAAgACAAIAAgACAAIAAgACAA4BAgACABABEYECAAIAAgATAQYAQgAVAQIAAgACAAIAAgACAAIAAgACAAIAFoECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAOQEIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAB+BAcACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAEABhgSMBAgACAAIAAgAlAQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAwAEAAQABAADAAMAAwADAAQABAAEAAQABAAEAAQABHATAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAdQMIAAgACAAIAAgACAAIAMkACAAIAAgAfQMIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACACFA4kDCAAIAAgACAAIAOcBCAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAIcDCAAIAAgACAAIAAgACAAIAAgACAAIAJEDCAAIAAgACADFAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABgBAgAZgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAbAQCBXIECAAIAHkECAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACABAAJwEQACjBKoEsgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAC6BMIECAAIAAgACAAIAAgACABmBAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAxwQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAGYECAAIAAgAzgQIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBd0FXwUIAOIF6gXxBYoF3gT5BQAGCAaKBYoFigWKBYoFigWKBYoFigWKBYoFigXWBIoFigWKBYoFigWKBYoFigWKBYsFEAaKBYoFigWKBYoFigWKBRQGCACKBYoFigWKBQgACAAIANEECAAIABgGigUgBggAJgYIAC4GMwaKBYoF0wQ3Bj4GigWKBYoFigWKBYoFigWKBYoFigWKBYoFigUIAAgACAAIAAgACAAIAAgAigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWKBYoFigWLBf///////wQABAAEAAQABAAEAAQABAAEAAQAAwAEAAQAAgAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAQADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUAAAAFAAUAAAAFAAUAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUAAQAAAAUABQAFAAUABQAFAAAAAAAFAAUAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAFAAUAAQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAAABwAHAAcAAAAHAAcABwAFAAEAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAcABwAFAAUAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAAAAQABAAAAAAAAAAAAAAAFAAUABQAFAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAHAAcAAAAHAAcAAAAAAAUABQAHAAUAAQAHAAEABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwABAAUABQAFAAUAAAAAAAAAAAAAAAEAAQABAAEAAQABAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABQANAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABAAEAAQABAAEAAQABAAEAAQABAAEAAQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAABQAHAAUABQAFAAAAAAAAAAcABQAFAAUABQAFAAQABAAEAAQABAAEAAQABAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAEAAQABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUAAAAFAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAUAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAcABwAFAAcABwAAAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUABwAHAAUABQAFAAUAAAAAAAcABwAAAAAABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAABQAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAAAAAAAAAAABQAFAAAAAAAFAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAFAAUABQAFAAUAAAAFAAUABwAAAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABwAFAAUABQAFAAAAAAAHAAcAAAAAAAcABwAFAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAAAAAAAAAHAAcABwAAAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAABQAHAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAUABQAFAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAHAAcABQAHAAcAAAAFAAcABwAAAAcABwAFAAUAAAAAAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAFAAcABwAFAAUABQAAAAUAAAAHAAcABwAHAAcABwAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAHAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAABwAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAUAAAAFAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABwAFAAUABQAFAAUAAAAFAAUAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABwAFAAUABQAFAAUABQAAAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABQAFAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABQAFAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAHAAUABQAFAAUABQAFAAUABwAHAAcABwAHAAcABwAHAAUABwAHAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABwAHAAcABwAFAAUABwAHAAcAAAAAAAAAAAAHAAcABQAHAAcABwAHAAcABwAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAcABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAUABQAFAAUABQAFAAUAAAAFAAAABQAAAAAABQAFAAUABQAFAAUABQAFAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAFAAUAAAAAAAUABQAFAAUABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABwAFAAcABwAHAAcABwAFAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAUABQAFAAUABwAHAAUABQAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABQAFAAcABwAHAAUABwAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAcABQAFAAUABQAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAAAAAABwAFAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAAAAAAAAAFAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAUABQAHAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAUABQAFAAUABQAHAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAcABwAFAAUABQAFAAcABwAFAAUABwAHAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAFAAcABwAFAAUABwAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAFAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAFAAUABQAAAAAABQAFAAAAAAAAAAAAAAAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAcABwAAAAAAAAAAAAAABwAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAcABwAFAAcABwAAAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAFAAUABQAAAAUABQAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABwAFAAUABQAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAUABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAHAAcABQAHAAUABQAAAAAAAAAAAAAAAAAFAAAABwAHAAcABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAHAAcABwAAAAAABwAHAAAAAAAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABwAHAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAFAAUABwAFAAcABwAFAAcABQAFAAcABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAHAAcABQAFAAUABQAAAAAABwAHAAcABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAHAAUABQAFAAUABQAFAAUABQAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABwAFAAcABwAFAAUABQAFAAUABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAcABwAFAAUABQAFAAcABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAUABQAFAAUABQAHAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAFAAUABQAFAAAAAAAFAAUABwAHAAcABwAFAAAAAAAAAAcAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABwAHAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAcABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUAAAAHAAUABQAFAAUABQAFAAUABwAFAAUABwAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUAAAAAAAAABQAAAAUABQAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAHAAcABwAHAAcAAAAFAAUAAAAHAAcABQAHAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAAAAUABQAFAAAAAAAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAFAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAFAAUABQAAAAAABQAFAAUABQAFAAUABQAAAAUABQAAAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFAAUABQAFAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABQAFAAUABQAFAAUABQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAFAAUABQAFAAUADgAOAA4ADgAOAA4ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAA8ADwAPAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAcABwAHAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAgACAAIAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAMAAwADAAMAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkACQAJAAkAAAAAAAAAAAAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAKAAoACgAAAAAAAAAAAAsADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwACwAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAMAAwADAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAADgAOAA4AAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAAAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4AAAAOAAAAAAAAAAAAAAAAAA4AAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAAAAAAAAAAAA4AAAAOAAAAAAAAAAAADgAOAA4AAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAA4AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4AAAAAAA4ADgAOAA4ADgAOAA4ADgAOAAAADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4ADgAOAAAAAAAAAAAAAAAAAAAAAAAAAAAADgAOAA4ADgAOAA4AAAAAAAAAAAAAAAAAAAAAAA4ADgAOAA4ADgAOAA4ADgAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAOAA4ADgAOAA4ADgAAAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4ADgAOAA4AAAAAAAAAAAA="),Vi="×",Ki=function(e){return Pi.get(e)},Gi=function(e,t,A){var i=A-2,n=t[i],a=t[A-1],r=t[A];if(2===a&&3===r)return Vi;if(2===a||3===a||4===a)return"÷";if(2===r||3===r||4===r)return"÷";if(a===Li&&-1!==[Li,Ni,Di,Ri].indexOf(r))return Vi;if(!(a!==Di&&a!==Ni||r!==Ni&&10!==r))return Vi;if((a===Ri||10===a)&&10===r)return Vi;if(13===r||5===r)return Vi;if(7===r)return Vi;if(1===a)return Vi;if(13===a&&14===r){for(;5===n;)n=t[--i];if(14===n)return Vi}if(15===a&&15===r){for(var s=0;15===n;)s++,n=t[--i];if(s%2==0)return Vi}return"÷"},Wi=function(e){var t=function(e){for(var t=[],A=0,i=e.length;A<i;){var n=e.charCodeAt(A++);if(n>=55296&&n<=56319&&A<i){var a=e.charCodeAt(A++);56320==(64512&a)?t.push(((1023&n)<<10)+(1023&a)+65536):(t.push(n),A--)}else t.push(n)}return t}(e),A=t.length,i=0,n=0,a=t.map(Ki);return{next:function(){if(i>=A)return{done:!0,value:null};for(var e=Vi;i<A&&(e=Gi(0,a,++i))===Vi;);if(e!==Vi||i===A){var r=Hi.apply(null,t.slice(n,i));return n=i,{value:r,done:!1}}return{done:!0,value:null}}}},zi=function(e){return 0===e[0]&&255===e[1]&&0===e[2]&&255===e[3]},Xi=function(e,t,A,i,n){var a="http://www.w3.org/2000/svg",r=document.createElementNS(a,"svg"),s=document.createElementNS(a,"foreignObject");return r.setAttributeNS(null,"width",e.toString()),r.setAttributeNS(null,"height",t.toString()),s.setAttributeNS(null,"width","100%"),s.setAttributeNS(null,"height","100%"),s.setAttributeNS(null,"x",A.toString()),s.setAttributeNS(null,"y",i.toString()),s.setAttributeNS(null,"externalResourcesRequired","true"),r.appendChild(s),s.appendChild(n),r},Yi=function(e){return new Promise((function(t,A){var i=new Image;i.onload=function(){return t(i)},i.onerror=A,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},ji={get SUPPORT_RANGE_BOUNDS(){var e=function(e){if(e.createRange){var t=e.createRange();if(t.getBoundingClientRect){var A=e.createElement("boundtest");A.style.height="123px",A.style.display="block",e.body.appendChild(A),t.selectNode(A);var i=t.getBoundingClientRect(),n=Math.round(i.height);if(e.body.removeChild(A),123===n)return!0}}return!1}(document);return Object.defineProperty(ji,"SUPPORT_RANGE_BOUNDS",{value:e}),e},get SUPPORT_WORD_BREAKING(){var e=ji.SUPPORT_RANGE_BOUNDS&&function(e){var t=e.createElement("boundtest");t.style.width="50px",t.style.display="block",t.style.fontSize="12px",t.style.letterSpacing="0px",t.style.wordSpacing="0px",e.body.appendChild(t);var A=e.createRange();t.innerHTML="function"==typeof"".repeat?"👨".repeat(10):"";var i=t.firstChild,n=o(i.data).map((function(e){return l(e)})),a=0,r={},s=n.every((function(e,t){A.setStart(i,a),A.setEnd(i,a+e.length);var n=A.getBoundingClientRect();a+=e.length;var s=n.x>r.x||n.y>r.y;return r=n,0===t||s}));return e.body.removeChild(t),s}(document);return Object.defineProperty(ji,"SUPPORT_WORD_BREAKING",{value:e}),e},get SUPPORT_SVG_DRAWING(){var e=function(e){var t=new Image,A=e.createElement("canvas"),i=A.getContext("2d");if(!i)return!1;t.src="data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg'></svg>";try{i.drawImage(t,0,0),A.toDataURL()}catch(e){return!1}return!0}(document);return Object.defineProperty(ji,"SUPPORT_SVG_DRAWING",{value:e}),e},get SUPPORT_FOREIGNOBJECT_DRAWING(){var e="function"==typeof Array.from&&"function"==typeof window.fetch?function(e){var t=e.createElement("canvas"),A=100;t.width=A,t.height=A;var i=t.getContext("2d");if(!i)return Promise.reject(!1);i.fillStyle="rgb(0, 255, 0)",i.fillRect(0,0,A,A);var n=new Image,a=t.toDataURL();n.src=a;var r=Xi(A,A,0,0,n);return i.fillStyle="red",i.fillRect(0,0,A,A),Yi(r).then((function(t){i.drawImage(t,0,0);var n=i.getImageData(0,0,A,A).data;i.fillStyle="red",i.fillRect(0,0,A,A);var r=e.createElement("div");return r.style.backgroundImage="url("+a+")",r.style.height="100px",zi(n)?Yi(Xi(A,A,0,0,r)):Promise.reject(!1)})).then((function(e){return i.drawImage(e,0,0),zi(i.getImageData(0,0,A,A).data)})).catch((function(){return!1}))}(document):Promise.resolve(!1);return Object.defineProperty(ji,"SUPPORT_FOREIGNOBJECT_DRAWING",{value:e}),e},get SUPPORT_CORS_IMAGES(){var e=void 0!==(new Image).crossOrigin;return Object.defineProperty(ji,"SUPPORT_CORS_IMAGES",{value:e}),e},get SUPPORT_RESPONSE_TYPE(){var e="string"==typeof(new XMLHttpRequest).responseType;return Object.defineProperty(ji,"SUPPORT_RESPONSE_TYPE",{value:e}),e},get SUPPORT_CORS_XHR(){var e="withCredentials"in new XMLHttpRequest;return Object.defineProperty(ji,"SUPPORT_CORS_XHR",{value:e}),e},get SUPPORT_NATIVE_TEXT_SEGMENTATION(){var e=!("undefined"==typeof Intl||!Intl.Segmenter);return Object.defineProperty(ji,"SUPPORT_NATIVE_TEXT_SEGMENTATION",{value:e}),e}},_i=function(e,t){this.text=e,this.bounds=t},Ji=function(e,t){var A=t.ownerDocument;if(A){var i=A.createElement("html2canvaswrapper");i.appendChild(t.cloneNode(!0));var n=t.parentNode;if(n){n.replaceChild(i,t);var a=s(e,i);return i.firstChild&&n.replaceChild(i.firstChild,i),a}}return r.EMPTY},Zi=function(e,t,A){var i=e.ownerDocument;if(!i)throw new Error("Node has no owner document");var n=i.createRange();return n.setStart(e,t),n.setEnd(e,t+A),n},qi=function(e){if(ji.SUPPORT_NATIVE_TEXT_SEGMENTATION){var t=new Intl.Segmenter(void 0,{granularity:"grapheme"});return Array.from(t.segment(e)).map((function(e){return e.segment}))}return function(e){for(var t,A=Wi(e),i=[];!(t=A.next()).done;)t.value&&i.push(t.value.slice());return i}(e)},$i=function(e,t){return 0!==t.letterSpacing?qi(e):function(e,t){if(ji.SUPPORT_NATIVE_TEXT_SEGMENTATION){var A=new Intl.Segmenter(void 0,{granularity:"word"});return Array.from(A.segment(e)).map((function(e){return e.segment}))}return tn(e,t)}(e,t)},en=[32,160,4961,65792,65793,4153,4241],tn=function(e,t){for(var A,i=function(e,t){var A=o(e),i=ae(A,t),n=i[0],a=i[1],r=i[2],s=A.length,l=0,c=0;return{next:function(){if(c>=s)return{done:!0,value:null};for(var e=X;c<s&&(e=ne(A,a,n,++c,r))===X;);if(e!==X||c===s){var t=new re(A,e,l,c);return l=c,{value:t,done:!1}}return{done:!0,value:null}}}}(e,{lineBreak:t.lineBreak,wordBreak:"break-word"===t.overflowWrap?"break-word":t.wordBreak}),n=[],a=function(){if(A.value){var e=A.value.slice(),t=o(e),i="";t.forEach((function(e){-1===en.indexOf(e)?i+=l(e):(i.length&&n.push(i),n.push(l(e)),i="")})),i.length&&n.push(i)}};!(A=i.next()).done;)a();return n},An=function(e,t,A){this.text=nn(t.data,A.textTransform),this.textBounds=function(e,t,A,i){var n=$i(t,A),a=[],s=0;return n.forEach((function(t){if(A.textDecorationLine.length||t.trim().length>0)if(ji.SUPPORT_RANGE_BOUNDS){var n=Zi(i,s,t.length).getClientRects();if(n.length>1){var o=qi(t),l=0;o.forEach((function(t){a.push(new _i(t,r.fromDOMRectList(e,Zi(i,l+s,t.length).getClientRects()))),l+=t.length}))}else a.push(new _i(t,r.fromDOMRectList(e,n)))}else{var c=i.splitText(t.length);a.push(new _i(t,Ji(e,i))),i=c}else ji.SUPPORT_RANGE_BOUNDS||(i=i.splitText(t.length));s+=t.length})),a}(e,this.text,A,t)},nn=function(e,t){switch(t){case 1:return e.toLowerCase();case 3:return e.replace(an,rn);case 2:return e.toUpperCase();default:return e}},an=/(^|\s|:|-|\(|\))([a-z])/g,rn=function(e,t,A){return e.length>0?t+A.toUpperCase():e},sn=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i.src=A.currentSrc||A.src,i.intrinsicWidth=A.naturalWidth,i.intrinsicHeight=A.naturalHeight,i.context.cache.addImage(i.src),i}return t(A,e),A}(Fi),on=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i.canvas=A,i.intrinsicWidth=A.width,i.intrinsicHeight=A.height,i}return t(A,e),A}(Fi),ln=function(e){function A(t,A){var i=e.call(this,t,A)||this,n=new XMLSerializer,a=s(t,A);return A.setAttribute("width",a.width+"px"),A.setAttribute("height",a.height+"px"),i.svg="data:image/svg+xml,"+encodeURIComponent(n.serializeToString(A)),i.intrinsicWidth=A.width.baseVal.value,i.intrinsicHeight=A.height.baseVal.value,i.context.cache.addImage(i.svg),i}return t(A,e),A}(Fi),cn=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i.value=A.value,i}return t(A,e),A}(Fi),dn=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i.start=A.start,i.reversed="boolean"==typeof A.reversed&&!0===A.reversed,i}return t(A,e),A}(Fi),hn=[{type:15,flags:0,unit:"px",number:3}],un=[{type:16,flags:0,number:50}],gn="checkbox",pn="radio",mn="password",wn=707406591,fn=function(e){function A(t,A){var i,n,a,s=e.call(this,t,A)||this;switch(s.type=A.type.toLowerCase(),s.checked=A.checked,s.value=0===(a=(n=A).type===mn?new Array(n.value.length+1).join("•"):n.value).length?n.placeholder||"":a,s.type!==gn&&s.type!==pn||(s.styles.backgroundColor=3739148031,s.styles.borderTopColor=s.styles.borderRightColor=s.styles.borderBottomColor=s.styles.borderLeftColor=2779096575,s.styles.borderTopWidth=s.styles.borderRightWidth=s.styles.borderBottomWidth=s.styles.borderLeftWidth=1,s.styles.borderTopStyle=s.styles.borderRightStyle=s.styles.borderBottomStyle=s.styles.borderLeftStyle=1,s.styles.backgroundClip=[0],s.styles.backgroundOrigin=[0],s.bounds=(i=s.bounds).width>i.height?new r(i.left+(i.width-i.height)/2,i.top,i.height,i.height):i.width<i.height?new r(i.left,i.top+(i.height-i.width)/2,i.width,i.width):i),s.type){case gn:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=hn;break;case pn:s.styles.borderTopRightRadius=s.styles.borderTopLeftRadius=s.styles.borderBottomRightRadius=s.styles.borderBottomLeftRadius=un}return s}return t(A,e),A}(Fi),En=function(e){function A(t,A){var i=e.call(this,t,A)||this,n=A.options[A.selectedIndex||0];return i.value=n&&n.text||"",i}return t(A,e),A}(Fi),Bn=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i.value=A.value,i}return t(A,e),A}(Fi),bn=function(e){function A(t,A){var i=e.call(this,t,A)||this;i.src=A.src,i.width=parseInt(A.width,10)||0,i.height=parseInt(A.height,10)||0,i.backgroundColor=i.styles.backgroundColor;try{if(A.contentWindow&&A.contentWindow.document&&A.contentWindow.document.documentElement){i.tree=Fn(t,A.contentWindow.document.documentElement);var n=A.contentWindow.document.documentElement?bt(t,getComputedStyle(A.contentWindow.document.documentElement).backgroundColor):vt.TRANSPARENT,a=A.contentWindow.document.body?bt(t,getComputedStyle(A.contentWindow.document.body).backgroundColor):vt.TRANSPARENT;i.backgroundColor=ut(n)?ut(a)?i.styles.backgroundColor:a:n}}catch(e){}return i}return t(A,e),A}(Fi),vn=["OL","UL","MENU"],Cn=function(e,t,A,i){for(var n=t.firstChild,a=void 0;n;n=a)if(a=n.nextSibling,Sn(n)&&n.data.trim().length>0)A.textNodes.push(new An(e,n,A.styles));else if(In(n))if(Wn(n)&&n.assignedNodes)n.assignedNodes().forEach((function(t){return Cn(e,t,A,i)}));else{var r=yn(e,n);r.styles.isVisible()&&(xn(n,r,i)?r.flags|=4:Tn(r.styles)&&(r.flags|=2),-1!==vn.indexOf(n.tagName)&&(r.flags|=8),A.elements.push(r),n.slot,n.shadowRoot?Cn(e,n.shadowRoot,r,i):Kn(n)||Ln(n)||Gn(n)||Cn(e,n,r,i))}},yn=function(e,t){return Hn(t)?new sn(e,t):Dn(t)?new on(e,t):Ln(t)?new ln(e,t):Un(t)?new cn(e,t):Qn(t)?new dn(e,t):On(t)?new fn(e,t):Gn(t)?new En(e,t):Kn(t)?new Bn(e,t):Pn(t)?new bn(e,t):new Fi(e,t)},Fn=function(e,t){var A=yn(e,t);return A.flags|=4,Cn(e,t,A,A),A},xn=function(e,t,A){return t.styles.isPositionedWithZIndex()||t.styles.opacity<1||t.styles.isTransformed()||Nn(e)&&A.styles.isTransparent()},Tn=function(e){return e.isPositioned()||e.isFloating()},Sn=function(e){return e.nodeType===Node.TEXT_NODE},In=function(e){return e.nodeType===Node.ELEMENT_NODE},Mn=function(e){return In(e)&&void 0!==e.style&&!kn(e)},kn=function(e){return"object"==typeof e.className},Un=function(e){return"LI"===e.tagName},Qn=function(e){return"OL"===e.tagName},On=function(e){return"INPUT"===e.tagName},Ln=function(e){return"svg"===e.tagName},Nn=function(e){return"BODY"===e.tagName},Dn=function(e){return"CANVAS"===e.tagName},Rn=function(e){return"VIDEO"===e.tagName},Hn=function(e){return"IMG"===e.tagName},Pn=function(e){return"IFRAME"===e.tagName},Vn=function(e){return"STYLE"===e.tagName},Kn=function(e){return"TEXTAREA"===e.tagName},Gn=function(e){return"SELECT"===e.tagName},Wn=function(e){return"SLOT"===e.tagName},zn=function(e){return e.tagName.indexOf("-")>0},Xn=function(){function e(){this.counters={}}return e.prototype.getCounterValue=function(e){var t=this.counters[e];return t&&t.length?t[t.length-1]:1},e.prototype.getCounterValues=function(e){return this.counters[e]||[]},e.prototype.pop=function(e){var t=this;e.forEach((function(e){return t.counters[e].pop()}))},e.prototype.parse=function(e){var t=this,A=e.counterIncrement,i=e.counterReset,n=!0;null!==A&&A.forEach((function(e){var A=t.counters[e.counter];A&&0!==e.increment&&(n=!1,A.length||A.push(1),A[Math.max(0,A.length-1)]+=e.increment)}));var a=[];return n&&i.forEach((function(e){var A=t.counters[e.counter];a.push(e.counter),A||(A=t.counters[e.counter]=[]),A.push(e.reset)})),a},e}(),Yn={integers:[1e3,900,500,400,100,90,50,40,10,9,5,4,1],values:["M","CM","D","CD","C","XC","L","XL","X","IX","V","IV","I"]},jn={integers:[9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["Ք","Փ","Ւ","Ց","Ր","Տ","Վ","Ս","Ռ","Ջ","Պ","Չ","Ո","Շ","Ն","Յ","Մ","Ճ","Ղ","Ձ","Հ","Կ","Ծ","Խ","Լ","Ի","Ժ","Թ","Ը","Է","Զ","Ե","Դ","Գ","Բ","Ա"]},_n={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,400,300,200,100,90,80,70,60,50,40,30,20,19,18,17,16,15,10,9,8,7,6,5,4,3,2,1],values:["י׳","ט׳","ח׳","ז׳","ו׳","ה׳","ד׳","ג׳","ב׳","א׳","ת","ש","ר","ק","צ","פ","ע","ס","נ","מ","ל","כ","יט","יח","יז","טז","טו","י","ט","ח","ז","ו","ה","ד","ג","ב","א"]},Jn={integers:[1e4,9e3,8e3,7e3,6e3,5e3,4e3,3e3,2e3,1e3,900,800,700,600,500,400,300,200,100,90,80,70,60,50,40,30,20,10,9,8,7,6,5,4,3,2,1],values:["ჵ","ჰ","ჯ","ჴ","ხ","ჭ","წ","ძ","ც","ჩ","შ","ყ","ღ","ქ","ფ","ჳ","ტ","ს","რ","ჟ","პ","ო","ჲ","ნ","მ","ლ","კ","ი","თ","ჱ","ზ","ვ","ე","დ","გ","ბ","ა"]},Zn=function(e,t,A,i,n,a){return e<t||e>A?ra(e,n,a.length>0):i.integers.reduce((function(t,A,n){for(;e>=A;)e-=A,t+=i.values[n];return t}),"")+a},qn=function(e,t,A,i){var n="";do{A||e--,n=i(e)+n,e/=t}while(e*t>=t);return n},$n=function(e,t,A,i,n){var a=A-t+1;return(e<0?"-":"")+(qn(Math.abs(e),a,i,(function(e){return l(Math.floor(e%a)+t)}))+n)},ea=function(e,t,A){void 0===A&&(A=". ");var i=t.length;return qn(Math.abs(e),i,!1,(function(e){return t[Math.floor(e%i)]}))+A},ta=function(e,t,A,i,n,a){if(e<-9999||e>9999)return ra(e,4,n.length>0);var r=Math.abs(e),s=n;if(0===r)return t[0]+s;for(var o=0;r>0&&o<=4;o++){var l=r%10;0===l&&li(a,1)&&""!==s?s=t[l]+s:l>1||1===l&&0===o||1===l&&1===o&&li(a,2)||1===l&&1===o&&li(a,4)&&e>100||1===l&&o>1&&li(a,8)?s=t[l]+(o>0?A[o-1]:"")+s:1===l&&o>0&&(s=A[o-1]+s),r=Math.floor(r/10)}return(e<0?i:"")+s},Aa="十百千萬",ia="拾佰仟萬",na="マイナス",aa="마이너스",ra=function(e,t,A){var i=A?". ":"",n=A?"、":"",a=A?", ":"",r=A?" ":"";switch(t){case 0:return"•"+r;case 1:return"◦"+r;case 2:return"◾"+r;case 5:var s=$n(e,48,57,!0,i);return s.length<4?"0"+s:s;case 4:return ea(e,"〇一二三四五六七八九",n);case 6:return Zn(e,1,3999,Yn,3,i).toLowerCase();case 7:return Zn(e,1,3999,Yn,3,i);case 8:return $n(e,945,969,!1,i);case 9:return $n(e,97,122,!1,i);case 10:return $n(e,65,90,!1,i);case 11:return $n(e,1632,1641,!0,i);case 12:case 49:return Zn(e,1,9999,jn,3,i);case 35:return Zn(e,1,9999,jn,3,i).toLowerCase();case 13:return $n(e,2534,2543,!0,i);case 14:case 30:return $n(e,6112,6121,!0,i);case 15:return ea(e,"子丑寅卯辰巳午未申酉戌亥",n);case 16:return ea(e,"甲乙丙丁戊己庚辛壬癸",n);case 17:case 48:return ta(e,"零一二三四五六七八九",Aa,"負",n,14);case 47:return ta(e,"零壹貳參肆伍陸柒捌玖",ia,"負",n,15);case 42:return ta(e,"零一二三四五六七八九",Aa,"负",n,14);case 41:return ta(e,"零壹贰叁肆伍陆柒捌玖",ia,"负",n,15);case 26:return ta(e,"〇一二三四五六七八九","十百千万",na,n,0);case 25:return ta(e,"零壱弐参四伍六七八九","拾百千万",na,n,7);case 31:return ta(e,"영일이삼사오육칠팔구","십백천만",aa,a,7);case 33:return ta(e,"零一二三四五六七八九","十百千萬",aa,a,0);case 32:return ta(e,"零壹貳參四五六七八九","拾百千",aa,a,7);case 18:return $n(e,2406,2415,!0,i);case 20:return Zn(e,1,19999,Jn,3,i);case 21:return $n(e,2790,2799,!0,i);case 22:return $n(e,2662,2671,!0,i);case 22:return Zn(e,1,10999,_n,3,i);case 23:return ea(e,"あいうえおかきくけこさしすせそたちつてとなにぬねのはひふへほまみむめもやゆよらりるれろわゐゑをん");case 24:return ea(e,"いろはにほへとちりぬるをわかよたれそつねならむうゐのおくやまけふこえてあさきゆめみしゑひもせす");case 27:return $n(e,3302,3311,!0,i);case 28:return ea(e,"アイウエオカキクケコサシスセソタチツテトナニヌネノハヒフヘホマミムメモヤユヨラリルレロワヰヱヲン",n);case 29:return ea(e,"イロハニホヘトチリヌルヲワカヨタレソツネナラムウヰノオクヤマケフコエテアサキユメミシヱヒモセス",n);case 34:return $n(e,3792,3801,!0,i);case 37:return $n(e,6160,6169,!0,i);case 38:return $n(e,4160,4169,!0,i);case 39:return $n(e,2918,2927,!0,i);case 40:return $n(e,1776,1785,!0,i);case 43:return $n(e,3046,3055,!0,i);case 44:return $n(e,3174,3183,!0,i);case 45:return $n(e,3664,3673,!0,i);case 46:return $n(e,3872,3881,!0,i);default:return $n(e,48,57,!0,i)}},sa="data-html2canvas-ignore",oa=function(){function e(e,t,A){if(this.context=e,this.options=A,this.scrolledElements=[],this.referenceElement=t,this.counters=new Xn,this.quoteDepth=0,!t.ownerDocument)throw new Error("Cloned element does not have an owner document");this.documentElement=this.cloneNode(t.ownerDocument.documentElement,!1)}return e.prototype.toIFrame=function(e,t){var A=this,a=ca(e,t);if(!a.contentWindow)return Promise.reject("Unable to find iframe window");var r=e.defaultView.pageXOffset,s=e.defaultView.pageYOffset,o=a.contentWindow,l=o.document,c=ua(a).then((function(){return i(A,void 0,void 0,(function(){var e,A;return n(this,(function(i){switch(i.label){case 0:return this.scrolledElements.forEach(fa),o&&(o.scrollTo(t.left,t.top),!/(iPad|iPhone|iPod)/g.test(navigator.userAgent)||o.scrollY===t.top&&o.scrollX===t.left||(this.context.logger.warn("Unable to restore scroll position for cloned document"),this.context.windowBounds=this.context.windowBounds.add(o.scrollX-t.left,o.scrollY-t.top,0,0))),e=this.options.onclone,void 0===(A=this.clonedReferenceElement)?[2,Promise.reject("Error finding the "+this.referenceElement.nodeName+" in the cloned document")]:l.fonts&&l.fonts.ready?[4,l.fonts.ready]:[3,2];case 1:i.sent(),i.label=2;case 2:return/(AppleWebKit)/g.test(navigator.userAgent)?[4,ha(l)]:[3,4];case 3:i.sent(),i.label=4;case 4:return"function"==typeof e?[2,Promise.resolve().then((function(){return e(l,A)})).then((function(){return a}))]:[2,a]}}))}))}));return l.open(),l.write(ma(document.doctype)+"<html></html>"),wa(this.referenceElement.ownerDocument,r,s),l.replaceChild(l.adoptNode(this.documentElement),l.documentElement),l.close(),c},e.prototype.createElementClone=function(e){if(yi(e,2),Dn(e))return this.createCanvasClone(e);if(Rn(e))return this.createVideoClone(e);if(Vn(e))return this.createStyleClone(e);var t=e.cloneNode(!1);return Hn(t)&&(Hn(e)&&e.currentSrc&&e.currentSrc!==e.src&&(t.src=e.currentSrc,t.srcset=""),"lazy"===t.loading&&(t.loading="eager")),zn(t)?this.createCustomElementClone(t):t},e.prototype.createCustomElementClone=function(e){var t=document.createElement("html2canvascustomelement");return pa(e.style,t),t},e.prototype.createStyleClone=function(e){try{var t=e.sheet;if(t&&t.cssRules){var A=[].slice.call(t.cssRules,0).reduce((function(e,t){return t&&"string"==typeof t.cssText?e+t.cssText:e}),""),i=e.cloneNode(!1);return i.textContent=A,i}}catch(e){if(this.context.logger.error("Unable to access cssRules property",e),"SecurityError"!==e.name)throw e}return e.cloneNode(!1)},e.prototype.createCanvasClone=function(e){var t;if(this.options.inlineImages&&e.ownerDocument){var A=e.ownerDocument.createElement("img");try{return A.src=e.toDataURL(),A}catch(t){this.context.logger.info("Unable to inline canvas contents, canvas is tainted",e)}}var i=e.cloneNode(!1);try{i.width=e.width,i.height=e.height;var n=e.getContext("2d"),a=i.getContext("2d");if(a)if(!this.options.allowTaint&&n)a.putImageData(n.getImageData(0,0,e.width,e.height),0,0);else{var r=null!==(t=e.getContext("webgl2"))&&void 0!==t?t:e.getContext("webgl");if(r){var s=r.getContextAttributes();!1===(null==s?void 0:s.preserveDrawingBuffer)&&this.context.logger.warn("Unable to clone WebGL context as it has preserveDrawingBuffer=false",e)}a.drawImage(e,0,0)}return i}catch(t){this.context.logger.info("Unable to clone canvas as it is tainted",e)}return i},e.prototype.createVideoClone=function(e){var t=e.ownerDocument.createElement("canvas");t.width=e.offsetWidth,t.height=e.offsetHeight;var A=t.getContext("2d");try{return A&&(A.drawImage(e,0,0,t.width,t.height),this.options.allowTaint||A.getImageData(0,0,t.width,t.height)),t}catch(t){this.context.logger.info("Unable to clone video as it is tainted",e)}var i=e.ownerDocument.createElement("canvas");return i.width=e.offsetWidth,i.height=e.offsetHeight,i},e.prototype.appendChildNode=function(e,t,A){In(t)&&("SCRIPT"===t.tagName||t.hasAttribute(sa)||"function"==typeof this.options.ignoreElements&&this.options.ignoreElements(t))||this.options.copyStyles&&In(t)&&Vn(t)||e.appendChild(this.cloneNode(t,A))},e.prototype.cloneChildNodes=function(e,t,A){for(var i=this,n=e.shadowRoot?e.shadowRoot.firstChild:e.firstChild;n;n=n.nextSibling)if(In(n)&&Wn(n)&&"function"==typeof n.assignedNodes){var a=n.assignedNodes();a.length&&a.forEach((function(e){return i.appendChildNode(t,e,A)}))}else this.appendChildNode(t,n,A)},e.prototype.cloneNode=function(e,t){if(Sn(e))return document.createTextNode(e.data);if(!e.ownerDocument)return e.cloneNode(!1);var A=e.ownerDocument.defaultView;if(A&&In(e)&&(Mn(e)||kn(e))){var i=this.createElementClone(e);i.style.transitionProperty="none";var n=A.getComputedStyle(e),a=A.getComputedStyle(e,":before"),r=A.getComputedStyle(e,":after");this.referenceElement===e&&Mn(i)&&(this.clonedReferenceElement=i),Nn(i)&&va(i);var s=this.counters.parse(new vi(this.context,n)),o=this.resolvePseudoContent(e,i,a,Oi.BEFORE);zn(e)&&(t=!0),Rn(e)||this.cloneChildNodes(e,i,t),o&&i.insertBefore(o,i.firstChild);var l=this.resolvePseudoContent(e,i,r,Oi.AFTER);return l&&i.appendChild(l),this.counters.pop(s),(n&&(this.options.copyStyles||kn(e))&&!Pn(e)||t)&&pa(n,i),0===e.scrollTop&&0===e.scrollLeft||this.scrolledElements.push([i,e.scrollLeft,e.scrollTop]),(Kn(e)||Gn(e))&&(Kn(i)||Gn(i))&&(i.value=e.value),i}return e.cloneNode(!1)},e.prototype.resolvePseudoContent=function(e,t,A,i){var n=this;if(A){var a=A.content,r=t.ownerDocument;if(r&&a&&"none"!==a&&"-moz-alt-content"!==a&&"none"!==A.display){this.counters.parse(new vi(this.context,A));var s=new bi(this.context,A),o=r.createElement("html2canvaspseudoelement");pa(A,o),s.content.forEach((function(t){if(0===t.type)o.appendChild(r.createTextNode(t.value));else if(22===t.type){var A=r.createElement("img");A.src=t.value,A.style.opacity="1",o.appendChild(A)}else if(18===t.type){if("attr"===t.name){var i=t.values.filter(ze);i.length&&o.appendChild(r.createTextNode(e.getAttribute(i[0].value)||""))}else if("counter"===t.name){var a=t.values.filter(_e),l=a[0],c=a[1];if(l&&ze(l)){var d=n.counters.getCounterValue(l.value),h=c&&ze(c)?IA.parse(n.context,c.value):3;o.appendChild(r.createTextNode(ra(d,h,!1)))}}else if("counters"===t.name){var u=t.values.filter(_e),g=(l=u[0],u[1]);if(c=u[2],l&&ze(l)){var p=n.counters.getCounterValues(l.value),m=c&&ze(c)?IA.parse(n.context,c.value):3,w=g&&0===g.type?g.value:"",f=p.map((function(e){return ra(e,m,!1)})).join(w);o.appendChild(r.createTextNode(f))}}}else if(20===t.type)switch(t.value){case"open-quote":o.appendChild(r.createTextNode(pi(s.quotes,n.quoteDepth++,!0)));break;case"close-quote":o.appendChild(r.createTextNode(pi(s.quotes,--n.quoteDepth,!1)));break;default:o.appendChild(r.createTextNode(t.value))}})),o.className=Ea+" "+Ba;var l=i===Oi.BEFORE?" "+Ea:" "+Ba;return kn(t)?t.className.baseValue+=l:t.className+=l,o}}},e.destroy=function(e){return!!e.parentNode&&(e.parentNode.removeChild(e),!0)},e}();!function(e){e[e.BEFORE=0]="BEFORE",e[e.AFTER=1]="AFTER"}(Oi||(Oi={}));var la,ca=function(e,t){var A=e.createElement("iframe");return A.className="html2canvas-container",A.style.visibility="hidden",A.style.position="fixed",A.style.left="-10000px",A.style.top="0px",A.style.border="0",A.width=t.width.toString(),A.height=t.height.toString(),A.scrolling="no",A.setAttribute(sa,"true"),e.body.appendChild(A),A},da=function(e){return new Promise((function(t){e.complete?t():e.src?(e.onload=t,e.onerror=t):t()}))},ha=function(e){return Promise.all([].slice.call(e.images,0).map(da))},ua=function(e){return new Promise((function(t,A){var i=e.contentWindow;if(!i)return A("No window assigned for iframe");var n=i.document;i.onload=e.onload=function(){i.onload=e.onload=null;var A=setInterval((function(){n.body.childNodes.length>0&&"complete"===n.readyState&&(clearInterval(A),t(e))}),50)}}))},ga=["all","d","content"],pa=function(e,t){for(var A=e.length-1;A>=0;A--){var i=e.item(A);-1===ga.indexOf(i)&&t.style.setProperty(i,e.getPropertyValue(i))}return t},ma=function(e){var t="";return e&&(t+="<!DOCTYPE ",e.name&&(t+=e.name),e.internalSubset&&(t+=e.internalSubset),e.publicId&&(t+='"'+e.publicId+'"'),e.systemId&&(t+='"'+e.systemId+'"'),t+=">"),t},wa=function(e,t,A){e&&e.defaultView&&(t!==e.defaultView.pageXOffset||A!==e.defaultView.pageYOffset)&&e.defaultView.scrollTo(t,A)},fa=function(e){var t=e[0],A=e[1],i=e[2];t.scrollLeft=A,t.scrollTop=i},Ea="___html2canvas___pseudoelement_before",Ba="___html2canvas___pseudoelement_after",ba='{\n content: "" !important;\n display: none !important;\n}',va=function(e){Ca(e,"."+Ea+":before"+ba+"\n ."+Ba+":after"+ba)},Ca=function(e,t){var A=e.ownerDocument;if(A){var i=A.createElement("style");i.textContent=t,e.appendChild(i)}},ya=function(){function e(){}return e.getOrigin=function(t){var A=e._link;return A?(A.href=t,A.href=A.href,A.protocol+A.hostname+A.port):"about:blank"},e.isSameOrigin=function(t){return e.getOrigin(t)===e._origin},e.setContext=function(t){e._link=t.document.createElement("a"),e._origin=e.getOrigin(t.location.href)},e._origin="about:blank",e}(),Fa=function(){function e(e,t){this.context=e,this._options=t,this._cache={}}return e.prototype.addImage=function(e){var t=Promise.resolve();return this.has(e)?t:Ua(e)||Ia(e)?((this._cache[e]=this.loadImage(e)).catch((function(){})),t):t},e.prototype.match=function(e){return this._cache[e]},e.prototype.loadImage=function(e){return i(this,void 0,void 0,(function(){var t,A,i,a,r=this;return n(this,(function(n){switch(n.label){case 0:return t=ya.isSameOrigin(e),A=!Ma(e)&&!0===this._options.useCORS&&ji.SUPPORT_CORS_IMAGES&&!t,i=!Ma(e)&&!t&&!Ua(e)&&"string"==typeof this._options.proxy&&ji.SUPPORT_CORS_XHR&&!A,t||!1!==this._options.allowTaint||Ma(e)||Ua(e)||i||A?(a=e,i?[4,this.proxy(a)]:[3,2]):[2];case 1:a=n.sent(),n.label=2;case 2:return this.context.logger.debug("Added image "+e.substring(0,256)),[4,new Promise((function(e,t){var i=new Image;i.onload=function(){return e(i)},i.onerror=t,(ka(a)||A)&&(i.crossOrigin="anonymous"),i.src=a,!0===i.complete&&setTimeout((function(){return e(i)}),500),r._options.imageTimeout>0&&setTimeout((function(){return t("Timed out ("+r._options.imageTimeout+"ms) loading image")}),r._options.imageTimeout)}))];case 3:return[2,n.sent()]}}))}))},e.prototype.has=function(e){return void 0!==this._cache[e]},e.prototype.keys=function(){return Promise.resolve(Object.keys(this._cache))},e.prototype.proxy=function(e){var t=this,A=this._options.proxy;if(!A)throw new Error("No proxy defined");var i=e.substring(0,256);return new Promise((function(n,a){var r=ji.SUPPORT_RESPONSE_TYPE?"blob":"text",s=new XMLHttpRequest;s.onload=function(){if(200===s.status)if("text"===r)n(s.response);else{var e=new FileReader;e.addEventListener("load",(function(){return n(e.result)}),!1),e.addEventListener("error",(function(e){return a(e)}),!1),e.readAsDataURL(s.response)}else a("Failed to proxy resource "+i+" with status code "+s.status)},s.onerror=a;var o=A.indexOf("?")>-1?"&":"?";if(s.open("GET",""+A+o+"url="+encodeURIComponent(e)+"&responseType="+r),"text"!==r&&s instanceof XMLHttpRequest&&(s.responseType=r),t._options.imageTimeout){var l=t._options.imageTimeout;s.timeout=l,s.ontimeout=function(){return a("Timed out ("+l+"ms) proxying "+i)}}s.send()}))},e}(),xa=/^data:image\/svg\+xml/i,Ta=/^data:image\/.*;base64,/i,Sa=/^data:image\/.*/i,Ia=function(e){return ji.SUPPORT_SVG_DRAWING||!Qa(e)},Ma=function(e){return Sa.test(e)},ka=function(e){return Ta.test(e)},Ua=function(e){return"blob"===e.substr(0,4)},Qa=function(e){return"svg"===e.substr(-3).toLowerCase()||xa.test(e)},Oa=function(){function e(e,t){this.type=0,this.x=e,this.y=t}return e.prototype.add=function(t,A){return new e(this.x+t,this.y+A)},e}(),La=function(e,t,A){return new Oa(e.x+(t.x-e.x)*A,e.y+(t.y-e.y)*A)},Na=function(){function e(e,t,A,i){this.type=1,this.start=e,this.startControl=t,this.endControl=A,this.end=i}return e.prototype.subdivide=function(t,A){var i=La(this.start,this.startControl,t),n=La(this.startControl,this.endControl,t),a=La(this.endControl,this.end,t),r=La(i,n,t),s=La(n,a,t),o=La(r,s,t);return A?new e(this.start,i,r,o):new e(o,s,a,this.end)},e.prototype.add=function(t,A){return new e(this.start.add(t,A),this.startControl.add(t,A),this.endControl.add(t,A),this.end.add(t,A))},e.prototype.reverse=function(){return new e(this.end,this.endControl,this.startControl,this.start)},e}(),Da=function(e){return 1===e.type},Ra=function(e){var t=e.styles,A=e.bounds,i=nt(t.borderTopLeftRadius,A.width,A.height),n=i[0],a=i[1],r=nt(t.borderTopRightRadius,A.width,A.height),s=r[0],o=r[1],l=nt(t.borderBottomRightRadius,A.width,A.height),c=l[0],d=l[1],h=nt(t.borderBottomLeftRadius,A.width,A.height),u=h[0],g=h[1],p=[];p.push((n+s)/A.width),p.push((u+c)/A.width),p.push((a+g)/A.height),p.push((o+d)/A.height);var m=Math.max.apply(Math,p);m>1&&(n/=m,a/=m,s/=m,o/=m,c/=m,d/=m,u/=m,g/=m);var w=A.width-s,f=A.height-d,E=A.width-c,B=A.height-g,b=t.borderTopWidth,v=t.borderRightWidth,C=t.borderBottomWidth,y=t.borderLeftWidth,F=at(t.paddingTop,e.bounds.width),x=at(t.paddingRight,e.bounds.width),T=at(t.paddingBottom,e.bounds.width),S=at(t.paddingLeft,e.bounds.width);this.topLeftBorderDoubleOuterBox=n>0||a>0?Ha(A.left+y/3,A.top+b/3,n-y/3,a-b/3,la.TOP_LEFT):new Oa(A.left+y/3,A.top+b/3),this.topRightBorderDoubleOuterBox=n>0||a>0?Ha(A.left+w,A.top+b/3,s-v/3,o-b/3,la.TOP_RIGHT):new Oa(A.left+A.width-v/3,A.top+b/3),this.bottomRightBorderDoubleOuterBox=c>0||d>0?Ha(A.left+E,A.top+f,c-v/3,d-C/3,la.BOTTOM_RIGHT):new Oa(A.left+A.width-v/3,A.top+A.height-C/3),this.bottomLeftBorderDoubleOuterBox=u>0||g>0?Ha(A.left+y/3,A.top+B,u-y/3,g-C/3,la.BOTTOM_LEFT):new Oa(A.left+y/3,A.top+A.height-C/3),this.topLeftBorderDoubleInnerBox=n>0||a>0?Ha(A.left+2*y/3,A.top+2*b/3,n-2*y/3,a-2*b/3,la.TOP_LEFT):new Oa(A.left+2*y/3,A.top+2*b/3),this.topRightBorderDoubleInnerBox=n>0||a>0?Ha(A.left+w,A.top+2*b/3,s-2*v/3,o-2*b/3,la.TOP_RIGHT):new Oa(A.left+A.width-2*v/3,A.top+2*b/3),this.bottomRightBorderDoubleInnerBox=c>0||d>0?Ha(A.left+E,A.top+f,c-2*v/3,d-2*C/3,la.BOTTOM_RIGHT):new Oa(A.left+A.width-2*v/3,A.top+A.height-2*C/3),this.bottomLeftBorderDoubleInnerBox=u>0||g>0?Ha(A.left+2*y/3,A.top+B,u-2*y/3,g-2*C/3,la.BOTTOM_LEFT):new Oa(A.left+2*y/3,A.top+A.height-2*C/3),this.topLeftBorderStroke=n>0||a>0?Ha(A.left+y/2,A.top+b/2,n-y/2,a-b/2,la.TOP_LEFT):new Oa(A.left+y/2,A.top+b/2),this.topRightBorderStroke=n>0||a>0?Ha(A.left+w,A.top+b/2,s-v/2,o-b/2,la.TOP_RIGHT):new Oa(A.left+A.width-v/2,A.top+b/2),this.bottomRightBorderStroke=c>0||d>0?Ha(A.left+E,A.top+f,c-v/2,d-C/2,la.BOTTOM_RIGHT):new Oa(A.left+A.width-v/2,A.top+A.height-C/2),this.bottomLeftBorderStroke=u>0||g>0?Ha(A.left+y/2,A.top+B,u-y/2,g-C/2,la.BOTTOM_LEFT):new Oa(A.left+y/2,A.top+A.height-C/2),this.topLeftBorderBox=n>0||a>0?Ha(A.left,A.top,n,a,la.TOP_LEFT):new Oa(A.left,A.top),this.topRightBorderBox=s>0||o>0?Ha(A.left+w,A.top,s,o,la.TOP_RIGHT):new Oa(A.left+A.width,A.top),this.bottomRightBorderBox=c>0||d>0?Ha(A.left+E,A.top+f,c,d,la.BOTTOM_RIGHT):new Oa(A.left+A.width,A.top+A.height),this.bottomLeftBorderBox=u>0||g>0?Ha(A.left,A.top+B,u,g,la.BOTTOM_LEFT):new Oa(A.left,A.top+A.height),this.topLeftPaddingBox=n>0||a>0?Ha(A.left+y,A.top+b,Math.max(0,n-y),Math.max(0,a-b),la.TOP_LEFT):new Oa(A.left+y,A.top+b),this.topRightPaddingBox=s>0||o>0?Ha(A.left+Math.min(w,A.width-v),A.top+b,w>A.width+v?0:Math.max(0,s-v),Math.max(0,o-b),la.TOP_RIGHT):new Oa(A.left+A.width-v,A.top+b),this.bottomRightPaddingBox=c>0||d>0?Ha(A.left+Math.min(E,A.width-y),A.top+Math.min(f,A.height-C),Math.max(0,c-v),Math.max(0,d-C),la.BOTTOM_RIGHT):new Oa(A.left+A.width-v,A.top+A.height-C),this.bottomLeftPaddingBox=u>0||g>0?Ha(A.left+y,A.top+Math.min(B,A.height-C),Math.max(0,u-y),Math.max(0,g-C),la.BOTTOM_LEFT):new Oa(A.left+y,A.top+A.height-C),this.topLeftContentBox=n>0||a>0?Ha(A.left+y+S,A.top+b+F,Math.max(0,n-(y+S)),Math.max(0,a-(b+F)),la.TOP_LEFT):new Oa(A.left+y+S,A.top+b+F),this.topRightContentBox=s>0||o>0?Ha(A.left+Math.min(w,A.width+y+S),A.top+b+F,w>A.width+y+S?0:s-y+S,o-(b+F),la.TOP_RIGHT):new Oa(A.left+A.width-(v+x),A.top+b+F),this.bottomRightContentBox=c>0||d>0?Ha(A.left+Math.min(E,A.width-(y+S)),A.top+Math.min(f,A.height+b+F),Math.max(0,c-(v+x)),d-(C+T),la.BOTTOM_RIGHT):new Oa(A.left+A.width-(v+x),A.top+A.height-(C+T)),this.bottomLeftContentBox=u>0||g>0?Ha(A.left+y+S,A.top+B,Math.max(0,u-(y+S)),g-(C+T),la.BOTTOM_LEFT):new Oa(A.left+y+S,A.top+A.height-(C+T))};!function(e){e[e.TOP_LEFT=0]="TOP_LEFT",e[e.TOP_RIGHT=1]="TOP_RIGHT",e[e.BOTTOM_RIGHT=2]="BOTTOM_RIGHT",e[e.BOTTOM_LEFT=3]="BOTTOM_LEFT"}(la||(la={}));var Ha=function(e,t,A,i,n){var a=(Math.sqrt(2)-1)/3*4,r=A*a,s=i*a,o=e+A,l=t+i;switch(n){case la.TOP_LEFT:return new Na(new Oa(e,l),new Oa(e,l-s),new Oa(o-r,t),new Oa(o,t));case la.TOP_RIGHT:return new Na(new Oa(e,t),new Oa(e+r,t),new Oa(o,l-s),new Oa(o,l));case la.BOTTOM_RIGHT:return new Na(new Oa(o,t),new Oa(o,t+s),new Oa(e+r,l),new Oa(e,l));case la.BOTTOM_LEFT:default:return new Na(new Oa(o,l),new Oa(o-r,l),new Oa(e,t+s),new Oa(e,t))}},Pa=function(e){return[e.topLeftBorderBox,e.topRightBorderBox,e.bottomRightBorderBox,e.bottomLeftBorderBox]},Va=function(e){return[e.topLeftPaddingBox,e.topRightPaddingBox,e.bottomRightPaddingBox,e.bottomLeftPaddingBox]},Ka=function(e,t,A){this.offsetX=e,this.offsetY=t,this.matrix=A,this.type=0,this.target=6},Ga=function(e,t){this.path=e,this.target=t,this.type=1},Wa=function(e){this.opacity=e,this.type=2,this.target=6},za=function(e){return 1===e.type},Xa=function(e,t){return e.length===t.length&&e.some((function(e,A){return e===t[A]}))},Ya=function(e){this.element=e,this.inlineLevel=[],this.nonInlineLevel=[],this.negativeZIndex=[],this.zeroOrAutoZIndexOrTransformedOrOpacity=[],this.positiveZIndex=[],this.nonPositionedFloats=[],this.nonPositionedInlineLevel=[]},ja=function(){function e(e,t){if(this.container=e,this.parent=t,this.effects=[],this.curves=new Ra(this.container),this.container.styles.opacity<1&&this.effects.push(new Wa(this.container.styles.opacity)),null!==this.container.styles.transform){var A=this.container.bounds.left+this.container.styles.transformOrigin[0].number,i=this.container.bounds.top+this.container.styles.transformOrigin[1].number,n=this.container.styles.transform;this.effects.push(new Ka(A,i,n))}if(0!==this.container.styles.overflowX){var a=Pa(this.curves),r=Va(this.curves);Xa(a,r)?this.effects.push(new Ga(a,6)):(this.effects.push(new Ga(a,2)),this.effects.push(new Ga(r,4)))}}return e.prototype.getEffects=function(e){for(var t=-1===[2,3].indexOf(this.container.styles.position),A=this.parent,i=this.effects.slice(0);A;){var n=A.effects.filter((function(e){return!za(e)}));if(t||0!==A.container.styles.position||!A.parent){if(i.unshift.apply(i,n),t=-1===[2,3].indexOf(A.container.styles.position),0!==A.container.styles.overflowX){var a=Pa(A.curves),r=Va(A.curves);Xa(a,r)||i.unshift(new Ga(r,6))}}else i.unshift.apply(i,n);A=A.parent}return i.filter((function(t){return li(t.target,e)}))},e}(),_a=function(e,t,A,i){e.container.elements.forEach((function(n){var a=li(n.flags,4),r=li(n.flags,2),s=new ja(n,e);li(n.styles.display,2048)&&i.push(s);var o=li(n.flags,8)?[]:i;if(a||r){var l=a||n.styles.isPositioned()?A:t,c=new Ya(s);if(n.styles.isPositioned()||n.styles.opacity<1||n.styles.isTransformed()){var d=n.styles.zIndex.order;if(d<0){var h=0;l.negativeZIndex.some((function(e,t){return d>e.element.container.styles.zIndex.order?(h=t,!1):h>0})),l.negativeZIndex.splice(h,0,c)}else if(d>0){var u=0;l.positiveZIndex.some((function(e,t){return d>=e.element.container.styles.zIndex.order?(u=t+1,!1):u>0})),l.positiveZIndex.splice(u,0,c)}else l.zeroOrAutoZIndexOrTransformedOrOpacity.push(c)}else n.styles.isFloating()?l.nonPositionedFloats.push(c):l.nonPositionedInlineLevel.push(c);_a(s,c,a?c:A,o)}else n.styles.isInlineLevel()?t.inlineLevel.push(s):t.nonInlineLevel.push(s),_a(s,t,A,o);li(n.flags,8)&&Ja(n,o)}))},Ja=function(e,t){for(var A=e instanceof dn?e.start:1,i=e instanceof dn&&e.reversed,n=0;n<t.length;n++){var a=t[n];a.container instanceof cn&&"number"==typeof a.container.value&&0!==a.container.value&&(A=a.container.value),a.listValue=ra(A,a.container.styles.listStyleType,!0),A+=i?-1:1}},Za=function(e,t){switch(t){case 0:return $a(e.topLeftBorderBox,e.topLeftPaddingBox,e.topRightBorderBox,e.topRightPaddingBox);case 1:return $a(e.topRightBorderBox,e.topRightPaddingBox,e.bottomRightBorderBox,e.bottomRightPaddingBox);case 2:return $a(e.bottomRightBorderBox,e.bottomRightPaddingBox,e.bottomLeftBorderBox,e.bottomLeftPaddingBox);default:return $a(e.bottomLeftBorderBox,e.bottomLeftPaddingBox,e.topLeftBorderBox,e.topLeftPaddingBox)}},qa=function(e,t){var A=[];return Da(e)?A.push(e.subdivide(.5,!1)):A.push(e),Da(t)?A.push(t.subdivide(.5,!0)):A.push(t),A},$a=function(e,t,A,i){var n=[];return Da(e)?n.push(e.subdivide(.5,!1)):n.push(e),Da(A)?n.push(A.subdivide(.5,!0)):n.push(A),Da(i)?n.push(i.subdivide(.5,!0).reverse()):n.push(i),Da(t)?n.push(t.subdivide(.5,!1).reverse()):n.push(t),n},er=function(e){var t=e.bounds,A=e.styles;return t.add(A.borderLeftWidth,A.borderTopWidth,-(A.borderRightWidth+A.borderLeftWidth),-(A.borderTopWidth+A.borderBottomWidth))},tr=function(e){var t=e.styles,A=e.bounds,i=at(t.paddingLeft,A.width),n=at(t.paddingRight,A.width),a=at(t.paddingTop,A.width),r=at(t.paddingBottom,A.width);return A.add(i+t.borderLeftWidth,a+t.borderTopWidth,-(t.borderRightWidth+t.borderLeftWidth+i+n),-(t.borderTopWidth+t.borderBottomWidth+a+r))},Ar=function(e,t,A){var i=function(e,t){return 0===e?t.bounds:2===e?tr(t):er(t)}(rr(e.styles.backgroundOrigin,t),e),n=function(e,t){return 0===e?t.bounds:2===e?tr(t):er(t)}(rr(e.styles.backgroundClip,t),e),a=ar(rr(e.styles.backgroundSize,t),A,i),r=a[0],s=a[1],o=nt(rr(e.styles.backgroundPosition,t),i.width-r,i.height-s);return[sr(rr(e.styles.backgroundRepeat,t),o,a,i,n),Math.round(i.left+o[0]),Math.round(i.top+o[1]),r,s]},ir=function(e){return ze(e)&&e.value===Vt.AUTO},nr=function(e){return"number"==typeof e},ar=function(e,t,A){var i=t[0],n=t[1],a=t[2],r=e[0],s=e[1];if(!r)return[0,0];if($e(r)&&s&&$e(s))return[at(r,A.width),at(s,A.height)];var o=nr(a);if(ze(r)&&(r.value===Vt.CONTAIN||r.value===Vt.COVER))return nr(a)?A.width/A.height<a!=(r.value===Vt.COVER)?[A.width,A.width/a]:[A.height*a,A.height]:[A.width,A.height];var l=nr(i),c=nr(n),d=l||c;if(ir(r)&&(!s||ir(s)))return l&&c?[i,n]:o||d?d&&o?[l?i:n*a,c?n:i/a]:[l?i:A.width,c?n:A.height]:[A.width,A.height];if(o){var h=0,u=0;return $e(r)?h=at(r,A.width):$e(s)&&(u=at(s,A.height)),ir(r)?h=u*a:s&&!ir(s)||(u=h/a),[h,u]}var g=null,p=null;if($e(r)?g=at(r,A.width):s&&$e(s)&&(p=at(s,A.height)),null===g||s&&!ir(s)||(p=l&&c?g/i*n:A.height),null!==p&&ir(r)&&(g=l&&c?p/n*i:A.width),null!==g&&null!==p)return[g,p];throw new Error("Unable to calculate background-size for element")},rr=function(e,t){var A=e[t];return void 0===A?e[0]:A},sr=function(e,t,A,i,n){var a=t[0],r=t[1],s=A[0],o=A[1];switch(e){case 2:return[new Oa(Math.round(i.left),Math.round(i.top+r)),new Oa(Math.round(i.left+i.width),Math.round(i.top+r)),new Oa(Math.round(i.left+i.width),Math.round(o+i.top+r)),new Oa(Math.round(i.left),Math.round(o+i.top+r))];case 3:return[new Oa(Math.round(i.left+a),Math.round(i.top)),new Oa(Math.round(i.left+a+s),Math.round(i.top)),new Oa(Math.round(i.left+a+s),Math.round(i.height+i.top)),new Oa(Math.round(i.left+a),Math.round(i.height+i.top))];case 1:return[new Oa(Math.round(i.left+a),Math.round(i.top+r)),new Oa(Math.round(i.left+a+s),Math.round(i.top+r)),new Oa(Math.round(i.left+a+s),Math.round(i.top+r+o)),new Oa(Math.round(i.left+a),Math.round(i.top+r+o))];default:return[new Oa(Math.round(n.left),Math.round(n.top)),new Oa(Math.round(n.left+n.width),Math.round(n.top)),new Oa(Math.round(n.left+n.width),Math.round(n.height+n.top)),new Oa(Math.round(n.left),Math.round(n.height+n.top))]}},or="Hidden Text",lr=function(){function e(e){this._data={},this._document=e}return e.prototype.parseMetrics=function(e,t){var A=this._document.createElement("div"),i=this._document.createElement("img"),n=this._document.createElement("span"),a=this._document.body;A.style.visibility="hidden",A.style.fontFamily=e,A.style.fontSize=t,A.style.margin="0",A.style.padding="0",A.style.whiteSpace="nowrap",a.appendChild(A),i.src="data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7",i.width=1,i.height=1,i.style.margin="0",i.style.padding="0",i.style.verticalAlign="baseline",n.style.fontFamily=e,n.style.fontSize=t,n.style.margin="0",n.style.padding="0",n.appendChild(this._document.createTextNode(or)),A.appendChild(n),A.appendChild(i);var r=i.offsetTop-n.offsetTop+2;A.removeChild(n),A.appendChild(this._document.createTextNode(or)),A.style.lineHeight="normal",i.style.verticalAlign="super";var s=i.offsetTop-A.offsetTop+2;return a.removeChild(A),{baseline:r,middle:s}},e.prototype.getMetrics=function(e,t){var A=e+" "+t;return void 0===this._data[A]&&(this._data[A]=this.parseMetrics(e,t)),this._data[A]},e}(),cr=function(e,t){this.context=e,this.options=t},dr=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i._activeEffects=[],i.canvas=A.canvas?A.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),A.canvas||(i.canvas.width=Math.floor(A.width*A.scale),i.canvas.height=Math.floor(A.height*A.scale),i.canvas.style.width=A.width+"px",i.canvas.style.height=A.height+"px"),i.fontMetrics=new lr(document),i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-A.x,-A.y),i.ctx.textBaseline="bottom",i._activeEffects=[],i.context.logger.debug("Canvas renderer initialized ("+A.width+"x"+A.height+") with scale "+A.scale),i}return t(A,e),A.prototype.applyEffects=function(e){for(var t=this;this._activeEffects.length;)this.popEffect();e.forEach((function(e){return t.applyEffect(e)}))},A.prototype.applyEffect=function(e){this.ctx.save(),function(e){return 2===e.type}(e)&&(this.ctx.globalAlpha=e.opacity),function(e){return 0===e.type}(e)&&(this.ctx.translate(e.offsetX,e.offsetY),this.ctx.transform(e.matrix[0],e.matrix[1],e.matrix[2],e.matrix[3],e.matrix[4],e.matrix[5]),this.ctx.translate(-e.offsetX,-e.offsetY)),za(e)&&(this.path(e.path),this.ctx.clip()),this._activeEffects.push(e)},A.prototype.popEffect=function(){this._activeEffects.pop(),this.ctx.restore()},A.prototype.renderStack=function(e){return i(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return e.element.container.styles.isVisible()?[4,this.renderStackContent(e)]:[3,2];case 1:t.sent(),t.label=2;case 2:return[2]}}))}))},A.prototype.renderNode=function(e){return i(this,void 0,void 0,(function(){return n(this,(function(t){switch(t.label){case 0:return li(e.container.flags,16),e.container.styles.isVisible()?[4,this.renderNodeBackgroundAndBorders(e)]:[3,3];case 1:return t.sent(),[4,this.renderNodeContent(e)];case 2:t.sent(),t.label=3;case 3:return[2]}}))}))},A.prototype.renderTextWithLetterSpacing=function(e,t,A){var i=this;0===t?this.ctx.fillText(e.text,e.bounds.left,e.bounds.top+A):qi(e.text).reduce((function(t,n){return i.ctx.fillText(n,t,e.bounds.top+A),t+i.ctx.measureText(n).width}),e.bounds.left)},A.prototype.createFontStyle=function(e){var t=e.fontVariant.filter((function(e){return"normal"===e||"small-caps"===e})).join(""),A=mr(e.fontFamily).join(", "),i=Ge(e.fontSize)?""+e.fontSize.number+e.fontSize.unit:e.fontSize.number+"px";return[[e.fontStyle,t,e.fontWeight,i,A].join(" "),A,i]},A.prototype.renderTextNode=function(e,t){return i(this,void 0,void 0,(function(){var A,i,a,r,s,o,l,c,d=this;return n(this,(function(n){return A=this.createFontStyle(t),i=A[0],a=A[1],r=A[2],this.ctx.font=i,this.ctx.direction=1===t.direction?"rtl":"ltr",this.ctx.textAlign="left",this.ctx.textBaseline="alphabetic",s=this.fontMetrics.getMetrics(a,r),o=s.baseline,l=s.middle,c=t.paintOrder,e.textBounds.forEach((function(e){c.forEach((function(A){switch(A){case 0:d.ctx.fillStyle=gt(t.color),d.renderTextWithLetterSpacing(e,t.letterSpacing,o);var i=t.textShadow;i.length&&e.text.trim().length&&(i.slice(0).reverse().forEach((function(A){d.ctx.shadowColor=gt(A.color),d.ctx.shadowOffsetX=A.offsetX.number*d.options.scale,d.ctx.shadowOffsetY=A.offsetY.number*d.options.scale,d.ctx.shadowBlur=A.blur.number,d.renderTextWithLetterSpacing(e,t.letterSpacing,o)})),d.ctx.shadowColor="",d.ctx.shadowOffsetX=0,d.ctx.shadowOffsetY=0,d.ctx.shadowBlur=0),t.textDecorationLine.length&&(d.ctx.fillStyle=gt(t.textDecorationColor||t.color),t.textDecorationLine.forEach((function(t){switch(t){case 1:d.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top+o),e.bounds.width,1);break;case 2:d.ctx.fillRect(e.bounds.left,Math.round(e.bounds.top),e.bounds.width,1);break;case 3:d.ctx.fillRect(e.bounds.left,Math.ceil(e.bounds.top+l),e.bounds.width,1)}})));break;case 1:t.webkitTextStrokeWidth&&e.text.trim().length&&(d.ctx.strokeStyle=gt(t.webkitTextStrokeColor),d.ctx.lineWidth=t.webkitTextStrokeWidth,d.ctx.lineJoin=window.chrome?"miter":"round",d.ctx.strokeText(e.text,e.bounds.left,e.bounds.top+o)),d.ctx.strokeStyle="",d.ctx.lineWidth=0,d.ctx.lineJoin="miter"}}))})),[2]}))}))},A.prototype.renderReplacedElement=function(e,t,A){if(A&&e.intrinsicWidth>0&&e.intrinsicHeight>0){var i=tr(e),n=Va(t);this.path(n),this.ctx.save(),this.ctx.clip(),this.ctx.drawImage(A,0,0,e.intrinsicWidth,e.intrinsicHeight,i.left,i.top,i.width,i.height),this.ctx.restore()}},A.prototype.renderNodeContent=function(e){return i(this,void 0,void 0,(function(){var t,i,a,s,o,l,c,d,h,u,g,p,m,w,f,E,B,b;return n(this,(function(n){switch(n.label){case 0:this.applyEffects(e.getEffects(4)),t=e.container,i=e.curves,a=t.styles,s=0,o=t.textNodes,n.label=1;case 1:return s<o.length?(l=o[s],[4,this.renderTextNode(l,a)]):[3,4];case 2:n.sent(),n.label=3;case 3:return s++,[3,1];case 4:if(!(t instanceof sn))return[3,8];n.label=5;case 5:return n.trys.push([5,7,,8]),[4,this.context.cache.match(t.src)];case 6:return f=n.sent(),this.renderReplacedElement(t,i,f),[3,8];case 7:return n.sent(),this.context.logger.error("Error loading image "+t.src),[3,8];case 8:if(t instanceof on&&this.renderReplacedElement(t,i,t.canvas),!(t instanceof ln))return[3,12];n.label=9;case 9:return n.trys.push([9,11,,12]),[4,this.context.cache.match(t.svg)];case 10:return f=n.sent(),this.renderReplacedElement(t,i,f),[3,12];case 11:return n.sent(),this.context.logger.error("Error loading svg "+t.svg.substring(0,255)),[3,12];case 12:return t instanceof bn&&t.tree?[4,new A(this.context,{scale:this.options.scale,backgroundColor:t.backgroundColor,x:0,y:0,width:t.width,height:t.height}).render(t.tree)]:[3,14];case 13:c=n.sent(),t.width&&t.height&&this.ctx.drawImage(c,0,0,t.width,t.height,t.bounds.left,t.bounds.top,t.bounds.width,t.bounds.height),n.label=14;case 14:if(t instanceof fn&&(d=Math.min(t.bounds.width,t.bounds.height),t.type===gn?t.checked&&(this.ctx.save(),this.path([new Oa(t.bounds.left+.39363*d,t.bounds.top+.79*d),new Oa(t.bounds.left+.16*d,t.bounds.top+.5549*d),new Oa(t.bounds.left+.27347*d,t.bounds.top+.44071*d),new Oa(t.bounds.left+.39694*d,t.bounds.top+.5649*d),new Oa(t.bounds.left+.72983*d,t.bounds.top+.23*d),new Oa(t.bounds.left+.84*d,t.bounds.top+.34085*d),new Oa(t.bounds.left+.39363*d,t.bounds.top+.79*d)]),this.ctx.fillStyle=gt(wn),this.ctx.fill(),this.ctx.restore()):t.type===pn&&t.checked&&(this.ctx.save(),this.ctx.beginPath(),this.ctx.arc(t.bounds.left+d/2,t.bounds.top+d/2,d/4,0,2*Math.PI,!0),this.ctx.fillStyle=gt(wn),this.ctx.fill(),this.ctx.restore())),hr(t)&&t.value.length){switch(h=this.createFontStyle(a),B=h[0],u=h[1],g=this.fontMetrics.getMetrics(B,u).baseline,this.ctx.font=B,this.ctx.fillStyle=gt(a.color),this.ctx.textBaseline="alphabetic",this.ctx.textAlign=gr(t.styles.textAlign),b=tr(t),p=0,t.styles.textAlign){case 1:p+=b.width/2;break;case 2:p+=b.width}m=b.add(p,0,0,-b.height/2+1),this.ctx.save(),this.path([new Oa(b.left,b.top),new Oa(b.left+b.width,b.top),new Oa(b.left+b.width,b.top+b.height),new Oa(b.left,b.top+b.height)]),this.ctx.clip(),this.renderTextWithLetterSpacing(new _i(t.value,m),a.letterSpacing,g),this.ctx.restore(),this.ctx.textBaseline="alphabetic",this.ctx.textAlign="left"}if(!li(t.styles.display,2048))return[3,20];if(null===t.styles.listStyleImage)return[3,19];if(0!==(w=t.styles.listStyleImage).type)return[3,18];f=void 0,E=w.url,n.label=15;case 15:return n.trys.push([15,17,,18]),[4,this.context.cache.match(E)];case 16:return f=n.sent(),this.ctx.drawImage(f,t.bounds.left-(f.width+10),t.bounds.top),[3,18];case 17:return n.sent(),this.context.logger.error("Error loading list-style-image "+E),[3,18];case 18:return[3,20];case 19:e.listValue&&-1!==t.styles.listStyleType&&(B=this.createFontStyle(a)[0],this.ctx.font=B,this.ctx.fillStyle=gt(a.color),this.ctx.textBaseline="middle",this.ctx.textAlign="right",b=new r(t.bounds.left,t.bounds.top+at(t.styles.paddingTop,t.bounds.width),t.bounds.width,xA(a.lineHeight,a.fontSize.number)/2+1),this.renderTextWithLetterSpacing(new _i(e.listValue,b),a.letterSpacing,xA(a.lineHeight,a.fontSize.number)/2+2),this.ctx.textBaseline="bottom",this.ctx.textAlign="left"),n.label=20;case 20:return[2]}}))}))},A.prototype.renderStackContent=function(e){return i(this,void 0,void 0,(function(){var t,A,i,a,r,s,o,l,c,d,h,u,g,p,m;return n(this,(function(n){switch(n.label){case 0:return li(e.element.container.flags,16),[4,this.renderNodeBackgroundAndBorders(e.element)];case 1:n.sent(),t=0,A=e.negativeZIndex,n.label=2;case 2:return t<A.length?(m=A[t],[4,this.renderStack(m)]):[3,5];case 3:n.sent(),n.label=4;case 4:return t++,[3,2];case 5:return[4,this.renderNodeContent(e.element)];case 6:n.sent(),i=0,a=e.nonInlineLevel,n.label=7;case 7:return i<a.length?(m=a[i],[4,this.renderNode(m)]):[3,10];case 8:n.sent(),n.label=9;case 9:return i++,[3,7];case 10:r=0,s=e.nonPositionedFloats,n.label=11;case 11:return r<s.length?(m=s[r],[4,this.renderStack(m)]):[3,14];case 12:n.sent(),n.label=13;case 13:return r++,[3,11];case 14:o=0,l=e.nonPositionedInlineLevel,n.label=15;case 15:return o<l.length?(m=l[o],[4,this.renderStack(m)]):[3,18];case 16:n.sent(),n.label=17;case 17:return o++,[3,15];case 18:c=0,d=e.inlineLevel,n.label=19;case 19:return c<d.length?(m=d[c],[4,this.renderNode(m)]):[3,22];case 20:n.sent(),n.label=21;case 21:return c++,[3,19];case 22:h=0,u=e.zeroOrAutoZIndexOrTransformedOrOpacity,n.label=23;case 23:return h<u.length?(m=u[h],[4,this.renderStack(m)]):[3,26];case 24:n.sent(),n.label=25;case 25:return h++,[3,23];case 26:g=0,p=e.positiveZIndex,n.label=27;case 27:return g<p.length?(m=p[g],[4,this.renderStack(m)]):[3,30];case 28:n.sent(),n.label=29;case 29:return g++,[3,27];case 30:return[2]}}))}))},A.prototype.mask=function(e){this.ctx.beginPath(),this.ctx.moveTo(0,0),this.ctx.lineTo(this.canvas.width,0),this.ctx.lineTo(this.canvas.width,this.canvas.height),this.ctx.lineTo(0,this.canvas.height),this.ctx.lineTo(0,0),this.formatPath(e.slice(0).reverse()),this.ctx.closePath()},A.prototype.path=function(e){this.ctx.beginPath(),this.formatPath(e),this.ctx.closePath()},A.prototype.formatPath=function(e){var t=this;e.forEach((function(e,A){var i=Da(e)?e.start:e;0===A?t.ctx.moveTo(i.x,i.y):t.ctx.lineTo(i.x,i.y),Da(e)&&t.ctx.bezierCurveTo(e.startControl.x,e.startControl.y,e.endControl.x,e.endControl.y,e.end.x,e.end.y)}))},A.prototype.renderRepeat=function(e,t,A,i){this.path(e),this.ctx.fillStyle=t,this.ctx.translate(A,i),this.ctx.fill(),this.ctx.translate(-A,-i)},A.prototype.resizeImage=function(e,t,A){var i;if(e.width===t&&e.height===A)return e;var n=(null!==(i=this.canvas.ownerDocument)&&void 0!==i?i:document).createElement("canvas");return n.width=Math.max(1,t),n.height=Math.max(1,A),n.getContext("2d").drawImage(e,0,0,e.width,e.height,0,0,t,A),n},A.prototype.renderBackgroundImage=function(e){return i(this,void 0,void 0,(function(){var t,A,i,a,r,s;return n(this,(function(o){switch(o.label){case 0:t=e.styles.backgroundImage.length-1,A=function(A){var a,r,s,o,l,c,d,h,u,g,p,m,w,f,E,B,b,v,C,y,F,x,T,S,I,M,k,U,Q,O,L;return n(this,(function(n){switch(n.label){case 0:if(0!==A.type)return[3,5];a=void 0,r=A.url,n.label=1;case 1:return n.trys.push([1,3,,4]),[4,i.context.cache.match(r)];case 2:return a=n.sent(),[3,4];case 3:return n.sent(),i.context.logger.error("Error loading background-image "+r),[3,4];case 4:return a&&(s=Ar(e,t,[a.width,a.height,a.width/a.height]),B=s[0],x=s[1],T=s[2],C=s[3],y=s[4],f=i.ctx.createPattern(i.resizeImage(a,C,y),"repeat"),i.renderRepeat(B,f,x,T)),[3,6];case 5:1===A.type?(o=Ar(e,t,[null,null,null]),B=o[0],x=o[1],T=o[2],C=o[3],y=o[4],l=Tt(A.angle,C,y),c=l[0],d=l[1],h=l[2],u=l[3],g=l[4],(p=document.createElement("canvas")).width=C,p.height=y,m=p.getContext("2d"),w=m.createLinearGradient(d,u,h,g),xt(A.stops,c).forEach((function(e){return w.addColorStop(e.stop,gt(e.color))})),m.fillStyle=w,m.fillRect(0,0,C,y),C>0&&y>0&&(f=i.ctx.createPattern(p,"repeat"),i.renderRepeat(B,f,x,T))):function(e){return 2===e.type}(A)&&(E=Ar(e,t,[null,null,null]),B=E[0],b=E[1],v=E[2],C=E[3],y=E[4],F=0===A.position.length?[At]:A.position,x=at(F[0],C),T=at(F[F.length-1],y),S=function(e,t,A,i,n){var a=0,r=0;switch(e.size){case 0:0===e.shape?a=r=Math.min(Math.abs(t),Math.abs(t-i),Math.abs(A),Math.abs(A-n)):1===e.shape&&(a=Math.min(Math.abs(t),Math.abs(t-i)),r=Math.min(Math.abs(A),Math.abs(A-n)));break;case 2:if(0===e.shape)a=r=Math.min(St(t,A),St(t,A-n),St(t-i,A),St(t-i,A-n));else if(1===e.shape){var s=Math.min(Math.abs(A),Math.abs(A-n))/Math.min(Math.abs(t),Math.abs(t-i)),o=It(i,n,t,A,!0),l=o[0],c=o[1];r=s*(a=St(l-t,(c-A)/s))}break;case 1:0===e.shape?a=r=Math.max(Math.abs(t),Math.abs(t-i),Math.abs(A),Math.abs(A-n)):1===e.shape&&(a=Math.max(Math.abs(t),Math.abs(t-i)),r=Math.max(Math.abs(A),Math.abs(A-n)));break;case 3:if(0===e.shape)a=r=Math.max(St(t,A),St(t,A-n),St(t-i,A),St(t-i,A-n));else if(1===e.shape){s=Math.max(Math.abs(A),Math.abs(A-n))/Math.max(Math.abs(t),Math.abs(t-i));var d=It(i,n,t,A,!1);l=d[0],c=d[1],r=s*(a=St(l-t,(c-A)/s))}}return Array.isArray(e.size)&&(a=at(e.size[0],i),r=2===e.size.length?at(e.size[1],n):a),[a,r]}(A,x,T,C,y),I=S[0],M=S[1],I>0&&M>0&&(k=i.ctx.createRadialGradient(b+x,v+T,0,b+x,v+T,I),xt(A.stops,2*I).forEach((function(e){return k.addColorStop(e.stop,gt(e.color))})),i.path(B),i.ctx.fillStyle=k,I!==M?(U=e.bounds.left+.5*e.bounds.width,Q=e.bounds.top+.5*e.bounds.height,L=1/(O=M/I),i.ctx.save(),i.ctx.translate(U,Q),i.ctx.transform(1,0,0,O,0,0),i.ctx.translate(-U,-Q),i.ctx.fillRect(b,L*(v-Q)+Q,C,y*L),i.ctx.restore()):i.ctx.fill())),n.label=6;case 6:return t--,[2]}}))},i=this,a=0,r=e.styles.backgroundImage.slice(0).reverse(),o.label=1;case 1:return a<r.length?(s=r[a],[5,A(s)]):[3,4];case 2:o.sent(),o.label=3;case 3:return a++,[3,1];case 4:return[2]}}))}))},A.prototype.renderSolidBorder=function(e,t,A){return i(this,void 0,void 0,(function(){return n(this,(function(i){return this.path(Za(A,t)),this.ctx.fillStyle=gt(e),this.ctx.fill(),[2]}))}))},A.prototype.renderDoubleBorder=function(e,t,A,a){return i(this,void 0,void 0,(function(){var i,r;return n(this,(function(n){switch(n.label){case 0:return t<3?[4,this.renderSolidBorder(e,A,a)]:[3,2];case 1:return n.sent(),[2];case 2:return i=function(e,t){switch(t){case 0:return $a(e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox,e.topRightBorderBox,e.topRightBorderDoubleOuterBox);case 1:return $a(e.topRightBorderBox,e.topRightBorderDoubleOuterBox,e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox);case 2:return $a(e.bottomRightBorderBox,e.bottomRightBorderDoubleOuterBox,e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox);default:return $a(e.bottomLeftBorderBox,e.bottomLeftBorderDoubleOuterBox,e.topLeftBorderBox,e.topLeftBorderDoubleOuterBox)}}(a,A),this.path(i),this.ctx.fillStyle=gt(e),this.ctx.fill(),r=function(e,t){switch(t){case 0:return $a(e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox,e.topRightBorderDoubleInnerBox,e.topRightPaddingBox);case 1:return $a(e.topRightBorderDoubleInnerBox,e.topRightPaddingBox,e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox);case 2:return $a(e.bottomRightBorderDoubleInnerBox,e.bottomRightPaddingBox,e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox);default:return $a(e.bottomLeftBorderDoubleInnerBox,e.bottomLeftPaddingBox,e.topLeftBorderDoubleInnerBox,e.topLeftPaddingBox)}}(a,A),this.path(r),this.ctx.fill(),[2]}}))}))},A.prototype.renderNodeBackgroundAndBorders=function(e){return i(this,void 0,void 0,(function(){var t,A,i,a,r,s,o,l,c=this;return n(this,(function(n){switch(n.label){case 0:return this.applyEffects(e.getEffects(2)),t=e.container.styles,A=!ut(t.backgroundColor)||t.backgroundImage.length,i=[{style:t.borderTopStyle,color:t.borderTopColor,width:t.borderTopWidth},{style:t.borderRightStyle,color:t.borderRightColor,width:t.borderRightWidth},{style:t.borderBottomStyle,color:t.borderBottomColor,width:t.borderBottomWidth},{style:t.borderLeftStyle,color:t.borderLeftColor,width:t.borderLeftWidth}],a=ur(rr(t.backgroundClip,0),e.curves),A||t.boxShadow.length?(this.ctx.save(),this.path(a),this.ctx.clip(),ut(t.backgroundColor)||(this.ctx.fillStyle=gt(t.backgroundColor),this.ctx.fill()),[4,this.renderBackgroundImage(e.container)]):[3,2];case 1:n.sent(),this.ctx.restore(),t.boxShadow.slice(0).reverse().forEach((function(t){c.ctx.save();var A,i,n,a,r,s=Pa(e.curves),o=t.inset?0:1e4,l=(A=s,i=-o+(t.inset?1:-1)*t.spread.number,n=(t.inset?1:-1)*t.spread.number,a=t.spread.number*(t.inset?-2:2),r=t.spread.number*(t.inset?-2:2),A.map((function(e,t){switch(t){case 0:return e.add(i,n);case 1:return e.add(i+a,n);case 2:return e.add(i+a,n+r);case 3:return e.add(i,n+r)}return e})));t.inset?(c.path(s),c.ctx.clip(),c.mask(l)):(c.mask(s),c.ctx.clip(),c.path(l)),c.ctx.shadowOffsetX=t.offsetX.number+o,c.ctx.shadowOffsetY=t.offsetY.number,c.ctx.shadowColor=gt(t.color),c.ctx.shadowBlur=t.blur.number,c.ctx.fillStyle=t.inset?gt(t.color):"rgba(0,0,0,1)",c.ctx.fill(),c.ctx.restore()})),n.label=2;case 2:r=0,s=0,o=i,n.label=3;case 3:return s<o.length?0!==(l=o[s]).style&&!ut(l.color)&&l.width>0?2!==l.style?[3,5]:[4,this.renderDashedDottedBorder(l.color,l.width,r,e.curves,2)]:[3,11]:[3,13];case 4:return n.sent(),[3,11];case 5:return 3!==l.style?[3,7]:[4,this.renderDashedDottedBorder(l.color,l.width,r,e.curves,3)];case 6:return n.sent(),[3,11];case 7:return 4!==l.style?[3,9]:[4,this.renderDoubleBorder(l.color,l.width,r,e.curves)];case 8:return n.sent(),[3,11];case 9:return[4,this.renderSolidBorder(l.color,r,e.curves)];case 10:n.sent(),n.label=11;case 11:r++,n.label=12;case 12:return s++,[3,3];case 13:return[2]}}))}))},A.prototype.renderDashedDottedBorder=function(e,t,A,a,r){return i(this,void 0,void 0,(function(){var i,s,o,l,c,d,h,u,g,p,m,w,f,E,B,b;return n(this,(function(n){return this.ctx.save(),i=function(e,t){switch(t){case 0:return qa(e.topLeftBorderStroke,e.topRightBorderStroke);case 1:return qa(e.topRightBorderStroke,e.bottomRightBorderStroke);case 2:return qa(e.bottomRightBorderStroke,e.bottomLeftBorderStroke);default:return qa(e.bottomLeftBorderStroke,e.topLeftBorderStroke)}}(a,A),s=Za(a,A),2===r&&(this.path(s),this.ctx.clip()),Da(s[0])?(o=s[0].start.x,l=s[0].start.y):(o=s[0].x,l=s[0].y),Da(s[1])?(c=s[1].end.x,d=s[1].end.y):(c=s[1].x,d=s[1].y),h=0===A||2===A?Math.abs(o-c):Math.abs(l-d),this.ctx.beginPath(),3===r?this.formatPath(i):this.formatPath(s.slice(0,2)),u=t<3?3*t:2*t,g=t<3?2*t:t,3===r&&(u=t,g=t),p=!0,h<=2*u?p=!1:h<=2*u+g?(u*=m=h/(2*u+g),g*=m):(w=Math.floor((h+g)/(u+g)),f=(h-w*u)/(w-1),g=(E=(h-(w+1)*u)/w)<=0||Math.abs(g-f)<Math.abs(g-E)?f:E),p&&(3===r?this.ctx.setLineDash([0,u+g]):this.ctx.setLineDash([u,g])),3===r?(this.ctx.lineCap="round",this.ctx.lineWidth=t):this.ctx.lineWidth=2*t+1.1,this.ctx.strokeStyle=gt(e),this.ctx.stroke(),this.ctx.setLineDash([]),2===r&&(Da(s[0])&&(B=s[3],b=s[0],this.ctx.beginPath(),this.formatPath([new Oa(B.end.x,B.end.y),new Oa(b.start.x,b.start.y)]),this.ctx.stroke()),Da(s[1])&&(B=s[1],b=s[2],this.ctx.beginPath(),this.formatPath([new Oa(B.end.x,B.end.y),new Oa(b.start.x,b.start.y)]),this.ctx.stroke())),this.ctx.restore(),[2]}))}))},A.prototype.render=function(e){return i(this,void 0,void 0,(function(){var t;return n(this,(function(A){switch(A.label){case 0:return this.options.backgroundColor&&(this.ctx.fillStyle=gt(this.options.backgroundColor),this.ctx.fillRect(this.options.x,this.options.y,this.options.width,this.options.height)),i=new ja(e,null),n=new Ya(i),_a(i,n,n,a=[]),Ja(i.container,a),t=n,[4,this.renderStack(t)];case 1:return A.sent(),this.applyEffects([]),[2,this.canvas]}var i,n,a}))}))},A}(cr),hr=function(e){return e instanceof Bn||e instanceof En||e instanceof fn&&e.type!==pn&&e.type!==gn},ur=function(e,t){switch(e){case 0:return Pa(t);case 2:return function(e){return[e.topLeftContentBox,e.topRightContentBox,e.bottomRightContentBox,e.bottomLeftContentBox]}(t);default:return Va(t)}},gr=function(e){switch(e){case 1:return"center";case 2:return"right";default:return"left"}},pr=["-apple-system","system-ui"],mr=function(e){return/iPhone OS 15_(0|1)/.test(window.navigator.userAgent)?e.filter((function(e){return-1===pr.indexOf(e)})):e},wr=function(e){function A(t,A){var i=e.call(this,t,A)||this;return i.canvas=A.canvas?A.canvas:document.createElement("canvas"),i.ctx=i.canvas.getContext("2d"),i.options=A,i.canvas.width=Math.floor(A.width*A.scale),i.canvas.height=Math.floor(A.height*A.scale),i.canvas.style.width=A.width+"px",i.canvas.style.height=A.height+"px",i.ctx.scale(i.options.scale,i.options.scale),i.ctx.translate(-A.x,-A.y),i.context.logger.debug("EXPERIMENTAL ForeignObject renderer initialized ("+A.width+"x"+A.height+" at "+A.x+","+A.y+") with scale "+A.scale),i}return t(A,e),A.prototype.render=function(e){return i(this,void 0,void 0,(function(){var t,A;return n(this,(function(i){switch(i.label){case 0:return t=Xi(this.options.width*this.options.scale,this.options.height*this.options.scale,this.options.scale,this.options.scale,e),[4,fr(t)];case 1:return A=i.sent(),this.options.backgroundColor&&(this.ctx.fillStyle=gt(this.options.backgroundColor),this.ctx.fillRect(0,0,this.options.width*this.options.scale,this.options.height*this.options.scale)),this.ctx.drawImage(A,-this.options.x*this.options.scale,-this.options.y*this.options.scale),[2,this.canvas]}}))}))},A}(cr),fr=function(e){return new Promise((function(t,A){var i=new Image;i.onload=function(){t(i)},i.onerror=A,i.src="data:image/svg+xml;charset=utf-8,"+encodeURIComponent((new XMLSerializer).serializeToString(e))}))},Er=function(){function e(e){var t=e.id,A=e.enabled;this.id=t,this.enabled=A,this.start=Date.now()}return e.prototype.debug=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.debug?console.debug.apply(console,a([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.getTime=function(){return Date.now()-this.start},e.prototype.info=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&"undefined"!=typeof window&&window.console&&"function"==typeof console.info&&console.info.apply(console,a([this.id,this.getTime()+"ms"],e))},e.prototype.warn=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.warn?console.warn.apply(console,a([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.prototype.error=function(){for(var e=[],t=0;t<arguments.length;t++)e[t]=arguments[t];this.enabled&&("undefined"!=typeof window&&window.console&&"function"==typeof console.error?console.error.apply(console,a([this.id,this.getTime()+"ms"],e)):this.info.apply(this,e))},e.instances={},e}(),Br=function(){function e(t,A){var i;this.windowBounds=A,this.instanceName="#"+e.instanceCount++,this.logger=new Er({id:this.instanceName,enabled:t.logging}),this.cache=null!==(i=t.cache)&&void 0!==i?i:new Fa(this,t)}return e.instanceCount=1,e}();"undefined"!=typeof window&&ya.setContext(window);var br=function(e,t){return i(void 0,void 0,void 0,(function(){var i,a,o,l,c,d,h,u,g,p,m,w,f,E,B,b,v,C,y,F,x,T,S,I,M,k,U,Q,O,L,N,D,R,H,P,V,K,G;return n(this,(function(n){switch(n.label){case 0:if(!e||"object"!=typeof e)return[2,Promise.reject("Invalid element provided as first argument")];if(!(i=e.ownerDocument))throw new Error("Element is not attached to a Document");if(!(a=i.defaultView))throw new Error("Document is not attached to a Window");return o={allowTaint:null!==(T=t.allowTaint)&&void 0!==T&&T,imageTimeout:null!==(S=t.imageTimeout)&&void 0!==S?S:15e3,proxy:t.proxy,useCORS:null!==(I=t.useCORS)&&void 0!==I&&I},l=A({logging:null===(M=t.logging)||void 0===M||M,cache:t.cache},o),c={windowWidth:null!==(k=t.windowWidth)&&void 0!==k?k:a.innerWidth,windowHeight:null!==(U=t.windowHeight)&&void 0!==U?U:a.innerHeight,scrollX:null!==(Q=t.scrollX)&&void 0!==Q?Q:a.pageXOffset,scrollY:null!==(O=t.scrollY)&&void 0!==O?O:a.pageYOffset},d=new r(c.scrollX,c.scrollY,c.windowWidth,c.windowHeight),h=new Br(l,d),u=null!==(L=t.foreignObjectRendering)&&void 0!==L&&L,g={allowTaint:null!==(N=t.allowTaint)&&void 0!==N&&N,onclone:t.onclone,ignoreElements:t.ignoreElements,inlineImages:u,copyStyles:u},h.logger.debug("Starting document clone with size "+d.width+"x"+d.height+" scrolled to "+-d.left+","+-d.top),p=new oa(h,e,g),(m=p.clonedReferenceElement)?[4,p.toIFrame(i,d)]:[2,Promise.reject("Unable to find element in cloned iframe")];case 1:return w=n.sent(),f=Nn(m)||"HTML"===m.tagName?function(e){var t=e.body,A=e.documentElement;if(!t||!A)throw new Error("Unable to get document size");var i=Math.max(Math.max(t.scrollWidth,A.scrollWidth),Math.max(t.offsetWidth,A.offsetWidth),Math.max(t.clientWidth,A.clientWidth)),n=Math.max(Math.max(t.scrollHeight,A.scrollHeight),Math.max(t.offsetHeight,A.offsetHeight),Math.max(t.clientHeight,A.clientHeight));return new r(0,0,i,n)}(m.ownerDocument):s(h,m),E=f.width,B=f.height,b=f.left,v=f.top,C=vr(h,m,t.backgroundColor),y={canvas:t.canvas,backgroundColor:C,scale:null!==(R=null!==(D=t.scale)&&void 0!==D?D:a.devicePixelRatio)&&void 0!==R?R:1,x:(null!==(H=t.x)&&void 0!==H?H:0)+b,y:(null!==(P=t.y)&&void 0!==P?P:0)+v,width:null!==(V=t.width)&&void 0!==V?V:Math.ceil(E),height:null!==(K=t.height)&&void 0!==K?K:Math.ceil(B)},u?(h.logger.debug("Document cloned, using foreign object rendering"),[4,new wr(h,y).render(m)]):[3,3];case 2:return F=n.sent(),[3,5];case 3:return h.logger.debug("Document cloned, element located at "+b+","+v+" with size "+E+"x"+B+" using computed rendering"),h.logger.debug("Starting DOM parsing"),x=Fn(h,m),C===x.styles.backgroundColor&&(x.styles.backgroundColor=vt.TRANSPARENT),h.logger.debug("Starting renderer for element at "+y.x+","+y.y+" with size "+y.width+"x"+y.height),[4,new dr(h,y).render(x)];case 4:F=n.sent(),n.label=5;case 5:return(null===(G=t.removeContainer)||void 0===G||G)&&(oa.destroy(w)||h.logger.error("Cannot detach cloned iframe as it is not in the DOM anymore")),h.logger.debug("Finished rendering"),[2,F]}}))}))},vr=function(e,t,A){var i=t.ownerDocument,n=i.documentElement?bt(e,getComputedStyle(i.documentElement).backgroundColor):vt.TRANSPARENT,a=i.body?bt(e,getComputedStyle(i.body).backgroundColor):vt.TRANSPARENT,r="string"==typeof A?bt(e,A):null===A?vt.TRANSPARENT:4294967295;return t===i.documentElement?ut(n)?ut(a)?r:a:n:r};return function(e,t){return void 0===t&&(t={}),br(e,t)}}();var html2canvas=html2canvasExports;const updateEquation=async(e,t,A,i,n)=>{const a=await tex2dataURL(e,n);if(a){const e=[];e.push({mimeType:a.mimeType,id:t,dataURL:a.dataURL,created:a.created,size:a.size,hasSVGwithBitmap:!1,shouldScale:!0}),i(e,A)}};async function tex2dataURL(e,t){let A=0;for(;!t.mathjax&&!t.mathjaxLoaderFinished&&A<10;)await sleep$1(100),A++;t.mathjaxLoaderFinished||errorlog({where:"text2dataURL",fn:tex2dataURL,message:"mathjaxLoader not ready, using fallback. Try reloading Obsidian or restarting the Excalidraw plugin"});try{return await mathjaxSVG(e,t)}catch(A){await sleep$1(100);try{return await mathjaxSVG(e,t)}catch(A){await sleep$1(100);try{return await mathjaxSVG(e,t)}catch(A){return t.mathjax?new obsidian_module.Notice("Unknown error loading LaTeX. Using fallback solution. Try closing and reopening this drawing."):new obsidian_module.Notice("LaTeX support did not load. Using fallback solution. Try checking your network connection."),await mathjaxImage2html(e)}}}}async function mathjaxSVG(e,t){const A=t.mathjax.tex2svg(e,{display:!0,scale:4}).querySelector("svg");if(A){A.width.baseVal.valueInSpecifiedUnits<2&&(A.width.baseVal.valueAsString=`${(A.width.baseVal.valueInSpecifiedUnits+1).toFixed(3)}ex`);const e=svgToBase64(A.outerHTML);return{mimeType:"image/svg+xml",fileId:fileid(),dataURL:e,created:Date.now(),size:await getImageSize(e)}}return null}async function mathjaxImage2html(e){const t=document.body.createDiv();t.style.display="table";const A=window.MathJax.tex2chtml(e,{display:!0,scale:4});A.style.margin="3px",A.style.color="black";const i=A.querySelector("mjx-assistive-mml");i&&i.parentElement.removeChild(i),t.appendChild(A),window.MathJax.typeset();const n=await html2canvas(t,{backgroundColor:null});return document.body.removeChild(t),{mimeType:"image/png",fileId:fileid(),dataURL:n.toDataURL(),created:Date.now(),size:{height:n.height,width:n.width}}}const THEME_FILTER="invert(100%) hue-rotate(180deg) saturate(1.25)",markdownRendererRecursionWatcthdog=new Set,replaceSVGColors=(e,t)=>{if(!t)return e;if("string"==typeof e){for(const[A,i]of Object.entries(t)){const t=new RegExp(`fill="${A}"`,"g");e=e.replaceAll(t,`fill="${i}"`);const n=new RegExp(`stroke="${A}"`,"g");e=e.replaceAll(n,`stroke="${i}"`)}return e}const A=e=>{if(e instanceof SVGElement){const A=e.getAttribute("fill"),i=e.getAttribute("stroke");A&&t[A]&&e.setAttribute("fill",t[A]),i&&t[i]&&e.setAttribute("stroke",t[i])}for(const t of e.childNodes)A(t)};for(const t of e.childNodes)A(t);return e};class EmbeddedFile{constructor(e,t,A,i){if(this.file=null,this.isSVGwithBitmap=!1,this.img="",this.imgInverted="",this.mtime=0,this.mimeType="application/octet-stream",this.size={height:0,width:0},this.attemptCounter=0,this.isHyperlink=!1,this.colorMap=null,this.plugin=e,this.resetImage(t,A),this.file&&(this.plugin.ea.isExcalidrawFile(this.file)||"svg"===this.file.extension.toLowerCase()))try{this.colorMap=i?JSON.parse(i):null}catch(e){this.colorMap=null}}resetImage(e,t){if(this.imgInverted=this.img="",this.mtime=0,t.startsWith("https://")||t.startsWith("http://"))return this.isHyperlink=!0,void(this.hyperlink=t);this.linkParts=getLinkParts(t),this.hostPath=e,this.linkParts.path?(this.linkParts.width||(this.linkParts.width=this.plugin.settings.mdSVGwidth),this.linkParts.height||(this.linkParts.height=this.plugin.settings.mdSVGmaxHeight),this.file=app.metadataCache.getFirstLinkpathDest(this.linkParts.path,e),this.file||0==this.attemptCounter++&&new obsidian_module.Notice(`Excalidraw Warning: could not find image file: ${t}`,5e3)):new obsidian_module.Notice(`Excalidraw Error\nIncorrect embedded filename: ${t}`)}fileChanged(){return!this.isHyperlink&&(this.file||(this.file=app.metadataCache.getFirstLinkpathDest(this.linkParts.path,this.hostPath),this.file)?this.mtime!=this.file.stat.mtime:(this.attemptCounter++,!1))}setImage(e,t,A,i,n){if(this.file||this.isHyperlink){switch(this.fileChanged()&&(this.imgInverted=this.img=""),this.mtime=this.isHyperlink?0:this.file.stat.mtime,this.size=A,this.mimeType=t,i&&n){case!0:this.imgInverted=e;break;case!1:this.img=e}this.isSVGwithBitmap=n}}isLoaded(e){if(!this.isHyperlink){if(!this.file&&(this.file=app.metadataCache.getFirstLinkpathDest(this.linkParts.path,this.hostPath),!this.file))return this.attemptCounter++,!0;if(this.fileChanged())return!1}return this.isSVGwithBitmap&&e?""!==this.imgInverted:""!==this.img}getImage(e){return this.file||this.isHyperlink?e&&this.isSVGwithBitmap?this.imgInverted:this.img:""}shouldScale(){return this.isHyperlink||!Boolean(this.linkParts&&this.linkParts.original&&this.linkParts.original.endsWith("|100%"))}}class EmbeddedFilesLoader{constructor(e,t){this.pdfDocsMap=new Map,this.terminate=!1,this.plugin=e,this.isDark=t,this.uid=nanoid()}emptyPDFDocsMap(){this.pdfDocsMap.forEach((e=>e.destroy())),this.pdfDocsMap.clear()}async getObsidianImage(e,t){const A=await this._getObsidianImage(e,t);return this.emptyPDFDocsMap(),A}async _getObsidianImage(e,t){var A;if(!this.plugin||!e)return null;const i=e instanceof EmbeddedFile&&e.isHyperlink,n=e instanceof EmbeddedFile?e.hyperlink:"",a=e instanceof EmbeddedFile?e.file:e;if(a&&markdownRendererRecursionWatcthdog.has(a))return new obsidian_module.Notice(`Loading of ${a.path}. Please check if there is an inifinite loop of one file embedded in the other.`),null;const r=i?null:e instanceof EmbeddedFile?e.linkParts:{original:a.path,path:a.path,isBlockRef:!1,ref:null,width:this.plugin.settings.mdSVGwidth,height:this.plugin.settings.mdSVGmaxHeight,page:null};let s=!1;const o=!i&&this.plugin.isExcalidrawFile(a),l=!i&&"pdf"===a.extension.toLowerCase();if(!(i||l||IMAGE_TYPES.contains(a.extension)||o||"md"===a.extension))return null;const c=i||l?null:await app.vault.readBinary(a),d=o?await(async A=>{const i=hasExportTheme(this.plugin,a)?getExportTheme(this.plugin,a,"light"):void 0,n={withBackground:!!hasExportBackground(this.plugin,a)&&getWithBackground(this.plugin,a),withTheme:!!i},r=replaceSVGColors(await createSVG(a.path,!0,n,this,i,null,null,[],this.plugin,t+1,getExportPadding(this.plugin,a)),e instanceof EmbeddedFile?e.colorMap:null),o=r.querySelectorAll("image:not([href^='data:image/svg'])");return o.length>0&&(s=!0),s&&A&&o.forEach((e=>{var t;const A=null===(t=e.parentElement)||void 0===t?void 0:t.id;r.querySelectorAll(`use[href='#${A}']`).forEach((e=>{e.setAttribute("filter",THEME_FILTER)}))})),!s&&r.getAttribute("hasbitmap")&&(s=!0),svgToBase64(r.outerHTML)})(this.isDark):null,[h,u]=l?await this.pdfToDataURL(a,r):[null,null];let g=l?"image/png":"image/svg+xml";const p=i?getURLImageExtension(n):a.extension;o||l||(g=getMimeType(p));let m=i?e instanceof EmbeddedFile?await getDataURLFromURL(e.hyperlink,g):null:null!==(A=null!=d?d:h)&&void 0!==A?A:"svg"===a.extension?await getSVGData(app,a,e instanceof EmbeddedFile?e.colorMap:null):"md"===a.extension?null:await getDataURL(c,g);if(!i&&!m){markdownRendererRecursionWatcthdog.add(a);const e=await this.convertMarkdownToSVG(this.plugin,a,r,t);markdownRendererRecursionWatcthdog.delete(a),m=e.dataURL,s=e.hasSVGwithBitmap}try{const e=l?u:await getImageSize(m);return{mimeType:g,fileId:await generateIdFromFile(i||l?(new TextEncoder).encode(m):c),dataURL:m,created:i?0:a.stat.mtime,hasSVGwithBitmap:s,size:e}}catch(e){return null}}async loadSceneFiles(e,t,A){var i,n;if(A>4)return void new obsidian_module.Notice(t$d("INFINITE_LOOP_WARNING")+A.toString(),6e3);const a=e.getFileEntries();let r;void 0===this.isDark&&(this.isDark="dark"===(null===(n=null===(i=null==e?void 0:e.scene)||void 0===i?void 0:i.appState)||void 0===n?void 0:n.theme));const s=[];for(;!this.terminate&&!(r=a.next()).done;){const e=r.value[1];if(e.isLoaded(this.isDark)){if(e.isSVGwithBitmap){const A={mimeType:e.mimeType,id:r.value[0],dataURL:e.getImage(this.isDark),created:e.mtime,size:e.size,hasSVGwithBitmap:e.isSVGwithBitmap,shouldScale:e.shouldScale()};try{t([A],this.isDark,!1)}catch(e){errorlog({where:"EmbeddedFileLoader.loadSceneFiles",error:e})}}}else{const i=await this._getObsidianImage(e,A);if(i){const A={mimeType:i.mimeType,id:r.value[0],dataURL:i.dataURL,created:i.created,size:i.size,hasSVGwithBitmap:i.hasSVGwithBitmap,shouldScale:e.shouldScale()};try{t([A],this.isDark,!1)}catch(e){errorlog({where:"EmbeddedFileLoader.loadSceneFiles",error:e})}}}}let o;const l=e.getEquationEntries();for(;!this.terminate&&!(o=l.next()).done;)if(!e.getEquation(o.value[0]).isLoaded){const e=o.value[1].latex,t=await tex2dataURL(e,this.plugin);if(t){const e={mimeType:t.mimeType,id:o.value[0],dataURL:t.dataURL,created:t.created,size:t.size,hasSVGwithBitmap:!1,shouldScale:!0};s.push(e)}}if(this.emptyPDFDocsMap(),!this.terminate)try{t(s,this.isDark,!0)}catch(e){errorlog({where:"EmbeddedFileLoader.loadSceneFiles",error:e})}}async pdfToDataURL(e,t){var A,i;try{let n=0,a=0;const r=null!==(A=this.pdfDocsMap.get(e.path))&&void 0!==A?A:await getPDFDoc(e);this.pdfDocsMap.has(e.path)||this.pdfDocsMap.set(e.path,r);const s=isNaN(t.page)?1:null!==(i=t.page)&&void 0!==i?i:1,o=this.plugin.settings.pdfScale,l=async e=>{const t=createEl("canvas"),A=t.getContext("2d"),i=await r.getPage(e),s=i.getViewport({scale:o});a=t.height=s.height,n=t.width=s.width;const l={canvasContext:A,background:"rgba(0,0,0,0)",viewport:s};return await i.render(l).promise,t},c=await l(s);if(c){const e=[`data:image/png;base64,${await new Promise(((e,t)=>{c.toBlob((async t=>{const A=await blobToBase64(t);e(A)}))}))}`,{width:n,height:a}];return c.width=0,c.height=0,e}}catch(e){return console.log(e),[null,null]}}async convertMarkdownToSVG(e,t,A,i){var n,a,r,s;let o=!1;const l=await getTransclusion(A,e.app,t);let c=(null!==(n=l.leadingHashes)&&void 0!==n?n:"")+l.contents;""===c&&(c="# Empty markdown file\nCTRL+Click here to open the file for editing in the current active pane, or CTRL+SHIFT+Click to open it in an adjacent pane.");const d=e.app.metadataCache.getFileCache(t);let h,u=e.settings.mdFont;switch((null==d?void 0:d.frontmatter)&&Boolean(d.frontmatter["excalidraw-font"])&&(u=d.frontmatter["excalidraw-font"]),u){case"Virgil":h=VIRGIL_FONT;break;case"Cascadia":h=CASCADIA_FONT;break;case"":h="";break;default:const A=await getFontDataURL(e.app,u,t.path);h=A.fontDef,u=A.fontName}(null==d?void 0:d.frontmatter)&&null!==d.frontmatter.banner&&(c=c.replace(/banner:\s*.*/,""));const g=(null==d?void 0:d.frontmatter)&&null!==(a=d.frontmatter["excalidraw-font-color"])&&void 0!==a?a:e.settings.mdFontColor;let p=(null==d?void 0:d.frontmatter)&&null!==(r=d.frontmatter["excalidraw-css"])&&void 0!==r?r:"",m=!1;if(p&&""!=p){const A=e.app.metadataCache.getFirstLinkpathDest(p,t.path);A&&(p=await e.app.vault.read(A),m=!0)}if(!m)if(e.settings.mdCSS&&""!==e.settings.mdCSS){const A=e.app.metadataCache.getFirstLinkpathDest(e.settings.mdCSS,t.path);p+=A?`\n${await e.app.vault.read(A)}`:DEFAULT_MD_EMBED_CSS}else p+=DEFAULT_MD_EMBED_CSS;const w=(null==d?void 0:d.frontmatter)&&null!==(s=d.frontmatter["excalidraw-border-color"])&&void 0!==s?s:e.settings.mdBorderColor;w&&""!==w&&!p.match(/svg/i)&&(p+=`svg{border:2px solid;color:${w};transform:scale(.95)}`);let f=` width="${A.width}px" height="100000"`,E=` width="${A.width}px" height="100%"`;const B=(e,t,A)=>`<svg xmlns="http://www.w3.org/2000/svg"${f}>${A?`<style>${A}</style>`:""}<foreignObject x="0" y="0"${E}>${e}${t}</foreignObject>${""!==h?`<defs><style>${h}</style></defs>`:""}</svg>`,b=createDiv();b.setAttribute("xmlns","http://www.w3.org/1999/xhtml"),b.setAttribute("class","excalidraw-md-host"),""!==u&&(b.style.fontFamily=u),b.style.overflow="auto",b.style.display="block",b.style.color=g&&""!==g?g:"initial",await obsidian_module.MarkdownRenderer.renderMarkdown(c,b,t.path,e),b.querySelectorAll(":scope > *[class^='frontmatter']").forEach((e=>b.removeChild(e)));const v=Array.from(b.querySelectorAll("span[class='internal-embed']"));for(let A=0;A<v.length;A++){const i=v[A],n=i.getAttribute("src");if(!n)continue;const a=i.getAttribute("width"),r=i.getAttribute("height"),s=new EmbeddedFile(e,t.path,n);if(!s.file)continue;const o=await this._getObsidianImage(s,1),l=createEl("img");a&&l.setAttribute("width",a),r&&l.setAttribute("height",r),l.src=o.dataURL,i.replaceWith(l)}const C=document.body.createDiv();C.style.display="none";const y=C.createEl("iframe").contentWindow.document;if(p){const e=y.createElement("style");e.type="text/css",e.innerHTML=p,y.head.appendChild(e)}const F=y.importNode(b,!0);y.body.appendChild(F);const x=createDiv();x.setAttribute("class","excalidraw-md-footer"),y.body.appendChild(x),y.body.querySelectorAll("*").forEach((e=>{const t=e.style,A=window.getComputedStyle(e);let i="";for(const e in t)t.hasOwnProperty(e)&&(i+=`${e}: ${A[e]};`);e.setAttribute("style",i)}));const T=(new XMLSerializer).serializeToString(F),S=(new XMLSerializer).serializeToString(x);document.body.removeChild(C);const I=new DOMParser,M=I.parseFromString(B(T,S),"image/svg+xml").firstElementChild,k=createDiv();k.appendChild(M),document.body.appendChild(k);const U=M.querySelector(".excalidraw-md-footer").scrollHeight,Q=M.querySelector(".excalidraw-md-host").scrollHeight+U,O=Q<=A.height?Q:A.height;document.body.removeChild(k),f=` width="${A.width}px" height="${O}px"`,E=` width="${A.width}px" height="${O}px"`,b.style.height=O-U+"px",b.style.overflow="hidden";const L=b.querySelectorAll("img:not([src^='data:image/svg+xml'])");L.length>0&&(o=!0),o&&this.isDark&&L.forEach((e=>{e instanceof HTMLImageElement&&(e.style.filter=THEME_FILTER)}));const N=B((new XMLSerializer).serializeToString(b),'<div class="excalidraw-md-footer"></div>',p);return e.ea.mostRecentMarkdownSVG=I.parseFromString(N,"image/svg+xml").firstElementChild,{dataURL:svgToBase64(N),hasSVGwithBitmap:o}}}const getSVGData=async(e,t,A)=>{const i=replaceSVGColors(await e.vault.read(t),A);return svgToBase64(i)},generateIdFromFile=async e=>{let t;try{const A=await window.crypto.subtle.digest("SHA-1",e);t=Array.from(new Uint8Array(A)).map((e=>e.toString(16).padStart(2,"0"))).join("")}catch(e){errorlog({where:"EmbeddedFileLoader.generateIdFromFile",error:e}),t=fileid()}return t};class Prompt extends obsidian_module.Modal{constructor(e,t,A,i,n){super(e),this.prompt_text=t,this.default_value=A,this.placeholder=i,this.prompt_desc=n}onOpen(){this.titleEl.setText(this.prompt_text),this.createForm()}onClose(){this.contentEl.empty()}createForm(){var e;let t=this.contentEl.createDiv();t.addClass("excalidraw-prompt-div"),this.prompt_desc&&(t=t.createDiv(),t.style.width="100%",t.createEl("p").innerHTML=this.prompt_desc);const A=t.createEl("form");A.addClass("excalidraw-prompt-form"),A.type="submit",A.onsubmit=e=>{e.preventDefault(),this.resolve(this.promptEl.value),this.close()},this.promptEl=A.createEl("input"),this.promptEl.type="text",this.promptEl.placeholder=this.placeholder,this.promptEl.value=null!==(e=this.default_value)&&void 0!==e?e:"",this.promptEl.addClass("excalidraw-prompt-input"),this.promptEl.select()}async openAndGetValue(e){this.resolve=e,this.open()}}class GenericInputPrompt extends obsidian_module.Modal{static Prompt(e,t,A,i,n,a,r,s,o,l,c){return new GenericInputPrompt(e,t,A,i,n,a,r,s,o,l,c).waitForClose}constructor(e,t,A,i,n,a,r,s,o,l,c){super(A),this.header=i,this.didSubmit=!1,this.lines=1,this.displayEditorButtons=!1,this.selectionStart=0,this.selectionEnd=0,this.selectionUpdateTimer=0,this.blockPointerInputOutsideModal=!1,this.linkBtnClickCallback=()=>{this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer),this.plugin.insertLinkDialog.start(this.view.file.path,(e=>{const t=this.inputComponent.inputEl.value;this.selectionStart>0&&" "!==t.slice(this.selectionStart-1,this.selectionStart)&&(e=" "+e),this.selectionStart<t.length&&" "!==t.slice(this.selectionStart,this.selectionStart+1)&&(e+=" ");const A=this.inputComponent.inputEl.value.slice(0,this.selectionStart)+e+this.inputComponent.inputEl.value.slice(this.selectionStart);this.inputComponent.inputEl.value=A,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.selectionStart=this.selectionStart+e.length,this.selectionEnd=this.selectionStart+e.length,this.inputComponent.inputEl.setSelectionRange(this.selectionStart,this.selectionStart)}))},this.insertStringBtnClickCallback=e=>{this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer);const t=this.inputComponent.inputEl.value.slice(0,this.selectionStart)+e+this.inputComponent.inputEl.value.slice(this.selectionStart);this.inputComponent.inputEl.value=t,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.selectionStart=this.selectionStart+1,this.selectionEnd=this.selectionStart,this.inputComponent.inputEl.setSelectionRange(this.selectionStart,this.selectionEnd)},this.delBtnClickCallback=()=>{if(this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer),0===this.input.length)return;const e=this.selectionEnd>this.selectionStart?this.selectionStart:this.selectionStart>0?this.selectionStart-1:0,t=this.selectionEnd,A=this.inputComponent.inputEl.value.slice(0,e)+this.inputComponent.inputEl.value.slice(t);this.inputComponent.inputEl.value=A,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.selectionStart=e,this.selectionEnd=e,this.inputComponent.inputEl.setSelectionRange(e,e)},this.uppercaseBtnClickCallback=()=>{if(this.view.ownerWindow.clearTimeout(this.selectionUpdateTimer),this.selectionEnd===this.selectionStart)return;const e=this.inputComponent.inputEl.value.slice(0,this.selectionStart)+this.inputComponent.inputEl.value.slice(this.selectionStart,this.selectionEnd).toUpperCase()+this.inputComponent.inputEl.value.slice(this.selectionEnd);this.inputComponent.inputEl.value=e,this.input=this.inputComponent.inputEl.value,this.inputComponent.inputEl.focus(),this.inputComponent.inputEl.setSelectionRange(this.selectionStart,this.selectionEnd)},this.submitClickCallback=()=>this.submit(),this.cancelClickCallback=()=>this.cancel(),this.keyDownCallback=e=>{("Enter"===e.key&&1===this.lines||isCTRL(e)&&"Enter"===e.key)&&(e.preventDefault(),this.submit()),this.displayEditorButtons&&"k"===e.key&&isCTRL(e)&&(e.preventDefault(),this.linkBtnClickCallback())},this.view=e,this.plugin=t,this.placeholder=n,this.input=a,this.buttons=r,this.lines=null!=s?s:1,this.displayEditorButtons=this.lines>1&&null!=o&&o,this.customComponents=l,this.blockPointerInputOutsideModal=null!=c&&c,this.waitForClose=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})),this.display(),this.inputComponent.inputEl.focus(),this.open()}display(){var e;this.contentEl.empty(),this.blockPointerInputOutsideModal&&(this.bgEl.style.pointerEvents=this.blockPointerInputOutsideModal?"none":"auto"),this.titleEl.textContent=this.header;const t=this.contentEl.createDiv();this.inputComponent=this.createInputField(t,this.placeholder,this.input),null===(e=this.customComponents)||void 0===e||e.call(this,t),this.createButtonBar(t)}createInputField(e,t,A){const i=new obsidian_module.TextAreaComponent(e);i.inputEl.style.width="100%",i.inputEl.style.height=2*this.lines+"em",1===this.lines&&(i.inputEl.style.resize="none",i.inputEl.style.overflow="hidden"),i.setPlaceholder(null!=t?t:"").setValue(null!=A?A:"").onChange((e=>this.input=e));const n=()=>{this.selectionUpdateTimer=this.view.ownerWindow.setTimeout((()=>{this.selectionStart=this.inputComponent.inputEl.selectionStart,this.selectionEnd=this.inputComponent.inputEl.selectionEnd}),30)};return i.inputEl.addEventListener("keydown",this.keyDownCallback),i.inputEl.addEventListener("keyup",n),i.inputEl.addEventListener("pointerup",n),i.inputEl.addEventListener("touchend",n),i.inputEl.addEventListener("input",n),i.inputEl.addEventListener("paste",n),i.inputEl.addEventListener("cut",n),i.inputEl.addEventListener("select",n),i.inputEl.addEventListener("selectionchange",n),i}createButton(e,t,A,i="",n="5px"){const a=new obsidian_module.ButtonComponent(e);return a.buttonEl.style.padding="0.5em",a.buttonEl.style.marginLeft=n,a.setTooltip(i),a.setButtonText(t).onClick(A),a}createButtonBar(e){const t=e.createDiv();t.style.display="flex",t.style.justifyContent="space-between",t.style.marginTop="1rem";const A=t.createDiv(),i=t.createDiv();if(this.buttons&&this.buttons.length>0){let e=null;for(const t of this.buttons){const A=new obsidian_module.ButtonComponent(i);A.buttonEl.style.marginLeft="5px",t.tooltip&&A.setTooltip(t.tooltip),A.setButtonText(t.caption).onClick((e=>{const A=t.action(this.input);A&&(this.input=A),this.submit()})),e=null!=e?e:A}e&&(e.setCta(),e.buttonEl.style.marginRight="0")}else this.createButton(i,"✅",this.submitClickCallback).setCta().buttonEl.style.marginRight="0";this.createButton(i,"❌",this.cancelClickCallback,t$d("PROMPT_BUTTON_CANCEL")),this.displayEditorButtons&&(this.createButton(A,"⏎",(()=>this.insertStringBtnClickCallback("\n")),t$d("PROMPT_BUTTON_INSERT_LINE"),"0"),this.createButton(A,"⌫",this.delBtnClickCallback,"Delete"),this.createButton(A,"⎵",(()=>this.insertStringBtnClickCallback(" ")),t$d("PROMPT_BUTTON_INSERT_SPACE")),this.view&&this.createButton(A,"🔗",this.linkBtnClickCallback,t$d("PROMPT_BUTTON_INSERT_LINK")),this.createButton(A,"🔠",this.uppercaseBtnClickCallback,t$d("PROMPT_BUTTON_UPPERCASE")))}submit(){this.didSubmit=!0,this.close()}cancel(){this.close()}resolveInput(){this.didSubmit?this.resolvePromise(this.input):this.rejectPromise("No input given.")}removeInputListener(){var e,t;null===(t=null===(e=this.inputComponent)||void 0===e?void 0:e.inputEl)||void 0===t||t.removeEventListener("keydown",this.keyDownCallback)}onOpen(){super.onOpen(),this.inputComponent.inputEl.focus(),this.inputComponent.inputEl.select()}onClose(){super.onClose(),this.resolveInput(),this.removeInputListener()}}class GenericSuggester extends obsidian_module.FuzzySuggestModal{static Suggest(e,t,A,i,n){return new GenericSuggester(e,t,A,i,n).promise}constructor(e,t,A,i,n){var a;super(e),this.displayItems=t,this.items=A,this.hint=i,this.instructions=n,this.limit=20,this.setPlaceholder(null!==(a=this.hint)&&void 0!==a?a:""),n&&this.setInstructions(this.instructions),this.promise=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})),this.open()}getItemText(e){return this.displayItems[this.items.indexOf(e)]}getItems(){return this.items}selectSuggestion(e,t){this.resolved=!0,super.selectSuggestion(e,t)}onChooseItem(e){this.resolved=!0,this.resolvePromise(e)}onClose(){super.onClose(),this.resolved||this.rejectPromise(this.inputEl.value)}}class NewFileActions extends obsidian_module.Modal{constructor(e,t,A,i,n=!0,a){super(e.app),this.plugin=e,this.path=t,this.keys=A,this.view=i,this.openNewFile=n,this.parentFile=a,this.newFile=null,a||(this.parentFile=i.file),this.waitForClose=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t}))}onOpen(){this.createForm()}openFile(e){this.newFile=e,e&&this.openNewFile&&getLeaf(this.plugin,this.view.leaf,this.keys).openFile(e,{active:!0})}onClose(){super.onClose(),this.resolvePromise(this.newFile)}createForm(){this.titleEl.setText(t$d("PROMPT_TITLE_NEW_FILE")),this.contentEl.createDiv({cls:"excalidraw-prompt-center",text:t$d("PROMPT_FILE_DOES_NOT_EXIST")}),this.contentEl.createDiv({cls:"excalidraw-prompt-center filepath",text:this.path}),this.contentEl.createDiv({cls:"excalidraw-prompt-center"},(e=>{e.style.textAlign="right";const t=()=>this.path&&""!==this.path?!!this.parentFile||(new obsidian_module.Notice(t$d("PROMPT_ERROR_DRAWING_CLOSED")),!1):(new obsidian_module.Notice(t$d("PROMPT_ERROR_NO_FILENAME")),!1),A=async e=>{if(!this.path.includes("/")){const e=new RegExp(`${this.parentFile.name}$`,"g");this.path=this.parentFile.path.replace(e,this.path)}return this.path.match(/\.md$/)||(this.path=`${this.path}.md`),checkAndCreateFolder(splitFolderAndFilename(this.path).folderpath),await this.app.vault.create(this.path,e)};e.createEl("button",{text:t$d("PROMPT_BUTTON_CREATE_MARKDOWN")}).onclick=async()=>{if(!t)return;const e=await A("");this.openFile(e),this.close()},e.createEl("button",{text:t$d("PROMPT_BUTTON_CREATE_EXCALIDRAW")}).onclick=async()=>{if(!t)return;const e=await A(await this.plugin.getBlankDrawing());await sleep$1(200),this.openFile(e),this.close()},e.createEl("button",{text:t$d("PROMPT_BUTTON_NEVERMIND")}).onclick=()=>{this.close()}}))}}class ConfirmationPrompt extends obsidian_module.Modal{constructor(e,t){super(e.app),this.plugin=e,this.didConfirm=!1,this.cancelClickCallback=()=>{this.didConfirm=!1,this.close()},this.confirmClickCallback=()=>{this.didConfirm=!0,this.close()},this.message=t,this.waitForClose=new Promise(((e,t)=>{this.resolvePromise=e,this.rejectPromise=t})),this.display(),this.open()}display(){this.contentEl.empty(),this.titleEl.textContent=t$d("PROMPT_TITLE_CONFIRMATION");const e=this.contentEl.createDiv();e.style.marginBottom="1rem",e.innerHTML=this.message;const t=this.contentEl.createDiv();t.style.display="flex",t.style.justifyContent="flex-end";const A=this.createButton(t,t$d("PROMPT_BUTTON_CANCEL"),this.cancelClickCallback);A.buttonEl.style.marginRight="0.5rem",this.createButton(t,t$d("PROMPT_BUTTON_OK"),this.confirmClickCallback).buttonEl.style.marginRight="0",A.buttonEl.focus()}createButton(e,t,A){const i=new obsidian_module.ButtonComponent(e);return i.setButtonText(t).onClick(A),i}onOpen(){var e;super.onOpen(),null===(e=this.contentEl.querySelector("button"))||void 0===e||e.focus()}onClose(){super.onClose(),this.didConfirm?this.resolvePromise(!0):this.resolvePromise(!1)}}var AutoexportPreference;!function(e){e[e.none=0]="none",e[e.both=1]="both",e[e.png=2]="png",e[e.svg=3]="svg",e[e.inherit=4]="inherit"}(AutoexportPreference||(AutoexportPreference={}));const REGEX_LINK={
|
|
|
EXPR:/(!)?(\[\[([^|\]]+)\|?([^\]]+)?]]|\[([^\]]*)]\(([^)]*)\))(\{(\d+)\})?/g,getResList:e=>{const t=e.matchAll(REGEX_LINK.EXPR);let A;const i=[];for(;!(A=t.next()).done;)i.push(A);return i},getRes:e=>e.matchAll(REGEX_LINK.EXPR),isTransclusion:e=>!!e.value[1],getLink:e=>e.value[3]?e.value[3]:e.value[6],isWikiLink:e=>!!e.value[3],getAliasOrLink:e=>REGEX_LINK.isWikiLink(e)?e.value[4]?e.value[4]:e.value[3]:e.value[5]?e.value[5]:e.value[6],getWrapLength:(e,t)=>{const A=parseInt(e.value[8]);return isNaN(A)?t>0?t:null:A}},DRAWING_REG=/\n# Drawing\n[^`]*(```json\n)([\s\S]*?)```\n/gm,DRAWING_REG_FALLBACK=/\n# Drawing\n(```json\n)?(.*)(```)?(%%)?/gm,DRAWING_COMPRESSED_REG=/(\n# Drawing\n[^`]*(?:```compressed\-json\n))([\s\S]*?)(```\n)/gm,DRAWING_COMPRESSED_REG_FALLBACK=/(\n# Drawing\n(?:```compressed\-json\n)?)(.*)((```)?(%%)?)/gm,REG_LINKINDEX_HYPERLINK=/^\w+:\/\//,isCompressedMD=e=>null!==e.match(/```compressed\-json\n/gm),getDecompressedScene=e=>{let t,A=e.matchAll(DRAWING_COMPRESSED_REG);return t=A.next(),t.done&&(A=e.matchAll(DRAWING_COMPRESSED_REG_FALLBACK),t=A.next()),t.value&&t.value.length>1?[decompress(t.value[2]),t]:[null,t]},changeThemeOfExcalidrawMD=e=>{const t=isCompressedMD(e);let A=t?getDecompressedScene(e)[0]:e;return A?(isObsidianThemeDark?1===(A.match(/"theme"\s*:\s*"light"\s*,/g)||[]).length&&(A=A.replace(/"theme"\s*:\s*"light"\s*,/,'"theme": "dark",')):1===(A.match(/"theme"\s*:\s*"dark"\s*,/g)||[]).length&&(A=A.replace(/"theme"\s*:\s*"dark"\s*,/,'"theme": "light",')),t?e.replace(DRAWING_COMPRESSED_REG,`$1${compress(A)}$3`):A):e};function getJSON(e){let t,A;if(isCompressedMD(e)){const[t,A]=getDecompressedScene(e);return t?{scene:t.substring(0,t.lastIndexOf("}")+1),pos:A.value.index}:{scene:e,pos:A.value?A.value.index:0}}if(t=e.matchAll(DRAWING_REG),A=t.next(),A.done&&(t=e.matchAll(DRAWING_REG_FALLBACK),A=t.next()),A.value&&A.value.length>1){const e=A.value[2];return{scene:e.substr(0,e.lastIndexOf("}")+1),pos:A.value.index}}return{scene:e,pos:A.value?A.value.index:0}}function getMarkdownDrawingSection(e,t){return t?`%%\n# Drawing\n\`\`\`compressed-json\n${compress(e)}\n\`\`\`\n%%`:`%%\n# Drawing\n\`\`\`json\n${e}\n\`\`\`\n%%`}const estimateMaxLineLen=(e,t)=>{if(!t||!e)return null;if(e===t)return null;let A=0;const i=e.split("\n");if(1===i.length)return null;for(const e of i){const t=e.trim();t.length>A&&(A=t.length)}return A},wrap=(e,t)=>t?wrapTextAtCharLength(e,t,!1,0):e;class ExcalidrawData{constructor(e){this.plugin=e,this.textElements=null,this.elementLinks=null,this.scene=null,this.deletedElements=[],this.file=null,this.embeddableTheme="auto",this.autoexportPreference=AutoexportPreference.inherit,this.textMode=TextMode.raw,this.loaded=!1,this.files=null,this.equations=null,this.compatibilityMode=!1,this.selectedElementIds={},this.disableCompression=!1,this.app=e.app,this.files=new Map,this.equations=new Map}initializeNonInitializedFields(){var e,t,A;if(!this.scene||!this.scene.elements)return;const i=null!==(e=this.scene.source.split("https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/")[1])&&void 0!==e?e:"1.8.16",n=this.scene.elements;for(const e of n){if("iframe"===e.type&&(e.type="embeddable"),e.boundElements){const t=new Map;e.boundElements.forEach((e=>{t.set(e.id,e.type)}));const A=Array.from(t,(([e,t])=>({id:e,type:t})));A.length!==e.boundElements.length&&(e.boundElements=A)}e.boundElementIds&&(e.boundElements||(e.boundElements=[]),e.boundElements=e.boundElements.concat(e.boundElementIds.map((e=>({type:"arrow",id:e})))),delete e.boundElementIds),"text"!==e.type||e.containerId||(e.containerId=null),null===e.x&&(e.x=0),null===e.y&&(e.y=0),null===(null===(t=e.startBinding)||void 0===t?void 0:t.focus)&&(e.startBinding.focus=0),null===(null===(A=e.endBinding)||void 0===A?void 0:A.focus)&&(e.endBinding.focus=0),null===e.fontSize&&(e.fontSize=20)}try{n.filter((e=>"text"===e.type&&e.containerId&&n.some((t=>t.id===e.containerId&&t.boundElements.length>0&&t.boundElements.some((t=>"text"===t.type&&t.id!==e.id&&t.id.length>8)))))).forEach((e=>{try{const t=n.filter((t=>t.id===e.containerId))[0],A=t.boundElements.filter((e=>!("text"===e.type&&!n.some((t=>t.id===e.id)))));t.boundElements=[{id:e.id,type:"text"}].concat(A)}catch(e){}}));const e=!isVersionNewerThanOther(i,"1.8.16");n.filter((e=>e.boundElements&&e.boundElements.length>0)).forEach((t=>{var A;e&&!(null===(A=t.customData)||void 0===A?void 0:A.legacyTextWrap)&&(t.customData=Object.assign(Object.assign({},t.customData),{legacyTextWrap:!0}));const i=t.boundElements.filter((e=>n.some((t=>t.id===e.id))));i.length!==t.boundElements.length&&(t.boundElements=i)})),n.filter((e=>"text"===e.type&&e.containerId&&!n.some((t=>t.id===e.containerId)))).forEach((e=>{e.containerId=null}))}catch(e){}}async loadData(e,t,A){var i,n;if(!t)return!1;if(this.loaded=!1,this.selectedElementIds={},this.textElements=new Map,this.elementLinks=new Map,this.file!=t&&(this.files.clear(),this.equations.clear()),this.file=t,this.compatibilityMode=!1,this.setShowLinkBrackets(),this.setLinkPrefix(),this.setUrlPrefix(),this.setAutoexportPreferences(),this.setembeddableThemePreference(),this.scene=null,this.plugin.settings.syncExcalidraw){const e=`${t.path.substring(0,t.path.lastIndexOf(".md"))}.excalidraw`,A=this.app.vault.getAbstractFileByPath(e);if(A&&A instanceof obsidian_module.TFile&&A.stat.mtime>t.stat.mtime){const e=await this.app.vault.read(A);this.scene=JSON.parse(e)}}let a=null;if(a=(()=>{const t=getJSON(e);if(-1===t.pos)throw new Error("Excalidraw JSON not found in the file");return this.scene||(this.scene=JSON_parse(t.scene)),t})(),this.deletedElements=this.scene.elements.filter((e=>e.isDeleted)),this.scene.elements=this.scene.elements.filter((e=>!e.isDeleted)),this.scene.files||(this.scene.files={}),hasExportTheme(this.plugin,this.file)?this.scene.appState.theme=getExportTheme(this.plugin,this.file,"light"):this.plugin.settings.matchThemeAlways&&(this.scene.appState.theme=isObsidianThemeDark()?"dark":"light"),null===(n=null===(i=this.scene)||void 0===i?void 0:i.elements)||void 0===n?void 0:n.some((e=>"iframe"===e.type))){const e=new ConfirmationPrompt(this.plugin,"This file contains embedded frames which will be migrated to a newer version for compatibility with <a href='https://excalidraw.com'>excalidraw.com</a>.<br>🔄 If you're using Obsidian on multiple devices, you may proceed now, but please, before opening this file on your other devices, update Excalidraw on those as well.<br>🔍 More info is available <a href='https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.9.9'>here</a>.<br>🌐 <a href='https://translate.google.com/?sl=en&tl=zh-CN&text=This%20file%20contains%20embedded%20frames%20which%20will%20be%20migrated%20to%20a%20newer%20version%20for%20compatibility%20with%20excalidraw.com.%0A%0AIf%20you%27re%20using%20Obsidian%20on%20multiple%20devices%2C%20you%20may%20proceed%20now%2C%20but%20please%2C%20before%20opening%20this%20file%20on%20your%20other%20devices%2C%20update%20Excalidraw%20on%20those%20as%20well.%0A%0AMore%20info%20is%20available%20here%3A%20https%3A%2F%2Fgithub.com%2Fzsviczian%2Fobsidian-excalidraw-plugin%2Freleases%2Ftag%2F1.9.9%27%3Ehere%3C%2Fa%3E.&op=translate'>Translate</a>.");if(e.contentEl.focus(),!await e.waitForClose)throw new Error("iframe conversion canceled")}this.initializeNonInitializedFields();let r=(e=e.substring(0,a.pos)).search(/(^%%\n)?# Text Elements\n/m);if(-1===r)return await this.setTextMode(A,!1),this.loaded=!0,!0;r+=e.match(/((^%%\n)?# Text Elements\n)/m)[0].length,e=e.substring(r),r=0;const s=" ^12345678\n\n".length;let o,l=e.matchAll(/\s\^(.{8})[\n]+/g);for(;!(o=l.next()).done;){let t=e.substring(r,o.value.index);const A=o.value[1],i=this.scene.elements.filter((e=>e.id===A))[0];if(i)if("text"!==i.type)i.link!==t&&(i.link=t,i.version++,i.versionNonce++),this.elementLinks.set(A,t);else{const e=estimateMaxLineLen(i.text,i.originalText),n=t.matchAll(/^%%\*\*\*>>>text element-link:(\[\[[^<*\]]*]])<<<\*\*\*%%/gm).next();n.done||(t=t.replace(/^%%\*\*\*>>>text element-link:\[\[[^<*\]]*]]<<<\*\*\*%%/gm,""),i.link=n.value[1]);const a=await this.parse(t);i.rawText=t,this.textElements.set(A,{raw:t,parsed:a.parsed,wrapAt:e}),a.link&&(i.link=a.link),!i||i.rawText&&""!==i.rawText||(i.rawText=t)}r=o.value.index+s}for(l=(e=e.substring(e.indexOf("# Embedded files\n")+"# Embedded files\n".length)).matchAll(/([\w\d]*):\s*\[\[([^\]]*)]]\s?(\{[^}]*})?\n/gm);!(o=l.next()).done;){const e=new EmbeddedFile(this.plugin,this.file.path,o.value[2],o.value[3]);this.setFile(o.value[1],e)}for(l=e.matchAll(/([\w\d]*):\s*(https?:\/\/[^\s]*)\n/gm);!(o=l.next()).done;){const e=new EmbeddedFile(this.plugin,null,o.value[2]);this.setFile(o.value[1],e)}for(l=e.matchAll(/([\w\d]*):\s*\$\$(.*)(\$\$\s*\n)/gm);!(o=l.next()).done;)this.setEquation(o.value[1],{latex:o.value[2],isLoaded:!1});return this.findNewTextElementsInScene(),this.findNewElementLinksInScene(),await this.setTextMode(A,!0),this.loaded=!0,!0}async loadLegacyData(e,t){return!!t&&(this.loaded=!1,this.selectedElementIds={},this.compatibilityMode=!0,this.file=t,this.textElements=new Map,this.elementLinks=new Map,this.setShowLinkBrackets(),this.setLinkPrefix(),this.setUrlPrefix(),this.setembeddableThemePreference(),this.scene=JSON.parse(e),this.scene.files||(this.scene.files={}),this.initializeNonInitializedFields(),this.plugin.settings.matchThemeAlways&&(this.scene.appState.theme=isObsidianThemeDark()?"dark":"light"),this.files.clear(),this.equations.clear(),this.findNewTextElementsInScene(),this.findNewElementLinksInScene(),await this.setTextMode(TextMode.raw,!0),this.loaded=!0,!0)}async setTextMode(e,t=!1){this.scene&&(this.textMode=e,await this.updateSceneTextElements(t))}updateTextElement(e,t,A,i=!1,n){var a;if(i||t!=e.text){const i=_measureText(t,e.fontSize,e.fontFamily,null!==(a=e.lineHeight)&&void 0!==a?a:getDefaultLineHeight(e.fontFamily));e.text=t,e.originalText=A,e.containerId&&"arrow"!==n||(e.width=i.w),e.height=i.h,e.baseline=i.baseline}}async updateSceneTextElements(e=!1){var t,A,i,n;const a=null===(t=this.scene.elements)||void 0===t?void 0:t.filter((e=>"text"===e.type));for(const t of a){const a=getContainerElement(t,this.scene),r=null!==(i=null!==(A=await this.getText(t.id))&&void 0!==A?A:t.originalText)&&void 0!==i?i:t.text,s=null===(n=this.textElements.get(t.id))||void 0===n?void 0:n.wrapAt;try{this.updateTextElement(t,s?wrapText(r,getFontString({fontSize:t.fontSize,fontFamily:t.fontFamily}),getBoundTextMaxWidth(a)):r,r,e,null==a?void 0:a.type)}catch(e){debug({where:"ExcalidrawData.updateSceneTextElements",fn:this.updateSceneTextElements,textElement:t})}}}async getText(e){const t=this.textElements.get(e);return t?this.textMode===TextMode.parsed?(t.parsed||this.textElements.set(e,{raw:t.raw,parsed:(await this.parse(t.raw)).parsed,wrapAt:t.wrapAt}),t.parsed):t.raw:null}findNewElementLinksInScene(){var e;let t=!1;const A=null===(e=this.scene.elements)||void 0===e?void 0:e.filter((e=>"text"!==e.type&&e.link&&e.link.startsWith("[[")&&!this.elementLinks.has(e.id)));if(0===A.length)return t;let i,n=JSON.stringify(this.scene);for(const e of A)i=e.id,e.id.length>8&&(t=!0,i=nanoid(),n=n.replaceAll(e.id,i)),this.elementLinks.set(i,e.link);return this.scene=JSON.parse(n),t}findNewTextElementsInScene(e={}){var t;this.selectedElementIds=e;const A=null===(t=this.scene.elements)||void 0===t?void 0:t.filter((e=>"text"===e.type));let i,n=JSON.stringify(this.scene),a=!1;for(const e of A)if(i=e.id,e.id.length>8){if(a=!0,i=nanoid(),this.selectedElementIds[e.id]&&(delete this.selectedElementIds[e.id],this.selectedElementIds[i]=!0),n=n.replaceAll(e.id,i),this.textElements.has(e.id)){const t=this.textElements.get(e.id);this.textElements.set(i,{raw:t.raw,parsed:t.parsed,wrapAt:t.wrapAt}),this.textElements.delete(e.id)}if(!this.textElements.has(i)){const t=e.rawText&&""!==e.rawText?e.rawText:e.text,A=estimateMaxLineLen(e.text,e.originalText);this.textElements.set(i,{raw:t,parsed:null,wrapAt:A}),this.parseasync(i,t,A)}}else if(!this.textElements.has(e.id)){const t=e.rawText&&""!==e.rawText?e.rawText:e.text,A=estimateMaxLineLen(e.text,e.originalText);this.textElements.set(i,{raw:t,parsed:null,wrapAt:A}),this.parseasync(i,t,A)}return a&&(this.scene=JSON.parse(n)),a}updateElementLinksFromScene(){var e;for(const t of this.elementLinks.keys()){const A=null===(e=this.scene.elements)||void 0===e?void 0:e.filter((e=>"text"!==e.type&&e.id===t&&e.link&&e.link.startsWith("[[")));0===A.length?this.elementLinks.delete(t):this.elementLinks.set(t,A[0].link)}}async updateTextElementsFromScene(){var e,t,A;for(const i of this.textElements.keys()){const n=null===(e=this.scene.elements)||void 0===e?void 0:e.filter((e=>"text"===e.type&&e.id===i));if(0===n.length)this.textElements.delete(i);else{const e=await this.getText(i),a=this.scene.prevTextMode===TextMode.parsed?n[0].rawText:null!==(t=n[0].originalText)&&void 0!==t?t:n[0].text;if(e!==(null!==(A=n[0].originalText)&&void 0!==A?A:n[0].text)){const e=estimateMaxLineLen(n[0].text,n[0].originalText);this.textElements.set(i,{raw:a,parsed:(await this.parse(a)).parsed,wrapAt:e})}}}}async parseasync(e,t,A){this.textElements.set(e,{raw:t,parsed:(await this.parse(t)).parsed,wrapAt:A})}parseLinks(e,t,A){return e.substring(t,A.value.index)+(this.showLinkBrackets?"[[":"")+REGEX_LINK.getAliasOrLink(A)+(this.showLinkBrackets?"]]":"")}async getTransclusion(e){const t=getLinkParts(e,this.file),A=this.app.metadataCache.getFirstLinkpathDest(t.path,this.file.path);return await getTransclusion(t,this.app,A,this.plugin.settings.pageTransclusionCharLimit)}async parse(e){e=this.parseCheckbox(e);let t="",A=null,i=0;const n=REGEX_LINK.getRes(e);let a,r=!1,s=!1;for(e.match(REG_LINKINDEX_HYPERLINK)&&(A=e,s=!0);!(a=n.next()).done;){if(!A){const e=REGEX_LINK.getLink(a);A=e.match(REG_LINKINDEX_HYPERLINK)?e:`[[${e}]]`}if(REGEX_LINK.isTransclusion(a)){let A=this.parseCheckbox((await this.getTransclusion(REGEX_LINK.getLink(a))).contents).replaceAll(/%%[^%]*%%/gm,"");this.plugin.settings.removeTransclusionQuoteSigns&&(A=A.replaceAll(/\n\s*>\s?/gm,"\n")),t+=e.substring(i,a.value.index)+wrapTextAtCharLength(A,REGEX_LINK.getWrapLength(a,this.plugin.settings.wordWrappingDefault),this.plugin.settings.forceWrap)}else{const A=this.parseLinks(e,i,a);A&&(t+=A,s||r||(REGEX_LINK.getLink(a).match(REG_LINKINDEX_HYPERLINK)?s=!0:r=!0))}i=a.value.index+a.value[0].length}return t+=e.substring(i,e.length),r&&(t=this.linkPrefix+t),s&&(t=this.urlPrefix+t),{parsed:t,link:A}}parseCheckbox(e){return this.plugin.settings.parseTODO?e.replaceAll(/^- \[\s] /g,`${this.plugin.settings.todo} `).replaceAll(/\n- \[\s] /g,`\n${this.plugin.settings.todo} `).replaceAll(/^- \[[^\s]] /g,`${this.plugin.settings.done} `).replaceAll(/\n- \[[^\s]] /g,`\n${this.plugin.settings.done} `):e}quickParse(e){if((e=>{const t=REGEX_LINK.getRes(e);let A;for(;!(A=t.next()).done;)if(REGEX_LINK.isTransclusion(A))return!0;return!1})(e))return[null,null];e=this.parseCheckbox(e);let t="",A=null,i=0;const n=REGEX_LINK.getRes(e);let a,r=!1,s=!1;for(e.match(REG_LINKINDEX_HYPERLINK)&&(A=e,s=!0);!(a=n.next()).done;){if(!A){const e=REGEX_LINK.getLink(a);A=e.match(REG_LINKINDEX_HYPERLINK)?e:`[[${e}]]`}const n=this.parseLinks(e,i,a);n&&(t+=n,s||r||(REGEX_LINK.getLink(a).match(REG_LINKINDEX_HYPERLINK)?s=!0:r=!0)),i=a.value.index+a.value[0].length}return t+=e.substring(i,e.length),r&&(t=this.linkPrefix+t),s&&(t=this.urlPrefix+t),[t,A]}generateMD(e=[]){let t="# Text Elements\n";for(const e of this.textElements.keys()){const A=this.scene.elements.filter((t=>t.id===e));let i=this.textElements.get(e).raw;A&&1===A.length&&A[0].link&&A[0].rawText===A[0].originalText&&A[0].link.match(/^\[\[[^\]]*]]$/g)&&(i=`%%***>>>text element-link:${A[0].link}<<<***%%`+i),t+=`${i} ^${e}\n\n`}for(const e of this.elementLinks.keys())t+=`${this.elementLinks.get(e)} ^${e}\n\n`;if(t+=this.equations.size>0||this.files.size>0?"\n# Embedded files\n":"",this.equations.size>0)for(const e of this.equations.keys())t+=`${e}: $$${this.equations.get(e).latex}$$\n`;if(this.files.size>0)for(const e of this.files.keys()){const A=/(^[^#\|]*)/,i=this.files.get(e);i.isHyperlink?t+=`${e}: ${i.hyperlink}\n`:t+=`${e}: [[${i.file?i.linkParts.original.replace(A,app.metadataCache.fileToLinktext(i.file,this.file.path)):i.linkParts.original}]]${i.colorMap?" "+JSON.stringify(i.colorMap):""}\n`}return t+=this.equations.size>0||this.files.size>0?"\n":"",t+getMarkdownDrawingSection(JSON.stringify({type:this.scene.type,version:this.scene.version,source:this.scene.source,elements:this.scene.elements.concat(e),appState:this.scene.appState,files:this.scene.files},null,"\t"),!this.disableCompression&&this.plugin.settings.compress)}async saveDataURLtoVault(e,t,A){var i;const n=this.scene;let a=`Pasted Image ${window.moment().format("YYYYMMDDHHmmss_SSS")}`;switch(t){case"image/png":default:a+=".png";break;case"image/jpeg":a+=".jpg";break;case"image/svg+xml":a+=".svg";break;case"image/gif":a+=".gif"}const r=(await getAttachmentsFolderAndFilePath(this.app,this.file.path,a)).filepath,s=await getBinaryFileFromDataURL(e);if(!s)return null;const o=await this.app.vault.createBinary(r,s),l=new EmbeddedFile(this.plugin,this.file.path,r);return l.setImage(e,t,{height:0,width:0},"dark"===(null===(i=n.appState)||void 0===i?void 0:i.theme),"image/svg+xml"===t),this.setFile(A,l),o}async syncFiles(){let e=!1;const t=this.scene,A=t.elements.filter((e=>"image"===e.type)).map((e=>e.fileId));if(this.files.forEach(((t,i)=>{A.contains(i)||(this.files.delete(i),e=!0)})),this.equations.forEach(((t,i)=>{A.contains(i)||(this.equations.delete(i),e=!0)})),!t.files||0===Object.keys(t.files).length)return!1;const i=new Set;A.forEach((A=>{if(i.has(A)){const n=this.getFile(A),a=this.getEquation(A);if(n&&(n.isHyperlink||n.file&&("md"!==n.file.extension||this.plugin.isExcalidrawFile(n.file))))return;const r=fileid();t.elements.filter((e=>e.fileId===A))[0].fileId=r,e=!0,i.add(r),n&&this.setFile(r,new EmbeddedFile(this.plugin,this.file.path,n.linkParts.original)),a&&this.setEquation(r,{latex:a.latex,isLoaded:!1})}i.add(A)}));for(const A of Object.keys(t.files))this.hasFile(A)||this.hasEquation(A)||(e=!0,await this.saveDataURLtoVault(t.files[A].dataURL,t.files[A].mimeType,A));return e}async syncElements(e,t){this.scene=e;let A=!1;return this.compatibilityMode||(A=await this.syncFiles(),this.scene.files={}),this.updateElementLinksFromScene(),A=A||this.setLinkPrefix()||this.setUrlPrefix()||this.setShowLinkBrackets()||this.findNewElementLinksInScene(),await this.updateTextElementsFromScene(),A||this.findNewTextElementsInScene(t)}async updateScene(e){this.scene=JSON_parse(e),this.updateElementLinksFromScene();const t=this.setLinkPrefix()||this.setUrlPrefix()||this.setShowLinkBrackets()||this.setembeddableThemePreference()||this.findNewElementLinksInScene();return await this.updateTextElementsFromScene(),!(!t&&!this.findNewTextElementsInScene()||(await this.updateSceneTextElements(),0))}getRawText(e){var t;return null===(t=this.textElements.get(e))||void 0===t?void 0:t.raw}getParsedText(e){const t=this.textElements.get(e);return t?[wrap(t.parsed,t.wrapAt),t.parsed,null]:[null,null,null]}setTextElement(e,t,A,i){const n=estimateMaxLineLen(t,A),[a,r]=this.quickParse(A);return a?(this.textElements.set(e,{raw:A,parsed:a,wrapAt:n}),[wrap(a,n),a,r]):(this.parse(A).then((t=>{const a=t.parsed;this.textElements.set(e,{raw:A,parsed:a,wrapAt:n}),a&&i(wrap(a,n),a)})),[null,null,null])}async addTextElement(e,t,A){let i=estimateMaxLineLen(t,A);this.textElements.has(e)&&(i=this.textElements.get(e).wrapAt);const n=await this.parse(A);return this.textElements.set(e,{raw:A,parsed:n.parsed,wrapAt:i}),[wrap(n.parsed,i),n.parsed,n.link]}deleteTextElement(e){this.textElements.delete(e)}getOpenMode(){const e=this.app.metadataCache.getFileCache(this.file);let t="view-mobile"===this.plugin.settings.defaultMode?DEVICE.isPhone?"view":"normal":this.plugin.settings.defaultMode;switch((null==e?void 0:e.frontmatter)&&null!=e.frontmatter["excalidraw-default-mode"]&&(t=e.frontmatter["excalidraw-default-mode"]),t){case"zen":return{viewModeEnabled:!1,zenModeEnabled:!0};case"view":return{viewModeEnabled:!0,zenModeEnabled:!1};default:return{viewModeEnabled:!1,zenModeEnabled:!1}}}getLinkOpacity(){const e=this.app.metadataCache.getFileCache(this.file);let t=this.plugin.settings.linkOpacity;return(null==e?void 0:e.frontmatter)&&null!=e.frontmatter["excalidraw-linkbutton-opacity"]&&(t=e.frontmatter["excalidraw-linkbutton-opacity"]),t}getOnLoadScript(){const e=this.app.metadataCache.getFileCache(this.file);return(null==e?void 0:e.frontmatter)&&null!=e.frontmatter["excalidraw-onload-script"]?e.frontmatter["excalidraw-onload-script"]:null}setLinkPrefix(){const e=this.linkPrefix,t=this.app.metadataCache.getFileCache(this.file);return(null==t?void 0:t.frontmatter)&&null!=t.frontmatter["excalidraw-link-prefix"]?this.linkPrefix=t.frontmatter["excalidraw-link-prefix"]:this.linkPrefix=this.plugin.settings.linkPrefix,e!=this.linkPrefix}setUrlPrefix(){const e=this.urlPrefix,t=this.app.metadataCache.getFileCache(this.file);return(null==t?void 0:t.frontmatter)&&null!=t.frontmatter["excalidraw-url-prefix"]?this.urlPrefix=t.frontmatter["excalidraw-url-prefix"]:this.urlPrefix=this.plugin.settings.urlPrefix,e!=this.urlPrefix}setAutoexportPreferences(){const e=this.app.metadataCache.getFileCache(this.file);if((null==e?void 0:e.frontmatter)&&null!=e.frontmatter["excalidraw-autoexport"])switch(e.frontmatter["excalidraw-autoexport"].toLowerCase()){case"none":this.autoexportPreference=AutoexportPreference.none;break;case"both":this.autoexportPreference=AutoexportPreference.both;break;case"png":this.autoexportPreference=AutoexportPreference.png;break;case"svg":this.autoexportPreference=AutoexportPreference.svg;break;default:this.autoexportPreference=AutoexportPreference.inherit}else this.autoexportPreference=AutoexportPreference.inherit}setembeddableThemePreference(){const e=this.embeddableTheme,t=this.app.metadataCache.getFileCache(this.file);return(null==t?void 0:t.frontmatter)&&null!=t.frontmatter["excalidraw-iframe-theme"]?(this.embeddableTheme=t.frontmatter["excalidraw-iframe-theme"].toLowerCase(),EMBEDDABLE_THEME_FRONTMATTER_VALUES.includes(this.embeddableTheme)||(this.embeddableTheme="default")):this.embeddableTheme=this.plugin.settings.iframeMatchExcalidrawTheme?"auto":"default",e!=this.embeddableTheme}setShowLinkBrackets(){const e=this.showLinkBrackets,t=this.app.metadataCache.getFileCache(this.file);return(null==t?void 0:t.frontmatter)&&null!=t.frontmatter["excalidraw-link-brackets"]?this.showLinkBrackets=0!=t.frontmatter["excalidraw-link-brackets"]:this.showLinkBrackets=this.plugin.settings.showLinkBrackets,e!=this.showLinkBrackets}setFile(e,t){if(!t)return;if(this.files.set(e,t),t.isHyperlink)return void this.plugin.filesMaster.set(e,{isHyperlink:!0,path:t.hyperlink,blockrefData:null,hasSVGwithBitmap:t.isSVGwithBitmap});if(!t.file)return;const A=t.linkParts.original.split("#");this.plugin.filesMaster.set(e,{isHyperlink:!1,path:t.file.path+(t.shouldScale()?"":"|100%"),blockrefData:1===A.length?null:A[1],hasSVGwithBitmap:t.isSVGwithBitmap,colorMapJSON:t.colorMap?JSON.stringify(t.colorMap):null})}getFiles(){return Object.values(this.files)}getFile(e){let t=this.files.get(e);if(t)return t;const A=this.plugin.filesMaster.get(e);return A?(t=new EmbeddedFile(this.plugin,this.file.path,A.blockrefData?A.path+"#"+A.blockrefData:A.path),this.files.set(e,t),t):t}getFileEntries(){return this.files.entries()}deleteFile(e){this.files.delete(e)}hasFile(e){if(this.files.has(e))return!0;if(this.plugin.filesMaster.has(e)){const t=this.plugin.filesMaster.get(e);if(t.isHyperlink)return this.files.set(e,new EmbeddedFile(this.plugin,this.file.path,t.path)),!0;const A=t.path.split("|")[0].split("#")[0];if(!this.app.vault.getAbstractFileByPath(A))return this.plugin.filesMaster.delete(e),!0;const i=t.path.endsWith("100%"),n=new EmbeddedFile(this.plugin,this.file.path,(t.blockrefData?A+"#"+t.blockrefData:A)+(i?"|100%":""),t.colorMapJSON);return this.files.set(e,n),!0}return!1}setEquation(e,t){this.equations.set(e,{latex:t.latex,isLoaded:t.isLoaded}),this.plugin.equationsMaster.set(e,t.latex)}getEquation(e){let t=this.equations.get(e);if(t)return t;const A=this.plugin.equationsMaster.get(e);return A?(this.equations.set(e,{latex:A,isLoaded:!1}),{latex:A,isLoaded:!1}):t}getEquationEntries(){return this.equations.entries()}deleteEquation(e){this.equations.delete(e)}hasEquation(e){return!!this.equations.has(e)||!!this.plugin.equationsMaster.has(e)&&(this.equations.set(e,{latex:this.plugin.equationsMaster.get(e),isLoaded:!1}),!0)}}const getTransclusion=async(e,t,A,i)=>{var n,a,r,s,o,l,c,d,h;if(!e.path)return{contents:e.original.trim(),lineNum:0};if(!(A&&A instanceof obsidian_module.TFile))return{contents:e.original.trim(),lineNum:0};const u=await t.vault.read(A);if(!e.ref)return i?{contents:u.substring(0,i).trim(),lineNum:0}:{contents:u.trim(),lineNum:0};const g=(await t.metadataCache.blockCache.getForFile({isCancelled:()=>!1},A)).blocks.filter((e=>"comment"!=e.node.type));if(!g)return{contents:e.original.trim(),lineNum:0};if(e.isBlockRef){let t=null===(n=g.filter((t=>t.node.id==e.ref))[0])||void 0===n?void 0:n.node;if(!t)return{contents:e.original.trim(),lineNum:0};["blockquote"].includes(t.type)&&(t=t.children[0]);const A=t.position.start.offset,i=t.position.start.line,a=t.position.end.offset;return{contents:u.substring(A,a).replaceAll(/ \^\S*$|^\^\S*$/gm,"").trim(),lineNum:i}}const p=g.filter((e=>0===e.display.search(/^#+\s/)));let m=null,w=0,f=null,E=1;for(let t=0;t<p.length;t++){if(m&&!f){let e=t;for(;e<p.length&&p[e].node.depth>E;)e++;return e===p.length&&p[e-1].node.depth>E?{leadingHashes:"#".repeat(E)+" ",contents:u.substring(m).trim(),lineNum:w}:(f=p[e].node.position.start.offset-1,{leadingHashes:"#".repeat(E)+" ",contents:u.substring(m,f).trim(),lineNum:w})}const A=p[t].node.children[0],i=null===(r=null===(a=p[t].node.data)||void 0===a?void 0:a.hProperties)||void 0===r?void 0:r.dataHeading,n=null==A?void 0:A.children;!m&&((null===(s=null==A?void 0:A.value)||void 0===s?void 0:s.replaceAll(REG_BLOCK_REF_CLEAN,""))===e.ref||(null===(o=null==A?void 0:A.title)||void 0===o?void 0:o.replaceAll(REG_BLOCK_REF_CLEAN,""))===e.ref||(null==i?void 0:i.replaceAll(REG_BLOCK_REF_CLEAN,""))===e.ref||n&&(null===(c=null===(l=n[0])||void 0===l?void 0:l.value)||void 0===c?void 0:c.replaceAll(REG_BLOCK_REF_CLEAN,""))===e.ref)&&(m=null===(d=p[t].node.children[0])||void 0===d?void 0:d.position.start.offset,E=p[t].node.depth,w=null===(h=p[t].node.children[0])||void 0===h?void 0:h.position.start.line)}return m?{leadingHashes:"#".repeat(E)+" ",contents:u.substring(m).trim(),lineNum:w}:{contents:e.original.trim(),lineNum:0}};class ScriptEngine{constructor(e){this.plugin=e,this.scriptIconMap={},this.loadScripts(),this.registerEventHandlers()}registerEventHandlers(){const e=e=>{if(!e.endsWith(".svg"))return;const t=app.vault.getAbstractFileByPath(getIMGFilename(e,"md"));t&&t instanceof obsidian_module.TFile&&(this.unloadScript(this.getScriptName(t),t.path),this.loadScript(t))};this.plugin.registerEvent(app.vault.on("delete",(async t=>{t instanceof obsidian_module.TFile&&t.path.startsWith(this.scriptPath)&&(this.unloadScript(this.getScriptName(t),t.path),e(t.path))}))),this.plugin.registerEvent(app.vault.on("create",(async t=>{t instanceof obsidian_module.TFile&&t.path.startsWith(this.scriptPath)&&(this.loadScript(t),e(t.path))}))),this.plugin.registerEvent(app.vault.on("rename",(async(t,A)=>{if(!(t instanceof obsidian_module.TFile))return;const i=A.startsWith(this.scriptPath),n=t.path.startsWith(this.scriptPath);i&&(this.unloadScript(this.getScriptName(A),A),e(A)),n&&(this.loadScript(t),e(t.path))})))}updateScriptPath(){this.scriptPath!==this.plugin.settings.scriptFolderPath&&(this.scriptPath&&this.unloadScripts(),this.loadScripts())}getListofScripts(){if(this.scriptPath=this.plugin.settings.scriptFolderPath,app.vault.getAbstractFileByPath(this.scriptPath))return app.vault.getFiles().filter((e=>e.path.startsWith(this.scriptPath)&&"md"===e.extension));this.scriptPath=null}loadScripts(){var e;null===(e=this.getListofScripts())||void 0===e||e.forEach((e=>this.loadScript(e)))}getScriptName(e){let t="",A="";e instanceof obsidian_module.TFile?(t=e.basename,A=e.path):(t=splitFolderAndFilename(e).basename,A=e);const i=A.split(`${this.scriptPath}/`)[1],n=i.lastIndexOf("/");return n>-1?i.substring(0,n+1)+t:t}async addScriptIconToMap(e,t){const A=getIMGFilename(e,"svg"),i=app.vault.getAbstractFileByPath(A),n=i&&i instanceof obsidian_module.TFile?await app.vault.read(i):null;this.scriptIconMap=Object.assign({},this.scriptIconMap);const a=splitFolderAndFilename(t);this.scriptIconMap[e]={name:a.filename,group:"/"===a.folderpath?"":a.folderpath,svgString:n},this.updateToolPannels()}loadScript(e){if("md"!==e.extension)return;const t=this.getScriptName(e);this.addScriptIconToMap(e.path,t),this.plugin.addCommand({id:t,name:`(Script) ${t}`,checkCallback:A=>{if(A)return Boolean(app.workspace.getActiveViewOfType(ExcalidrawView));const i=app.workspace.getActiveViewOfType(ExcalidrawView);return!!i&&((async()=>{const A=await app.vault.read(e);A&&this.executeScript(i,A,t,e)})(),!0)}})}unloadScripts(){const e=app.vault.getFiles().filter((e=>e.path.startsWith(this.scriptPath)));e.forEach((e=>{this.unloadScript(this.getScriptName(e),e.path)}))}unloadScript(e,t){if(!t.endsWith(".md"))return;delete this.scriptIconMap[t],this.scriptIconMap=Object.assign({},this.scriptIconMap),this.updateToolPannels();const A=`${PLUGIN_ID}:${e}`;app.commands.commands[A]&&delete app.commands.commands[A]}async executeScript(e,t,A,i){if(!e||!t||!A)return;this.plugin.ea.reset(),this.plugin.ea.setView(e),this.plugin.ea.activeScript=A;const n=Object.getPrototypeOf((async()=>{})).constructor;let a=null;return a=await new n("ea","utils",t)(this.plugin.ea,{inputPrompt:(t,A,i,n,a,r,s,o)=>ScriptEngine.inputPrompt(e,this.plugin,app,t,A,i,n,a,r,s,o),suggester:(e,t,A,i)=>ScriptEngine.suggester(app,e,t,A,i),scriptFile:i}),this.plugin.ea.activeScript=null,a}updateToolPannels(){app.workspace.getLeavesOfType("excalidraw").forEach((e=>{var t,A;null===(A=null===(t=e.view.toolsPanelRef)||void 0===t?void 0:t.current)||void 0===A||A.updateScriptIconMap(this.scriptIconMap)}))}static async inputPrompt(e,t,A,i,n,a,r,s,o,l,c){try{return await GenericInputPrompt.Prompt(e,t,A,i,n,a,r,s,o,l,c)}catch(e){return}}static async suggester(e,t,A,i,n){try{return await GenericSuggester.Suggest(e,t,A,i,n)}catch(e){return}}}var t$c={d:(e,t)=>{for(var A in t)t$c.o(t,A)&&!t$c.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},r$e={};t$c.d(r$e,{QA:()=>w$1,ZP:()=>j$1,qt:()=>x$1,MX:()=>$});const e$d={red:"hsl(0, 100%, 50%)",orange:"hsl(30, 100%, 50%)",yellow:"hsl(60, 100%, 50%)","lime green":"hsl(90, 100%, 50%)",green:"hsl(120, 100%, 50%)","blue green":"hsl(150, 100%, 50%)",cyan:"hsl(180, 100%, 50%)","sky blue":"hsl(210, 100%, 50%)",blue:"hsl(240, 100%, 50%)",purple:"hsl(270, 100%, 50%)",magenta:"hsl(300, 100%, 50%)",pink:"hsl(330, 100%, 50%)"};function s$a(e,t,A){return Math.max(e,Math.min(t,A))}function n$c(e,t){return+e.toFixed(t>=0?t:0)}function a$c(e){const t=e%360;return t<0?t+360:t}function i$a(e){return void 0!==e?s$a(0,e,1):1}function o$b(e){return Math.floor(Math.random()*e)}function h$4(e){var t;const{Cmin:A,Cmax:i,H:n,delta:a}=function(e){const[t,A,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,A,i),a=Math.min(t,A,i),r=n-a;return{Cmin:a,Cmax:n,H:0===r?0:n===t?(A-i)/r%6:n===A?(i-t)/r+2:(t-A)/r+4,delta:r}}(e),r=(i+A)/2,s=0===a?0:a/(1-Math.abs(2*r-1));return{h:a$c(60*n),s:100*s,l:100*r,a:null!==(t=e.a)&&void 0!==t?t:1}}function u$8(e){const{h:t,s:A,l:i,a:n}=e,a=i/100,r=A/100,s=(1-Math.abs(2*a-1))*r,o=s*(1-Math.abs(t/60%2-1)),l=a-s/2,c=t<60||300<=t&&t<360?s:120<=t&&t<240?0:o,d=240<=t&&t<360?0:60<=t&&t<180?s:o,h=t<120?0:180<=t&&t<300?s:o,[u,g,p]=[c,d,h].map((e=>255*(e+l)));return{r:u,g:g,b:p,a:null!=n?n:1}}function l$5(e){const[t,A,i,n]=Object.values(e).map((e=>parseInt(e,16)));return{r:t,g:A,b:i,a:n?n/255:1}}const c$a=/^#?([\da-f])([\da-f])([\da-f])([\da-f])?$|^#?([\da-f]{2})([\da-f]{2})([\da-f]{2})?([\da-f]{2})?$/gi,f$3=/hsla?\s*\(\s*([+-]?\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function d$2({h:e,s:t,l:A,a:i}){return[u$8({h:a$c(e),s:s$a(0,t,100),l:s$a(0,A,100),a:i$a(i)}),"hsl"]}const g$2=/rgba?\s*\(\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function b$5({r:e,g:t,b:A,a:i}){return[{r:s$a(0,e,255),g:s$a(0,t,255),b:s$a(0,A,255),a:i$a(i)},"rgb"]}var p$3,v$2,m$1=function(e,t,A,i,n){if("m"===i)throw new TypeError("Private method is not writable");if("a"===i&&!n)throw new TypeError("Private accessor was defined without a setter");if("function"==typeof t?e!==t||!n:!t.has(e))throw new TypeError("Cannot write private member to an object whose class did not declare it");return"a"===i?n.call(e,A):n?n.value=A:t.set(e,A),A},y$1=function(e,t,A,i){if("a"===A&&!i)throw new TypeError("Private accessor was defined without a getter");if("function"==typeof t?e!==t||!i:!t.has(e))throw new TypeError("Cannot read private member from an object whose class did not declare it");return"m"===A?i:"a"===A?i.call(e):i?i.value:t.get(e)};class w$1{constructor(e){var t,A;p$3.set(this,{r:0,g:0,b:0,a:1}),v$2.set(this,"rgb");const i=w$1.Parsers.map((t=>t(e))).find((e=>"invalid"!==e[1]));i?(t=this,A=this,[{set value(e){m$1(t,p$3,e,"f")}}.value,{set value(e){m$1(A,v$2,e,"f")}}.value]=i):m$1(this,v$2,"invalid","f")}get red(){return y$1(this,p$3,"f").r}get blue(){return y$1(this,p$3,"f").b}get green(){return y$1(this,p$3,"f").g}get alpha(){return y$1(this,p$3,"f").a}get hue(){return h$4(y$1(this,p$3,"f")).h}get saturation(){return h$4(y$1(this,p$3,"f")).s}get lightness(){return h$4(y$1(this,p$3,"f")).l}get format(){return y$1(this,v$2,"f")}isValid(){return"invalid"!==y$1(this,v$2,"f")}rgba(){return y$1(this,p$3,"f")}hsla(){return h$4(y$1(this,p$3,"f"))}hexa({round:e=!1}={}){return function(e,t=!1){let{r:A,g:i,b:n,a:a}=e;a&&(a*=255),t&&([A,i,n,a]=[A,i,n,a].map((e=>e&&Math.round(e))));const[r,s,o,l]=[A,i,n,null!=a?a:255].map((e=>e.toString(16).padStart(2,"0").toUpperCase()));return{r:r,g:s,b:o,a:l}}(y$1(this,p$3,"f"),e)}stringRGB({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(y$1(this,p$3,"f")).map(((e,A)=>n$c(e,t[A])));return e?`rgba(${A}, ${i}, ${n}, ${a})`:`rgb(${A}, ${i}, ${n})`}stringHEX({alpha:e=!0}={}){const[t,A,i,n]=Object.values(this.hexa({round:!0}));return`#${t}${A}${i}${e?n:""}`}stringHSL({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.hsla()).map(((e,A)=>n$c(e,t[A])));return e?`hsla(${A}, ${i}%, ${n}%, ${a})`:`hsl(${A}, ${i}%, ${n}%)`}hueTo(e){var t;const{h:A,s:i,l:n,a:a}=this.hsla(),r="number"==typeof e?a$c(e):Number(null!==(t=e$d[e].match(/\d{1,3}/))&&void 0!==t?t:A);return m$1(this,p$3,u$8({h:r,s:i,l:n,a:a}),"f"),this}hueBy(e){const{h:t,s:A,l:i,a:n}=this.hsla();return m$1(this,p$3,u$8({h:a$c(t+e),s:A,l:i,a:n}),"f"),this}saturationTo(e){const{h:t,l:A,a:i}=this.hsla();return m$1(this,p$3,u$8({h:t,s:s$a(0,e,100),l:A,a:i}),"f"),this}saturateBy(e){const{h:t,s:A,l:i,a:n}=this.hsla();return m$1(this,p$3,u$8({h:t,s:s$a(0,A+e,100),l:i,a:n}),"f"),this}desaturateBy(e){return this.saturateBy(-1*e)}lightnessTo(e){const{h:t,s:A,a:i}=this.hsla();return m$1(this,p$3,u$8({h:t,s:A,l:s$a(0,e,100),a:i}),"f"),this}lighterBy(e){const{h:t,s:A,l:i,a:n}=this.hsla();return m$1(this,p$3,u$8({h:t,s:A,l:s$a(0,i+e,100),a:n}),"f"),this}darkerBy(e){return this.lighterBy(-1*e)}alphaTo(e){return m$1(this,p$3,Object.assign(Object.assign({},y$1(this,p$3,"f")),{a:s$a(0,e,1)}),"f"),this}alphaBy(e){return m$1(this,p$3,Object.assign(Object.assign({},y$1(this,p$3,"f")),{a:s$a(0,y$1(this,p$3,"f").a+e,1)}),"f"),this}invert({alpha:e=!1}={}){const{r:t,g:A,b:i,a:n}=y$1(this,p$3,"f");return m$1(this,p$3,{r:255-t,g:255-A,b:255-i,a:e?1-n:n},"f"),this}grayscale(){return this.desaturateBy(100)}rotate(e){return this.hueBy(e)}}function $(){return new w$1({r:o$b(255),g:o$b(255),b:o$b(255),a:Math.random()})}function x$1(e){(e=e.filter(((e,t,A)=>A.indexOf(e)===t))).forEach((e=>e(w$1)))}p$3=new WeakMap,v$2=new WeakMap,w$1.Parsers=[function(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{r:t,g:A,b:i}=e;return void 0!==t&&void 0!==A&&void 0!==i&&"number"==typeof t}(e))return b$5(e);if("string"==typeof e){g$2.lastIndex=0;const t=g$2.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(t<3?2.55:.01):+e));return b$5({r:e,g:A,b:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]},function(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{r:t,g:A,b:i}=e;return void 0!==t&&void 0!==A&&void 0!==i&&"string"==typeof t}(e))return[l$5(e),"hex"];if("string"==typeof e){c$a.lastIndex=0;const t=c$a.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map((e=>1===e.length?e.repeat(2):e));return[l$5({r:e,g:A,b:i,a:null!=n?n:"FF"}),"hex"]}}return[{r:0,g:0,b:0,a:1},"invalid"]},function(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{h:t,s:A,l:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return d$2(e);if("string"==typeof e){f$3.lastIndex=0;const t=f$3.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(0===t?3.59:t<3?1:.01):+e));return d$2({h:e,s:A,l:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}];const j$1=e=>new w$1(e);r$e.QA;var O$1=r$e.ZP,B=r$e.qt;r$e.MX;var e$c={d:(e,t)=>{for(var A in t)e$c.o(t,A)&&!e$c.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a$b={};function t$b(e){const t=e%360;return t<0?t+360:t}e$c.d(a$b,{Z:()=>n$b});const n$b=e=>{e.prototype.harmony=function({type:t="analogous",effect:A="tones",amount:i=5}={}){const{h:n,s:a,l:r,a:s}=this.hsla();switch("monochromatic"===t&&(o=i,i=Math.max(2,Math.min(o,10))),t){case"analogous":return[-30,0,30].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"complementary":return[0,180].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"split-complementary":return[0,150,210].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"double-split-complementary":return[-30,0,30,150,210].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"triad":return[0,120,240].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"rectangle":return[0,60,180,240].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"square":return[0,90,180,270].map((t=>new e({h:t$b(n+t),s:a,l:r,a:s})));case"monochromatic":{const t="tones"===A?a:r;let o=("tints"===A?100-t:t)/i;o="tints"===A?o:-1*o;const l=[t];for(let e=0;e<i;e++)l.push(l[e]+o);return"tones"===A?l.map((t=>new e({h:n,s:t,l:r,a:s}))):l.map((t=>new e({h:n,s:a,l:t,a:s})))}}var o}};var r$d=a$b.Z,a$a={d:(e,t)=>{for(var A in t)a$a.o(t,A)&&!a$a.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},t$a={};a$a.d(t$a,{Z:()=>k});const e$b=6/29,n$a=Math.pow(e$b,3),c$9=Math.pow(29/3,3),r$c={x:.96422,y:1,z:.82521};function u$7(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function s$9(e,t,A){return Math.max(e,Math.min(t,A))}function o$a(e){const t=e%360;return t<0?t+360:t}function l$4(e){const[t,A,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,A,i),a=Math.min(t,A,i),r=n-a;return{Cmin:a,Cmax:n,H:0===r?0:n===t?(A-i)/r%6:n===A?(i-t)/r+2:(t-A)/r+4,delta:r}}function b$4(e){var t;const{Cmin:A,Cmax:i,H:n,delta:a}=l$4(e),r=(i+A)/2,s=0===a?0:a/(1-Math.abs(2*r-1));return{h:o$a(60*n),s:100*s,l:100*r,a:null!==(t=e.a)&&void 0!==t?t:1}}function h$3(e){var t;const{Cmax:A,H:i,delta:n}=l$4(e),a=0===n?0:n/A;return{h:o$a(60*i),s:100*a,v:100*A,a:null!==(t=e.a)&&void 0!==t?t:1}}function v$1(e){const{h:t,a:A}=b$4(e),{r:i,g:n,b:a}=e;return{h:t,w:Math.min(i,n,a)/2.55,b:100*(1-Math.max(i,n,a)/255),a:A}}function i$9(e){const[t,A,i]=u$7([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,A,i]=u$7([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}({x:t,y:A,z:i,a:e.a})}function m(e){const t=Object.values(i$9(e)).map(((e,t)=>e/(100*Object.values(r$c)[t]))).map((e=>e>n$a?Math.cbrt(e):(c$9*e+16)/116));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2]),alpha:e.a}}function p$2(e){const{l:t,a:A,b:i}=m(e),n=180*Math.atan2(i,A)/Math.PI;return{l:t,c:Math.sqrt(Math.pow(A,2)+Math.pow(i,2)),h:o$a(n),a:e.a}}function f$2(e){const[t,A,i]=Object.values(i$9(e)).map((e=>e/100)),n=A/r$c.y,a=t&&A&&i?t+15*A+3*i:19,r=4*t/a,s=9*A/a,o=r$c.x+15*r$c.y+3*r$c.z,l=4*r$c.x/o,c=9*r$c.y/o;let d=n>n$a?116*Math.cbrt(n)-16:c$9*n,h=13*d*(r-l),u=13*d*(s-c);return d===Number(-0)&&(d=0),h===Number(-0)&&(h=0),u===Number(-0)&&(u=0),{l:d,u:h,v:u,a:e.a}}function M(e){const{x:t,y:A,z:i}=i$9(e),[n,a,r]=u$7([[2/3,0,0],[0,1,0],[-.5,1.5,.5]],[t,A,i]);return{u:n,v:a,w:r,a:e.a}}function w(e){let{r:t,g:A,b:i}=e;const n=Math.min(t,A,i);[t,A,i]=[t,A,i].map((e=>e-n));const a=Math.max(t,A,i);let r=Math.min(t,A);t-=r,A-=r,i&&A&&(i/=2,A/=2),r+=A,i+=A;const s=Math.max(t,r,i);if(s){const e=a/s;[t,r,i]=[t,r,i].map((t=>t*e))}return[t,r,i]=[t,r,i].map((e=>e+n)),{r:t,y:r,b:i,a:e.a}}function O(e){const{r:t,g:A,b:i,a:n}=e,a=1-Math.max(t,A,i)/255,[r,s,o]=1===a?[0,0,0]:[t,A,i].map((e=>100*(1-e/255-a)/(1-a)));return{c:r,m:s,y:o,k:100*a,a:n}}function j(e){const{h:t,s:A,v:i,a:n}=e,a=i/100,r=a*(A/100),s=r*(1-Math.abs(t/60%2-1)),o=a-r,l=t<60||300<=t&&t<360?r:120<=t&&t<240?0:s,c=240<=t&&t<360?0:60<=t&&t<180?r:s,d=t<120?0:180<=t&&t<300?r:s,[h,u,g]=[l,c,d].map((e=>255*(e+o)));return{r:h,g:u,b:g,a:null!=n?n:1}}function x(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=u$7([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}(e)).map((e=>e/100)),[n,a,r]=u$7([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,A,i]).map((e=>{return s$9(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:a,b:r,a:e.a}}function y(e){const{l:t,a:A,b:i}=e,n=(t+16)/116,a=n+A/500,r=n-i/200,s=Object.values(r$c),[o,l,c]=[a,n,r].map(((e,t)=>(e>e$b?Math.pow(e,3):3*Math.pow(e$b,2)*(e-4/29))*s[t]*100));return x({x:o,y:l,z:c,a:e.alpha})}const k=e=>{e.prototype.mix=function({color:t="#fff",ratio:A=.5,colorspace:i="luv"}={}){const n=this.rgba(),a=(t instanceof e?t:new e(t)).rgba();let r,s;switch(A=s$9(0,A,1),i){case"hsl":r=Object.values(b$4(n)),s=Object.values(b$4(a));break;case"hsv":r=Object.values(h$3(n)),s=Object.values(h$3(a));break;case"hwb":r=Object.values(v$1(n)),s=Object.values(v$1(a));break;case"lab":r=Object.values(m(n)),s=Object.values(m(a));break;case"lch":r=Object.values(p$2(n)),s=Object.values(p$2(a));break;case"luv":r=Object.values(f$2(n)),s=Object.values(f$2(a));break;case"ryb":r=Object.values(w(n)),s=Object.values(w(a));break;case"uvw":r=Object.values(M(n)),s=Object.values(M(a));break;case"xyz":r=Object.values(i$9(n)),s=Object.values(i$9(a));break;case"cmyk":r=Object.values(O(n)),s=Object.values(O(a));break;default:r=Object.values(n),s=Object.values(a)}const[o,l,c,d,h]=r.map(((e,t)=>r[t]*(1-A)+s[t]*A));switch(i){case"hsl":return new e(function(e){const{h:t,s:A,l:i,a:n}=e,a=i/100,r=A/100,s=(1-Math.abs(2*a-1))*r,o=s*(1-Math.abs(t/60%2-1)),l=a-s/2,c=t<60||300<=t&&t<360?s:120<=t&&t<240?0:o,d=240<=t&&t<360?0:60<=t&&t<180?s:o,h=t<120?0:180<=t&&t<300?s:o,[u,g,p]=[c,d,h].map((e=>255*(e+l)));return{r:u,g:g,b:p,a:null!=n?n:1}}({h:o,s:l,l:c,a:d}));case"hsv":return new e(j({h:o,s:l,v:c,a:d}));case"hwb":return new e(function(e){const{h:t,b:A,w:i,a:n}=e;return j({h:t,s:100===A?0:100-i/(100-A)*100,v:100-A,a:n})}({h:o,w:l,b:c,a:d}));case"lab":return new e(y({l:o,a:l,b:c,alpha:d}));case"lch":return new e(function(e){const{l:t,c:A,h:i}=e;return y({l:t,a:A*Math.cos(i*Math.PI/180),b:A*Math.sin(i*Math.PI/180),alpha:e.a})}({l:o,c:l,h:c,a:d}));case"luv":return new e(function(e){const{l:t,u:A,v:i}=e,n=t>c$9*n$a?Math.pow((t+16)/116,3):t/c$9,a=r$c.x+15*r$c.y+3*r$c.z,r=(52*t/(A&&t?A+13*t*(4*r$c.x/a):1)-1)/3,s=-5*n,o=n*(39*t/(i&&t?i+13*t*(9*r$c.y/a):1)-5),l=r===-1/3?o-s:(o-s)/(r- -1/3);return x({x:100*l,y:100*n,z:100*(r*l+s),a:e.a})}({l:o,u:l,v:c,a:d}));case"ryb":return new e(function(e){let{r:t,y:A,b:i}=e;const n=Math.min(t,A,i);[t,A,i]=[t,A,i].map((e=>e-n));const a=Math.max(t,A,i);let r=Math.min(A,i);A-=r,i-=r,i&&r&&(i*=2,r*=2),t+=A,r+=A;const s=Math.max(t,r,i);if(s){const e=a/s;[t,r,i]=[t,r,i].map((t=>t*e))}return[t,r,i]=[t,r,i].map((e=>e+n)),{r:t,g:r,b:i,a:e.a}}({r:o,y:l,b:c,a:d}));case"uvw":return new e(function(e){const{u:t,v:A,w:i}=e,[n,a,r]=u$7([[1.5,0,0],[0,1,0],[1.5,-3,2]],[t,A,i]);return x({x:n,y:a,z:r,a:e.a})}({u:o,v:l,w:c,a:d}));case"xyz":return new e(x({x:o,y:l,z:c,a:d}));case"cmyk":return new e(function(e){const{c:t,m:A,y:i,k:n,a:a}=e,[r,s,o]=[t,A,i].map((e=>255*(1-e/100)*(1-n/100)));return{r:r,g:s,b:o,a:a}}({c:o,m:l,y:c,k:d,a:h}));default:return new e({r:o,g:l,b:c,a:d})}}};var z=t$a.Z,r$b={d:(e,t)=>{for(var A in t)r$b.o(t,A)&&!r$b.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},b$3={};r$b.d(b$3,{Z:()=>n$9});const g$1=["rgb(0,0,0)","rgb(0,0,51)","rgb(0,0,102)","rgb(0,0,153)","rgb(0,0,204)","rgb(0,0,255)","rgb(0,51,0)","rgb(0,51,51)","rgb(0,51,102)","rgb(0,51,153)","rgb(0,51,204)","rgb(0,51,255)","rgb(0,102,0)","rgb(0,102,51)","rgb(0,102,102)","rgb(0,102,153)","rgb(0,102,204)","rgb(0,102,255)","rgb(0,153,0)","rgb(0,153,51)","rgb(0,153,102)","rgb(0,153,153)","rgb(0,153,204)","rgb(0,153,255)","rgb(0,204,0)","rgb(0,204,51)","rgb(0,204,102)","rgb(0,204,153)","rgb(0,204,204)","rgb(0,204,255)","rgb(0,255,0)","rgb(0,255,51)","rgb(0,255,102)","rgb(0,255,153)","rgb(0,255,204)","rgb(0,255,255)","rgb(51,0,0)","rgb(51,0,51)","rgb(51,0,102)","rgb(51,0,153)","rgb(51,0,204)","rgb(51,0,255)","rgb(51,51,0)","rgb(51,51,51)","rgb(51,51,102)","rgb(51,51,153)","rgb(51,51,204)","rgb(51,51,255)","rgb(51,102,0)","rgb(51,102,51)","rgb(51,102,102)","rgb(51,102,153)","rgb(51,102,204)","rgb(51,102,255)","rgb(51,153,0)","rgb(51,153,51)","rgb(51,153,102)","rgb(51,153,153)","rgb(51,153,204)","rgb(51,153,255)","rgb(51,204,0)","rgb(51,204,51)","rgb(51,204,102)","rgb(51,204,153)","rgb(51,204,204)","rgb(51,204,255)","rgb(51,255,0)","rgb(51,255,51)","rgb(51,255,102)","rgb(51,255,153)","rgb(51,255,204)","rgb(51,255,255)","rgb(102,0,0)","rgb(102,0,51)","rgb(102,0,102)","rgb(102,0,153)","rgb(102,0,204)","rgb(102,0,255)","rgb(102,51,0)","rgb(102,51,51)","rgb(102,51,102)","rgb(102,51,153)","rgb(102,51,204)","rgb(102,51,255)","rgb(102,102,0)","rgb(102,102,51)","rgb(102,102,102)","rgb(102,102,153)","rgb(102,102,204)","rgb(102,102,255)","rgb(102,153,0)","rgb(102,153,51)","rgb(102,153,102)","rgb(102,153,153)","rgb(102,153,204)","rgb(102,153,255)","rgb(102,204,0)","rgb(102,204,51)","rgb(102,204,102)","rgb(102,204,153)","rgb(102,204,204)","rgb(102,204,255)","rgb(102,255,0)","rgb(102,255,51)","rgb(102,255,102)","rgb(102,255,153)","rgb(102,255,204)","rgb(102,255,255)","rgb(153,0,0)","rgb(153,0,51)","rgb(153,0,102)","rgb(153,0,153)","rgb(153,0,204)","rgb(153,0,255)","rgb(153,51,0)","rgb(153,51,51)","rgb(153,51,102)","rgb(153,51,153)","rgb(153,51,204)","rgb(153,51,255)","rgb(153,102,0)","rgb(153,102,51)","rgb(153,102,102)","rgb(153,102,153)","rgb(153,102,204)","rgb(153,102,255)","rgb(153,153,0)","rgb(153,153,51)","rgb(153,153,102)","rgb(153,153,153)","rgb(153,153,204)","rgb(153,153,255)","rgb(153,204,0)","rgb(153,204,51)","rgb(153,204,102)","rgb(153,204,153)","rgb(153,204,204)","rgb(153,204,255)","rgb(153,255,0)","rgb(153,255,51)","rgb(153,255,102)","rgb(153,255,153)","rgb(153,255,204)","rgb(153,255,255)","rgb(204,0,0)","rgb(204,0,51)","rgb(204,0,102)","rgb(204,0,153)","rgb(204,0,204)","rgb(204,0,255)","rgb(204,51,0)","rgb(204,51,51)","rgb(204,51,102)","rgb(204,51,153)","rgb(204,51,204)","rgb(204,51,255)","rgb(204,102,0)","rgb(204,102,51)","rgb(204,102,102)","rgb(204,102,153)","rgb(204,102,204)","rgb(204,102,255)","rgb(204,153,0)","rgb(204,153,51)","rgb(204,153,102)","rgb(204,153,153)","rgb(204,153,204)","rgb(204,153,255)","rgb(204,204,0)","rgb(204,204,51)","rgb(204,204,102)","rgb(204,204,153)","rgb(204,204,204)","rgb(204,204,255)","rgb(204,255,0)","rgb(204,255,51)","rgb(204,255,102)","rgb(204,255,153)","rgb(204,255,204)","rgb(204,255,255)","rgb(255,0,0)","rgb(255,0,51)","rgb(255,0,102)","rgb(255,0,153)","rgb(255,0,204)","rgb(255,0,255)","rgb(255,51,0)","rgb(255,51,51)","rgb(255,51,102)","rgb(255,51,153)","rgb(255,51,204)","rgb(255,51,255)","rgb(255,102,0)","rgb(255,102,51)","rgb(255,102,102)","rgb(255,102,153)","rgb(255,102,204)","rgb(255,102,255)","rgb(255,153,0)","rgb(255,153,51)","rgb(255,153,102)","rgb(255,153,153)","rgb(255,153,204)","rgb(255,153,255)","rgb(255,204,0)","rgb(255,204,51)","rgb(255,204,102)","rgb(255,204,153)","rgb(255,204,204)","rgb(255,204,255)","rgb(255,255,0)","rgb(255,255,51)","rgb(255,255,102)","rgb(255,255,153)","rgb(255,255,204)","rgb(255,255,255)"];function t$9(e){return(e/=255)<.04045?e/12.92:Math.pow((e+.055)/1.055,2.4)}function o$9(e,t=[0,0,0,1]){var A,i;return null!==(i=null===(A=e.match(/\d{1,3}/g))||void 0===A?void 0:A.map((e=>+e)))&&void 0!==i?i:t}const n$9=e=>{e.prototype.brightness=function({precision:e=4,percentage:t=!1}={}){const{r:A,g:i,b:n}=this.rgba(),a=+((.299*A+.587*i+.114*n)/255).toFixed(e);return t?100*a:a},e.prototype.luminance=function({precision:e=4,percentage:t=!1}={}){const{r:A,g:i,b:n}=this.rgba(),a=+(.2126*t$9(A)+.7152*t$9(i)+.0722*t$9(n)).toFixed(e);return t?100*a:a},e.prototype.contrast=function({bgColor:t="#fff",precision:A=4,ratio:i=!1}={}){const n=this.luminance(),a=(t instanceof e?t:new e(t)).luminance(),r=((Math.max(n,a)+.05)/(Math.min(n,a)+.05)).toFixed(A);return i?r+":1":+r},e.prototype.readableOn=function({bgColor:e="#fff",size:t="body",level:A="minimum"}={}){const i=this.contrast({bgColor:e});return"body"===t&&"enhanced"===A?i>=7:"large"===t&&"minimum"===A?i>=3:i>=4.5},e.prototype.equalTo=function(t="#fff"){const A=Object.values(this.rgba()),i=Object.values((t instanceof e?t:new e(t)).rgba());return A.toString()===i.toString()},e.prototype.isLight=function(){return this.brightness()>=.5},e.prototype.isDark=function(){return!this.isLight()},e.prototype.isCool=function(){const{h:e}=this.hsla();return 75<=e&&e<255},e.prototype.isWarm=function(){return!this.isCool()},e.prototype.isTinted=function(){return this.hsla().l>50},e.prototype.isShaded=function(){return this.hsla().l<50},e.prototype.isToned=function(){return this.hsla().s<100},e.prototype.isPureHue=function({reason:e=!0}={}){return this.isTinted()?!!e&&{pure:!1,reason:"tinted"}:this.isShaded()?!!e&&{pure:!1,reason:"shaded"}:this.isToned()?!!e&&{pure:!1,reason:"toned"}:!e||{pure:!0,reason:"N/A"}},e.prototype.closestCool=function(){const{h:e}=this.hsla();return this.isCool()?this:this.hueTo(e<75?75:254)},e.prototype.closestWarm=function(){const{h:e}=this.hsla();return this.isWarm()?this:this.hueTo(e<165?74:255)},e.prototype.closestPureHue=function(){const{h:t,a:A}=this.hsla(),{r:i,g:n,b:a,a:r}=function(e){const{h:t,s:A,l:i,a:n}=e,a=i/100,r=A/100,s=(1-Math.abs(2*a-1))*r,o=s*(1-Math.abs(t/60%2-1)),l=a-s/2,c=t<60||300<=t&&t<360?s:120<=t&&t<240?0:o,d=240<=t&&t<360?0:60<=t&&t<180?s:o,h=t<120?0:180<=t&&t<300?s:o,[u,g,p]=[c,d,h].map((e=>255*(e+l)));return{r:u,g:g,b:p,a:null!=n?n:1}}({h:t,s:100,l:50,a:A});return new e({r:i,g:n,b:a,a:r})},e.prototype.closestWebSafe=function(){const{r:t,g:A,b:i,a:n}=this.rgba();let[a,r,s]=new Array(3).fill(0),o=Number.POSITIVE_INFINITY,l={r:t,g:A,b:i,a:n};for(let e=0;e<g$1.length;e++){[a,r,s]=o$9(g$1[e],[a,r,s]);const h=(c=[a,r,s],d=[t,A,i],Math.abs(c[0]-d[0])+Math.abs(c[1]-d[1])+Math.abs(c[2]-d[2]));h<o&&(o=h,l={r:a,g:r,b:s,a:n})}var c,d;return new e(l)}};var e$a=b$3.Z,r$a={d:(e,t)=>{for(var A in t)r$a.o(t,A)&&!r$a.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},g={};r$a.d(g,{Z:()=>a$9});const e$9={maroon:"rgb(128,0,0)","dark red":"rgb(139,0,0)",brown:"rgb(165,42,42)",firebrick:"rgb(178,34,34)",crimson:"rgb(220,20,60)",red:"rgb(255,0,0)",tomato:"rgb(255,99,71)",coral:"rgb(255,127,80)","indian red":"rgb(205,92,92)","light coral":"rgb(240,128,128)","dark salmon":"rgb(233,150,122)",salmon:"rgb(250,128,114)","light salmon":"rgb(255,160,122)","orange red":"rgb(255,69,0)","dark orange":"rgb(255,140,0)",orange:"rgb(255,165,0)",gold:"rgb(255,215,0)","dark golden rod":"rgb(184,134,11)","golden rod":"rgb(218,165,32)","pale golden rod":"rgb(238,232,170)","dark khaki":"rgb(189,183,107)",khaki:"rgb(240,230,140)",olive:"rgb(128,128,0)",yellow:"rgb(255,255,0)","yellow green":"rgb(154,205,50)","dark olive green":"rgb(85,107,47)","olive drab":"rgb(107,142,35)","lawn green":"rgb(124,252,0)","chart reuse":"rgb(127,255,0)","green yellow":"rgb(173,255,47)","dark green":"rgb(0,100,0)",green:"rgb(0,128,0)","forest green":"rgb(34,139,34)",lime:"rgb(0,255,0)","lime green":"rgb(50,205,50)","light green":"rgb(144,238,144)","pale green":"rgb(152,251,152)","dark sea green":"rgb(143,188,143)","medium spring green":"rgb(0,250,154)","spring green":"rgb(0,255,127)","sea green":"rgb(46,139,87)","medium aqua marine":"rgb(102,205,170)","medium sea green":"rgb(60,179,113)","light sea green":"rgb(32,178,170)","dark slate gray":"rgb(47,79,79)",teal:"rgb(0,128,128)","dark cyan":"rgb(0,139,139)",cyan:"rgb(0,255,255)",aqua:"rgb(0,255,255)","light cyan":"rgb(224,255,255)","dark turquoise":"rgb(0,206,209)",turquoise:"rgb(64,224,208)","medium turquoise":"rgb(72,209,204)","pale turquoise":"rgb(175,238,238)","aqua marine":"rgb(127,255,212)","powder blue":"rgb(176,224,230)","cadet blue":"rgb(95,158,160)","steel blue":"rgb(70,130,180)","corn flower blue":"rgb(100,149,237)","deep sky blue":"rgb(0,191,255)","dodger blue":"rgb(30,144,255)","light blue":"rgb(173,216,230)","sky blue":"rgb(135,206,235)","light sky blue":"rgb(135,206,250)","midnight blue":"rgb(25,25,112)",navy:"rgb(0,0,128)","dark blue":"rgb(0,0,139)","medium blue":"rgb(0,0,205)",blue:"rgb(0,0,255)","royal blue":"rgb(65,105,225)","blue violet":"rgb(138,43,226)",indigo:"rgb(75,0,130)","dark slate blue":"rgb(72,61,139)","slate blue":"rgb(106,90,205)","medium slate blue":"rgb(123,104,238)","medium purple":"rgb(147,112,219)","dark magenta":"rgb(139,0,139)","dark violet":"rgb(148,0,211)","dark orchid":"rgb(153,50,204)","medium orchid":"rgb(186,85,211)",purple:"rgb(128,0,128)",thistle:"rgb(216,191,216)",plum:"rgb(221,160,221)",violet:"rgb(238,130,238)",magenta:"rgb(255,0,255)",fuchsia:"rgb(255,0,255)",orchid:"rgb(218,112,214)","medium violet red":"rgb(199,21,133)","pale violet red":"rgb(219,112,147)","deep pink":"rgb(255,20,147)","hot pink":"rgb(255,105,180)","light pink":"rgb(255,182,193)",pink:"rgb(255,192,203)","antique white":"rgb(250,235,215)",beige:"rgb(245,245,220)",bisque:"rgb(255,228,196)","blanched almond":"rgb(255,235,205)",wheat:"rgb(245,222,179)","corn silk":"rgb(255,248,220)","lemon chiffon":"rgb(255,250,205)","light golden rod yellow":"rgb(250,250,210)","light yellow":"rgb(255,255,224)","saddle brown":"rgb(139,69,19)",sienna:"rgb(160,82,45)",chocolate:"rgb(210,105,30)",peru:"rgb(205,133,63)","sandy brown":"rgb(244,164,96)","burly wood":"rgb(222,184,135)",tan:"rgb(210,180,140)","rosy brown":"rgb(188,143,143)",moccasin:"rgb(255,228,181)","navajo white":"rgb(255,222,173)","peach puff":"rgb(255,218,185)","misty rose":"rgb(255,228,225)","lavender blush":"rgb(255,240,245)",linen:"rgb(250,240,230)","old lace":"rgb(253,245,230)","papaya whip":"rgb(255,239,213)","sea shell":"rgb(255,245,238)","mint cream":"rgb(245,255,250)","slate gray":"rgb(112,128,144)","light slate gray":"rgb(119,136,153)","light steel blue":"rgb(176,196,222)",lavender:"rgb(230,230,250)","floral white":"rgb(255,250,240)","alice blue":"rgb(240,248,255)","ghost white":"rgb(248,248,255)",honeydew:"rgb(240,255,240)",ivory:"rgb(255,255,240)",azure:"rgb(240,255,255)",snow:"rgb(255,250,250)",black:"rgb(0,0,0)","dim gray":"rgb(105,105,105)","dim grey":"rgb(105,105,105)",gray:"rgb(128,128,128)",grey:"rgb(128,128,128)","dark gray":"rgb(169,169,169)","dark grey":"rgb(169,169,169)",silver:"rgb(192,192,192)","light gray":"rgb(211,211,211)","light grey":"rgb(211,211,211)",gainsboro:"rgb(220,220,220)",gainsborough:"rgb(220,220,220)","white smoke":"rgb(245,245,245)",white:"rgb(255,255,255)",transparent:"rgba(0,0,0,0)"};function b$2(e,t=[0,0,0,1]){var A,i;return null!==(i=null===(A=e.match(/\d{1,3}/g))||void 0===A?void 0:A.map((e=>+e)))&&void 0!==i?i:t}const a$9=e=>{e.prototype.name=function({exact:e=!0}={}){const{r:t,g:A,b:i,a:n}=this.rgba();if(0===n)return"transparent";const[a,r]=[Object.keys(e$9),Object.values(e$9)];let s;if(e){const e=this.stringRGB({alpha:!1}).replace(/\s/g,"");s=a.find((t=>e$9[t]===e))}else{let e=Number.POSITIVE_INFINITY;for(let n=0;n<r.length;n++){const c=(o=b$2(r[n]),l=[t,A,i],Math.abs(o[0]-l[0])+Math.abs(o[1]-l[1])+Math.abs(o[2]-l[2]));c<e&&(e=c,s=a[n])}}var o,l;return s?s+(n<1?" (with opacity)":""):"undefined"},e.Parsers.push((function(e){if(Object.keys(e$9).includes(e)){const[t,A,i,n]=b$2(e$9[e]);return[{r:t,g:A,b:i,a:null!=n?n:1},"name"]}return[{r:0,g:0,b:0,a:1},"invalid"]}))};var l$3=g.Z,t$8={d:(e,t)=>{for(var A in t)t$8.o(t,A)&&!t$8.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a$8={};t$8.d(a$8,{Z:()=>d$1});const n$8=6/29,r$9=Math.pow(n$8,3),o$8=Math.pow(29/3,3),e$8={x:.96422,y:1,z:.82521};function c$8(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function s$8(e,t,A){return Math.max(e,Math.min(t,A))}function u$6(e){const t=e%360;return t<0?t+360:t}function i$8(e){const{l:t,a:A,b:i}=function(e){const t=Object.values(function(e){const[t,A,i]=c$8([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,A,i]=c$8([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}({x:t,y:A,z:i,a:e.a})}(e)).map(((e,t)=>e/(100*Object.values(e$8)[t]))).map((e=>e>r$9?Math.cbrt(e):(o$8*e+16)/116));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2]),alpha:e.a}}(e),n=180*Math.atan2(i,A)/Math.PI;return{l:t,c:Math.sqrt(Math.pow(A,2)+Math.pow(i,2)),h:u$6(n),a:e.a}}function h$2(e){const{l:t,c:A,h:i}=e;return function(e){const{l:t,a:A,b:i}=e,n=(t+16)/116,a=n+A/500,r=n-i/200,s=Object.values(e$8),[o,l,c]=[a,n,r].map(((e,t)=>(e>n$8?Math.pow(e,3):3*Math.pow(n$8,2)*(e-4/29))*s[t]*100));return function(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=c$8([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}(e)).map((e=>e/100)),[n,a,r]=c$8([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,A,i]).map((e=>{return s$8(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:a,b:r,a:e.a}}({x:o,y:l,z:c,a:e.alpha})}({l:t,a:A*Math.cos(i*Math.PI/180),b:A*Math.sin(i*Math.PI/180),alpha:e.a})}const l$2=/lcha?\s*\(\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*([+-]?\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function p$1({l:e,c:t,h:A,a:i}){return[h$2({l:s$8(0,e,100),c:s$8(0,t,230),h:u$6(A),a:(n=i,void 0!==n?s$8(0,n,1):1)}),"lch"];var n}function f$1(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{l:t,c:A,h:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return p$1(e);if("string"==typeof e){l$2.lastIndex=0;const t=l$2.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(0===t?1:1===t?2.3:2===t?3.59:.01):+e));return p$1({l:e,c:A,h:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const d$1=e=>{e.prototype.lcha=function(){return i$8(this.rgba())},e.prototype.stringLCH=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.lcha()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`lcha(${A}%, ${i}, ${n}, ${a})`:`lch(${A}%, ${i}, ${n})`},e.Parsers.push(f$1)};var b$1=a$8.Z,t$7={d:(e,t)=>{for(var A in t)t$7.o(t,A)&&!t$7.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$7={};t$7.d(n$7,{Z:()=>l$1});const r$8=Math.pow(6/29,3),e$7=Math.pow(29/3,3);function o$7(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function a$7(e,t,A){return Math.max(e,Math.min(t,A))}function u$5(e){const{l:t,u:A,v:i}=e,n=t>e$7*r$8?Math.pow((t+16)/116,3):t/e$7,a=(52*t/(A&&t?A+13*t*.20916005282038627:1)-1)/3,r=-5*n,s=n*(39*t/(i&&t?i+13*t*(9/18.43985):1)-5),o=a===-1/3?s-r:(s-r)/(a- -1/3);return function(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=o$7([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}(e)).map((e=>e/100)),[n,a,r]=o$7([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,A,i]).map((e=>{return a$7(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:a,b:r,a:e.a}}({x:100*o,y:100*n,z:100*(a*o+r),a:e.a})}const c$7=/color\s*\(\s*luva?\s*(\d*\.?\d+%?)\s*,?\s*([+-]?\d*\.?\d+%?)\s*,?\s*([+-]?\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function s$7({l:e,u:t,v:A,a:i}){return[u$5({l:a$7(0,e,100),u:a$7(-100,t,100),v:a$7(-100,A,100),a:(n=i,void 0!==n?a$7(0,n,1):1)}),"luv"];var n}function i$7(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{l:t,u:A,v:i}=e;return void 0!==t&&void 0!==A&&null!=i}(e))return s$7(e);if("string"==typeof e){c$7.lastIndex=0;const t=c$7.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(t<3?1:.01):+e));return s$7({l:e,u:A,v:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const l$1=e=>{e.prototype.luva=function(){return function(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=o$7([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,A,i]=o$7([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}({x:t,y:A,z:i,a:e.a})}(e)).map((e=>e/100)),n=A/1,a=t&&A&&i?t+15*A+3*i:19,r=4*t/a,s=9*A/a;let o=n>r$8?116*Math.cbrt(n)-16:e$7*n,l=13*o*(r-.20916005282038627),c=13*o*(s-.48807338454488514);return o===Number(-0)&&(o=0),l===Number(-0)&&(l=0),c===Number(-0)&&(c=0),{l:o,u:l,v:c,a:e.a}}(this.rgba())},e.prototype.stringLUV=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.luva()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`color(luva ${A}%, ${i}%, ${n}%, ${a})`:`color(luv ${A}%, ${i}%, ${n}%)`},e.Parsers.push(i$7)};var v=n$7.Z,t$6={d:(e,t)=>{for(var A in t)t$6.o(t,A)&&!t$6.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},a$6={};t$6.d(a$6,{Z:()=>d});const n$6=6/29,r$7=Math.pow(n$6,3),e$6=Math.pow(29/3,3),o$6={x:.96422,y:1,z:.82521};function c$6(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function s$6(e,t,A){return Math.max(e,Math.min(t,A))}function u$4(e){return void 0!==e?s$6(0,e,1):1}function i$6(e){const t=Object.values(function(e){const[t,A,i]=c$6([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,A,i]=c$6([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}({x:t,y:A,z:i,a:e.a})}(e)).map(((e,t)=>e/(100*Object.values(o$6)[t]))).map((e=>e>r$7?Math.cbrt(e):(e$6*e+16)/116));return{l:116*t[1]-16,a:500*(t[0]-t[1]),b:200*(t[1]-t[2]),alpha:e.a}}function l(e){const{l:t,a:A,b:i}=e,n=(t+16)/116,a=n+A/500,r=n-i/200,s=Object.values(o$6),[o,l,c]=[a,n,r].map(((e,t)=>(e>n$6?Math.pow(e,3):3*Math.pow(n$6,2)*(e-4/29))*s[t]*100));return function(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=c$6([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}(e)).map((e=>e/100)),[n,a,r]=c$6([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,A,i]).map((e=>{return s$6(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:a,b:r,a:e.a}}({x:o,y:l,z:c,a:e.alpha})}const p=/laba?\s*\(\s*(\d*\.?\d+%?)\s*,?\s*([+-]?\d*\.?\d+)\s*,?\s*([+-]?\d*\.?\d+)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function b({l:e,a:t,b:A,alpha:i}){return[l({l:s$6(0,e,100),a:s$6(-160,t,160),b:s$6(-160,A,160),alpha:u$4(i)}),"lab"]}function f(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{l:t,a:A,b:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return b(e);if("string"==typeof e){p.lastIndex=0;const t=p.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(t<3?1:.01):+e));return b({l:e,a:A,b:i,alpha:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const d=e=>{e.prototype.laba=function(){return i$6(this.rgba())},e.prototype.stringLAB=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.laba()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`laba(${A}%, ${i}, ${n}, ${a})`:`lab(${A}%, ${i}, ${n})`},e.Parsers.push(f)};var h$1=a$6.Z,t$5={d:(e,t)=>{for(var A in t)t$5.o(t,A)&&!t$5.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$5={};function r$6(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function o$5(e,t,A){return Math.max(e,Math.min(t,A))}function e$5(e){const{u:t,v:A,w:i}=e,[n,a,r]=r$6([[1.5,0,0],[0,1,0],[1.5,-3,2]],[t,A,i]);return function(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=r$6([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}(e)).map((e=>e/100)),[n,a,r]=r$6([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,A,i]).map((e=>{return o$5(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:a,b:r,a:e.a}}({x:n,y:a,z:r,a:e.a})}t$5.d(n$5,{Z:()=>s$5});const a$5=/color\s*\(\s*uvwa?\s*(\d*\.?\d+)\s*,?\s*([+-]?\d*\.?\d+)\s*,?\s*([+-]?\d*\.?\d+)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function u$3({u:e,v:t,w:A,a:i}){return[e$5({u:o$5(0,e,200/3*.96422),v:o$5(0,t,100),w:o$5(-48.211,A,191.2605),a:(n=i,void 0!==n?o$5(0,n,1):1)}),"uvw"];var n}function c$5(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{u:t,v:A,w:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return u$3(e);if("string"==typeof e){a$5.lastIndex=0;const t=a$5.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map((e=>e.includes("%")?.01*+e.slice(0,-1):+e));return u$3({u:e,v:A,w:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const s$5=e=>{e.prototype.uvwa=function(){return function(e){const{x:t,y:A,z:i}=function(e){const[t,A,i]=r$6([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,A,i]=r$6([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}({x:t,y:A,z:i,a:e.a})}(e),[n,a,r]=r$6([[2/3,0,0],[0,1,0],[-.5,1.5,.5]],[t,A,i]);return{u:n,v:a,w:r,a:e.a}}(this.rgba())},e.prototype.stringUVW=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.uvwa()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`color(uvwa ${A}, ${i}, ${n}, ${a})`:`color(uvw ${A}, ${i}, ${n})`},e.Parsers.push(c$5)};var i$5=n$5.Z,t$4={d:(e,t)=>{for(var A in t)t$4.o(t,A)&&!t$4.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$4={};function r$5(e,t){return[e[0][0]*t[0]+e[0][1]*t[1]+e[0][2]*t[2],e[1][0]*t[0]+e[1][1]*t[1]+e[1][2]*t[2],e[2][0]*t[0]+e[2][1]*t[1]+e[2][2]*t[2]]}function o$4(e,t,A){return Math.max(e,Math.min(t,A))}function e$4(e){const[t,A,i]=Object.values(function(e){const[t,A,i]=r$5([[.9554734527042182,-.023098536874261423,.0632593086610217],[-.028369706963208136,1.0099954580058226,.021041398966943008],[.012314001688319899,-.020507696433477912,1.3303659366080753]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}(e)).map((e=>e/100)),[n,a,r]=r$5([[3.2409699419045226,-1.537383177570094,-.4986107602930034],[-.9692436362808796,1.8759675015077202,.04155505740717559],[.05563007969699366,-.20397695888897652,1.0569715142428786]],[t,A,i]).map((e=>{return o$4(0,255*((t=e)>.0031308?1.055*Math.pow(t,1/2.4)-.055:12.92*t),255);var t}));return{r:n,g:a,b:r,a:e.a}}t$4.d(n$4,{Z:()=>u$2});const a$4=/color\s*\(\s*xyza?\s*(\d*\.?\d+)\s*,?\s*(\d*\.?\d+)\s*,?\s*(\d*\.?\d+)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function s$4({x:e,y:t,z:A,a:i}){return[e$4({x:o$4(0,e,96.422),y:o$4(0,t,100),z:o$4(0,A,82.521),a:(n=i,void 0!==n?o$4(0,n,1):1)}),"xyz"];var n}function c$4(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{x:t,y:A,z:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return s$4(e);if("string"==typeof e){a$4.lastIndex=0;const t=a$4.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map((e=>e.includes("%")?.01*+e.slice(0,-1):+e));return s$4({x:e,y:A,z:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const u$2=e=>{e.prototype.xyza=function(){return function(e){const[t,A,i]=r$5([[.41239079926595934,.357584339383878,.1804807884018343],[.21263900587151027,.715168678767756,.07219231536073371],[.01933081871559182,.11919477979462598,.9505321522496607]],Object.values(e).map((e=>{return 100*(t=e,(t/=255)<.04045?t/12.92:Math.pow((t+.055)/1.055,2.4));var t})));return function(e){const[t,A,i]=r$5([[1.0479298208405488,.022946793341019088,-.05019222954313557],[.029627815688159344,.990434484573249,-.01707382502938514],[-.009243058152591178,.015055144896577895,.7518742899580008]],Object.values(e));return{x:t,y:A,z:i,a:e.a}}({x:t,y:A,z:i,a:e.a})}(this.rgba())},e.prototype.stringXYZ=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.xyza()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`color(xyza ${A}, ${i}, ${n}, ${a})`:`color(xyz ${A}, ${i}, ${n})`},e.Parsers.push(c$4)};var i$4=n$4.Z,t$3={d:(e,t)=>{for(var A in t)t$3.o(t,A)&&!t$3.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$3={};function r$4(e,t,A){return Math.max(e,Math.min(t,A))}function a$3(e){const t=e%360;return t<0?t+360:t}function o$3(e){const{h:t,a:A}=function(e){var t;const{Cmin:A,Cmax:i,H:n,delta:a}=function(e){const[t,A,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,A,i),a=Math.min(t,A,i),r=n-a;return{Cmin:a,Cmax:n,H:0===r?0:n===t?(A-i)/r%6:n===A?(i-t)/r+2:(t-A)/r+4,delta:r}}(e),r=(i+A)/2,s=0===a?0:a/(1-Math.abs(2*r-1));return{h:a$3(60*n),s:100*s,l:100*r,a:null!==(t=e.a)&&void 0!==t?t:1}}(e),{r:i,g:n,b:a}=e;return{h:t,w:Math.min(i,n,a)/2.55,b:100*(1-Math.max(i,n,a)/255),a:A}}function e$3(e){const{h:t,b:A,w:i,a:n}=e;return function(e){const{h:t,s:A,v:i,a:n}=e,a=i/100,r=a*(A/100),s=r*(1-Math.abs(t/60%2-1)),o=a-r,l=t<60||300<=t&&t<360?r:120<=t&&t<240?0:s,c=240<=t&&t<360?0:60<=t&&t<180?r:s,d=t<120?0:180<=t&&t<300?r:s,[h,u,g]=[l,c,d].map((e=>255*(e+o)));return{r:h,g:u,b:g,a:null!=n?n:1}}({h:t,s:100===A?0:100-i/(100-A)*100,v:100-A,a:n})}t$3.d(n$3,{Z:()=>u$1});const s$3=/hwba?\s*\(\s*([+-]?\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function i$3({h:e,w:t,b:A,a:i}){return[e$3({h:a$3(e),w:r$4(0,t,100),b:r$4(0,A,100),a:(n=i,void 0!==n?r$4(0,n,1):1)}),"hwb"];var n}function c$3(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{h:t,w:A,b:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return i$3(e);if("string"==typeof e){s$3.lastIndex=0;const t=s$3.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(0===t?3.59:t<3?1:.01):+e));return i$3({h:e,w:A,b:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const u$1=e=>{e.prototype.hwba=function(){return o$3(this.rgba())},e.prototype.stringHWB=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.hwba()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`hwba(${a$3(A)}, ${i}%, ${n}%, ${a})`:`hwb(${a$3(A)}, ${i}%, ${n}%)`},e.Parsers.push(c$3)};var h=n$3.Z,t$2={d:(e,t)=>{for(var A in t)t$2.o(t,A)&&!t$2.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n$2={};function r$3(e,t,A){return Math.max(e,Math.min(t,A))}function s$2(e){const t=e%360;return t<0?t+360:t}function e$2(e){const{h:t,s:A,v:i,a:n}=e,a=i/100,r=a*(A/100),s=r*(1-Math.abs(t/60%2-1)),o=a-r,l=t<60||300<=t&&t<360?r:120<=t&&t<240?0:s,c=240<=t&&t<360?0:60<=t&&t<180?r:s,d=t<120?0:180<=t&&t<300?r:s,[h,u,g]=[l,c,d].map((e=>255*(e+o)));return{r:h,g:u,b:g,a:null!=n?n:1}}t$2.d(n$2,{Z:()=>c$2});const a$2=/hsva?\s*\(\s*([+-]?\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function o$2({h:e,s:t,v:A,a:i}){return[e$2({h:s$2(e),s:r$3(0,t,100),v:r$3(0,A,100),a:(n=i,void 0!==n?r$3(0,n,1):1)}),"hsv"];var n}function i$2(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{h:t,s:A,v:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return o$2(e);if("string"==typeof e){a$2.lastIndex=0;const t=a$2.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(0===t?3.59:t<3?1:.01):+e));return o$2({h:e,s:A,v:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const c$2=e=>{e.prototype.hsva=function(){return function(e){var t;const{Cmax:A,H:i,delta:n}=function(e){const[t,A,i]=Object.values(e).map((e=>e/255)),n=Math.max(t,A,i),a=Math.min(t,A,i),r=n-a;return{Cmin:a,Cmax:n,H:0===r?0:n===t?(A-i)/r%6:n===A?(i-t)/r+2:(t-A)/r+4,delta:r}}(e),a=0===n?0:n/A;return{h:s$2(60*i),s:100*a,v:100*A,a:null!==(t=e.a)&&void 0!==t?t:1}}(this.rgba())},e.prototype.stringHSV=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.hsva()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`hsva(${s$2(A)}, ${i}%, ${n}%, ${a})`:`hsv(${s$2(A)}, ${i}%, ${n}%)`},e.Parsers.push(i$2)};var u=n$2.Z,t$1={d:(e,t)=>{for(var A in t)t$1.o(t,A)&&!t$1.o(e,A)&&Object.defineProperty(e,A,{enumerable:!0,get:t[A]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},r$2={};function n$1(e,t,A){return Math.max(e,Math.min(t,A))}function o$1(e){let{r:t,y:A,b:i}=e;const n=Math.min(t,A,i);[t,A,i]=[t,A,i].map((e=>e-n));const a=Math.max(t,A,i);let r=Math.min(A,i);A-=r,i-=r,i&&r&&(i*=2,r*=2),t+=A,r+=A;const s=Math.max(t,r,i);if(s){const e=a/s;[t,r,i]=[t,r,i].map((t=>t*e))}return[t,r,i]=[t,r,i].map((e=>e+n)),{r:t,g:r,b:i,a:e.a}}t$1.d(r$2,{Z:()=>i$1});const a$1=/color\s*\(\s*ryba?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function e$1({r:e,y:t,b:A,a:i}){return[o$1({r:n$1(0,e,255),y:n$1(0,t,255),b:n$1(0,A,255),a:(n=i,void 0!==n?n$1(0,n,1):1)}),"ryb"];var n}function s$1(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{r:t,y:A,b:i}=e;return void 0!==t&&void 0!==A&&void 0!==i}(e))return e$1(e);if("string"==typeof e){a$1.lastIndex=0;const t=a$1.exec(e);if(t){const[e,A,i,n]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(t<3?2.55:.01):+e));return e$1({r:e,y:A,b:i,a:n})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const i$1=e=>{e.prototype.ryba=function(){return function(e){let{r:t,g:A,b:i}=e;const n=Math.min(t,A,i);[t,A,i]=[t,A,i].map((e=>e-n));const a=Math.max(t,A,i);let r=Math.min(t,A);t-=r,A-=r,i&&A&&(i/=2,A/=2),r+=A,i+=A;const s=Math.max(t,r,i);if(s){const e=a/s;[t,r,i]=[t,r,i].map((t=>t*e))}return[t,r,i]=[t,r,i].map((e=>e+n)),{r:t,y:r,b:i,a:e.a}}(this.rgba())},e.prototype.stringRYB=function({alpha:e=!0,precision:t=[0,0,0,1]}={}){const[A,i,n,a]=Object.values(this.ryba()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`color(ryba ${A}, ${i}, ${n}, ${a})`:`color(ryb ${A}, ${i}, ${n})`},e.Parsers.push(s$1)};var c$1=r$2.Z,t={d:(e,A)=>{for(var i in A)t.o(A,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:A[i]})},o:(e,t)=>Object.prototype.hasOwnProperty.call(e,t)},n={};function e(e,t,A){return Math.max(e,Math.min(t,A))}function r$1(e){const{c:t,m:A,y:i,k:n,a:a}=e,[r,s,o]=[t,A,i].map((e=>255*(1-e/100)*(1-n/100)));return{r:r,g:s,b:o,a:a}}t.d(n,{Z:()=>i});const c=/device-cmyka?\s*\(\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?)\s*,?\s*(\d*\.?\d+%?),?\s*\/?\s*?(\d*\.?\d+%?)?\s*\)/gi;function o({c:t,m:A,y:i,k:n,a:a}){return[r$1({c:e(0,t,100),m:e(0,A,100),y:e(0,i,100),k:e(0,n,100),a:(r=a,void 0!==r?e(0,r,1):1)}),"cmyk"];var r}function a(e){if("object"===e.constructor.name.toLowerCase()&&function(e){const{c:t,m:A,y:i,k:n}=e;return void 0!==t&&void 0!==A&&void 0!==i&&void 0!==n}(e))return o(e);if("string"==typeof e){c.lastIndex=0;const t=c.exec(e);if(t){const[e,A,i,n,a]=t.filter((e=>void 0!==e)).slice(1).map(((e,t)=>e.includes("%")?+e.slice(0,-1)*(t<4?1:.01):+e));return o({c:e,m:A,y:i,k:n,a:a})}}return[{r:0,g:0,b:0,a:1},"invalid"]}const i=e=>{e.prototype.cmyka=function(){return function(e){const{r:t,g:A,b:i,a:n}=e,a=1-Math.max(t,A,i)/255,[r,s,o]=1===a?[0,0,0]:[t,A,i].map((e=>100*(1-e/255-a)/(1-a)));return{c:r,m:s,y:o,k:100*a,a:n}}(this.rgba())},e.prototype.stringCMYK=function({alpha:e=!0,precision:t=[0,0,0,0,1]}={}){const[A,i,n,a,r]=Object.values(this.cmyka()).map(((e,A)=>function(e,t){return+e.toFixed(t>=0?t:0)}(e,t[A])));return e?`device-cmyk(${A}, ${i}, ${n}, ${a}, ${r})`:`device-cmyk(${A}, ${i}, ${n}, ${a})`},e.Parsers.push(a)};var s=n.Z;class ExcalidrawScene{constructor(e=[]){this.type="excalidraw",this.version=2,this.source=GITHUB_RELEASES+PLUGIN_VERSION,this.elements=[],this.elements=e}toExJSON(){return Object.assign(Object.assign({},this),{elements:this.elements.map((e=>Object.assign({},e)))})}}var ARRAY_TYPE="undefined"!=typeof Float32Array?Float32Array:Array;function create$1(){var e=new ARRAY_TYPE(16);return ARRAY_TYPE!=Float32Array&&(e[1]=0,e[2]=0,e[3]=0,e[4]=0,e[6]=0,e[7]=0,e[8]=0,e[9]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0),e[0]=1,e[5]=1,e[10]=1,e[15]=1,e}function clone(e){var t=new ARRAY_TYPE(16);return t[0]=e[0],t[1]=e[1],t[2]=e[2],t[3]=e[3],t[4]=e[4],t[5]=e[5],t[6]=e[6],t[7]=e[7],t[8]=e[8],t[9]=e[9],t[10]=e[10],t[11]=e[11],t[12]=e[12],t[13]=e[13],t[14]=e[14],t[15]=e[15],t}function fromValues$1(e,t,A,i,n,a,r,s,o,l,c,d,h,u,g,p){var m=new ARRAY_TYPE(16);return m[0]=e,m[1]=t,m[2]=A,m[3]=i,m[4]=n,m[5]=a,m[6]=r,m[7]=s,m[8]=o,m[9]=l,m[10]=c,m[11]=d,m[12]=h,m[13]=u,m[14]=g,m[15]=p,m}function multiply(e,t,A){var i=t[0],n=t[1],a=t[2],r=t[3],s=t[4],o=t[5],l=t[6],c=t[7],d=t[8],h=t[9],u=t[10],g=t[11],p=t[12],m=t[13],w=t[14],f=t[15],E=A[0],B=A[1],b=A[2],v=A[3];return e[0]=E*i+B*s+b*d+v*p,e[1]=E*n+B*o+b*h+v*m,e[2]=E*a+B*l+b*u+v*w,e[3]=E*r+B*c+b*g+v*f,E=A[4],B=A[5],b=A[6],v=A[7],e[4]=E*i+B*s+b*d+v*p,e[5]=E*n+B*o+b*h+v*m,e[6]=E*a+B*l+b*u+v*w,e[7]=E*r+B*c+b*g+v*f,E=A[8],B=A[9],b=A[10],v=A[11],e[8]=E*i+B*s+b*d+v*p,e[9]=E*n+B*o+b*h+v*m,e[10]=E*a+B*l+b*u+v*w,e[11]=E*r+B*c+b*g+v*f,E=A[12],B=A[13],b=A[14],v=A[15],e[12]=E*i+B*s+b*d+v*p,e[13]=E*n+B*o+b*h+v*m,e[14]=E*a+B*l+b*u+v*w,e[15]=E*r+B*c+b*g+v*f,e}function create(){var e=new ARRAY_TYPE(3);return ARRAY_TYPE!=Float32Array&&(e[0]=0,e[1]=0,e[2]=0),e}function fromValues(e,t,A){var i=new ARRAY_TYPE(3);return i[0]=e,i[1]=t,i[2]=A,i}function transformMat4(e,t,A){var i=t[0],n=t[1],a=t[2],r=A[3]*i+A[7]*n+A[11]*a+A[15];return r=r||1,e[0]=(A[0]*i+A[4]*n+A[8]*a+A[12])/r,e[1]=(A[1]*i+A[5]*n+A[9]*a+A[13])/r,e[2]=(A[2]*i+A[6]*n+A[10]*a+A[14])/r,e}Math.hypot||(Math.hypot=function(){for(var e=0,t=arguments.length;t--;)e+=arguments[t]*arguments[t];return Math.sqrt(e)}),create();const random=new Random(Date.now()),randomInteger=()=>Math.floor(random.next()*2**31),randomId=()=>nanoid$1();function dimensionsFromPoints(e){const t=e.map((([e])=>e)),A=e.map((([,e])=>e)),i=Math.min(...t),n=Math.min(...A);return[Math.max(...t)-i,Math.max(...A)-n]}function getWindingOrder(e){return e.reduce(((e,[t,A],i,n)=>{const a=n[i+1];return((a?a[0]:0)-t)*((a?a[1]:0)+A)+e}),0)>0?"clockwise":"counterclockwise"}var chromaExports={},chroma$1={get exports(){return chromaExports},set exports(e){chromaExports=e}};chroma$1.exports=function(){for(var e=function(e,t,A){return void 0===t&&(t=0),void 0===A&&(A=1),e<t?t:e>A?A:e},t=e,A={},i=0,n=["Boolean","Number","String","Function","Array","Date","RegExp","Undefined","Null"];i<n.length;i+=1){var a=n[i];A["[object "+a+"]"]=a.toLowerCase()}var r=function(e){return A[Object.prototype.toString.call(e)]||"object"},s=r,o=r,l=Math.PI,c={clip_rgb:function(e){e._clipped=!1,e._unclipped=e.slice(0);for(var A=0;A<=3;A++)A<3?((e[A]<0||e[A]>255)&&(e._clipped=!0),e[A]=t(e[A],0,255)):3===A&&(e[A]=t(e[A],0,1));return e},limit:e,type:r,unpack:function(e,t){return void 0===t&&(t=null),e.length>=3?Array.prototype.slice.call(e):"object"==s(e[0])&&t?t.split("").filter((function(t){return void 0!==e[0][t]})).map((function(t){return e[0][t]})):e[0]},last:function(e){if(e.length<2)return null;var t=e.length-1;return"string"==o(e[t])?e[t].toLowerCase():null},PI:l,TWOPI:2*l,PITHIRD:l/3,DEG2RAD:l/180,RAD2DEG:180/l},d={format:{},autodetect:[]},h=c.last,u=c.clip_rgb,g=c.type,p=d,m=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=this;if("object"===g(e[0])&&e[0].constructor&&e[0].constructor===this.constructor)return e[0];var i=h(e),n=!1;if(!i){n=!0,p.sorted||(p.autodetect=p.autodetect.sort((function(e,t){return t.p-e.p})),p.sorted=!0);for(var a=0,r=p.autodetect;a<r.length;a+=1){var s=r[a];if(i=s.test.apply(s,e))break}}if(!p.format[i])throw new Error("unknown format: "+e);var o=p.format[i].apply(null,n?e:e.slice(0,-1));A._rgb=u(o),3===A._rgb.length&&A._rgb.push(1)};m.prototype.toString=function(){return"function"==g(this.hex)?this.hex():"["+this._rgb.join(",")+"]"};var w=m,f=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(f.Color,[null].concat(e)))};f.Color=w,f.version="2.4.2";var E=f,B=c.unpack,b=Math.max,v=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=B(e,"rgb"),i=A[0],n=A[1],a=A[2],r=1-b(i/=255,b(n/=255,a/=255)),s=r<1?1/(1-r):0;return[(1-i-r)*s,(1-n-r)*s,(1-a-r)*s,r]},C=c.unpack,y=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=(e=C(e,"cmyk"))[0],i=e[1],n=e[2],a=e[3],r=e.length>4?e[4]:1;return 1===a?[0,0,0,r]:[A>=1?0:255*(1-A)*(1-a),i>=1?0:255*(1-i)*(1-a),n>=1?0:255*(1-n)*(1-a),r]},F=E,x=w,T=d,S=c.unpack,I=c.type,M=v;x.prototype.cmyk=function(){return M(this._rgb)},F.cmyk=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(x,[null].concat(e,["cmyk"])))},T.format.cmyk=y,T.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=S(e,"cmyk"),"array"===I(e)&&4===e.length)return"cmyk"}});var k=c.unpack,U=c.last,Q=function(e){return Math.round(100*e)/100},O=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=k(e,"hsla"),i=U(e)||"lsa";return A[0]=Q(A[0]||0),A[1]=Q(100*A[1])+"%",A[2]=Q(100*A[2])+"%","hsla"===i||A.length>3&&A[3]<1?(A[3]=A.length>3?A[3]:1,i="hsla"):A.length=3,i+"("+A.join(",")+")"},L=c.unpack,N=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=(e=L(e,"rgba"))[0],i=e[1],n=e[2];A/=255,i/=255,n/=255;var a,r,s=Math.min(A,i,n),o=Math.max(A,i,n),l=(o+s)/2;return o===s?(a=0,r=Number.NaN):a=l<.5?(o-s)/(o+s):(o-s)/(2-o-s),A==o?r=(i-n)/(o-s):i==o?r=2+(n-A)/(o-s):n==o&&(r=4+(A-i)/(o-s)),(r*=60)<0&&(r+=360),e.length>3&&void 0!==e[3]?[r,a,l,e[3]]:[r,a,l]},D=c.unpack,R=c.last,H=O,P=N,V=Math.round,K=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=D(e,"rgba"),i=R(e)||"rgb";return"hsl"==i.substr(0,3)?H(P(A),i):(A[0]=V(A[0]),A[1]=V(A[1]),A[2]=V(A[2]),("rgba"===i||A.length>3&&A[3]<1)&&(A[3]=A.length>3?A[3]:1,i="rgba"),i+"("+A.slice(0,"rgb"===i?3:4).join(",")+")")},G=c.unpack,W=Math.round,z=function(){for(var e,t=[],A=arguments.length;A--;)t[A]=arguments[A];var i,n,a,r=(t=G(t,"hsl"))[0],s=t[1],o=t[2];if(0===s)i=n=a=255*o;else{var l=[0,0,0],c=[0,0,0],d=o<.5?o*(1+s):o+s-o*s,h=2*o-d,u=r/360;l[0]=u+1/3,l[1]=u,l[2]=u-1/3;for(var g=0;g<3;g++)l[g]<0&&(l[g]+=1),l[g]>1&&(l[g]-=1),6*l[g]<1?c[g]=h+6*(d-h)*l[g]:2*l[g]<1?c[g]=d:3*l[g]<2?c[g]=h+(d-h)*(2/3-l[g])*6:c[g]=h;i=(e=[W(255*c[0]),W(255*c[1]),W(255*c[2])])[0],n=e[1],a=e[2]}return t.length>3?[i,n,a,t[3]]:[i,n,a,1]},X=z,Y=d,j=/^rgb\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*\)$/,_=/^rgba\(\s*(-?\d+),\s*(-?\d+)\s*,\s*(-?\d+)\s*,\s*([01]|[01]?\.\d+)\)$/,J=/^rgb\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,Z=/^rgba\(\s*(-?\d+(?:\.\d+)?)%,\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,q=/^hsl\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*\)$/,$=/^hsla\(\s*(-?\d+(?:\.\d+)?),\s*(-?\d+(?:\.\d+)?)%\s*,\s*(-?\d+(?:\.\d+)?)%\s*,\s*([01]|[01]?\.\d+)\)$/,ee=Math.round,te=function(e){var t;if(e=e.toLowerCase().trim(),Y.format.named)try{return Y.format.named(e)}catch(e){}if(t=e.match(j)){for(var A=t.slice(1,4),i=0;i<3;i++)A[i]=+A[i];return A[3]=1,A}if(t=e.match(_)){for(var n=t.slice(1,5),a=0;a<4;a++)n[a]=+n[a];return n}if(t=e.match(J)){for(var r=t.slice(1,4),s=0;s<3;s++)r[s]=ee(2.55*r[s]);return r[3]=1,r}if(t=e.match(Z)){for(var o=t.slice(1,5),l=0;l<3;l++)o[l]=ee(2.55*o[l]);return o[3]=+o[3],o}if(t=e.match(q)){var c=t.slice(1,4);c[1]*=.01,c[2]*=.01;var d=X(c);return d[3]=1,d}if(t=e.match($)){var h=t.slice(1,4);h[1]*=.01,h[2]*=.01;var u=X(h);return u[3]=+t[4],u}};te.test=function(e){return j.test(e)||_.test(e)||J.test(e)||Z.test(e)||q.test(e)||$.test(e)};var Ae=E,ie=w,ne=d,ae=c.type,re=K,se=te;ie.prototype.css=function(e){return re(this._rgb,e)},Ae.css=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ie,[null].concat(e,["css"])))},ne.format.css=se,ne.autodetect.push({p:5,test:function(e){for(var t=[],A=arguments.length-1;A-- >0;)t[A]=arguments[A+1];if(!t.length&&"string"===ae(e)&&se.test(e))return"css"}});var oe=w,le=E,ce=c.unpack;d.format.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=ce(e,"rgba");return A[0]*=255,A[1]*=255,A[2]*=255,A},le.gl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(oe,[null].concat(e,["gl"])))},oe.prototype.gl=function(){var e=this._rgb;return[e[0]/255,e[1]/255,e[2]/255,e[3]]};var de=c.unpack,he=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A,i=de(e,"rgb"),n=i[0],a=i[1],r=i[2],s=Math.min(n,a,r),o=Math.max(n,a,r),l=o-s,c=100*l/255,d=s/(255-l)*100;return 0===l?A=Number.NaN:(n===o&&(A=(a-r)/l),a===o&&(A=2+(r-n)/l),r===o&&(A=4+(n-a)/l),(A*=60)<0&&(A+=360)),[A,c,d]},ue=c.unpack,ge=Math.floor,pe=function(){for(var e,t,A,i,n,a,r=[],s=arguments.length;s--;)r[s]=arguments[s];var o,l,c,d=(r=ue(r,"hcg"))[0],h=r[1],u=r[2];u*=255;var g=255*h;if(0===h)o=l=c=u;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var p=ge(d/=60),m=d-p,w=u*(1-h),f=w+g*(1-m),E=w+g*m,B=w+g;switch(p){case 0:o=(e=[B,E,w])[0],l=e[1],c=e[2];break;case 1:o=(t=[f,B,w])[0],l=t[1],c=t[2];break;case 2:o=(A=[w,B,E])[0],l=A[1],c=A[2];break;case 3:o=(i=[w,f,B])[0],l=i[1],c=i[2];break;case 4:o=(n=[E,w,B])[0],l=n[1],c=n[2];break;case 5:o=(a=[B,w,f])[0],l=a[1],c=a[2]}}return[o,l,c,r.length>3?r[3]:1]},me=c.unpack,we=c.type,fe=E,Ee=w,Be=d,be=he;Ee.prototype.hcg=function(){return be(this._rgb)},fe.hcg=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Ee,[null].concat(e,["hcg"])))},Be.format.hcg=pe,Be.autodetect.push({p:1,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=me(e,"hcg"),"array"===we(e)&&3===e.length)return"hcg"}});var ve=c.unpack,Ce=c.last,ye=Math.round,Fe=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=ve(e,"rgba"),i=A[0],n=A[1],a=A[2],r=A[3],s=Ce(e)||"auto";void 0===r&&(r=1),"auto"===s&&(s=r<1?"rgba":"rgb");var o="000000"+((i=ye(i))<<16|(n=ye(n))<<8|(a=ye(a))).toString(16);o=o.substr(o.length-6);var l="0"+ye(255*r).toString(16);switch(l=l.substr(l.length-2),s.toLowerCase()){case"rgba":return"#"+o+l;case"argb":return"#"+l+o;default:return"#"+o}},xe=/^#?([A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/,Te=/^#?([A-Fa-f0-9]{8}|[A-Fa-f0-9]{4})$/,Se=function(e){if(e.match(xe)){4!==e.length&&7!==e.length||(e=e.substr(1)),3===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]);var t=parseInt(e,16);return[t>>16,t>>8&255,255&t,1]}if(e.match(Te)){5!==e.length&&9!==e.length||(e=e.substr(1)),4===e.length&&(e=(e=e.split(""))[0]+e[0]+e[1]+e[1]+e[2]+e[2]+e[3]+e[3]);var A=parseInt(e,16);return[A>>24&255,A>>16&255,A>>8&255,Math.round((255&A)/255*100)/100]}throw new Error("unknown hex color: "+e)},Ie=E,Me=w,ke=c.type,Ue=d,Qe=Fe;Me.prototype.hex=function(e){return Qe(this._rgb,e)},Ie.hex=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Me,[null].concat(e,["hex"])))},Ue.format.hex=Se,Ue.autodetect.push({p:4,test:function(e){for(var t=[],A=arguments.length-1;A-- >0;)t[A]=arguments[A+1];if(!t.length&&"string"===ke(e)&&[3,4,5,6,7,8,9].indexOf(e.length)>=0)return"hex"}});var Oe=c.unpack,Le=c.TWOPI,Ne=Math.min,De=Math.sqrt,Re=Math.acos,He=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A,i=Oe(e,"rgb"),n=i[0],a=i[1],r=i[2],s=Ne(n/=255,a/=255,r/=255),o=(n+a+r)/3,l=o>0?1-s/o:0;return 0===l?A=NaN:(A=(n-a+(n-r))/2,A/=De((n-a)*(n-a)+(n-r)*(a-r)),A=Re(A),r>a&&(A=Le-A),A/=Le),[360*A,l,o]},Pe=c.unpack,Ve=c.limit,Ke=c.TWOPI,Ge=c.PITHIRD,We=Math.cos,ze=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A,i,n,a=(e=Pe(e,"hsi"))[0],r=e[1],s=e[2];return isNaN(a)&&(a=0),isNaN(r)&&(r=0),a>360&&(a-=360),a<0&&(a+=360),(a/=360)<1/3?i=1-((n=(1-r)/3)+(A=(1+r*We(Ke*a)/We(Ge-Ke*a))/3)):a<2/3?n=1-((A=(1-r)/3)+(i=(1+r*We(Ke*(a-=1/3))/We(Ge-Ke*a))/3)):A=1-((i=(1-r)/3)+(n=(1+r*We(Ke*(a-=2/3))/We(Ge-Ke*a))/3)),[255*(A=Ve(s*A*3)),255*(i=Ve(s*i*3)),255*(n=Ve(s*n*3)),e.length>3?e[3]:1]},Xe=c.unpack,Ye=c.type,je=E,_e=w,Je=d,Ze=He;_e.prototype.hsi=function(){return Ze(this._rgb)},je.hsi=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(_e,[null].concat(e,["hsi"])))},Je.format.hsi=ze,Je.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=Xe(e,"hsi"),"array"===Ye(e)&&3===e.length)return"hsi"}});var qe=c.unpack,$e=c.type,et=E,tt=w,At=d,it=N;tt.prototype.hsl=function(){return it(this._rgb)},et.hsl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(tt,[null].concat(e,["hsl"])))},At.format.hsl=z,At.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=qe(e,"hsl"),"array"===$e(e)&&3===e.length)return"hsl"}});var nt=c.unpack,at=Math.min,rt=Math.max,st=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A,i,n,a=(e=nt(e,"rgb"))[0],r=e[1],s=e[2],o=at(a,r,s),l=rt(a,r,s),c=l-o;return n=l/255,0===l?(A=Number.NaN,i=0):(i=c/l,a===l&&(A=(r-s)/c),r===l&&(A=2+(s-a)/c),s===l&&(A=4+(a-r)/c),(A*=60)<0&&(A+=360)),[A,i,n]},ot=c.unpack,lt=Math.floor,ct=function(){for(var e,t,A,i,n,a,r=[],s=arguments.length;s--;)r[s]=arguments[s];var o,l,c,d=(r=ot(r,"hsv"))[0],h=r[1],u=r[2];if(u*=255,0===h)o=l=c=u;else{360===d&&(d=0),d>360&&(d-=360),d<0&&(d+=360);var g=lt(d/=60),p=d-g,m=u*(1-h),w=u*(1-h*p),f=u*(1-h*(1-p));switch(g){case 0:o=(e=[u,f,m])[0],l=e[1],c=e[2];break;case 1:o=(t=[w,u,m])[0],l=t[1],c=t[2];break;case 2:o=(A=[m,u,f])[0],l=A[1],c=A[2];break;case 3:o=(i=[m,w,u])[0],l=i[1],c=i[2];break;case 4:o=(n=[f,m,u])[0],l=n[1],c=n[2];break;case 5:o=(a=[u,m,w])[0],l=a[1],c=a[2]}}return[o,l,c,r.length>3?r[3]:1]},dt=c.unpack,ht=c.type,ut=E,gt=w,pt=d,mt=st;gt.prototype.hsv=function(){return mt(this._rgb)},ut.hsv=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(gt,[null].concat(e,["hsv"])))},pt.format.hsv=ct,pt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=dt(e,"hsv"),"array"===ht(e)&&3===e.length)return"hsv"}});var wt={Kn:18,Xn:.95047,Yn:1,Zn:1.08883,t0:.137931034,t1:.206896552,t2:.12841855,t3:.008856452},ft=wt,Et=c.unpack,Bt=Math.pow,bt=function(e){return(e/=255)<=.04045?e/12.92:Bt((e+.055)/1.055,2.4)},vt=function(e){return e>ft.t3?Bt(e,1/3):e/ft.t2+ft.t0},Ct=function(e,t,A){return e=bt(e),t=bt(t),A=bt(A),[vt((.4124564*e+.3575761*t+.1804375*A)/ft.Xn),vt((.2126729*e+.7151522*t+.072175*A)/ft.Yn),vt((.0193339*e+.119192*t+.9503041*A)/ft.Zn)]},yt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=Et(e,"rgb"),i=A[0],n=A[1],a=A[2],r=Ct(i,n,a),s=r[0],o=r[1],l=116*o-16;return[l<0?0:l,500*(s-o),200*(o-r[2])]},Ft=wt,xt=c.unpack,Tt=Math.pow,St=function(e){return 255*(e<=.00304?12.92*e:1.055*Tt(e,1/2.4)-.055)},It=function(e){return e>Ft.t1?e*e*e:Ft.t2*(e-Ft.t0)},Mt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A,i,n,a=(e=xt(e,"lab"))[0],r=e[1],s=e[2];return i=(a+16)/116,A=isNaN(r)?i:i+r/500,n=isNaN(s)?i:i-s/200,i=Ft.Yn*It(i),A=Ft.Xn*It(A),n=Ft.Zn*It(n),[St(3.2404542*A-1.5371385*i-.4985314*n),St(-.969266*A+1.8760108*i+.041556*n),St(.0556434*A-.2040259*i+1.0572252*n),e.length>3?e[3]:1]},kt=c.unpack,Ut=c.type,Qt=E,Ot=w,Lt=d,Nt=yt;Ot.prototype.lab=function(){return Nt(this._rgb)},Qt.lab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(Ot,[null].concat(e,["lab"])))},Lt.format.lab=Mt,Lt.autodetect.push({p:2,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=kt(e,"lab"),"array"===Ut(e)&&3===e.length)return"lab"}});var Dt=c.unpack,Rt=c.RAD2DEG,Ht=Math.sqrt,Pt=Math.atan2,Vt=Math.round,Kt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=Dt(e,"lab"),i=A[0],n=A[1],a=A[2],r=Ht(n*n+a*a),s=(Pt(a,n)*Rt+360)%360;return 0===Vt(1e4*r)&&(s=Number.NaN),[i,r,s]},Gt=c.unpack,Wt=yt,zt=Kt,Xt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=Gt(e,"rgb"),i=A[0],n=A[1],a=A[2],r=Wt(i,n,a),s=r[0],o=r[1],l=r[2];return zt(s,o,l)},Yt=c.unpack,jt=c.DEG2RAD,_t=Math.sin,Jt=Math.cos,Zt=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=Yt(e,"lch"),i=A[0],n=A[1],a=A[2];return isNaN(a)&&(a=0),[i,Jt(a*=jt)*n,_t(a)*n]},qt=c.unpack,$t=Zt,eA=Mt,tA=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=(e=qt(e,"lch"))[0],i=e[1],n=e[2],a=$t(A,i,n),r=a[0],s=a[1],o=a[2],l=eA(r,s,o);return[l[0],l[1],l[2],e.length>3?e[3]:1]},AA=c.unpack,iA=tA,nA=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=AA(e,"hcl").reverse();return iA.apply(void 0,A)},aA=c.unpack,rA=c.type,sA=E,oA=w,lA=d,cA=Xt;oA.prototype.lch=function(){return cA(this._rgb)},oA.prototype.hcl=function(){return cA(this._rgb).reverse()},sA.lch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(oA,[null].concat(e,["lch"])))},sA.hcl=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(oA,[null].concat(e,["hcl"])))},lA.format.lch=tA,lA.format.hcl=nA,["lch","hcl"].forEach((function(e){return lA.autodetect.push({p:2,test:function(){for(var t=[],A=arguments.length;A--;)t[A]=arguments[A];if(t=aA(t,e),"array"===rA(t)&&3===t.length)return e}})}));var dA={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflower:"#6495ed",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dimgrey:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",indianred:"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",laserlemon:"#ffff54",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrod:"#fafad2",lightgoldenrodyellow:"#fafad2",lightgray:"#d3d3d3",lightgreen:"#90ee90",lightgrey:"#d3d3d3",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightslategrey:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",maroon2:"#7f0000",maroon3:"#b03060",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370db",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#db7093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",purple2:"#7f007f",purple3:"#a020f0",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",slategrey:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},hA=d,uA=c.type,gA=dA,pA=Se,mA=Fe;w.prototype.name=function(){for(var e=mA(this._rgb,"rgb"),t=0,A=Object.keys(gA);t<A.length;t+=1){var i=A[t];if(gA[i]===e)return i.toLowerCase()}return e},hA.format.named=function(e){if(e=e.toLowerCase(),gA[e])return pA(gA[e]);throw new Error("unknown color name: "+e)},hA.autodetect.push({p:5,test:function(e){for(var t=[],A=arguments.length-1;A-- >0;)t[A]=arguments[A+1];if(!t.length&&"string"===uA(e)&&gA[e.toLowerCase()])return"named"}});var wA=c.unpack,fA=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=wA(e,"rgb");return(A[0]<<16)+(A[1]<<8)+A[2]},EA=c.type,BA=function(e){if("number"==EA(e)&&e>=0&&e<=16777215)return[e>>16,e>>8&255,255&e,1];throw new Error("unknown num color: "+e)},bA=E,vA=w,CA=d,yA=c.type,FA=fA;vA.prototype.num=function(){return FA(this._rgb)},bA.num=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(vA,[null].concat(e,["num"])))},CA.format.num=BA,CA.autodetect.push({p:5,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(1===e.length&&"number"===yA(e[0])&&e[0]>=0&&e[0]<=16777215)return"num"}});var xA=E,TA=w,SA=d,IA=c.unpack,MA=c.type,kA=Math.round;TA.prototype.rgb=function(e){return void 0===e&&(e=!0),!1===e?this._rgb.slice(0,3):this._rgb.slice(0,3).map(kA)},TA.prototype.rgba=function(e){return void 0===e&&(e=!0),this._rgb.slice(0,4).map((function(t,A){return A<3?!1===e?t:kA(t):t}))},xA.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(TA,[null].concat(e,["rgb"])))},SA.format.rgb=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=IA(e,"rgba");return void 0===A[3]&&(A[3]=1),A},SA.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=IA(e,"rgba"),"array"===MA(e)&&(3===e.length||4===e.length&&"number"==MA(e[3])&&e[3]>=0&&e[3]<=1))return"rgb"}});var UA=Math.log,QA=function(e){var t,A,i,n=e/100;return n<66?(t=255,A=n<6?0:-155.25485562709179-.44596950469579133*(A=n-2)+104.49216199393888*UA(A),i=n<20?0:.8274096064007395*(i=n-10)-254.76935184120902+115.67994401066147*UA(i)):(t=351.97690566805693+.114206453784165*(t=n-55)-40.25366309332127*UA(t),A=325.4494125711974+.07943456536662342*(A=n-50)-28.0852963507957*UA(A),i=255),[t,A,i,1]},OA=QA,LA=c.unpack,NA=Math.round,DA=E,RA=w,HA=d,PA=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var A,i=LA(e,"rgb"),n=i[0],a=i[2],r=1e3,s=4e4,o=.4;s-r>o;){var l=OA(A=.5*(s+r));l[2]/l[0]>=a/n?s=A:r=A}return NA(A)};RA.prototype.temp=RA.prototype.kelvin=RA.prototype.temperature=function(){return PA(this._rgb)},DA.temp=DA.kelvin=DA.temperature=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(RA,[null].concat(e,["temp"])))},HA.format.temp=HA.format.kelvin=HA.format.temperature=QA;var VA=c.unpack,KA=Math.cbrt,GA=Math.pow,WA=Math.sign,zA=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=VA(e,"rgb"),i=A[0],n=A[1],a=A[2],r=[XA(i/255),XA(n/255),XA(a/255)],s=r[0],o=r[1],l=r[2],c=KA(.4122214708*s+.5363325363*o+.0514459929*l),d=KA(.2119034982*s+.6806995451*o+.1073969566*l),h=KA(.0883024619*s+.2817188376*o+.6299787005*l);return[.2104542553*c+.793617785*d-.0040720468*h,1.9779984951*c-2.428592205*d+.4505937099*h,.0259040371*c+.7827717662*d-.808675766*h]};function XA(e){var t=Math.abs(e);return t<.04045?e/12.92:(WA(e)||1)*GA((t+.055)/1.055,2.4)}var YA=c.unpack,jA=Math.pow,_A=Math.sign,JA=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=(e=YA(e,"lab"))[0],i=e[1],n=e[2],a=jA(A+.3963377774*i+.2158037573*n,3),r=jA(A-.1055613458*i-.0638541728*n,3),s=jA(A-.0894841775*i-1.291485548*n,3);return[255*ZA(4.0767416621*a-3.3077115913*r+.2309699292*s),255*ZA(-1.2684380046*a+2.6097574011*r-.3413193965*s),255*ZA(-.0041960863*a-.7034186147*r+1.707614701*s),e.length>3?e[3]:1]};function ZA(e){var t=Math.abs(e);return t>.0031308?(_A(e)||1)*(1.055*jA(t,1/2.4)-.055):12.92*e}var qA=c.unpack,$A=c.type,ei=E,ti=w,Ai=d,ii=zA;ti.prototype.oklab=function(){return ii(this._rgb)},ei.oklab=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(ti,[null].concat(e,["oklab"])))},Ai.format.oklab=JA,Ai.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=qA(e,"oklab"),"array"===$A(e)&&3===e.length)return"oklab"}});var ni=c.unpack,ai=zA,ri=Kt,si=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=ni(e,"rgb"),i=A[0],n=A[1],a=A[2],r=ai(i,n,a),s=r[0],o=r[1],l=r[2];return ri(s,o,l)},oi=c.unpack,li=Zt,ci=JA,di=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];var A=(e=oi(e,"lch"))[0],i=e[1],n=e[2],a=li(A,i,n),r=a[0],s=a[1],o=a[2],l=ci(r,s,o);return[l[0],l[1],l[2],e.length>3?e[3]:1]},hi=c.unpack,ui=c.type,gi=E,pi=w,mi=d,wi=si;pi.prototype.oklch=function(){return wi(this._rgb)},gi.oklch=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return new(Function.prototype.bind.apply(pi,[null].concat(e,["oklch"])))},mi.format.oklch=di,mi.autodetect.push({p:3,test:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];if(e=hi(e,"oklch"),"array"===ui(e)&&3===e.length)return"oklch"}});var fi=w,Ei=c.type;fi.prototype.alpha=function(e,t){return void 0===t&&(t=!1),void 0!==e&&"number"===Ei(e)?t?(this._rgb[3]=e,this):new fi([this._rgb[0],this._rgb[1],this._rgb[2],e],"rgb"):this._rgb[3]},w.prototype.clipped=function(){return this._rgb._clipped||!1};var Bi=w,bi=wt;Bi.prototype.darken=function(e){void 0===e&&(e=1);var t=this.lab();return t[0]-=bi.Kn*e,new Bi(t,"lab").alpha(this.alpha(),!0)},Bi.prototype.brighten=function(e){return void 0===e&&(e=1),this.darken(-e)},Bi.prototype.darker=Bi.prototype.darken,Bi.prototype.brighter=Bi.prototype.brighten,w.prototype.get=function(e){var t=e.split("."),A=t[0],i=t[1],n=this[A]();if(i){var a=A.indexOf(i)-("ok"===A.substr(0,2)?2:0);if(a>-1)return n[a];throw new Error("unknown channel "+i+" in mode "+A)}return n};var vi=w,Ci=c.type,yi=Math.pow;vi.prototype.luminance=function(e){if(void 0!==e&&"number"===Ci(e)){if(0===e)return new vi([0,0,0,this._rgb[3]],"rgb");if(1===e)return new vi([255,255,255,this._rgb[3]],"rgb");var t=this.luminance(),A=20,i=function(t,n){var a=t.interpolate(n,.5,"rgb"),r=a.luminance();return Math.abs(e-r)<1e-7||!A--?a:r>e?i(t,a):i(a,n)},n=(t>e?i(new vi([0,0,0]),this):i(this,new vi([255,255,255]))).rgb();return new vi(n.concat([this._rgb[3]]))}return Fi.apply(void 0,this._rgb.slice(0,3))};var Fi=function(e,t,A){return.2126*(e=xi(e))+.7152*(t=xi(t))+.0722*xi(A)},xi=function(e){return(e/=255)<=.03928?e/12.92:yi((e+.055)/1.055,2.4)},Ti={},Si=w,Ii=c.type,Mi=Ti,ki=function(e,t,A){void 0===A&&(A=.5);for(var i=[],n=arguments.length-3;n-- >0;)i[n]=arguments[n+3];var a=i[0]||"lrgb";if(Mi[a]||i.length||(a=Object.keys(Mi)[0]),!Mi[a])throw new Error("interpolation mode "+a+" is not defined");return"object"!==Ii(e)&&(e=new Si(e)),"object"!==Ii(t)&&(t=new Si(t)),Mi[a](e,t,A).alpha(e.alpha()+A*(t.alpha()-e.alpha()))},Ui=w,Qi=ki;Ui.prototype.mix=Ui.prototype.interpolate=function(e,t){void 0===t&&(t=.5);for(var A=[],i=arguments.length-2;i-- >0;)A[i]=arguments[i+2];return Qi.apply(void 0,[this,e,t].concat(A))};var Oi=w;Oi.prototype.premultiply=function(e){void 0===e&&(e=!1);var t=this._rgb,A=t[3];return e?(this._rgb=[t[0]*A,t[1]*A,t[2]*A,A],this):new Oi([t[0]*A,t[1]*A,t[2]*A,A],"rgb")};var Li=w,Ni=wt;Li.prototype.saturate=function(e){void 0===e&&(e=1);var t=this.lch();return t[1]+=Ni.Kn*e,t[1]<0&&(t[1]=0),new Li(t,"lch").alpha(this.alpha(),!0)},Li.prototype.desaturate=function(e){return void 0===e&&(e=1),this.saturate(-e)};var Di=w,Ri=c.type;Di.prototype.set=function(e,t,A){void 0===A&&(A=!1);var i=e.split("."),n=i[0],a=i[1],r=this[n]();if(a){var s=n.indexOf(a)-("ok"===n.substr(0,2)?2:0);if(s>-1){if("string"==Ri(t))switch(t.charAt(0)){case"+":case"-":r[s]+=+t;break;case"*":r[s]*=+t.substr(1);break;case"/":r[s]/=+t.substr(1);break;default:r[s]=+t}else{if("number"!==Ri(t))throw new Error("unsupported value for Color.set");r[s]=t}var o=new Di(r,n);return A?(this._rgb=o._rgb,this):o}throw new Error("unknown channel "+a+" in mode "+n)}return r};var Hi=w;Ti.rgb=function(e,t,A){var i=e._rgb,n=t._rgb;return new Hi(i[0]+A*(n[0]-i[0]),i[1]+A*(n[1]-i[1]),i[2]+A*(n[2]-i[2]),"rgb")};var Pi=w,Vi=Math.sqrt,Ki=Math.pow;Ti.lrgb=function(e,t,A){var i=e._rgb,n=i[0],a=i[1],r=i[2],s=t._rgb,o=s[0],l=s[1],c=s[2];return new Pi(Vi(Ki(n,2)*(1-A)+Ki(o,2)*A),Vi(Ki(a,2)*(1-A)+Ki(l,2)*A),Vi(Ki(r,2)*(1-A)+Ki(c,2)*A),"rgb")};var Gi=w;Ti.lab=function(e,t,A){var i=e.lab(),n=t.lab();return new Gi(i[0]+A*(n[0]-i[0]),i[1]+A*(n[1]-i[1]),i[2]+A*(n[2]-i[2]),"lab")};var Wi=w,zi=function(e,t,A,i){var n,a,r,s,o,l,c,d,h,u,g,p,m;return"hsl"===i?(r=e.hsl(),s=t.hsl()):"hsv"===i?(r=e.hsv(),s=t.hsv()):"hcg"===i?(r=e.hcg(),s=t.hcg()):"hsi"===i?(r=e.hsi(),s=t.hsi()):"lch"===i||"hcl"===i?(i="hcl",r=e.hcl(),s=t.hcl()):"oklch"===i&&(r=e.oklch().reverse(),s=t.oklch().reverse()),"h"!==i.substr(0,1)&&"oklch"!==i||(o=(n=r)[0],c=n[1],h=n[2],l=(a=s)[0],d=a[1],u=a[2]),isNaN(o)||isNaN(l)?isNaN(o)?isNaN(l)?p=Number.NaN:(p=l,1!=h&&0!=h||"hsv"==i||(g=d)):(p=o,1!=u&&0!=u||"hsv"==i||(g=c)):p=o+A*(l>o&&l-o>180?l-(o+360):l<o&&o-l>180?l+360-o:l-o),void 0===g&&(g=c+A*(d-c)),m=h+A*(u-h),new Wi("oklch"===i?[m,g,p]:[p,g,m],i)},Xi=zi,Yi=function(e,t,A){return Xi(e,t,A,"lch")};Ti.lch=Yi,Ti.hcl=Yi;var ji=w;Ti.num=function(e,t,A){var i=e.num(),n=t.num();return new ji(i+A*(n-i),"num")};var _i=zi;Ti.hcg=function(e,t,A){return _i(e,t,A,"hcg")};var Ji=zi;Ti.hsi=function(e,t,A){return Ji(e,t,A,"hsi")};var Zi=zi;Ti.hsl=function(e,t,A){return Zi(e,t,A,"hsl")};var qi=zi;Ti.hsv=function(e,t,A){return qi(e,t,A,"hsv")};var $i=w;Ti.oklab=function(e,t,A){var i=e.oklab(),n=t.oklab();return new $i(i[0]+A*(n[0]-i[0]),i[1]+A*(n[1]-i[1]),i[2]+A*(n[2]-i[2]),"oklab")};var en=zi;Ti.oklch=function(e,t,A){return en(e,t,A,"oklch")};var tn=w,An=c.clip_rgb,nn=Math.pow,an=Math.sqrt,rn=Math.PI,sn=Math.cos,on=Math.sin,ln=Math.atan2,cn=function(e,t){for(var A=e.length,i=[0,0,0,0],n=0;n<e.length;n++){var a=e[n],r=t[n]/A,s=a._rgb;i[0]+=nn(s[0],2)*r,i[1]+=nn(s[1],2)*r,i[2]+=nn(s[2],2)*r,i[3]+=s[3]*r}return i[0]=an(i[0]),i[1]=an(i[1]),i[2]=an(i[2]),i[3]>.9999999&&(i[3]=1),new tn(An(i))},dn=E,hn=c.type,un=Math.pow,gn=function(e){var t="rgb",A=dn("#ccc"),i=0,n=[0,1],a=[],r=[0,0],s=!1,o=[],l=!1,c=0,d=1,h=!1,u={},g=!0,p=1,m=function(e){if((e=e||["#fff","#000"])&&"string"===hn(e)&&dn.brewer&&dn.brewer[e.toLowerCase()]&&(e=dn.brewer[e.toLowerCase()]),"array"===hn(e)){1===e.length&&(e=[e[0],e[0]]),e=e.slice(0);for(var t=0;t<e.length;t++)e[t]=dn(e[t]);a.length=0;for(var A=0;A<e.length;A++)a.push(A/(e.length-1))}return B(),o=e},w=function(e){return e},f=function(e){return e},E=function(e,i){var n,l;if(null==i&&(i=!1),isNaN(e)||null===e)return A;l=i?e:s&&s.length>2?function(e){if(null!=s){for(var t=s.length-1,A=0;A<t&&e>=s[A];)A++;return A-1}return 0}(e)/(s.length-2):d!==c?(e-c)/(d-c):1,l=f(l),i||(l=w(l)),1!==p&&(l=un(l,p)),l=r[0]+l*(1-r[0]-r[1]),l=Math.min(1,Math.max(0,l));var h=Math.floor(1e4*l);if(g&&u[h])n=u[h];else{if("array"===hn(o))for(var m=0;m<a.length;m++){var E=a[m];if(l<=E){n=o[m];break}if(l>=E&&m===a.length-1){n=o[m];break}if(l>E&&l<a[m+1]){l=(l-E)/(a[m+1]-E),n=dn.interpolate(o[m],o[m+1],l,t);break}}else"function"===hn(o)&&(n=o(l));g&&(u[h]=n)}return n},B=function(){return u={}};m(e);var b=function(e){var t=dn(E(e));return l&&t[l]?t[l]():t};return b.classes=function(e){if(null!=e){if("array"===hn(e))s=e,n=[e[0],e[e.length-1]];else{var t=dn.analyze(n);s=0===e?[t.min,t.max]:dn.limits(t,"e",e)}return b}return s},b.domain=function(e){if(!arguments.length)return n;c=e[0],d=e[e.length-1],a=[];var t=o.length;if(e.length===t&&c!==d)for(var A=0,i=Array.from(e);A<i.length;A+=1){var r=i[A];a.push((r-c)/(d-c))}else{for(var s=0;s<t;s++)a.push(s/(t-1));if(e.length>2){var l=e.map((function(t,A){return A/(e.length-1)})),h=e.map((function(e){return(e-c)/(d-c)}));h.every((function(e,t){return l[t]===e}))||(f=function(e){if(e<=0||e>=1)return e;for(var t=0;e>=h[t+1];)t++;var A=(e-h[t])/(h[t+1]-h[t]);return l[t]+A*(l[t+1]-l[t])})}}return n=[c,d],b},b.mode=function(e){return arguments.length?(t=e,B(),b):t},b.range=function(e,t){return m(e),b},b.out=function(e){return l=e,b},b.spread=function(e){return arguments.length?(i=e,b):i},b.correctLightness=function(e){return null==e&&(e=!0),h=e,B(),w=h?function(e){for(var t=E(0,!0).lab()[0],A=E(1,!0).lab()[0],i=t>A,n=E(e,!0).lab()[0],a=t+(A-t)*e,r=n-a,s=0,o=1,l=20;Math.abs(r)>.01&&l-- >0;)i&&(r*=-1),r<0?(s=e,e+=.5*(o-e)):(o=e,e+=.5*(s-e)),r=(n=E(e,!0).lab()[0])-a;return e}:function(e){return e},b},b.padding=function(e){return null!=e?("number"===hn(e)&&(e=[e,e]),r=e,b):r},b.colors=function(t,A){arguments.length<2&&(A="hex");var i=[];if(0===arguments.length)i=o.slice(0);else if(1===t)i=[b(.5)];else if(t>1){var a=n[0],r=n[1]-a;i=pn(0,t,!1).map((function(e){return b(a+e/(t-1)*r)}))}else{e=[];var l=[];if(s&&s.length>2)for(var c=1,d=s.length,h=1<=d;h?c<d:c>d;h?c++:c--)l.push(.5*(s[c-1]+s[c]));else l=n;i=l.map((function(e){return b(e)}))}return dn[A]&&(i=i.map((function(e){return e[A]()}))),i},b.cache=function(e){return null!=e?(g=e,b):g},b.gamma=function(e){return null!=e?(p=e,b):p},b.nodata=function(e){return null!=e?(A=dn(e),b):A},b};function pn(e,t,A){for(var i=[],n=e<t,a=A?n?t+1:t-1:t,r=e;n?r<a:r>a;n?r++:r--)i.push(r);return i}var mn=w,wn=gn,fn=E,En=function(e,t,A){if(!En[A])throw new Error("unknown blend mode "+A);return En[A](e,t)},Bn=function(e){return function(t,A){var i=fn(A).rgb(),n=fn(t).rgb();return fn.rgb(e(i,n))}},bn=function(e){return function(t,A){var i=[];return i[0]=e(t[0],A[0]),i[1]=e(t[1],A[1]),i[2]=e(t[2],A[2]),i}};En.normal=Bn(bn((function(e){return e}))),En.multiply=Bn(bn((function(e,t){return e*t/255}))),En.screen=Bn(bn((function(e,t){return 255*(1-(1-e/255)*(1-t/255))}))),En.overlay=Bn(bn((function(e,t){return t<128?2*e*t/255:255*(1-2*(1-e/255)*(1-t/255))}))),En.darken=Bn(bn((function(e,t){return e>t?t:e}))),En.lighten=Bn(bn((function(e,t){return e>t?e:t}))),En.dodge=Bn(bn((function(e,t){return 255===e||(e=t/255*255/(1-e/255))>255?255:e}))),En.burn=Bn(bn((function(e,t){return 255*(1-(1-t/255)/(e/255))})));for(var vn=En,Cn=c.type,yn=c.clip_rgb,Fn=c.TWOPI,xn=Math.pow,Tn=Math.sin,Sn=Math.cos,In=E,Mn=w,kn=Math.floor,Un=Math.random,Qn=r,On=Math.log,Ln=Math.pow,Nn=Math.floor,Dn=Math.abs,Rn=function(e,t){void 0===t&&(t=null);var A={min:Number.MAX_VALUE,max:-1*Number.MAX_VALUE,sum:0,values:[],count:0};return"object"===Qn(e)&&(e=Object.values(e)),e.forEach((function(e){t&&"object"===Qn(e)&&(e=e[t]),null==e||isNaN(e)||(A.values.push(e),A.sum+=e,e<A.min&&(A.min=e),e>A.max&&(A.max=e),A.count+=1)})),A.domain=[A.min,A.max],A.limits=function(e,t){return Hn(A,e,t)},A},Hn=function(e,t,A){void 0===t&&(t="equal"),void 0===A&&(A=7),"array"==Qn(e)&&(e=Rn(e));var i=e.min,n=e.max,a=e.values.sort((function(e,t){return e-t}));if(1===A)return[i,n];var r=[];if("c"===t.substr(0,1)&&(r.push(i),r.push(n)),"e"===t.substr(0,1)){r.push(i);for(var s=1;s<A;s++)r.push(i+s/A*(n-i));r.push(n)}else if("l"===t.substr(0,1)){if(i<=0)throw new Error("Logarithmic scales are only possible for values > 0");var o=Math.LOG10E*On(i),l=Math.LOG10E*On(n);r.push(i);for(var c=1;c<A;c++)r.push(Ln(10,o+c/A*(l-o)));r.push(n)}else if("q"===t.substr(0,1)){r.push(i);for(var d=1;d<A;d++){var h=(a.length-1)*d/A,u=Nn(h);if(u===h)r.push(a[u]);else{var g=h-u;r.push(a[u]*(1-g)+a[u+1]*g)}}r.push(n)}else if("k"===t.substr(0,1)){var p,m=a.length,w=new Array(m),f=new Array(A),E=!0,B=0,b=null;(b=[]).push(i);for(var v=1;v<A;v++)b.push(i+v/A*(n-i));for(b.push(n);E;){for(var C=0;C<A;C++)f[C]=0;for(var y=0;y<m;y++)for(var F=a[y],x=Number.MAX_VALUE,T=void 0,S=0;S<A;S++){var I=Dn(b[S]-F);I<x&&(x=I,T=S),f[T]++,w[y]=T}for(var M=new Array(A),k=0;k<A;k++)M[k]=null;for(var U=0;U<m;U++)null===M[p=w[U]]?M[p]=a[U]:M[p]+=a[U];for(var Q=0;Q<A;Q++)M[Q]*=1/f[Q];E=!1;for(var O=0;O<A;O++)if(M[O]!==b[O]){E=!0;break}b=M,++B>200&&(E=!1)}for(var L={},N=0;N<A;N++)L[N]=[];for(var D=0;D<m;D++)L[p=w[D]].push(a[D]);for(var R=[],H=0;H<A;H++)R.push(L[H][0]),R.push(L[H][L[H].length-1]);R=R.sort((function(e,t){return e-t})),r.push(R[0]);for(var P=1;P<R.length;P+=2){var V=R[P];isNaN(V)||-1!==r.indexOf(V)||r.push(V)}}return r},Pn={analyze:Rn,limits:Hn},Vn=w,Kn=w,Gn=Math.sqrt,Wn=Math.pow,zn=Math.min,Xn=Math.max,Yn=Math.atan2,jn=Math.abs,_n=Math.cos,Jn=Math.sin,Zn=Math.exp,qn=Math.PI,$n=w,ea=w,ta=E,Aa=gn,ia={cool:function(){return Aa([ta.hsl(180,1,.9),ta.hsl(250,.7,.4)])},hot:function(){return Aa(["#000","#f00","#ff0","#fff"]).mode("rgb")}},na={OrRd:["#fff7ec","#fee8c8","#fdd49e","#fdbb84","#fc8d59","#ef6548","#d7301f","#b30000","#7f0000"],PuBu:["#fff7fb","#ece7f2","#d0d1e6","#a6bddb","#74a9cf","#3690c0","#0570b0","#045a8d","#023858"],BuPu:["#f7fcfd","#e0ecf4","#bfd3e6","#9ebcda","#8c96c6","#8c6bb1","#88419d","#810f7c","#4d004b"],Oranges:["#fff5eb","#fee6ce","#fdd0a2","#fdae6b","#fd8d3c","#f16913","#d94801","#a63603","#7f2704"],BuGn:["#f7fcfd","#e5f5f9","#ccece6","#99d8c9","#66c2a4","#41ae76","#238b45","#006d2c","#00441b"],YlOrBr:["#ffffe5","#fff7bc","#fee391","#fec44f","#fe9929","#ec7014","#cc4c02","#993404","#662506"],YlGn:["#ffffe5","#f7fcb9","#d9f0a3","#addd8e","#78c679","#41ab5d","#238443","#006837","#004529"],Reds:["#fff5f0","#fee0d2","#fcbba1","#fc9272","#fb6a4a","#ef3b2c","#cb181d","#a50f15","#67000d"],RdPu:["#fff7f3","#fde0dd","#fcc5c0","#fa9fb5","#f768a1","#dd3497","#ae017e","#7a0177","#49006a"],Greens:["#f7fcf5","#e5f5e0","#c7e9c0","#a1d99b","#74c476","#41ab5d","#238b45","#006d2c","#00441b"],YlGnBu:["#ffffd9","#edf8b1","#c7e9b4","#7fcdbb","#41b6c4","#1d91c0","#225ea8","#253494","#081d58"],Purples:["#fcfbfd","#efedf5","#dadaeb","#bcbddc","#9e9ac8","#807dba","#6a51a3","#54278f","#3f007d"],GnBu:["#f7fcf0","#e0f3db","#ccebc5","#a8ddb5","#7bccc4","#4eb3d3","#2b8cbe","#0868ac","#084081"],Greys:["#ffffff","#f0f0f0","#d9d9d9","#bdbdbd","#969696","#737373","#525252","#252525","#000000"],YlOrRd:["#ffffcc","#ffeda0","#fed976","#feb24c","#fd8d3c","#fc4e2a","#e31a1c","#bd0026","#800026"],PuRd:["#f7f4f9","#e7e1ef","#d4b9da","#c994c7","#df65b0","#e7298a","#ce1256","#980043","#67001f"],Blues:["#f7fbff","#deebf7","#c6dbef","#9ecae1","#6baed6","#4292c6","#2171b5","#08519c","#08306b"],PuBuGn:["#fff7fb","#ece2f0","#d0d1e6","#a6bddb","#67a9cf","#3690c0","#02818a","#016c59","#014636"],Viridis:["#440154","#482777","#3f4a8a","#31678e","#26838f","#1f9d8a","#6cce5a","#b6de2b","#fee825"],Spectral:["#9e0142","#d53e4f","#f46d43","#fdae61","#fee08b","#ffffbf","#e6f598","#abdda4","#66c2a5","#3288bd","#5e4fa2"],RdYlGn:["#a50026","#d73027","#f46d43","#fdae61","#fee08b","#ffffbf","#d9ef8b","#a6d96a","#66bd63","#1a9850","#006837"],RdBu:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#f7f7f7","#d1e5f0","#92c5de","#4393c3","#2166ac","#053061"],PiYG:["#8e0152","#c51b7d","#de77ae","#f1b6da","#fde0ef","#f7f7f7","#e6f5d0","#b8e186","#7fbc41","#4d9221","#276419"],PRGn:["#40004b","#762a83","#9970ab","#c2a5cf","#e7d4e8","#f7f7f7","#d9f0d3","#a6dba0","#5aae61","#1b7837","#00441b"],RdYlBu:["#a50026","#d73027","#f46d43","#fdae61","#fee090","#ffffbf","#e0f3f8","#abd9e9","#74add1","#4575b4","#313695"],BrBG:["#543005","#8c510a","#bf812d","#dfc27d","#f6e8c3","#f5f5f5","#c7eae5","#80cdc1","#35978f","#01665e","#003c30"],RdGy:["#67001f","#b2182b","#d6604d","#f4a582","#fddbc7","#ffffff","#e0e0e0","#bababa","#878787","#4d4d4d","#1a1a1a"],PuOr:["#7f3b08","#b35806","#e08214","#fdb863","#fee0b6","#f7f7f7","#d8daeb","#b2abd2","#8073ac","#542788","#2d004b"],Set2:["#66c2a5","#fc8d62","#8da0cb","#e78ac3","#a6d854","#ffd92f","#e5c494","#b3b3b3"],Accent:["#7fc97f","#beaed4","#fdc086","#ffff99","#386cb0","#f0027f","#bf5b17","#666666"],Set1:["#e41a1c","#377eb8","#4daf4a","#984ea3","#ff7f00","#ffff33","#a65628","#f781bf","#999999"],Set3:["#8dd3c7","#ffffb3","#bebada","#fb8072","#80b1d3","#fdb462","#b3de69","#fccde5","#d9d9d9","#bc80bd","#ccebc5","#ffed6f"],Dark2:["#1b9e77","#d95f02","#7570b3","#e7298a","#66a61e","#e6ab02","#a6761d","#666666"],Paired:["#a6cee3","#1f78b4","#b2df8a","#33a02c","#fb9a99","#e31a1c","#fdbf6f","#ff7f00","#cab2d6","#6a3d9a","#ffff99","#b15928"],Pastel2:["#b3e2cd","#fdcdac","#cbd5e8","#f4cae4","#e6f5c9","#fff2ae","#f1e2cc","#cccccc"],Pastel1:["#fbb4ae","#b3cde3","#ccebc5","#decbe4","#fed9a6","#ffffcc","#e5d8bd","#fddaec","#f2f2f2"]},aa=0,ra=Object.keys(na);aa<ra.length;aa+=1){var sa=ra[aa];na[sa.toLowerCase()]=na[sa]}var oa=na,la=E;return la.average=function(e,t,A){void 0===t&&(t="lrgb"),void 0===A&&(A=null);var i=e.length;A||(A=Array.from(new Array(i)).map((function(){return 1})));var n=i/A.reduce((function(e,t){return e+t}));if(A.forEach((function(e,t){A[t]*=n})),e=e.map((function(e){return new tn(e)})),"lrgb"===t)return cn(e,A);for(var a=e.shift(),r=a.get(t),s=[],o=0,l=0,c=0;c<r.length;c++)if(r[c]=(r[c]||0)*A[0],s.push(isNaN(r[c])?0:A[0]),"h"===t.charAt(c)&&!isNaN(r[c])){var d=r[c]/180*rn;o+=sn(d)*A[0],l+=on(d)*A[0]}var h=a.alpha()*A[0];e.forEach((function(e,i){var n=e.get(t);h+=e.alpha()*A[i+1];for(var a=0;a<r.length;a++)if(!isNaN(n[a]))if(s[a]+=A[i+1],"h"===t.charAt(a)){var c=n[a]/180*rn;o+=sn(c)*A[i+1],l+=on(c)*A[i+1]}else r[a]+=n[a]*A[i+1]}));for(var u=0;u<r.length;u++)if("h"===t.charAt(u)){for(var g=ln(l/s[u],o/s[u])/rn*180;g<0;)g+=360;for(;g>=360;)g-=360;r[u]=g}else r[u]=r[u]/s[u];return h/=i,new tn(r,t).alpha(h>.99999?1:h,!0)},la.bezier=function(e){var t=function(e){var t,A,i,n,a,r,s;if(e=e.map((function(e){return new mn(e)})),2===e.length)t=e.map((function(e){return e.lab()})),a=t[0],r=t[1],n=function(e){var t=[0,1,2].map((function(t){return a[t]+e*(r[t]-a[t])}));return new mn(t,"lab")};else if(3===e.length)A=e.map((function(e){return e.lab()})),a=A[0],r=A[1],s=A[2],n=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*a[t]+2*(1-e)*e*r[t]+e*e*s[t]}));return new mn(t,"lab")};else if(4===e.length){var o;i=e.map((function(e){return e.lab()})),a=i[0],r=i[1],s=i[2],o=i[3],n=function(e){var t=[0,1,2].map((function(t){return(1-e)*(1-e)*(1-e)*a[t]+3*(1-e)*(1-e)*e*r[t]+3*(1-e)*e*e*s[t]+e*e*e*o[t]}));return new mn(t,"lab")}}else{if(!(e.length>=5))throw new RangeError("No point in running bezier with only one color.");var l,c,d;l=e.map((function(e){return e.lab()})),d=e.length-1,c=function(e){for(var t=[1,1],A=1;A<e;A++){for(var i=[1],n=1;n<=t.length;n++)i[n]=(t[n]||0)+t[n-1];t=i}return t}(d),n=function(e){var t=1-e,A=[0,1,2].map((function(A){return l.reduce((function(i,n,a){return i+c[a]*Math.pow(t,d-a)*Math.pow(e,a)*n[A]}),0)}));return new mn(A,"lab")}}return n}(e);return t.scale=function(){return wn(t)},t},la.blend=vn,la.cubehelix=function(e,t,A,i,n){void 0===e&&(e=300),void 0===t&&(t=-1.5),void 0===A&&(A=1),void 0===i&&(i=1),void 0===n&&(n=[0,1]);var a,r=0;"array"===Cn(n)?a=n[1]-n[0]:(a=0,n=[n,n]);var s=function(s){var o=Fn*((e+120)/360+t*s),l=xn(n[0]+a*s,i),c=(0!==r?A[0]+s*r:A)*l*(1-l)/2,d=Sn(o),h=Tn(o);return In(yn([255*(l+c*(-.14861*d+1.78277*h)),255*(l+c*(-.29227*d-.90649*h)),255*(l+c*(1.97294*d)),1]))};return s.start=function(t){return null==t?e:(e=t,s)},s.rotations=function(e){return null==e?t:(t=e,s)},s.gamma=function(e){return null==e?i:(i=e,s)},s.hue=function(e){return null==e?A:("array"===Cn(A=e)?0==(r=A[1]-A[0])&&(A=A[1]):r=0,s)},s.lightness=function(e){return null==e?n:("array"===Cn(e)?(n=e,a=e[1]-e[0]):(n=[e,e],a=0),s)},s.scale=function(){return In.scale(s)},s.hue(A),s},la.mix=la.interpolate=ki,la.random=function(){for(var e="#",t=0;t<6;t++)e+="0123456789abcdef".charAt(kn(16*Un()));return new Mn(e,"hex")},la.scale=gn,la.analyze=Pn.analyze,la.contrast=function(e,t){e=new Vn(e),t=new Vn(t);var A=e.luminance(),i=t.luminance();return A>i?(A+.05)/(i+.05):(i+.05)/(A+.05)},la.deltaE=function(e,t,A,i,n){void 0===A&&(A=1),void 0===i&&(i=1),void 0===n&&(n=1);var a=function(e){return 360*e/(2*qn)},r=function(e){return 2*qn*e/360};e=new Kn(e),t=new Kn(t);var s=Array.from(e.lab()),o=s[0],l=s[1],c=s[2],d=Array.from(t.lab()),h=d[0],u=d[1],g=d[2],p=(o+h)/2,m=(Gn(Wn(l,2)+Wn(c,2))+Gn(Wn(u,2)+Wn(g,2)))/2,w=.5*(1-Gn(Wn(m,7)/(Wn(m,7)+Wn(25,7)))),f=l*(1+w),E=u*(1+w),B=Gn(Wn(f,2)+Wn(c,2)),b=Gn(Wn(E,2)+Wn(g,2)),v=(B+b)/2,C=a(Yn(c,f)),y=a(Yn(g,E)),F=C>=0?C:C+360,x=y>=0?y:y+360,T=jn(F-x)>180?(F+x+360)/2:(F+x)/2,S=1-.17*_n(r(T-30))+.24*_n(r(2*T))+.32*_n(r(3*T+6))-.2*_n(r(4*T-63)),I=x-F;I=jn(I)<=180?I:x<=F?I+360:I-360,I=2*Gn(B*b)*Jn(r(I)/2);var M=h-o,k=b-B,U=1+.015*Wn(p-50,2)/Gn(20+Wn(p-50,2)),Q=1+.045*v,O=1+.015*v*S,L=30*Zn(-Wn((T-275)/25,2)),N=-2*Gn(Wn(v,7)/(Wn(v,7)+Wn(25,7)))*Jn(2*r(L)),D=Gn(Wn(M/(A*U),2)+Wn(k/(i*Q),2)+Wn(I/(n*O),2)+N*(k/(i*Q))*(I/(n*O)));return Xn(0,zn(100,D))},la.distance=function(e,t,A){void 0===A&&(A="lab"),e=new $n(e),t=new $n(t);var i=e.get(A),n=t.get(A),a=0;for(var r in i){var s=(i[r]||0)-(n[r]||0);a+=s*s}return Math.sqrt(a)},la.limits=Pn.limits,la.valid=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];try{return new(Function.prototype.bind.apply(ea,[null].concat(e))),!0}catch(e){return!1}},la.scales=ia,la.colors=dA,la.brewer=oa,la}();var chroma=chromaExports;function hexWithAlpha(e,t){return chroma(e).alpha(t).css()}function has(e,t){return e.hasAttribute(t)}function get(e,t,A){return e.getAttribute(t)||A||""}function getNum(e,t,A){const i=Number(get(e,t));return Number.isNaN(i)?A||0:i}const attrHandlers={stroke:({el:e,exVals:t})=>{const A=get(e,"stroke");t.strokeColor=has(e,"stroke-opacity")?hexWithAlpha(A,getNum(e,"stroke-opacity")):A},"stroke-opacity":({el:e,exVals:t})=>{t.strokeColor=hexWithAlpha(get(e,"stroke","#000000"),getNum(e,"stroke-opacity"))},"stroke-width":({el:e,exVals:t})=>{t.strokeWidth=getNum(e,"stroke-width")},fill:({el:e,exVals:t})=>{const A=get(e,"fill");t.backgroundColor="none"===A?"#00000000":A},"fill-opacity":({el:e,exVals:t})=>{t.backgroundColor=hexWithAlpha(get(e,"fill","#000000"),getNum(e,"fill-opacity"))},opacity:({el:e,exVals:t})=>{t.opacity=getNum(e,"opacity",100)}};function presAttrsToElementValues(e){return[...e.attributes].reduce(((t,A)=>{const i=A.name;return Object.keys(attrHandlers).includes(i)&&attrHandlers[i]({el:e,exVals:t}),t}),{})}function filterAttrsToElementValues(e){const t={};return has(e,"x")&&(t.x=getNum(e,"x")),has(e,"y")&&(t.y=getNum(e,"y")),has(e,"width")&&(t.width=getNum(e,"width")),has(e,"height")&&(t.height=getNum(e,"height")),t}function pointsAttrToPoints(e){let t=[];return has(e,"points")&&(t=get(e,"points").split(" ").map((e=>e.split(",").map(parseFloat)))),t}function getGroupAttrs(e){return e.reduce(((e,{element:t})=>{const A=presAttrsToElementValues(t);return Object.assign(Object.assign({},e),A)}),{})}class Group{constructor(e){this.id=randomId(),this.element=e}}function createExElement(){return{id:randomId(),x:0,y:0,strokeColor:"#000000",backgroundColor:"#000000",fillStyle:"solid",strokeWidth:1,strokeStyle:"solid",roundness:null,roughness:0,opacity:100,width:0,height:0,angle:0,seed:Math.floor(random.next()*2**31),version:0,versionNonce:0,isDeleted:!1,groupIds:[],boundElementIds:null}}function createExRect(){return Object.assign(Object.assign({},createExElement()),{type:"rectangle"})}function createExLine(){return Object.assign(Object.assign({},createExElement()),{type:"line",points:[]})}function createExEllipse(){return Object.assign(Object.assign({},createExElement()),{type:"ellipse"})}function createExDraw(){return Object.assign(Object.assign({},createExElement()),{type:"line",points:[]})}const transformFunctions={matrix:"matrix",matrix3d:"matrix3d",perspective:"perspective",rotate:"rotate",rotate3d:"rotate3d",rotateX:"rotateX",rotateY:"rotateY",rotateZ:"rotateZ",scale:"scale",scale3d:"scale3d",scaleX:"scaleX",scaleY:"scaleY",scaleZ:"scaleZ",skew:"skew",skewX:"skewX",skewY:"skewY",translate:"translate",translate3d:"translate3d",translateX:"translateX",translateY:"translateY",translateZ:"translateZ"},transformFunctionsArr=Object.keys(transformFunctions),defaultUnits={matrix:"",matrix3d:"",perspective:"perspective",rotate:"deg",rotate3d:"deg",rotateX:"deg",rotateY:"deg",rotateZ:"deg",scale:"",scale3d:"",scaleX:"",scaleY:"",scaleZ:"",skew:"skew",skewX:"deg",skewY:"deg",translate:"px",translate3d:"px",translateX:"px",translateY:"px",translateZ:"px"},svgTransformToCSSTransform=e=>{const t=e.match(/(\w+)\(([^)]*)\)/g);if(!t)return"";const A=t.map((e=>{const t=e.split("(")[0];if(!t)throw new Error("Unable to find transform name");if(!transformFunctionsArr.includes(t))throw new Error(`transform function name "${t}" is not valid`);const A=e.match(/([-+]?[0-9]*\.?[0-9]+)([a-z])*/g);if(!A)return{type:t,values:[]};let i=A.map((e=>{const[A,i]=e.matchAll(/([-+]?[0-9]*\.?[0-9]+)|([a-z])*/g);return{unit:i[0]||defaultUnits[t],value:A[0]}}));return i&&"rotate"===t&&(null==i?void 0:i.length)>1&&(i=[i[0]]),{type:t,values:i}}));return A.map((({type:e,values:t})=>`${e}(${t.map((({unit:e,value:t})=>`${t}${e}`)).join(", ")})`)).join(" ")};function getElementMatrix(e){if(e.hasAttribute("transform")){const t=new DOMMatrix(svgTransformToCSSTransform(e.getAttribute("transform")||""));return multiply(create$1(),create$1(),t.toFloat32Array())}return create$1()}function getTransformMatrix(e,t){return t.map((({element:e})=>getElementMatrix(e))).concat([getElementMatrix(e)]).reduce(((e,t)=>multiply(e,e,t)),create$1())}function transformPoints(e,t){return e.map((([e,A])=>{const[i,n]=transformMat4(create(),fromValues(e,A,1),t);return[i,n]}))}function distance(e,t){return Math.sqrt(distanceSq(e,t))}function distanceSq(e,t){return Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2)}function distanceToSegmentSq(e,t,A){const i=distanceSq(t,A);if(0===i)return distanceSq(e,t);let n=((e[0]-t[0])*(A[0]-t[0])+(e[1]-t[1])*(A[1]-t[1]))/i;return n=Math.max(0,Math.min(1,n)),distanceSq(e,lerp(t,A,n))}function lerp(e,t,A){return[e[0]+(t[0]-e[0])*A,e[1]+(t[1]-e[1])*A]}function flatness(e,t){const A=e[t+0],i=e[t+1],n=e[t+2],a=e[t+3];let r=3*i[0]-2*A[0]-a[0];r*=r;let s=3*i[1]-2*A[1]-a[1];s*=s;let o=3*n[0]-2*a[0]-A[0];o*=o;let l=3*n[1]-2*a[1]-A[1];return l*=l,r<o&&(r=o),s<l&&(s=l),r+s}function getPointsOnBezierCurveWithSplitting(e,t,A,i){const n=i||[];if(flatness(e,t)<A){const A=e[t+0];n.length?distance(n[n.length-1],A)>1&&n.push(A):n.push(A),n.push(e[t+3])}else{const i=.5,a=e[t+0],r=e[t+1],s=e[t+2],o=e[t+3],l=lerp(a,r,i),c=lerp(r,s,i),d=lerp(s,o,i),h=lerp(l,c,i),u=lerp(c,d,i),g=lerp(h,u,i);getPointsOnBezierCurveWithSplitting([a,l,h,g],0,A,n),getPointsOnBezierCurveWithSplitting([g,u,d,o],0,A,n)}return n}function simplify(e,t){return simplifyPoints(e,0,e.length,t)}function simplifyPoints(e,t,A,i,n){const a=n||[],r=e[t],s=e[A-1];let o=0,l=1;for(let i=t+1;i<A-1;++i){const t=distanceToSegmentSq(e[i],r,s);t>o&&(o=t,l=i)}return Math.sqrt(o)>i?(simplifyPoints(e,t,l+1,i,a),simplifyPoints(e,l,A,i,a)):(a.length||a.push(r),a.push(s)),a}function pointsOnBezierCurves(e,t=.15,A){const i=[],n=(e.length-1)/3;for(let A=0;A<n;A++)getPointsOnBezierCurveWithSplitting(e,3*A,t,i);return A&&A>0?simplifyPoints(i,0,i.length,A):i}const COMMAND=0,NUMBER=1,EOD=2,PARAMS={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function tokenize(e){const t=new Array;for(;""!==e;)if(e.match(/^([ \t\r\n,]+)/))e=e.substr(RegExp.$1.length);else if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:0,text:RegExp.$1},e=e.substr(RegExp.$1.length);else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:1,text:`${parseFloat(RegExp.$1)}`},e=e.substr(RegExp.$1.length)}return t[t.length]={type:2,text:""},t}function isType(e,t){return e.type===t}function parsePath(e){const t=[],A=tokenize(e);let i="BOD",n=0,a=A[n];for(;!isType(a,2);){let r=0;const s=[];if("BOD"===i){if("M"!==a.text&&"m"!==a.text)return parsePath("M0,0"+e);n++,r=PARAMS[a.text],i=a.text}else isType(a,1)?r=PARAMS[i]:(n++,r=PARAMS[a.text],i=a.text);if(!(n+r<A.length))throw new Error("Path data ended short");for(let e=n;e<n+r;e++){const t=A[e];if(!isType(t,1))throw new Error("Param not a number: "+i+","+t.text);s[s.length]=+t.text}if("number"!=typeof PARAMS[i])throw new Error("Bad segment: "+i);{const e={key:i,data:s};t.push(e),n+=r,a=A[n],"M"===i&&(i="L"),"m"===i&&(i="l")}}return t}function absolutize(e){let t=0,A=0,i=0,n=0;const a=[];for(const{key:r,data:s}of e)switch(r){case"M":a.push({key:"M",data:[...s]}),[t,A]=s,[i,n]=s;break;case"m":t+=s[0],A+=s[1],a.push({key:"M",data:[t,A]}),i=t,n=A;break;case"L":a.push({key:"L",data:[...s]}),[t,A]=s;break;case"l":t+=s[0],A+=s[1],a.push({key:"L",data:[t,A]});break;case"C":a.push({key:"C",data:[...s]}),t=s[4],A=s[5];break;case"c":{const e=s.map(((e,i)=>i%2?e+A:e+t));a.push({key:"C",data:e}),t=e[4],A=e[5];break}case"Q":a.push({key:"Q",data:[...s]}),t=s[2],A=s[3];break;case"q":{const e=s.map(((e,i)=>i%2?e+A:e+t));a.push({key:"Q",data:e}),t=e[2],A=e[3];break}case"A":a.push({key:"A",data:[...s]}),t=s[5],A=s[6];break;case"a":t+=s[5],A+=s[6],a.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],t,A]});break;case"H":a.push({key:"H",data:[...s]}),t=s[0];break;case"h":t+=s[0],a.push({key:"H",data:[t]});break;case"V":a.push({key:"V",data:[...s]}),A=s[0];break;case"v":A+=s[0],a.push({key:"V",data:[A]});break;case"S":a.push({key:"S",data:[...s]}),t=s[2],A=s[3];break;case"s":{const e=s.map(((e,i)=>i%2?e+A:e+t));a.push({key:"S",data:e}),t=e[2],A=e[3];break}case"T":a.push({key:"T",data:[...s]}),t=s[0],A=s[1];break;case"t":t+=s[0],A+=s[1],a.push({key:"T",data:[t,A]});break;case"Z":case"z":a.push({key:"Z",data:[]}),t=i,A=n}return a}function normalize(e){const t=[];let A="",i=0,n=0,a=0,r=0,s=0,o=0;for(const{key:l,data:c}of e){switch(l){case"M":t.push({key:"M",data:[...c]}),[i,n]=c,[a,r]=c;break;case"C":t.push({key:"C",data:[...c]}),i=c[4],n=c[5],s=c[2],o=c[3];break;case"L":t.push({key:"L",data:[...c]}),[i,n]=c;break;case"H":i=c[0],t.push({key:"L",data:[i,n]});break;case"V":n=c[0],t.push({key:"L",data:[i,n]});break;case"S":{let e=0,a=0;"C"===A||"S"===A?(e=i+(i-s),a=n+(n-o)):(e=i,a=n),t.push({key:"C",data:[e,a,...c]}),s=c[0],o=c[1],i=c[2],n=c[3];break}case"T":{const[e,a]=c;let r=0,l=0;"Q"===A||"T"===A?(r=i+(i-s),l=n+(n-o)):(r=i,l=n);const d=i+2*(r-i)/3,h=n+2*(l-n)/3,u=e+2*(r-e)/3,g=a+2*(l-a)/3;t.push({key:"C",data:[d,h,u,g,e,a]}),s=r,o=l,i=e,n=a;break}case"Q":{const[e,A,a,r]=c,l=i+2*(e-i)/3,d=n+2*(A-n)/3,h=a+2*(e-a)/3,u=r+2*(A-r)/3;t.push({key:"C",data:[l,d,h,u,a,r]}),s=e,o=A,i=a,n=r;break}case"A":{const e=Math.abs(c[0]),A=Math.abs(c[1]),a=c[2],r=c[3],s=c[4],o=c[5],l=c[6];0===e||0===A?(t.push({key:"C",data:[i,n,o,l,o,l]}),i=o,n=l):i===o&&n===l||(arcToCubicCurves(i,n,o,l,e,A,a,r,s).forEach((function(e){t.push({key:"C",data:e})})),i=o,n=l);break}case"Z":t.push({key:"Z",data:[]}),i=a,n=r}A=l}return t}function degToRad(e){return Math.PI*e/180}function rotate(e,t,A){return[e*Math.cos(A)-t*Math.sin(A),e*Math.sin(A)+t*Math.cos(A)]}function arcToCubicCurves(e,t,A,i,n,a,r,s,o,l){const c=degToRad(r);let d=[],h=0,u=0,g=0,p=0;if(l)[h,u,g,p]=l;else{[e,t]=rotate(e,t,-c),[A,i]=rotate(A,i,-c);const r=(e-A)/2,l=(t-i)/2;let d=r*r/(n*n)+l*l/(a*a);d>1&&(d=Math.sqrt(d),n*=d,a*=d);const m=n*n,w=a*a,f=m*w-m*l*l-w*r*r,E=m*l*l+w*r*r,B=(s===o?-1:1)*Math.sqrt(Math.abs(f/E));g=B*n*l/a+(e+A)/2,p=B*-a*r/n+(t+i)/2,h=Math.asin(parseFloat(((t-p)/a).toFixed(9))),u=Math.asin(parseFloat(((i-p)/a).toFixed(9))),e<g&&(h=Math.PI-h),A<g&&(u=Math.PI-u),h<0&&(h=2*Math.PI+h),u<0&&(u=2*Math.PI+u),o&&h>u&&(h-=2*Math.PI),!o&&u>h&&(u-=2*Math.PI)}let m=u-h;if(Math.abs(m)>120*Math.PI/180){const e=u,t=A,s=i;u=o&&u>h?h+120*Math.PI/180*1:h+120*Math.PI/180*-1,d=arcToCubicCurves(A=g+n*Math.cos(u),i=p+a*Math.sin(u),t,s,n,a,r,0,o,[u,e,g,p])}m=u-h;const w=Math.cos(h),f=Math.sin(h),E=Math.cos(u),B=Math.sin(u),b=Math.tan(m/4),v=4/3*n*b,C=4/3*a*b,y=[e,t],F=[e+v*f,t-C*w],x=[A+v*B,i-C*E],T=[A,i];if(F[0]=2*y[0]-F[0],F[1]=2*y[1]-F[1],l)return[F,x,T].concat(d);{d=[F,x,T].concat(d);const e=[];for(let t=0;t<d.length;t+=3){const A=rotate(d[t][0],d[t][1],c),i=rotate(d[t+1][0],d[t+1][1],c),n=rotate(d[t+2][0],d[t+2][1],c);e.push([A[0],A[1],i[0],i[1],n[0],n[1]])}return e}}function pointsOnPath(e,t,A){const i=normalize(absolutize(parsePath(e))),n=[];let a=[],r=[0,0],s=[];const o=()=>{s.length>=4&&a.push(...pointsOnBezierCurves(s,t)),s=[]},l=()=>{o(),a.length&&(n.push(a),a=[])};for(const{key:e,data:t}of i)switch(e){case"M":l(),r=[t[0],t[1]],a.push(r);break;case"L":o(),a.push([t[0],t[1]]);break;case"C":if(!s.length){const e=a.length?a[a.length-1]:r;s.push([e[0],e[1]])}s.push([t[0],t[1]]),s.push([t[2],t[3]]),s.push([t[4],t[5]]);break;case"Z":o(),a.push([r[0],r[1]])}if(l(),!A)return n;const c=[];for(const e of n){const t=simplify(e,A);t.length&&c.push(t)}return c}const SUPPORTED_TAGS=["svg","path","g","use","circle","ellipse","rect","polyline","polygon"],nodeValidator=e=>SUPPORTED_TAGS.includes(e.tagName)?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_REJECT;function createTreeWalker(e){return document.createTreeWalker(e,NodeFilter.SHOW_ALL,{acceptNode:nodeValidator})}const presAttrs=(e,t)=>Object.assign(Object.assign(Object.assign({},getGroupAttrs(t)),presAttrsToElementValues(e)),filterAttrsToElementValues(e)),skippedUseAttrs=["id"],allwaysPassedUseAttrs=["x","y","width","height","href","xlink:href"],getDefElWithCorrectAttrs=(e,t)=>[...t.attributes].reduce(((A,i)=>(skippedUseAttrs.includes(i.value)||e.hasAttribute(i.name)&&!allwaysPassedUseAttrs.includes(i.name)||A.setAttribute(i.name,t.getAttribute(i.name)||""),A)),e.cloneNode()),walkers={svg:e=>{walk(e,e.tw.nextNode())},g:e=>{const t=Object.assign(Object.assign({},e),{tw:createTreeWalker(e.tw.currentNode),groups:[...e.groups,new Group(e.tw.currentNode)]});walk(t,t.tw.nextNode()),walk(e,e.tw.nextSibling())},use:e=>{const{root:t,tw:A,scene:i}=e,n=A.currentNode,a=n.getAttribute("href")||n.getAttribute("xlink:href");if(!a)throw new Error("unable to get id of use element");const r=t.querySelector(a);if(!r)throw new Error(`unable to find def element with id: ${a}`);const s=new ExcalidrawScene,o=getDefElWithCorrectAttrs(r,n);walk(Object.assign(Object.assign({},e),{scene:s,tw:createTreeWalker(o)}),o);const l=s.elements.pop();l&&i.elements.push(l),walk(e,e.tw.nextNode())},circle:e=>{const{tw:t,scene:A,groups:i}=e,n=t.currentNode,a=getNum(n,"r",0),r=2*a,s=getNum(n,"x",0)+getNum(n,"cx",0)-a,o=getNum(n,"y",0)+getNum(n,"cy",0)-a,l=getTransformMatrix(n,i),c=fromValues$1(r,0,0,0,0,r,0,0,0,0,1,0,s,o,0,1),d=multiply(create$1(),l,c),h=Object.assign(Object.assign(Object.assign({},createExEllipse()),presAttrs(n,i)),{x:d[12],y:d[13],width:d[0],height:d[5],groupIds:i.map((e=>e.id))});A.elements.push(h),walk(e,t.nextNode())},ellipse:e=>{const{tw:t,scene:A,groups:i}=e,n=t.currentNode,a=getNum(n,"rx",0),r=getNum(n,"ry",0),s=getNum(n,"cx",0),o=getNum(n,"cy",0),l=getNum(n,"x",0)+s-a,c=getNum(n,"y",0)+o-r,d=2*a,h=2*r,u=getTransformMatrix(n,i),g=fromValues$1(d,0,0,0,0,h,0,0,0,0,1,0,l,c,0,1),p=multiply(create$1(),u,g),m=Object.assign(Object.assign(Object.assign({},createExEllipse()),presAttrs(n,i)),{x:p[12],y:p[13],width:p[0],height:p[5],groupIds:i.map((e=>e.id))});A.elements.push(m),walk(e,t.nextNode())},line:e=>{walk(e,e.tw.nextNode())},polygon:e=>{const{tw:t,scene:A,groups:i}=e,n=t.currentNode,a=transformPoints(pointsAttrToPoints(n),getTransformMatrix(n,i)),r=a[0][0],s=a[0][1],o=a.map((([e,t])=>[e-r,t-s])),[l,c]=dimensionsFromPoints(o),d=Object.assign(Object.assign(Object.assign(Object.assign({},createExLine()),getGroupAttrs(i)),presAttrsToElementValues(n)),{points:o.concat([[0,0]]),x:r,y:s,width:l,height:c});A.elements.push(d),walk(e,e.tw.nextNode())},polyline:e=>{const{tw:t,scene:A,groups:i}=e,n=t.currentNode,a=getTransformMatrix(n,i),r=transformPoints(pointsAttrToPoints(n),a),s=r[0][0],o=r[0][1],l=r.map((([e,t])=>[e-s,t-o])),[c,d]=dimensionsFromPoints(l),h=has(n,"fill"),u=get(n,"fill"),g=!h||h&&"none"!==u,p=Object.assign(Object.assign(Object.assign(Object.assign({},createExLine()),getGroupAttrs(i)),presAttrsToElementValues(n)),{points:l.concat(g?[[0,0]]:[]),x:s,y:o,width:c,height:d});A.elements.push(p),walk(e,e.tw.nextNode())},rect:e=>{const{tw:t,scene:A,groups:i}=e,n=t.currentNode,a=getNum(n,"x",0),r=getNum(n,"y",0),s=getNum(n,"width",0),o=getNum(n,"height",0),l=getTransformMatrix(n,i),c=fromValues$1(s,0,0,0,0,o,0,0,0,0,1,0,a,r,0,1),d=multiply(create$1(),l,c),h=n.hasAttribute("rx")||n.hasAttribute("ry"),u=Object.assign(Object.assign(Object.assign({},createExRect()),presAttrs(n,i)),{x:d[12],y:d[13],width:d[0],height:d[5],roundness:h?{type:ROUNDNESS.LEGACY}:null});A.elements.push(u),walk(e,e.tw.nextNode())},path:e=>{const{tw:t,scene:A,groups:i}=e,n=t.currentNode,a=getTransformMatrix(n,i),r=pointsOnPath(get(n,"d")),s=get(n,"fill","black"),o=get(n,"fill-rule","nonzero");let l=[],c=randomId();switch(o){case"nonzero":let e="clockwise";l=r.map(((t,A)=>{const r=transformPoints(t,clone(a)),o=r[0][0],l=r[0][1],[d,h]=dimensionsFromPoints(r),u=r.map((([e,t])=>[e-o,t-l])),g=getWindingOrder(u);0===A&&(e=g,c=randomId());let p=s;return e!==g&&(p="#FFFFFF"),Object.assign(Object.assign(Object.assign(Object.assign({},createExDraw()),{strokeWidth:0,strokeColor:"#00000000"}),presAttrs(n,i)),{points:u,backgroundColor:p,width:d,height:h,x:o+getNum(n,"x",0),y:l+getNum(n,"y",0),groupIds:[c]})}));break;case"evenodd":l=r.map(((e,t)=>{const A=transformPoints(e,clone(a)),r=A[0][0],s=A[0][1],[o,l]=dimensionsFromPoints(A),d=A.map((([e,t])=>[e-r,t-s]));return 0===t&&(c=randomId()),Object.assign(Object.assign(Object.assign({},createExDraw()),presAttrs(n,i)),{points:d,width:o,height:l,x:r+getNum(n,"x",0),y:s+getNum(n,"y",0)})}))}A.elements=A.elements.concat(l),walk(e,t.nextNode())}};function walk(e,t){if(!t)return;const A=t.nodeName;walkers[A]&&walkers[A](e)}const svgToExcalidraw=e=>{const t=(new DOMParser).parseFromString(e,"image/svg+xml"),A=t.querySelectorAll("parsererror"),i=A.length>0;let n=null;if(i)console.error("There were errors while parsing the given SVG: ",[...A].map((e=>e.innerHTML)));else{const e=createTreeWalker(t),A=new ExcalidrawScene;walk({tw:e,scene:A,groups:[],root:t},e.nextNode()),n=A.elements}return{hasErrors:i,errors:i?A:null,content:n}};B([r$d,z,e$a,l$3,b$1,v,h$1,i$5,i$4,h,u,c$1,s]);const GAP=4;class ExcalidrawAutomate{get obsidian(){return obsidian_module__namespace}get DEVICE(){return DEVICE}async getAttachmentFilepath(e){var t;if(!this.targetView||!(null===(t=this.targetView)||void 0===t?void 0:t.file))return errorMessage("targetView not set","getAttachmentFolderAndFilePath()"),null;const A=await getAttachmentsFolderAndFilePath(app,this.targetView.file.path,e);return getNewUniqueFilepath(app.vault,e,A.folder)}async newFilePrompt(e,t,A,i){var n;if(!this.targetView||!(null===(n=this.targetView)||void 0===n?void 0:n.file))return errorMessage("targetView not set","newFileActions()"),null;const a=emulateKeysForLinkClick(A),r=new NewFileActions(this.plugin,e,a,this.targetView,t,i);return r.open(),await r.waitForClose}getLeaf(e,t){const A=emulateKeysForLinkClick(null!=t?t:"new-tab");return getLeaf(this.plugin,e,A)}constructor(e,t){this.mostRecentMarkdownSVG=null,this.targetView=null,this.onViewUnloadHook=null,this.onViewModeChangeHook=null,this.onLinkHoverHook=null,this.onLinkClickHook=null,this.onDropHook=null,this.onPasteHook=null,this.onCanvasColorChangeHook=null,this.activeScript=null,this.plugin=e,this.reset(),this.targetView=t}getViewLastPointerPosition(){var e;return this.targetView&&(null===(e=this.targetView)||void 0===e?void 0:e._loaded)?this.targetView.currentPosition:(errorMessage("targetView not set","getExcalidrawAPI()"),null)}getAPI(e){return new ExcalidrawAutomate(this.plugin,e)}setFillStyle(e){switch(e){case 0:return this.style.fillStyle="hachure","hachure";case 1:return this.style.fillStyle="cross-hatch","cross-hatch";default:return this.style.fillStyle="solid","solid"}}setStrokeStyle(e){switch(e){case 0:return this.style.strokeStyle="solid","solid";case 1:return this.style.strokeStyle="dashed","dashed";default:return this.style.strokeStyle="dotted","dotted"}}setStrokeSharpness(e){return 0===e?(this.style.roundness={type:ROUNDNESS.LEGACY},"round"):(this.style.roundness=null,"sharp")}setFontFamily(e){switch(e){case 1:return this.style.fontFamily=4,getFontFamily(4);case 2:return this.style.fontFamily=2,getFontFamily(2);case 3:return this.style.fontFamily=3,getFontFamily(3);default:return this.style.fontFamily=1,getFontFamily(1)}}setTheme(e){return 0===e?(this.canvas.theme="light","light"):(this.canvas.theme="dark","dark")}addToGroup(e){const t=nanoid();return e.forEach((e=>{var A,i;null===(i=null===(A=this.elementsDict[e])||void 0===A?void 0:A.groupIds)||void 0===i||i.push(t)})),t}async toClipboard(e){const t=e?await getTemplate(this.plugin,e,!1,new EmbeddedFilesLoader(this.plugin),0):null;let A=t?t.elements:[];A=A.concat(this.getElements()),navigator.clipboard.writeText(JSON.stringify({type:"excalidraw/clipboard",elements:A}))}async getSceneFromFile(e){if(!e)return errorMessage("file not found","getScene()"),null;if(!this.isExcalidrawFile(e))return errorMessage("file is not an Excalidraw file","getScene()"),null;const t=await getTemplate(this.plugin,e.path,!1,new EmbeddedFilesLoader(this.plugin),0);return{elements:t.elements,appState:t.appState}}getElements(){const e=[],t=Object.keys(this.elementsDict);for(let A=0;A<t.length;A++)e.push(this.elementsDict[t[A]]);return e}getElement(e){return this.elementsDict[e]}async create(e){var t,A,i,n,a,r,s,o,l,c,d,h,u,g,p,m,w,f,E,B,b,v,C,y,F,x,T,S,I,M,k,U,Q,O,L,N,D,R,H;const P=(null==e?void 0:e.templatePath)?await getTemplate(this.plugin,e.templatePath,!0,new EmbeddedFilesLoader(this.plugin),0):null;let V,K=P?P.elements:[];if(K=K.concat(this.getElements()),null==e?void 0:e.frontmatterKeys){Object.keys(e.frontmatterKeys).includes("excalidraw-plugin")||(e.frontmatterKeys["excalidraw-plugin"]="parsed"),V="---\n\n";for(const t of Object.keys(e.frontmatterKeys))V+=`${t}: ${""===e.frontmatterKeys[t]?'""':e.frontmatterKeys[t]}\n`;V+="\n---\n"}else V=(null==P?void 0:P.frontmatter)?P.frontmatter:FRONTMATTER;const G={type:"excalidraw",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:K,appState:{theme:null!==(A=null===(t=null==P?void 0:P.appState)||void 0===t?void 0:t.theme)&&void 0!==A?A:this.canvas.theme,viewBackgroundColor:null!==(n=null===(i=null==P?void 0:P.appState)||void 0===i?void 0:i.viewBackgroundColor)&&void 0!==n?n:this.canvas.viewBackgroundColor,currentItemStrokeColor:null!==(r=null===(a=null==P?void 0:P.appState)||void 0===a?void 0:a.currentItemStrokeColor)&&void 0!==r?r:this.style.strokeColor,currentItemBackgroundColor:null!==(o=null===(s=null==P?void 0:P.appState)||void 0===s?void 0:s.currentItemBackgroundColor)&&void 0!==o?o:this.style.backgroundColor,currentItemFillStyle:null!==(c=null===(l=null==P?void 0:P.appState)||void 0===l?void 0:l.currentItemFillStyle)&&void 0!==c?c:this.style.fillStyle,currentItemStrokeWidth:null!==(h=null===(d=null==P?void 0:P.appState)||void 0===d?void 0:d.currentItemStrokeWidth)&&void 0!==h?h:this.style.strokeWidth,currentItemStrokeStyle:null!==(g=null===(u=null==P?void 0:P.appState)||void 0===u?void 0:u.currentItemStrokeStyle)&&void 0!==g?g:this.style.strokeStyle,currentItemRoughness:null!==(m=null===(p=null==P?void 0:P.appState)||void 0===p?void 0:p.currentItemRoughness)&&void 0!==m?m:this.style.roughness,currentItemOpacity:null!==(f=null===(w=null==P?void 0:P.appState)||void 0===w?void 0:w.currentItemOpacity)&&void 0!==f?f:this.style.opacity,currentItemFontFamily:null!==(B=null===(E=null==P?void 0:P.appState)||void 0===E?void 0:E.currentItemFontFamily)&&void 0!==B?B:this.style.fontFamily,currentItemFontSize:null!==(v=null===(b=null==P?void 0:P.appState)||void 0===b?void 0:b.currentItemFontSize)&&void 0!==v?v:this.style.fontSize,currentItemTextAlign:null!==(y=null===(C=null==P?void 0:P.appState)||void 0===C?void 0:C.currentItemTextAlign)&&void 0!==y?y:this.style.textAlign,currentItemStartArrowhead:null!==(x=null===(F=null==P?void 0:P.appState)||void 0===F?void 0:F.currentItemStartArrowhead)&&void 0!==x?x:this.style.startArrowHead,currentItemEndArrowhead:null!==(S=null===(T=null==P?void 0:P.appState)||void 0===T?void 0:T.currentItemEndArrowhead)&&void 0!==S?S:this.style.endArrowHead,currentItemRoundness:(null!==(O=null!==(U=null!==(M=null===(I=null==P?void 0:P.appState)||void 0===I?void 0:I.currentItemLinearStrokeSharpness)&&void 0!==M?M:null===(k=null==P?void 0:P.appState)||void 0===k?void 0:k.currentItemStrokeSharpness)&&void 0!==U?U:null===(Q=null==P?void 0:P.appState)||void 0===Q?void 0:Q.currentItemRoundness)&&void 0!==O?O:this.style.roundness)?"round":"sharp",gridSize:null!==(N=null===(L=null==P?void 0:P.appState)||void 0===L?void 0:L.gridSize)&&void 0!==N?N:this.canvas.gridSize,colorPalette:null!==(R=null===(D=null==P?void 0:P.appState)||void 0===D?void 0:D.colorPalette)&&void 0!==R?R:this.colorPalette},files:null!==(H=null==P?void 0:P.files)&&void 0!==H?H:{}};return this.plugin.createAndOpenDrawing((null==e?void 0:e.filename)?e.filename+(e.filename.endsWith(".md")?"":".excalidraw.md"):getDrawingFilename(this.plugin.settings),(null==e?void 0:e.onNewPane)&&e.onNewPane?"new-pane":"active-pane",(null==e?void 0:e.foldername)?e.foldername:this.plugin.settings.folder,this.plugin.settings.compatibilityMode?JSON.stringify(G,null,"\t"):V+(()=>{let t=e.plaintext?e.plaintext+"\n\n":"";const A=this.getElements().filter((e=>"text"===e.type));return t+="# Text Elements\n",A.forEach((e=>{var A,i;t+=`${null!==(A=e.rawText)&&void 0!==A?A:null!==(i=e.originalText)&&void 0!==i?i:e.text} ^${e.id}\n\n`})),this.getElements().filter((e=>"text"!==e.type&&e.link)).forEach((e=>{t+=`${e.link} ^${e.id}\n\n`})),t+=Object.keys(this.imagesDict).length>0?"\n# Embedded files\n":"",Object.keys(this.imagesDict).forEach((e=>{const A=this.imagesDict[e];A.latex?t+=`${e}: $$${A.latex}$$\n`:t+=`${e}: [[${A.file}]]\n`})),t})()+getMarkdownDrawingSection(JSON.stringify(G,null,"\t"),this.plugin.settings.compress))}async createSVG(e,t=!1,A,i,n,a){return n||(n=this.plugin.settings.previewMatchObsidianTheme?isObsidianThemeDark()?"dark":"light":this.plugin.settings.exportWithTheme?void 0:"light"),n&&!A&&(A={withBackground:this.plugin.settings.exportWithBackground,withTheme:!0}),i||(i=new EmbeddedFilesLoader(this.plugin,n?"dark"===n:void 0)),await createSVG(e,t,A,i,n,this.canvas.theme,this.canvas.viewBackgroundColor,this.getElements(),this.plugin,0,a,this.imagesDict)}async createPNG(e,t=1,A,i,n,a){return n||(n=this.plugin.settings.previewMatchObsidianTheme?isObsidianThemeDark()?"dark":"light":this.plugin.settings.exportWithTheme?void 0:"light"),n&&!A&&(A={withBackground:this.plugin.settings.exportWithBackground,withTheme:!0}),i||(i=new EmbeddedFilesLoader(this.plugin,n?"dark"===n:void 0)),await createPNG(e,t,A,i,n,this.canvas.theme,this.canvas.viewBackgroundColor,this.getElements(),this.plugin,0,a,this.imagesDict)}wrapText(e,t){return wrapTextAtCharLength(e,t,this.plugin.settings.forceWrap)}boxedElement(e,t,A,i,n,a,r=null){return{id:e,type:t,x:A,y:i,width:n,height:a,angle:this.style.angle,strokeColor:this.style.strokeColor,backgroundColor:this.style.backgroundColor,fillStyle:this.style.fillStyle,strokeWidth:this.style.strokeWidth,strokeStyle:this.style.strokeStyle,roughness:this.style.roughness,opacity:this.style.opacity,roundness:this.style.strokeSharpness?"round"===this.style.strokeSharpness?{type:ROUNDNESS.ADAPTIVE_RADIUS}:null:this.style.roundness,seed:Math.floor(1e5*Math.random()),version:1,versionNonce:Math.floor(1e9*Math.random()),updated:Date.now(),isDeleted:!1,groupIds:[],boundElements:[],link:r,locked:!1}}addIFrame(e,t,A,i,n,a){return this.addEmbeddable(e,t,A,i,n,a)}addEmbeddable(e,t,A,i,n,a){var r;if(!this.targetView||!(null===(r=this.targetView)||void 0===r?void 0:r._loaded))return errorMessage("targetView not set","addEmbeddable()"),null;if(!n&&!a)return errorMessage("Either the url or the file must be set. If both are provided the URL takes precedence","addEmbeddable()"),null;const s=nanoid();return this.elementsDict[s]=this.boxedElement(s,"embeddable",e,t,A,i,n||(a?`[[${app.metadataCache.fileToLinktext(a,this.targetView.file.path,!1)}]]`:"")),s}addRect(e,t,A,i){const n=nanoid();return this.elementsDict[n]=this.boxedElement(n,"rectangle",e,t,A,i),n}addDiamond(e,t,A,i){const n=nanoid();return this.elementsDict[n]=this.boxedElement(n,"diamond",e,t,A,i),n}addEllipse(e,t,A,i){const n=nanoid();return this.elementsDict[n]=this.boxedElement(n,"ellipse",e,t,A,i),n}addBlob(e,t,A,i){const n=.5*i,a=.5*A,r=a/9,s=.8*n,o=[],l=(A,i)=>{const l=A+Math.random()*r-r/2;o.push([l+Math.random()*r-r/2+A%2*r/6+e,i*Math.sqrt(n*n*(1-l*l/(a*a)))+Math.random()*s-s/2+A%2*s/6+t])};let c;for(c=r/2-a;c<=a-r/2;c+=a/6)l(c,1);for(c=a-r/2;c>=r/2-a;c-=a/6)l(c,-1);o.push(o[0]);const d=this.addLine((e=>{const t=getLineBox(e),n=A/t.w,a=i/t.h;let r;for(r=0;r<e.length;r++){let[A,i]=e[r];A=(A-t.x)*n+t.x,i=(i-t.y)*a+t.y,e[r]=[A,i]}return e})(o));return this.elementsDict[d]=repositionElementsToCursor([this.getElement(d)],{x:e,y:t},!1,this.getExcalidrawAPI())[0],d}refreshTextElementSize(e){const t=this.getElement(e);if("text"!==t.type)return;const{w:A,h:i,baseline:n}=_measureText(t.text,t.fontSize,t.fontFamily,getDefaultLineHeight(t.fontFamily));t.width=A,t.height=i,t.baseline=n}addText(e,t,A,i,n){var a,r,s,o;n=null!=n?n:nanoid();const l=A;A=(null==i?void 0:i.wrapAt)?this.wrapText(A,i.wrapAt):A;const{w:c,h:d,baseline:h}=_measureText(A,this.style.fontSize,this.style.fontFamily,getDefaultLineHeight(this.style.fontFamily)),u=(null==i?void 0:i.width)?i.width:c,g=(null==i?void 0:i.height)?i.height:d;let p=null;const m=null!==(a=null==i?void 0:i.boxPadding)&&void 0!==a?a:30,w=this.style.strokeColor;if(this.style.strokeColor=null!==(r=null==i?void 0:i.boxStrokeColor)&&void 0!==r?r:w,null==i?void 0:i.box)switch(i.box){case"ellipse":p=this.addEllipse(e-m,t-m,u+2*m,g+2*m);break;case"diamond":p=this.addDiamond(e-m,t-m,u+2*m,g+2*m);break;case"blob":p=this.addBlob(e-m,t-m,u+2*m,g+2*m);break;default:p=this.addRect(e-m,t-m,u+2*m,g+2*m)}this.style.strokeColor=w;const f=p&&"blob"!==i.box;if(this.elementsDict[n]=Object.assign(Object.assign({text:A,fontSize:this.style.fontSize,fontFamily:this.style.fontFamily,textAlign:(null==i?void 0:i.textAlign)?i.textAlign:null!==(s=this.style.textAlign)&&void 0!==s?s:"left",verticalAlign:null!==(o=null==i?void 0:i.textVerticalAlign)&&void 0!==o?o:this.style.verticalAlign,baseline:h},this.boxedElement(n,"text",e,t,u,g)),{containerId:f?p:null,originalText:f?l:A,rawText:f?l:A,lineHeight:getDefaultLineHeight(this.style.fontFamily)}),p&&"blob"===(null==i?void 0:i.box)&&this.addToGroup([n,p]),f){const e=this.elementsDict[p];e.boundElements||(e.boundElements=[]),e.boundElements.push({type:"text",id:n})}return null!=p?p:n}addLine(e){const t=getLineBox(e),A=nanoid();return this.elementsDict[A]=Object.assign({points:normalizeLinePoints(e),lastCommittedPoint:null,startBinding:null,endBinding:null,startArrowhead:null,endArrowhead:null},this.boxedElement(A,"line",e[0][0],e[0][1],t.w,t.h)),A}addArrow(e,t){const A=getLineBox(e),i=nanoid(),n=e[0],a=e[e.length-1];return this.elementsDict[i]=Object.assign({points:normalizeLinePoints(e),lastCommittedPoint:null,startBinding:{elementId:null==t?void 0:t.startObjectId,focus:(null==t?void 0:t.startObjectId)?determineFocusDistance(this.getElement(null==t?void 0:t.startObjectId),a,n):.1,gap:4},endBinding:{elementId:null==t?void 0:t.endObjectId,focus:(null==t?void 0:t.endObjectId)?determineFocusDistance(this.getElement(null==t?void 0:t.endObjectId),n,a):.1,gap:4},startArrowhead:void 0!==(null==t?void 0:t.startArrowHead)?t.startArrowHead:this.style.startArrowHead,endArrowhead:void 0!==(null==t?void 0:t.endArrowHead)?t.endArrowHead:this.style.endArrowHead},this.boxedElement(i,"arrow",e[0][0],e[0][1],A.w,A.h)),(null==t?void 0:t.startObjectId)&&(this.elementsDict[t.startObjectId].boundElements||(this.elementsDict[t.startObjectId].boundElements=[]),this.elementsDict[t.startObjectId].boundElements.push({type:"arrow",id:i})),(null==t?void 0:t.endObjectId)&&(this.elementsDict[t.endObjectId].boundElements||(this.elementsDict[t.endObjectId].boundElements=[]),this.elementsDict[t.endObjectId].boundElements.push({type:"arrow",id:i})),i}async addImage(e,t,A,i=!0,n=!0){const a=nanoid(),r=new EmbeddedFilesLoader(this.plugin,"dark"===this.canvas.theme),s="string"==typeof A?await r.getObsidianImage(new EmbeddedFile(this.plugin,"",A),0):await r.getObsidianImage(A,0);if(!s)return null;const o="string"==typeof A?s.fileId:"md"===A.extension||"pdf"===A.extension.toLowerCase()?fileid():s.fileId;if(this.imagesDict[o]={mimeType:s.mimeType,id:o,dataURL:s.dataURL,created:s.created,isHyperlink:"string"==typeof A,hyperlink:"string"==typeof A?A:null,file:"string"==typeof A?null:A.path+(i||!n?"":"|100%"),hasSVGwithBitmap:s.hasSVGwithBitmap,latex:null},i&&Math.max(s.size.width,s.size.height)>500){const e=500/Math.max(s.size.width,s.size.height);s.size.width=e*s.size.width,s.size.height=e*s.size.height}return this.elementsDict[a]=this.boxedElement(a,"image",e,t,s.size.width,s.size.height),this.elementsDict[a].fileId=o,this.elementsDict[a].scale=[1,1],a}async addLaTex(e,t,A){const i=nanoid(),n=await tex2dataURL(A,this.plugin);return n?(this.imagesDict[n.fileId]={mimeType:n.mimeType,id:n.fileId,dataURL:n.dataURL,created:n.created,file:null,hasSVGwithBitmap:!1,latex:A},this.elementsDict[i]=this.boxedElement(i,"image",e,t,n.size.width,n.size.height),this.elementsDict[i].fileId=n.fileId,this.elementsDict[i].scale=[1,1],i):null}connectObjects(e,t,A,i,n){if(!this.elementsDict[e]||!this.elementsDict[A])return;if(["line","arrow","freedraw"].includes(this.elementsDict[e].type)||["line","arrow","freedraw"].includes(this.elementsDict[A].type))return;const a=(null==n?void 0:n.padding)?n.padding:10,r=(null==n?void 0:n.numberOfPoints)?n.numberOfPoints:0,s=(e,t)=>{switch(e){case"bottom":return[(t.x+(t.x+t.width))/2,t.y+t.height+a];case"left":return[t.x-a,(t.y+(t.y+t.height))/2];case"right":return[t.x+t.width+a,(t.y+(t.y+t.height))/2];default:return[(t.x+(t.x+t.width))/2,t.y-a]}};let o,l,c,d;const h=this.elementsDict[e],u=this.elementsDict[A];if(!t||!i){const e=h.x+h.width/2,A=u.x+u.width/2,n=h.y+h.height/2,a=u.y+u.height/2;if(!t){const t=intersectElementWithLine(h,[A,a],[e,n],4);0===t.length?[o,l]=[e,n]:[o,l]=t[0]}if(!i){const t=intersectElementWithLine(u,[e,n],[A,a],4);0===t.length?[c,d]=[A,a]:[c,d]=t[0]}}t&&([o,l]=s(t,this.elementsDict[e])),i&&([c,d]=s(i,this.elementsDict[A]));const g=r+2,p=[];for(let e=0;e<g;e++)p.push([o+e*(c-o)/(g-1),l+e*(d-l)/(g-1)]);return this.addArrow(p,{startArrowHead:null==n?void 0:n.startArrowHead,endArrowHead:null==n?void 0:n.endArrowHead,startObjectId:e,endObjectId:A})}addLabelToLine(e,t){const A=this.elementsDict[e];if(!A||!["arrow","line"].includes(A.type)||2!==A.points.length)return;let i=Math.atan2(A.points[1][1],A.points[1][0]);const n=this.measureText(t);i<0?i<-Math.PI/2&&(i+=Math.PI):i>Math.PI/2&&(i-=Math.PI),this.style.angle=i;const a=this.addText(A.x+A.points[1][0]/2-n.width/2,A.y+A.points[1][1]/2-n.height,t);return this.style.angle=0,a}clear(){this.elementsDict={},this.imagesDict={}}reset(){this.clear(),this.activeScript=null,this.style={strokeColor:"#000000",backgroundColor:"transparent",angle:0,fillStyle:"hachure",strokeWidth:1,strokeStyle:"solid",roughness:1,opacity:100,roundness:null,fontFamily:1,fontSize:20,textAlign:"left",verticalAlign:"top",startArrowHead:null,endArrowHead:"arrow"},this.canvas={theme:"light",viewBackgroundColor:"#FFFFFF",gridSize:0}}isExcalidrawFile(e){return this.plugin.isExcalidrawFile(e)}setView(e){if(!e){const e=app.workspace.getActiveViewOfType(ExcalidrawView);if(e instanceof ExcalidrawView)this.targetView=e;else{const e=app.workspace.getLeavesOfType("excalidraw");if(!e||0==e.length)return;this.targetView=e[0].view}}if("active"==e){const e=app.workspace.getActiveViewOfType(ExcalidrawView);if(!(e instanceof ExcalidrawView))return;this.targetView=e}if("first"==e){const e=app.workspace.getLeavesOfType("excalidraw");if(!e||0==e.length)return;this.targetView=e[0].view}return e instanceof ExcalidrawView&&(this.targetView=e),this.targetView}getExcalidrawAPI(){var e;return this.targetView&&(null===(e=this.targetView)||void 0===e?void 0:e._loaded)?this.targetView.excalidrawAPI:(errorMessage("targetView not set","getExcalidrawAPI()"),null)}getViewElements(){var e;if(!this.targetView||!(null===(e=this.targetView)||void 0===e?void 0:e._loaded))return errorMessage("targetView not set","getViewElements()"),[];const t=this.targetView.excalidrawAPI;return t?t.getSceneElements():[]}deleteViewElements(e){var t,A,i;if(!this.targetView||!(null===(t=this.targetView)||void 0===t?void 0:t._loaded))return errorMessage("targetView not set","deleteViewElements()"),!1;const n=null===(i=null===(A=this.targetView)||void 0===A?void 0:A.excalidrawRef)||void 0===i?void 0:i.current;if(!n)return!1;const a=n.getSceneElements(),r=n.getAppState();return this.targetView.updateScene({elements:a.filter((t=>!e.includes(t))),appState:r,commitToHistory:!0}),!0}getViewSelectedElement(){const e=this.getViewSelectedElements();return e?e[0]:null}getViewSelectedElements(){var e;return this.targetView&&(null===(e=this.targetView)||void 0===e?void 0:e._loaded)?this.targetView.getViewSelectedElements():(errorMessage("targetView not set","getViewSelectedElements()"),[])}getViewFileForImageElement(e){var t,A,i,n;return this.targetView&&(null===(t=this.targetView)||void 0===t?void 0:t._loaded)?e&&"image"===e.type?null===(n=null===(i=null===(A=this.targetView)||void 0===A?void 0:A.excalidrawData)||void 0===i?void 0:i.getFile(e.fileId))||void 0===n?void 0:n.file:(errorMessage("Must provide an image element as input","getViewFileForImageElement()"),null):(errorMessage("targetView not set","getViewFileForImageElement()"),null)}copyViewElementsToEAforEditing(e){e.forEach((e=>{this.elementsDict[e.id]=cloneElement(e)}))}viewToggleFullScreen(e=!1){var t,A,i;if(!this.targetView||!(null===(t=this.targetView)||void 0===t?void 0:t._loaded))return void errorMessage("targetView not set","viewToggleFullScreen()");const n=this.targetView,a=n.isFullscreen();e&&(n.updateScene({appState:{viewModeEnabled:!a},commitToHistory:!1}),null===(i=null===(A=this.targetView.toolsPanelRef)||void 0===A?void 0:A.current)||void 0===i||i.setExcalidrawViewMode(!a)),a?n.exitFullscreen():n.gotoFullscreen()}setViewModeEnabled(e){var t,A,i;if(!this.targetView||!(null===(t=this.targetView)||void 0===t?void 0:t._loaded))return void errorMessage("targetView not set","viewToggleFullScreen()");const n=this.targetView;n.updateScene({appState:{viewModeEnabled:e}}),null===(i=null===(A=n.toolsPanelRef)||void 0===A?void 0:A.current)||void 0===i||i.setExcalidrawViewMode(e)}viewUpdateScene(e,t=!1){var A;this.targetView&&(null===(A=this.targetView)||void 0===A?void 0:A._loaded)?this.targetView.updateScene(e,t):errorMessage("targetView not set","viewToggleFullScreen()")}connectObjectWithViewSelectedElement(e,t,A,i){const n=this.getViewSelectedElement();if(!n)return!1;const a=n.id;return this.elementsDict[a]=n,this.connectObjects(e,t,a,A,i),delete this.elementsDict[a],!0}viewZoomToElements(e,t){var A;this.targetView&&(null===(A=this.targetView)||void 0===A?void 0:A._loaded)?this.targetView.zoomToElements(e,t):errorMessage("targetView not set","viewToggleFullScreen()")}async addElementsToView(e=!1,t=!0,A=!1,i=!1){var n;if(!this.targetView||!(null===(n=this.targetView)||void 0===n?void 0:n._loaded))return errorMessage("targetView not set","addElementsToView()"),!1;const a=this.getElements();return await this.targetView.addElements(a,e,t,this.imagesDict,A,i)}registerThisAsViewEA(){var e;return this.targetView&&(null===(e=this.targetView)||void 0===e?void 0:e._loaded)?(this.targetView.setHookServer(this),!0):(errorMessage("targetView not set","addElementsToView()"),!1)}deregisterThisAsViewEA(){var e;return this.targetView&&(null===(e=this.targetView)||void 0===e?void 0:e._loaded)?(this.targetView.setHookServer(this),!0):(errorMessage("targetView not set","addElementsToView()"),!1)}getEmbeddedFilesLoader(e){return new EmbeddedFilesLoader(this.plugin,e)}getExportSettings(e,t){return{withBackground:e,withTheme:t}}getBoundingBox(e){const t=getCommonBoundingBox(e);return{topX:t.minX,topY:t.minY,width:t.maxX-t.minX,height:t.maxY-t.minY}}getMaximumGroups(e){return getMaximumGroups(e)}getLargestElement(e){if(!e||0===e.length)return null;let t=e[0];const A=e=>e.height*e.width;let i=A(e[0]);for(let n=1;n<e.length;n++){const a=A(e[n]);a>i&&(i=a,t=e[n])}return t}intersectElementWithLine(e,t,A,i){return intersectElementWithLine(e,t,A,i)}getCommonGroupForElements(e){const t=e.map((e=>e.groupIds)).reduce(((e,t)=>t.filter((t=>e.includes(t)))));return t.length>0?t[0]:null}getElementsInTheSameGroupWithElement(e,t){if(!e||!t)return[];const A="text"===e.type&&e.containerId?t.filter((t=>t.id===e.containerId)):[];return 0===e.groupIds.length?1===A.length?[e,A[0]]:[e]:1===A.length?t.filter((t=>t.groupIds.some((t=>e.groupIds.includes(t)))||t===A[0])):t.filter((t=>t.groupIds.some((t=>e.groupIds.includes(t)))))}getElementsInFrame(e,t){return e&&t&&"frame"===e.type?t.filter((t=>t.frameId===e.id)):[]}getScriptSettings(){var e;return this.activeScript?null!==(e=this.plugin.settings.scriptEngineSettings[this.activeScript])&&void 0!==e?e:{}:null}async setScriptSettings(e){if(!this.activeScript)return null;this.plugin.settings.scriptEngineSettings[this.activeScript]=e,await this.plugin.saveSettings()}openFileInNewOrAdjacentLeaf(e){if(!(e&&e instanceof obsidian_module.TFile))return null;if(!this.targetView)return null;const t=getNewOrAdjacentLeaf(this.plugin,this.targetView.leaf);return t.openFile(e,{active:!0}),t}measureText(e){var t,A;const i=_measureText(e,this.style.fontSize,this.style.fontFamily,getDefaultLineHeight(this.style.fontFamily));return{width:null!==(t=i.w)&&void 0!==t?t:0,height:null!==(A=i.h)&&void 0!==A?A:0}}async getOriginalImageSize(e){var t;if(!this.targetView||!(null===(t=this.targetView)||void 0===t?void 0:t._loaded))return errorMessage("targetView not set","getOriginalImageSize()"),null;if(!e||"image"!==e.type)return errorMessage("Please provide a single image element as input","getOriginalImageSize()"),null;const A=this.targetView.excalidrawData.getFile(e.fileId);if(!A)return errorMessage("Please provide a single image element as input","getOriginalImageSize()"),null;const i="dark"===this.getExcalidrawAPI().getAppState().theme,n=A.getImage(i);return await getImageSize(n)}verifyMinimumPluginVersion(e){return verifyMinimumPluginVersion(e)}isExcalidrawView(e){return e instanceof ExcalidrawView}selectElementsInView(e){var t;if(!this.targetView||!(null===(t=this.targetView)||void 0===t?void 0:t._loaded))return void errorMessage("targetView not set","selectElementsInView()");if(!e||0===e.length)return;const A=this.getExcalidrawAPI();if("string"==typeof e[0]){const t=this.getViewElements().filter((t=>e.includes(t.id)));A.selectElements(t)}else A.selectElements(e)}generateElementId(){return nanoid()}cloneElement(e){const t=JSON.parse(JSON.stringify(e));return t.id=nanoid(),t}moveViewElementToZIndex(e,t){var A;if(!this.targetView||!(null===(A=this.targetView)||void 0===A?void 0:A._loaded))return void errorMessage("targetView not set","moveViewElementToZIndex()");const i=this.getExcalidrawAPI(),n=this.getViewElements(),a=n.filter((t=>t.id===e));if(0===a.length)return void errorMessage(`Element (id: ${e}) not found`,"moveViewElementToZIndex");if(t>=n.length)return void i.bringToFront(a);if(t<0)return void i.sendToBack(a);const r=n.indexOf(a[0]);n.splice(t,0,n.splice(r,1)[0]),this.targetView.updateScene({elements:n,commitToHistory:!0})}hexStringToRgb(e){const t=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(e);return[parseInt(t[1],16),parseInt(t[2],16),parseInt(t[3],16)]}rgbToHexString(e){return O$1({r:e[0],g:e[1],b:e[2]}).stringHEX({alpha:!1})}hslToRgb(e){const t=O$1({h:e[0],s:e[1],l:e[2]});return[t.red,t.green,t.blue]}rgbToHsl(e){const t=O$1({r:e[0],g:e[1],b:e[2]});return[t.hue,t.saturation,t.lightness]}colorNameToHex(e){return COLOR_NAMES.has(e.toLowerCase().trim())?COLOR_NAMES.get(e.toLowerCase().trim()):e.trim()}getCM(e){if(e)return"string"==typeof e&&(e=this.colorNameToHex(e)),O$1(e);log("Creates a CM object. Visit https://github.com/lbragile/ColorMaster for documentation.")}importSVG(e){const t=svgToExcalidraw(e);return t.hasErrors?(new obsidian_module.Notice(`There were errors while parsing the given SVG:\n${[...t.errors].map((e=>e.innerHTML))}`),!1):(this.copyViewElementsToEAforEditing(t.content),!0)}}async function initExcalidrawAutomate(e){await initFonts();const t=new ExcalidrawAutomate(e);return window.ExcalidrawAutomate=t,t}function destroyExcalidrawAutomate(){delete window.ExcalidrawAutomate}function normalizeLinePoints(e){const t=[],[A,i]=e[0];for(let n=0;n<e.length;n++)t.push([e[n][0]-A,e[n][1]-i]);return t}function getLineBox(e){const[t,A,i,n]=estimateLineBound(e);return{x:t,y:A,w:i-t,h:n-A}}function getFontFamily(e){switch(e){case 1:return"Virgil, Segoe UI Emoji";case 2:return"Helvetica, Segoe UI Emoji";case 3:return"Cascadia, Segoe UI Emoji";case 4:return"LocalFont"}}async function initFonts(){for(let e=1;e<=3;e++)await document.fonts.load(`20px ${getFontFamily(e)}`)}function _measureText(e,t,A,i){t||(t=20),A||(i=getDefaultLineHeight(A=1));const n=measureText(e,`${t.toString()}px ${getFontFamily(A)}`,i);return{w:n.width,h:n.height,baseline:n.baseline}}async function getTemplate(e,t,A=!1,i,n){const a=e.app,r=a.vault,s=getEmbeddedFilenameParts(t),o=obsidian_module.normalizePath(s.filepath),l=a.metadataCache.getFirstLinkpathDest(o,"");let c=!1;if(l&&l instanceof obsidian_module.TFile){const t=(await r.read(l)).replaceAll("\r\n","\n").replaceAll("\r","\n"),a=new ExcalidrawData(e);if("excalidraw"===l.extension)return await a.loadLegacyData(t,l),{elements:a.scene.elements,appState:a.scene.appState,frontmatter:"",files:a.scene.files,hasSVGwithBitmap:c};const o=t.search("excalidraw-plugin: parsed\n")>-1||t.search("excalidraw-plugin: locked\n")>-1;await a.loadData(t,l,o?TextMode.parsed:TextMode.raw);let d=t.search("# Text Elements\n");-1==d&&(d=t.search("# Drawing\n"));let h=a.scene;A&&await i.loadSceneFiles(a,(e=>{if(e&&0!==e.length){for(const t of e)t.hasSVGwithBitmap&&(c=!0),a.scene.files[t.id]={mimeType:t.mimeType,id:t.id,dataURL:t.dataURL,created:t.created};h=scaleLoadedImage(a.scene,e).scene}}),n);let u=h.elements;if(s.hasGroupref){const t=s.hasSectionref?getTextElementsMatchingQuery(h.elements,["# "+s.sectionref],!0):h.elements.filter((e=>e.id===s.blockref));t.length>0&&(u=e.ea.getElementsInTheSameGroupWithElement(t[0],h.elements))}if(s.hasFrameref){const t=h.elements.filter((e=>e.id===s.blockref));1===t.length&&(u=e.ea.getElementsInFrame(t[0],h.elements))}return s.hasTaskbone&&(u=u.filter((t=>{var A;return"freedraw"===t.type||"image"===t.type&&!e.isExcalidrawFile(null===(A=a.getFile(t.fileId))||void 0===A?void 0:A.file)}))),{elements:u,appState:h.appState,frontmatter:t.substring(0,d),files:h.files,hasSVGwithBitmap:c}}return{elements:[],appState:{},frontmatter:null,files:[],hasSVGwithBitmap:c}}async function createPNG(e,t=1,A,i,n,a,r,s=[],o,l,c,d){var h,u,g,p,m,w,f;i||(i=new EmbeddedFilesLoader(o)),c=null!=c?c:o.settings.exportPaddingSVG;const E=e?await getTemplate(o,e,!0,i,l):null;let B=null!==(h=null==E?void 0:E.elements)&&void 0!==h?h:[];B=B.concat(s);const b=null!=d?d:{};return(null==E?void 0:E.files)&&Object.values(E.files).forEach((e=>{b[e.id]=e})),await getPNG({type:"excalidraw",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:B,appState:{theme:null!==(g=null!=n?n:null===(u=null==E?void 0:E.appState)||void 0===u?void 0:u.theme)&&void 0!==g?g:a,viewBackgroundColor:null!==(m=null===(p=null==E?void 0:E.appState)||void 0===p?void 0:p.viewBackgroundColor)&&void 0!==m?m:r},files:b},{withBackground:null!==(w=null==A?void 0:A.withBackground)&&void 0!==w?w:o.settings.exportWithBackground,withTheme:null!==(f=null==A?void 0:A.withTheme)&&void 0!==f?f:o.settings.exportWithTheme},c,t)}async function createSVG(e,t=!1,A,i,n,a,r,s=[],o,l,c,d){var h,u,g,p,m,w,f;i||(i=new EmbeddedFilesLoader(o));const E=e?await getTemplate(o,e,!0,i,l):null;let B=null!==(h=null==E?void 0:E.elements)&&void 0!==h?h:[];B=B.concat(s),c=null!=c?c:o.settings.exportPaddingSVG;const b=null!=d?d:{};(null==E?void 0:E.files)&&Object.values(E.files).forEach((e=>{b[e.id]=e}));const v=await getSVG({type:"excalidraw",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:B,appState:{theme:null!==(g=null!=n?n:null===(u=null==E?void 0:E.appState)||void 0===u?void 0:u.theme)&&void 0!==g?g:a,viewBackgroundColor:null!==(m=null===(p=null==E?void 0:E.appState)||void 0===p?void 0:p.viewBackgroundColor)&&void 0!==m?m:r},files:b},{withBackground:null!==(w=null==A?void 0:A.withBackground)&&void 0!==w?w:o.settings.exportWithBackground,withTheme:null!==(f=null==A?void 0:A.withTheme)&&void 0!==f?f:o.settings.exportWithTheme},c),C=getEmbeddedFilenameParts(e);if(!C.hasGroupref&&!C.hasFrameref&&(C.hasBlockref||C.hasSectionref)){let e=C.hasSectionref?getTextElementsMatchingQuery(B,["# "+C.sectionref],!0):B.filter((e=>e.id===C.blockref));if(e.length>0){const t=e[0].containerId;t&&(e=e.concat(B.filter((e=>e.id===t))));const A=o.ea.getBoundingBox(e),i=o.ea.getBoundingBox(B);v.viewBox.baseVal.x=A.topX-i.topX,v.viewBox.baseVal.y=A.topY-i.topY,v.viewBox.baseVal.width=A.width+2*c,v.viewBox.baseVal.height=A.height+2*c}}return(null==E?void 0:E.hasSVGwithBitmap)&&v.setAttribute("hasbitmap","true"),t?embedFontsInSVG(v,o):v}function estimateLineBound(e){let t=1/0,A=1/0,i=-1/0,n=-1/0;for(const[a,r]of e)t=Math.min(t,a),A=Math.min(A,r),i=Math.max(i,a),n=Math.max(n,r);return[t,A,i,n]}function estimateBounds(e){const t=getCommonBoundingBox(e);return[t.minX,t.minY,t.maxX,t.maxY]}function repositionElementsToCursor(e,t,A=!1,i){const[n,a,r,s]=estimateBounds(e);let[o,l]=[0,0];return[o,l]=A?[t.x-(n+r)/2,t.y-(a+s)/2]:[t.x-n,t.y-a],e.forEach((e=>{e.x=e.x+o,e.y=e.y+l})),restore({elements:e},null,null).elements}function errorMessage(e,t){switch(e){case"targetView not set":errorlog({where:"ExcalidrawAutomate",source:t,message:"targetView not set, or no longer active. Use setView before calling this function"});break;case"mobile not supported":errorlog({where:"ExcalidrawAutomate",source:t,message:"this function is not avalable on Obsidian Mobile"});break;default:errorlog({where:"ExcalidrawAutomate",source:t,message:null!=e?e:"unknown error"})}}const insertLaTeXToView=e=>{const t=e.plugin.app,A=e.plugin.ea;new Prompt(t,t$d("ENTER_LATEX"),e.plugin.settings.latexBoilerplate,"\\color{red}\\oint_S {E_n dA = \\frac{1}{{\\varepsilon _0 }}} Q_{inside}").openAndGetValue((async t=>{t&&(A.reset(),await A.addLaTex(0,0,t),A.setView(e),A.addElementsToView(!0,!1,!0))}))},search=async e=>{const t=e.plugin.ea;t.reset(),t.setView(e);const A=t.getViewElements().filter((e=>"text"===e.type||"frame"===e.type));if(0===A.length)return;let i=await ScriptEngine.inputPrompt(e,e.plugin,e.plugin.app,"Search for","use quotation marks for exact match","");if(!i)return;const n=i.matchAll(/"(.*?)"/g);let a,r=[];for(;!(a=n.next()).done;)r.push(a.value[1]);i=i.replaceAll(/"(.*?)"/g,""),r=r.concat(i.split(" ").filter((e=>0!==e.length))),t.targetView.selectElementsMatchingQuery(A,r)},getTextElementsMatchingQuery=(e,t,A=!1)=>e&&0!==e.length&&t&&0!==t.length?e.filter((e=>"text"===e.type&&t.some((t=>{if(A){const A=e.rawText.toLowerCase().split("\n")[0].trim().match(/^#*(# .*)/);return!(!A||2!==A.length)&&A[1]===t.toLowerCase()}return e.rawText.toLowerCase().replaceAll("\n"," ").trim().match(t.toLowerCase())})))):[],getFrameElementsMatchingQuery=(e,t,A=!1)=>e&&0!==e.length&&t&&0!==t.length?e.filter((e=>"frame"===e.type&&t.some((t=>{if(A){const A=e.name.toLowerCase().split("\n")[0].trim().match(/^#*(# .*)/);return!(!A||2!==A.length)&&A[1]===t.toLowerCase()}return(e.name?e.name.toLowerCase().replaceAll("\n"," ").trim():"").match(t.toLowerCase())})))):[],cloneElement=e=>{const t=JSON.parse(JSON.stringify(e));return t.version=e.version+1,t.updated=Date.now(),t.versionNonce=Math.floor(1e9*Math.random()),t},verifyMinimumPluginVersion=e=>PLUGIN_VERSION===e||isVersionNewerThanOther(PLUGIN_VERSION,e),URL$1="https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/index-new.md";class ScriptInstallPrompt extends obsidian_module.Modal{constructor(e){super(e.app),this.plugin=e}async onOpen(){this.contentEl.classList.add("excalidraw-scriptengine-install"),this.containerEl.classList.add("excalidraw-scriptengine-install");try{const e=await obsidian_module.request({url:URL$1});if(!e)return new obsidian_module.Notice("Error opening the Excalidraw Script Store page. Please double check that you can access the website. I've logged the link in developer console (press CTRL+SHIFT+i)",5e3),log(URL$1),void this.close();await obsidian_module.MarkdownRenderer.renderMarkdown(e,this.contentEl,"",this.plugin),this.contentEl.querySelectorAll("h1[data-heading],h2[data-heading],h3[data-heading]").forEach((e=>{e.setAttribute("id",e.getAttribute("data-heading"))})),this.contentEl.querySelectorAll("a.internal-link").forEach((e=>{e.removeAttribute("target")}))}catch(e){errorlog({where:"ScriptInstallPrompt.onOpen",error:e}),new obsidian_module.Notice("Could not open ScriptEngine repository"),this.close()}}onClose(){this.contentEl.empty()}}function r(e){var t,A,i="";if("string"==typeof e||"number"==typeof e)i+=e;else if("object"==typeof e)if(Array.isArray(e))for(t=0;t<e.length;t++)e[t]&&(A=r(e[t]))&&(i&&(i+=" "),i+=A);else for(t in e)e[t]&&(i&&(i+=" "),i+=t);return i}function clsx(){for(var e,t,A=0,i="";A<arguments.length;)(e=arguments[A++])&&(t=r(e))&&(i&&(i+=" "),i+=t);return i}const PENS={default:{type:"default",freedrawOnly:!1,strokeColor:"#000000",backgroundColor:"transparent",fillStyle:"hachure",strokeWidth:0,roughness:0,penOptions:{highlighter:!1,constantPressure:!1,hasOutline:!1,outlineWidth:1,options:{thinning:.6,smoothing:.5,streamline:.5,easing:"easeOutSine",start:{cap:!0,taper:0,easing:"linear"},end:{cap:!0,taper:0,easing:"linear"}}}},highlighter:{type:"highlighter",freedrawOnly:!0,strokeColor:"#FFC47C",backgroundColor:"#FFC47C",fillStyle:"solid",strokeWidth:2,roughness:null,penOptions:{highlighter:!0,constantPressure:!0,hasOutline:!0,outlineWidth:4,options:{thinning:1,smoothing:.5,streamline:.5,easing:"linear",start:{taper:0,cap:!0,easing:"linear"},end:{taper:0,cap:!0,easing:"linear"}}}},finetip:{type:"finetip",freedrawOnly:!1,strokeColor:"#3E6F8D",backgroundColor:"transparent",fillStyle:"hachure",strokeWidth:.5,roughness:0,penOptions:{highlighter:!1,hasOutline:!1,outlineWidth:1,constantPressure:!0,options:{smoothing:.4,thinning:-.5,streamline:.4,easing:"linear",start:{taper:5,cap:!1,easing:"linear"},end:{taper:5,cap:!1,easing:"linear"}}}},fountain:{type:"fountain",freedrawOnly:!1,strokeColor:"#000000",backgroundColor:"transparent",fillStyle:"hachure",strokeWidth:2,roughness:0,penOptions:{highlighter:!1,constantPressure:!1,hasOutline:!1,outlineWidth:1,options:{smoothing:.2,thinning:.6,streamline:.2,easing:"easeInOutSine",start:{taper:150,cap:!0,easing:"linear"},end:{taper:1,cap:!0,easing:"linear"}}}},marker:{type:"marker",freedrawOnly:!0,strokeColor:"#B83E3E",backgroundColor:"#FF7C7C",fillStyle:"dashed",strokeWidth:2,roughness:3,penOptions:{highlighter:!1,constantPressure:!0,hasOutline:!0,outlineWidth:4,options:{thinning:1,smoothing:.5,streamline:.5,easing:"linear",start:{taper:0,cap:!0,easing:"linear"},end:{taper:0,cap:!0,easing:"linear"}}}},"thick-thin":{type:"thick-thin",freedrawOnly:!0,strokeColor:"#CECDCC",backgroundColor:"transparent",fillStyle:"hachure",strokeWidth:0,roughness:null,penOptions:{highlighter:!0,constantPressure:!0,hasOutline:!1,outlineWidth:1,options:{thinning:1,smoothing:.5,streamline:.5,easing:"linear",start:{taper:0,cap:!0,easing:"linear"},end:{cap:!0,taper:!0,easing:"linear"}}}},"thin-thick-thin":{type:"thin-thick-thin",freedrawOnly:!0,strokeColor:"#CECDCC",backgroundColor:"transparent",fillStyle:"hachure",strokeWidth:0,roughness:null,penOptions:{highlighter:!0,constantPressure:!0,hasOutline:!1,outlineWidth:1,options:{thinning:1,smoothing:.5,streamline:.5,easing:"linear",start:{cap:!0,taper:!0,easing:"linear"},end:{cap:!0,taper:!0,easing:"linear"}}}}},EASINGFUNCTIONS={linear:"linear",easeInQuad:"easeInQuad",easeOutQuad:"easeOutQuad",easeInOutQuad:"easeInOutQuad",easeInCubic:"easeInCubic",easeOutCubic:"easeOutCubic",easeInOutCubic:"easeInOutCubic",easeInQuart:"easeInQuart",easeOutQuart:"easeOutQuart",easeInOutQuart:"easeInOutQuart",easeInQuint:"easeInQuint",easeOutQuint:"easeOutQuint",easeInOutQuint:"easeInOutQuint",easeInSine:"easeInSine",easeOutSine:"easeOutSine",easeInOutSine:"easeInOutSine",easeInExpo:"easeInExpo",easeOutExpo:"easeOutExpo",easeInOutExpo:"easeInOutExpo",easeInCirc:"easeInCirc",easeOutCirc:"easeOutCirc",easeInOutCirc:"easeInOutCirc",easeInBack:"easeInBack",easeOutBack:"easeOutBack",easeInOutBack:"easeInOutBack",easeInElastic:"easeInElastic",easeOutElastic:"easeOutElastic",easeInOutElastic:"easeInOutElastic",easeInBounce:"easeInBounce",easeOutBounce:"easeOutBounce",easeInOutBounce:"easeInOutBounce"};class PenSettingsModal extends obsidian_module.Modal{constructor(e,t,A){super(app),this.plugin=e,this.view=t,this.pen=A,this.dirty=!1,this.api=t.excalidrawAPI}onOpen(){this.containerEl.classList.add("excalidraw-release"),this.titleEl.setText("Pen Settings"),this.createForm()}async onClose(){if(this.dirty){app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&e.view.updatePinnedCustomPens()})),this.plugin.saveSettings();const e=this.plugin.settings.customPens[this.pen],t=this.view.excalidrawAPI;setPen(e,t),t.setActiveTool({type:"freedraw"})}}async createForm(){const e=e=>{let t="";if(COLOR_NAMES.has(e))return[COLOR_NAMES.get(e),t];const A=(new Option).style;if(A.color=e,A.color){const e=A.color.match(/^[^\d]*(\d*)[^\d]*(\d*)[^\d]*(\d*)[^\d]*([\d\.]*)?/);return e?(t=e[4]?(Math.round(255*parseFloat(e[4]))<<0).toString(16).padStart(2,"0"):"",[`#${(parseInt(e[1])<<0).toString(16).padStart(2,"0")}${(parseInt(e[2])<<0).toString(16).padStart(2,"0")}${(parseInt(e[3])<<0).toString(16).padStart(2,"0")}`,t]):[null,t]}return[null,t]},t=this.plugin.settings.customPens[this.pen],A=this.contentEl;let i,n,a,r,s;A.createEl("h1",{text:"Pen settings"}),new obsidian_module.Setting(A).setName("Pen type").setDesc("Select type of pen").addDropdown((e=>{e.addOption("default","Excalidraw Default").addOption("highlighter","Highlighter").addOption("finetip","Fine tip pen").addOption("fountain","Fountain pen").addOption("marker","Marker with Outline").addOption("thick-thin","Mindmap Thick-Thin").addOption("thin-thick-thin","Mindmap Thin-Thick-Thin").setValue(t.type).onChange((e=>{this.dirty=!0,t.type=e}))})).addButton((e=>e.setButtonText("Apply").onClick((()=>{this.dirty=!0,t.strokeColor=PENS[t.type].strokeColor,t.backgroundColor=PENS[t.type].backgroundColor,t.fillStyle=PENS[t.type].fillStyle,t.strokeWidth=PENS[t.type].strokeWidth,t.roughness=PENS[t.type].roughness,t.penOptions=Object.assign({},PENS[t.type].penOptions),A.empty(),this.createForm()})))),i=new obsidian_module.Setting(A).setName(fragWithHTML(t.freedrawOnly?"Stroke & fill applies to: <b>Freedraw only</b>":"Stroke & fill applies to: <b>All shapes</b>")).setDesc(fragWithHTML('<b>"All shapes"</b> means that if for example, you select a blue pen with dashed fill and then switch to a different tool (e.g. to a line, a circle, an arrow - i.e. not the freedraw tool), those will all have the same blue line and dashed fill.<br><b>"Only applies to the freedraw line"</b> means that if for example you are writing black text, and you select a custom pen (e.g. a yellow highlighter), then after using the highlighter you switch to another tool, the previous settings (e.g. black stroke color) will apply to the new shape.')).addToggle((e=>e.setValue(t.freedrawOnly).onChange((e=>{this.dirty=!0,i.setName(fragWithHTML(e?"Stroke & fill applies to: <b>Freedraw only</b>":"Stroke & fill applies to: <b>All shapes</b>")),t.freedrawOnly=e}))));let o,l,c,d,h,u,g,[p,m]=e(t.strokeColor),w=!1;s=new obsidian_module.Setting(A).setName(fragWithHTML(Boolean(t.strokeColor)?"Stroke color: <b>Preset color</b>":"Stroke color: <b>Current</b>")).setDesc(fragWithHTML("Use <b>current</b> stroke color of the canvas, or set a specific <b>preset color</b> for the pen")).addToggle((A=>A.setValue(!Boolean(t.strokeColor)).onChange((A=>{this.dirty=!0,n.settingEl.style.display=A?"none":"",s.setName(fragWithHTML(A?"Stroke color: <b>Current</b>":"Stroke color: <b>Preset color</b>")),A?delete t.strokeColor:(r.getValue()||([p,m]=e("black"),a.setValue(p),r.setValue("black")),t.strokeColor=r.getValue())})))),n=new obsidian_module.Setting(A).setName("Select stroke color").addButton((A=>A.setButtonText("Use Canvas Current").onClick((()=>{var A,i;const n=this.api.getAppState(),s=null!==(i=null===(A=n.resetCustomPen)||void 0===A?void 0:A.currentItemStrokeColor)&&void 0!==i?i:n.currentItemStrokeColor;[p,m]=e(s),t.strokeColor=s,this.dirty=!0,r.setValue(s),w=!0,a.setValue(p)})))).addText((A=>{r=A,A.setValue(t.strokeColor).onChange((A=>{w=!0,this.dirty=!0,t.strokeColor=A,[p,m]=e(A),p&&a.setValue(p)}))})).addColorPicker((e=>{a=e,e.setValue(null!=p?p:"#000000").onChange((e=>{w?w=!1:(this.dirty=!0,t.strokeColor=e+m,r.setValue(e+m))}))})),n.settingEl.style.display=Boolean(t.strokeColor)?"":"none";let[f,E]=e(t.backgroundColor);o=new obsidian_module.Setting(A).setName(fragWithHTML(Boolean(t.backgroundColor)?"Background color: <b>Preset color</b>":"Background color: <b>Current</b>")).setDesc(fragWithHTML("Toggle to use the <b>current background color</b> of the canvas; or a <b>preset color</b>")).addToggle((A=>A.setValue(!Boolean(t.backgroundColor)).onChange((A=>{this.dirty=!0,o.setName(fragWithHTML(A?"Background color: <b>Current</b>":"Background color: <b>Preset color</b>")),c.settingEl.style.display=A?"none":"",l.settingEl.style.display=A||"transparent"===t.backgroundColor?"none":"",A?delete t.backgroundColor:(h.getValue()||([f,E]=e("black"),d.setValue(f),h.setValue("black")),u.setValue(!1))})))),c=new obsidian_module.Setting(A).setName(fragWithHTML("transparent"===t.backgroundColor?"Background: <b>Transparent</b>":"Color: <b>Preset color</b>")).setDesc("Background has color or is transparent").addToggle((e=>{u=e,e.setValue("transparent"===t.backgroundColor).onChange((e=>{this.dirty=!0,l.settingEl.style.display=e?"none":"",g.settingEl.style.display=e?"none":"",c.setName(fragWithHTML(e?"Background: <b>Transparent</b>":"Color: <b>Preset color</b>")),t.backgroundColor=e?"transparent":d.getValue()}))})),c.settingEl.style.display=Boolean(t.backgroundColor)?"":"none";let B,b,v,C,y,F,x,T,S,I=!1;l=new obsidian_module.Setting(A).setName("Background color").addButton((A=>A.setButtonText("Use Canvas Current").onClick((()=>{var A,i;const n=this.api.getAppState(),a=null!==(i=null===(A=n.resetCustomPen)||void 0===A?void 0:A.currentItemBackgroundColor)&&void 0!==i?i:n.currentItemBackgroundColor;[f,E]=e(a),t.backgroundColor=a,this.dirty=!0,h.setValue(a),I=!0,d.setValue(f)})))).addText((A=>{h=A,A.setValue(t.backgroundColor).onChange((A=>{I=!0,this.dirty=!0,t.backgroundColor=A,[f,E]=e(A),f&&d.setValue(f)}))})).addColorPicker((e=>{d=e,e.setValue(null!=f?f:"#000000").onChange((e=>{I?I=!1:(this.dirty=!0,t.backgroundColor=e+E,h.setValue(e+E))}))})),l.settingEl.style.display=Boolean(t.backgroundColor)&&"transparent"!==t.backgroundColor?"":"none",g=new obsidian_module.Setting(A).setName("Fill Style").addDropdown((e=>e.addOption("","Unset").addOption("dots","Dots (⚠ VERY SLOW performance on large objects!)").addOption("zigzag","Zigzag").addOption("zigzag-line","Zigzag-line").addOption("dashed","Dashed").addOption("hachure","Hachure").addOption("cross-hatch","Cross-hatch").addOption("solid","Solid").setValue(t.fillStyle).onChange((e=>{this.dirty=!0,t.fillStyle=e})))),g.settingEl.style.display=Boolean(t.backgroundColor)&&"transparent"!==t.backgroundColor?"":"none",B=new obsidian_module.Setting(A).setName(fragWithHTML(`Sloppiness: <b>${null===t.roughness?"Not Set":t.roughness<=.5?"Architect (":t.roughness<=1.5?"Artist (":"Cartoonist ("}${null===t.roughness?"":`${t.roughness})`}</b>`)).setDesc("Line sloppiness of the shape fill pattern").addSlider((e=>e.setLimits(-.5,3,.5).setValue(null===t.roughness?-.5:t.roughness).onChange((e=>{this.dirty=!0,t.roughness=-.5===e?null:e,B.setName(fragWithHTML(`Sloppiness: <b>${null===t.roughness?"Not Set":t.roughness<=.5?"Architect (":t.roughness<=1.5?"Artist (":"Cartoonist ("}${null===t.roughness?"":`${t.roughness})`}</b>`))})))),b=new obsidian_module.Setting(A).setName(fragWithHTML(`Stroke Width <b>${0===t.strokeWidth?"Not Set":t.strokeWidth}</b>`)).addSlider((e=>e.setLimits(0,5,.5).setValue(t.strokeWidth).onChange((e=>{this.dirty=!0,t.strokeWidth=e,b.setName(fragWithHTML(`Stroke Width <b>${0===t.strokeWidth?"Not Set":t.strokeWidth}</b>`))})))),new obsidian_module.Setting(A).setName("Highlighter pen?").addToggle((e=>e.setValue(t.penOptions.highlighter).onChange((e=>{this.dirty=!0,t.penOptions.highlighter=e})))),new obsidian_module.Setting(A).setName("Pressure sensitve pen?").setDesc(fragWithHTML("<b>toggle on</b>: pressure sensitive<br><b>toggle off</b>: constant pressure")).addToggle((e=>e.setValue(!t.penOptions.constantPressure).onChange((e=>{this.dirty=!0,t.penOptions.constantPressure=!e,v.settingEl.style.display=t.penOptions.constantPressure?"none":""})))),t.penOptions.hasOutline&&0===t.penOptions.outlineWidth&&(t.penOptions.outlineWidth=.5,this.dirty=!0),!t.penOptions.hasOutline&&t.penOptions.outlineWidth>0&&(t.penOptions.outlineWidth=0,this.dirty=!0),C=new obsidian_module.Setting(A).setName(fragWithHTML(0===t.penOptions.outlineWidth?"No outline":`Outline width <b>${t.penOptions.outlineWidth}</b>`)).setDesc("If the stroke has an outline, this will mean the stroke color is the outline color, and the background color is the pen stroke's fill color. If the pen does not have an outline then the pen color is the stroke color. The Fill Style setting applies to the fill style of the enclosed shape, not of the line itself. The line can only have solid fill.").addSlider((e=>e.setLimits(0,8,.5).setValue(t.penOptions.outlineWidth).onChange((e=>{this.dirty=!0,t.penOptions.outlineWidth=e,t.penOptions.hasOutline=e>0,C.setName(fragWithHTML(0===t.penOptions.outlineWidth?"No outline":`Outline width <b>${t.penOptions.outlineWidth}</b>`))})))),A.createEl("h2",{text:"Perfect Freehand settings"}),A.createEl("p").innerHTML='Read the Perfect Freehand documentation following <a href="https://github.com/steveruizok/perfect-freehand#documentation" target="_blank">this link</a>.',y=new obsidian_module.Setting(A).setName(fragWithHTML(`Thinnning <b>${t.penOptions.options.thinning}</b>`)).setDesc(fragWithHTML("The effect of pressure on the stroke's size.<br>To create a stroke with a steady line, set the thinning option to 0.<br>To create a stroke that gets thinner with pressure instead of thicker, use a negative number for the thinning option.")).addSlider((e=>e.setLimits(-1,1,.05).setValue(t.penOptions.options.thinning).onChange((e=>{this.dirty,y.setName(fragWithHTML(`Thinnning <b>${e}</b>`)),t.penOptions.options.thinning=e})))),F=new obsidian_module.Setting(A).setName(fragWithHTML(`Smoothing <b>${t.penOptions.options.smoothing}</b>`)).setDesc(fragWithHTML("How much to soften the stroke's edges.")).addSlider((e=>e.setLimits(0,1,.05).setValue(t.penOptions.options.smoothing).onChange((e=>{this.dirty,F.setName(fragWithHTML(`Smoothing <b>${e}</b>`)),t.penOptions.options.smoothing=e})))),x=new obsidian_module.Setting(A).setName(fragWithHTML(`Streamline <b>${t.penOptions.options.streamline}</b>`)).setDesc(fragWithHTML("\tHow much to streamline the stroke.")).addSlider((e=>e.setLimits(0,1,.05).setValue(t.penOptions.options.streamline).onChange((e=>{this.dirty,x.setName(fragWithHTML(`Streamline <b>${e}</b>`)),t.penOptions.options.streamline=e})))),new obsidian_module.Setting(A).setName("Easing function").setDesc(fragWithHTML('An easing function for the tapering effect. For more info <a href="https://easings.net/#" target="_blank">click here</a>')).addDropdown((e=>e.addOptions(EASINGFUNCTIONS).setValue(t.penOptions.options.easing).onChange((e=>{this.dirty=!0,t.penOptions.options.easing=e})))),v=new obsidian_module.Setting(A).setName("Simulate Pressure").setDesc("Whether to simulate pressure based on velocity.").addDropdown((e=>e.addOption("true","Always").addOption("false","Never").addOption("","Yes for mouse, No for pen").setValue(!0===t.penOptions.options.simulatePressure?"true":!1===t.penOptions.options.simulatePressure?"false":"").onChange((e=>{switch(this.dirty=!0,e){case"true":t.penOptions.options.simulatePressure=!0;break;case"false":t.penOptions.options.simulatePressure=!1;break;default:delete t.penOptions.options.simulatePressure}})))),v.settingEl.style.display=t.penOptions.constantPressure?"none":"",A.createEl("h3",{text:"Start"}),A.createEl("p",{text:"Tapering options for the start of the line."}),new obsidian_module.Setting(A).setName("Cap Start").setDesc("Whether to draw a cap").addToggle((e=>e.setValue(t.penOptions.options.start.cap).onChange((e=>{this.dirty=!0,t.penOptions.options.start.cap=e})))),T=new obsidian_module.Setting(A).setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.start.taper?"true":t.penOptions.options.start.taper}</b>`)).setDesc("The distance to taper. If set to true, the taper will be the total length of the stroke.").addSlider((e=>e.setLimits(0,151,1).setValue("boolean"==typeof t.penOptions.options.start.taper?151:t.penOptions.options.start.taper).onChange((e=>{this.dirty,t.penOptions.options.start.taper=151===e||e,T.setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.start.taper?"true":t.penOptions.options.start.taper}</b>`))})))),new obsidian_module.Setting(A).setName("Easing function").setDesc(fragWithHTML('An easing function for the tapering effect. For more info <a href="https://easings.net/#" target="_blank">click here</a>')).addDropdown((e=>e.addOptions(EASINGFUNCTIONS).setValue(t.penOptions.options.start.easing).onChange((e=>{this.dirty=!0,t.penOptions.options.start.easing=e})))),A.createEl("h3",{text:"End"}),A.createEl("p",{text:"Tapering options for the end of the line."}),new obsidian_module.Setting(A).setName("Cap End").setDesc("Whether to draw a cap").addToggle((e=>e.setValue(t.penOptions.options.end.cap).onChange((e=>{this.dirty=!0,t.penOptions.options.end.cap=e})))),S=new obsidian_module.Setting(A).setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.end.taper?"true":t.penOptions.options.end.taper}</b>`)).setDesc("The distance to taper. If set to true, the taper will be the total length of the stroke.").addSlider((e=>e.setLimits(0,151,1).setValue("boolean"==typeof t.penOptions.options.end.taper?151:t.penOptions.options.end.taper).onChange((e=>{this.dirty,t.penOptions.options.end.taper=151===e||e,S.setName(fragWithHTML(`Taper: <b>${!0===t.penOptions.options.end.taper?"true":t.penOptions.options.end.taper}</b>`))})))),new obsidian_module.Setting(A).setName("Easing function").setDesc(fragWithHTML('An easing function for the tapering effect. For more info <a href="https://easings.net/#" target="_blank">click here</a>')).addDropdown((e=>e.addOptions(EASINGFUNCTIONS).setValue(t.penOptions.options.end.easing).onChange((e=>{this.dirty=!0,t.penOptions.options.end.easing=e}))))}}var defaultAttributes={xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,strokeLinecap:"round",strokeLinejoin:"round"};const toKebabCase=e=>e.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase(),createLucideIcon=(e,t)=>{const A=React.forwardRef((({color:A="currentColor",size:i=24,strokeWidth:n=2,absoluteStrokeWidth:a,children:r,...s},o)=>{return React.createElement("svg",{ref:o,...defaultAttributes,width:i,height:i,stroke:A,strokeWidth:a?24*Number(n)/Number(i):n,className:`lucide lucide-${l=e,l.replace(/([a-z0-9])([A-Z])/g,"$1-$2").toLowerCase()}`,...s},[...t.map((([e,t])=>React.createElement(e,t))),...(Array.isArray(r)?r:[r])||[]]);var l}));return A.displayName=`${e}`,A},Globe=createLucideIcon("Globe",[["circle",{cx:"12",cy:"12",r:"10",key:"1mglay"}],["line",{x1:"2",x2:"22",y1:"12",y2:"12",key:"1dnqot"}],["path",{d:"M12 2a15.3 15.3 0 0 1 4 10 15.3 15.3 0 0 1-4 10 15.3 15.3 0 0 1-4-10 15.3 15.3 0 0 1 4-10z",key:"nb9nel"}]]),RotateCcw=createLucideIcon("RotateCcw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]),Scan=createLucideIcon("Scan",[["path",{d:"M3 7V5a2 2 0 0 1 2-2h2",key:"aa7l1z"}],["path",{d:"M17 3h2a2 2 0 0 1 2 2v2",key:"4qcy5o"}],["path",{d:"M21 17v2a2 2 0 0 1-2 2h-2",key:"6vwrx8"}],["path",{d:"M7 21H5a2 2 0 0 1-2-2v-2",key:"ioqczr"}]]),ICONS={ExportImage:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("g",{strokeWidth:"1.25"},React__namespace.createElement("path",{stroke:"none",d:"M0 0h24v24H0z",fill:"none"}),React__namespace.createElement("path",{d:"M15 8h.01"}),React__namespace.createElement("path",{d:"M12 20h-5a3 3 0 0 1 -3 -3v-10a3 3 0 0 1 3 -3h10a3 3 0 0 1 3 3v5"}),React__namespace.createElement("path",{d:"M4 15l4 -4c.928 -.893 2.072 -.893 3 0l4 4"}),React__namespace.createElement("path",{d:"M14 14l1 -1c.617 -.593 1.328 -.793 2.009 -.598"}),React__namespace.createElement("path",{d:"M19 16v6"}),React__namespace.createElement("path",{d:"M22 19l-3 3l-3 -3"}))),Reload:React__namespace.createElement(RotateCcw,null),Globe:React__namespace.createElement(Globe,null),ZoomToSelectedElement:React__namespace.createElement(Scan,null),ZoomToSection:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("text",{x:"6",y:"18",fontSize:"22px"},"#")),ZoomToBlock:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"1",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("text",{x:"1",y:"18",fontSize:"22px"},"#^")),Discord:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"var(--icon-fill-color)",stroke:"none",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",viewBox:"0 0 640 512"},React__namespace.createElement("path",{d:"M524.531,69.836a1.5,1.5,0,0,0-.764-.7A485.065,485.065,0,0,0,404.081,32.03a1.816,1.816,0,0,0-1.923.91,337.461,337.461,0,0,0-14.9,30.6,447.848,447.848,0,0,0-134.426,0,309.541,309.541,0,0,0-15.135-30.6,1.89,1.89,0,0,0-1.924-.91A483.689,483.689,0,0,0,116.085,69.137a1.712,1.712,0,0,0-.788.676C39.068,183.651,18.186,294.69,28.43,404.354a2.016,2.016,0,0,0,.765,1.375A487.666,487.666,0,0,0,176.02,479.918a1.9,1.9,0,0,0,2.063-.676A348.2,348.2,0,0,0,208.12,430.4a1.86,1.86,0,0,0-1.019-2.588,321.173,321.173,0,0,1-45.868-21.853,1.885,1.885,0,0,1-.185-3.126c3.082-2.309,6.166-4.711,9.109-7.137a1.819,1.819,0,0,1,1.9-.256c96.229,43.917,200.41,43.917,295.5,0a1.812,1.812,0,0,1,1.924.233c2.944,2.426,6.027,4.851,9.132,7.16a1.884,1.884,0,0,1-.162,3.126,301.407,301.407,0,0,1-45.89,21.83,1.875,1.875,0,0,0-1,2.611,391.055,391.055,0,0,0,30.014,48.815,1.864,1.864,0,0,0,2.063.7A486.048,486.048,0,0,0,610.7,405.729a1.882,1.882,0,0,0,.765-1.352C623.729,277.594,590.933,167.465,524.531,69.836ZM222.491,337.58c-28.972,0-52.844-26.587-52.844-59.239S193.056,219.1,222.491,219.1c29.665,0,53.306,26.82,52.843,59.239C275.334,310.993,251.924,337.58,222.491,337.58Zm195.38,0c-28.971,0-52.843-26.587-52.843-59.239S388.437,219.1,417.871,219.1c29.667,0,53.307,26.82,52.844,59.239C470.715,310.993,447.538,337.58,417.871,337.58Z"})),Github:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M15 22v-4a4.8 4.8 0 0 0-1-3.5c3 0 6-2 6-5.5.08-1.25-.27-2.48-1-3.5.28-1.15.28-2.35 0-3.5 0 0-1 0-3 1.5-2.64-.5-5.36-.5-8 0C6 2 5 2 5 2c-.3 1.15-.3 2.35 0 3.5A5.403 5.403 0 0 0 4 9c0 3.5 3 5.5 6 5.5-.39.49-.68 1.05-.85 1.65-.17.6-.22 1.23-.15 1.85v4"}),React__namespace.createElement("path",{d:"M9 18c-4.51 2-5-2-7-2"})),YouTube:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M12 19c-2.3 0-6.4-.2-8.1-.6-.7-.2-1.2-.7-1.4-1.4-.3-1.1-.5-3.4-.5-5s.2-3.9.5-5c.2-.7.7-1.2 1.4-1.4C5.6 5.2 9.7 5 12 5s6.4.2 8.1.6c.7.2 1.2.7 1.4 1.4.3 1.1.5 3.4.5 5s-.2 3.9-.5 5c-.2.7-.7 1.2-1.4 1.4-1.7.4-5.8.6-8.1.6 0 0 0 0 0 0z"}),React__namespace.createElement("polygon",{points:"10 15 15 12 10 9"})),heart:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M20.42 4.58a5.4 5.4 0 0 0-7.65 0l-.77.78-.77-.78a5.4 5.4 0 0 0-7.65 0C1.46 6.7 1.33 10.28 4 13l8 8 8-8c2.67-2.72 2.54-6.3.42-8.42z"})),twitter:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M22 4s-.7 2.1-2 3.4c1.6 10-9.4 17.3-18 11.6 2.2.1 4.4-.6 6-2C3 15.5.5 9.6 3 5c2.2 2.6 5.6 4.1 9 4-.9-4.2 4-6.6 7-3.8 1.1 0 3-1.2 3-1.2z"})),exportLibrary:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 190",fill:"var(--icon-fill-color)"},React__namespace.createElement("g",{fillRule:"evenodd"},React__namespace.createElement("path",{strokeWidth:"0",d:"M50 10h20v20H50"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M50 10h20m-20 0h20m0 0v20m0-20v20m0 0H50m20 0H50m0 0V10m0 20V10"})),React__namespace.createElement("g",{fillRule:"evenodd"},React__namespace.createElement("path",{strokeWidth:"0",d:"M90 10h20v20H90"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M90 10h20m-20 0h20m0 0v20m0-20v20m0 0H90m20 0H90m0 0V10m0 20V10"})),React__namespace.createElement("g",{fillRule:"evenodd"},React__namespace.createElement("path",{strokeWidth:"0",d:"M130 10h20v20h-20"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M130 10h20m-20 0h20m0 0v20m0-20v20m0 0h-20m20 0h-20m0 0V10m0 20V10"})),React__namespace.createElement("g",{fillRule:"evenodd"},React__namespace.createElement("path",{strokeWidth:"0",d:"M170 10h20v20h-20"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M170 10h20m-20 0h20m0 0v20m0-20v20m0 0h-20m20 0h-20m0 0V10m0 20V10"})),React__namespace.createElement("g",{fillRule:"evenodd"},React__namespace.createElement("path",{strokeWidth:"0",d:"M70 50h60v80h20l-50 50-50-50h20V50"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M70 50h60m-60 0h60m0 0v80m0-80v80m0 0h20m-20 0h20m0 0-50 50m50-50-50 50m0 0-50-50m50 50-50-50m0 0h20m-20 0h20m0 0V50m0 80V50m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("g",{fillRule:"evenodd"},React__namespace.createElement("path",{strokeWidth:"0",d:"M10 10h20v20H10"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M10 10h20m-20 0h20m0 0v20m0-20v20m0 0H10m20 0H10m0 0V10m0 20V10"}))),insertPDF:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"var(--icon-fill-color)",stroke:"none"},React__namespace.createElement("path",{d:"M64 464H96v48H64c-35.3 0-64-28.7-64-64V64C0 28.7 28.7 0 64 0H229.5c17 0 33.3 6.7 45.3 18.7l90.5 90.5c12 12 18.7 28.3 18.7 45.3V288H336V160H256c-17.7 0-32-14.3-32-32V48H64c-8.8 0-16 7.2-16 16V448c0 8.8 7.2 16 16 16zM176 352h32c30.9 0 56 25.1 56 56s-25.1 56-56 56H192v32c0 8.8-7.2 16-16 16s-16-7.2-16-16V448 368c0-8.8 7.2-16 16-16zm32 80c13.3 0 24-10.7 24-24s-10.7-24-24-24H192v48h16zm96-80h32c26.5 0 48 21.5 48 48v64c0 26.5-21.5 48-48 48H304c-8.8 0-16-7.2-16-16V368c0-8.8 7.2-16 16-16zm32 128c8.8 0 16-7.2 16-16V400c0-8.8-7.2-16-16-16H320v96h16zm80-112c0-8.8 7.2-16 16-16h48c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v32h32c8.8 0 16 7.2 16 16s-7.2 16-16 16H448v48c0 8.8-7.2 16-16 16s-16-7.2-16-16V432 368z"})),insertImage:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"var(--icon-fill-color)",stroke:"none"},React__namespace.createElement("path",{d:"M464 64H48C21.49 64 0 85.49 0 112v288c0 26.51 21.49 48 48 48h416c26.51 0 48-21.49 48-48V112c0-26.51-21.49-48-48-48zm-6 336H54a6 6 0 0 1-6-6V118a6 6 0 0 1 6-6h404a6 6 0 0 1 6 6v276a6 6 0 0 1-6 6zM128 152c-22.091 0-40 17.909-40 40s17.909 40 40 40 40-17.909 40-40-17.909-40-40-40zM96 352h320v-80l-87.515-87.515c-4.686-4.686-12.284-4.686-16.971 0L192 304l-39.515-39.515c-4.686-4.686-12.284-4.686-16.971 0L96 304v48z"})),insertMD:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 384 512",fill:"var(--icon-fill-color)",stroke:"none"},React__namespace.createElement("path",{d:"M288 248v28c0 6.6-5.4 12-12 12H108c-6.6 0-12-5.4-12-12v-28c0-6.6 5.4-12 12-12h168c6.6 0 12 5.4 12 12zm-12 72H108c-6.6 0-12 5.4-12 12v28c0 6.6 5.4 12 12 12h168c6.6 0 12-5.4 12-12v-28c0-6.6-5.4-12-12-12zm108-188.1V464c0 26.5-21.5 48-48 48H48c-26.5 0-48-21.5-48-48V48C0 21.5 21.5 0 48 0h204.1C264.8 0 277 5.1 286 14.1L369.9 98c9 8.9 14.1 21.2 14.1 33.9zm-128-80V128h76.1L256 51.9zM336 464V176H232c-13.3 0-24-10.7-24-24V48H48v416h288z"})),insertLaTeX:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",stroke:"none",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M571.31 251.31l-22.62-22.62c-6.25-6.25-16.38-6.25-22.63 0L480 274.75l-46.06-46.06c-6.25-6.25-16.38-6.25-22.63 0l-22.62 22.62c-6.25 6.25-6.25 16.38 0 22.63L434.75 320l-46.06 46.06c-6.25 6.25-6.25 16.38 0 22.63l22.62 22.62c6.25 6.25 16.38 6.25 22.63 0L480 365.25l46.06 46.06c6.25 6.25 16.38 6.25 22.63 0l22.62-22.62c6.25-6.25 6.25-16.38 0-22.63L525.25 320l46.06-46.06c6.25-6.25 6.25-16.38 0-22.63zM552 0H307.65c-14.54 0-27.26 9.8-30.95 23.87l-84.79 322.8-58.41-106.1A32.008 32.008 0 0 0 105.47 224H24c-13.25 0-24 10.74-24 24v48c0 13.25 10.75 24 24 24h43.62l88.88 163.73C168.99 503.5 186.3 512 204.94 512c17.27 0 44.44-9 54.28-41.48L357.03 96H552c13.25 0 24-10.75 24-24V24c0-13.26-10.75-24-24-24z"})),insertLink:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",stroke:"none",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M326.612 185.391c59.747 59.809 58.927 155.698.36 214.59-.11.12-.24.25-.36.37l-67.2 67.2c-59.27 59.27-155.699 59.262-214.96 0-59.27-59.26-59.27-155.7 0-214.96l37.106-37.106c9.84-9.84 26.786-3.3 27.294 10.606.648 17.722 3.826 35.527 9.69 52.721 1.986 5.822.567 12.262-3.783 16.612l-13.087 13.087c-28.026 28.026-28.905 73.66-1.155 101.96 28.024 28.579 74.086 28.749 102.325.51l67.2-67.19c28.191-28.191 28.073-73.757 0-101.83-3.701-3.694-7.429-6.564-10.341-8.569a16.037 16.037 0 0 1-6.947-12.606c-.396-10.567 3.348-21.456 11.698-29.806l21.054-21.055c5.521-5.521 14.182-6.199 20.584-1.731a152.482 152.482 0 0 1 20.522 17.197zM467.547 44.449c-59.261-59.262-155.69-59.27-214.96 0l-67.2 67.2c-.12.12-.25.25-.36.37-58.566 58.892-59.387 154.781.36 214.59a152.454 152.454 0 0 0 20.521 17.196c6.402 4.468 15.064 3.789 20.584-1.731l21.054-21.055c8.35-8.35 12.094-19.239 11.698-29.806a16.037 16.037 0 0 0-6.947-12.606c-2.912-2.005-6.64-4.875-10.341-8.569-28.073-28.073-28.191-73.639 0-101.83l67.2-67.19c28.239-28.239 74.3-28.069 102.325.51 27.75 28.3 26.872 73.934-1.155 101.96l-13.087 13.087c-4.35 4.35-5.769 10.79-3.783 16.612 5.864 17.194 9.042 34.999 9.69 52.721.509 13.906 17.454 20.446 27.294 10.606l37.106-37.106c59.271-59.259 59.271-155.699.001-214.959z"})),search:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M500.3 443.7l-119.7-119.7c27.22-40.41 40.65-90.9 33.46-144.7C401.8 87.79 326.8 13.32 235.2 1.723C99.01-15.51-15.51 99.01 1.724 235.2c11.6 91.64 86.08 166.7 177.6 178.9c53.8 7.189 104.3-6.236 144.7-33.46l119.7 119.7c15.62 15.62 40.95 15.62 56.57 0C515.9 484.7 515.9 459.3 500.3 443.7zM79.1 208c0-70.58 57.42-128 128-128s128 57.42 128 128c0 70.58-57.42 128-128 128S79.1 278.6 79.1 208z"})),ocr:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"m6 18 6-12 6 12"}),React__namespace.createElement("path",{d:"M8 14h8"}),React__namespace.createElement("path",{d:"M3 7V5a2 2 0 0 1 2-2h2"}),React__namespace.createElement("path",{d:"M17 3h2a2 2 0 0 1 2 2v2"}),React__namespace.createElement("path",{d:"M21 17v2a2 2 0 0 1-2 2h-2"}),React__namespace.createElement("path",{d:"M7 21H5a2 2 0 0 1-2-2v-2"})),scriptEngine:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 100",stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",strokeLinecap:"round",strokeWidth:"4"},React__namespace.createElement("g",{transform:"translate(-8,-8)"},React__namespace.createElement("path",{d:"M24.318 37.983c-1.234-1.232-8.433-3.903-7.401-7.387 1.057-3.484 9.893-12.443 13.669-13.517 3.776-1.074 6.142 6.523 9.012 7.073 2.87.55 6.797-1.572 8.207-3.694 1.384-2.148-3.147-7.413.15-9.168 3.298-1.755 16.389-2.646 19.611-1.284 3.247 1.363-1.611 7.335-.151 9.483 1.46 2.148 6.067 3.746 8.836 3.38 2.769-.368 4.154-6.733 7.728-5.633 3.575 1.1 12.36 8.828 13.67 12.233 1.308 3.406-5.186 5.423-5.79 8.2-.58 2.75-.026 6.705 2.265 8.355 2.266 1.65 9.642-1.78 11.404 1.598 1.762 3.38 1.007 15.35-.806 18.651-1.787 3.353-7.753-.367-9.969 1.31-2.215 1.65-3.901 5.92-3.373 8.67.504 2.777 7.754 4.48 6.445 7.885C96.49 87.543 87.15 95.454 83.5 96.685c-3.65 1.231-4.96-4.741-7.577-5.16-2.593-.393-6.57.707-8.03 2.75-1.436 2.017 2.668 7.806-.63 9.483-3.323 1.676-15.759 2.226-19.157.655-3.373-1.598.554-7.964-1.108-10.138-1.687-2.174-6.394-3.431-9.012-2.907-2.643.55-3.273 7.282-6.747 6.103-3.499-1.126-12.788-9.535-14.172-13.019-1.36-3.484 5.437-5.108 5.966-7.858.529-2.777-.68-7.073-2.744-8.697-2.064-1.624-7.93 2.41-9.642-1.126-1.737-3.537-2.441-16.765-.654-20.118 1.787-3.3 9.062 1.598 11.429.183 2.366-1.44 2.316-7.282 2.769-8.749m.126-.104c-1.234-1.232-8.433-3.903-7.401-7.387 1.057-3.484 9.893-12.443 13.669-13.517 3.776-1.074 6.142 6.523 9.012 7.073 2.87.55 6.797-1.572 8.207-3.694 1.384-2.148-3.147-7.413.15-9.168 3.298-1.755 16.389-2.646 19.611-1.284 3.247 1.363-1.611 7.335-.151 9.483 1.46 2.148 6.067 3.746 8.836 3.38 2.769-.368 4.154-6.733 7.728-5.633 3.575 1.1 12.36 8.828 13.67 12.233 1.308 3.406-5.186 5.423-5.79 8.2-.58 2.75-.026 6.705 2.265 8.355 2.266 1.65 9.642-1.78 11.404 1.598 1.762 3.38 1.007 15.35-.806 18.651-1.787 3.353-7.753-.367-9.969 1.31-2.215 1.65-3.901 5.92-3.373 8.67.504 2.777 7.754 4.48 6.445 7.885C96.49 87.543 87.15 95.454 83.5 96.685c-3.65 1.231-4.96-4.741-7.577-5.16-2.593-.393-6.57.707-8.03 2.75-1.436 2.017 2.668 7.806-.63 9.483-3.323 1.676-15.759 2.226-19.157.655-3.373-1.598.554-7.964-1.108-10.138-1.687-2.174-6.394-3.431-9.012-2.907-2.643.55-3.273 7.282-6.747 6.103-3.499-1.126-12.788-9.535-14.172-13.019-1.36-3.484 5.437-5.108 5.966-7.858.529-2.777-.68-7.073-2.744-8.697-2.064-1.624-7.93 2.41-9.642-1.126-1.737-3.537-2.441-16.765-.654-20.118 1.787-3.3 9.062 1.598 11.429.183 2.366-1.44 2.316-7.282 2.769-8.749",fill:"none",strokeWidth:"2"}),React__namespace.createElement("path",{d:"M81.235 56.502a23.3 23.3 0 0 1-1.46 8.068 20.785 20.785 0 0 1-1.762 3.72 24.068 24.068 0 0 1-5.337 6.26 22.575 22.575 0 0 1-3.449 2.358 23.726 23.726 0 0 1-7.803 2.803 24.719 24.719 0 0 1-8.333 0 24.102 24.102 0 0 1-4.028-1.074 23.71 23.71 0 0 1-3.776-1.729 23.259 23.259 0 0 1-6.369-5.265 23.775 23.775 0 0 1-2.416-3.353 24.935 24.935 0 0 1-1.762-3.72 23.765 23.765 0 0 1-1.083-3.981 23.454 23.454 0 0 1 0-8.173c.252-1.336.604-2.698 1.083-3.956a24.935 24.935 0 0 1 1.762-3.72 22.587 22.587 0 0 1 2.416-3.378c.881-1.048 1.888-2.017 2.946-2.908a24.38 24.38 0 0 1 3.423-2.357 23.71 23.71 0 0 1 3.776-1.73 21.74 21.74 0 0 1 4.028-1.047 23.437 23.437 0 0 1 8.333 0 24.282 24.282 0 0 1 7.803 2.777 26.198 26.198 0 0 1 3.45 2.357 24.62 24.62 0 0 1 5.336 6.287 20.785 20.785 0 0 1 1.762 3.72 21.32 21.32 0 0 1 1.083 3.955c.251 1.336.302 3.405.377 4.086.05.681.05-.68 0 0",fill:"none"}),React__namespace.createElement("path",{d:"M69.404 56.633c-6.596-3.3-13.216-6.6-19.51-9.744m19.51 9.744c-6.747-3.379-13.493-6.758-19.51-9.744m0 0v19.489m0-19.49v19.49m0 0c4.355-2.148 8.71-4.322 19.51-9.745m-19.51 9.745c3.978-1.965 7.93-3.956 19.51-9.745m0 0h0m0 0h0"}))),openLink:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v7"}),React__namespace.createElement("polyline",{points:"14 2 14 8 20 8"}),React__namespace.createElement("path",{d:"m10 18 3-3-3-3"}),React__namespace.createElement("path",{d:"M4 18v-1a2 2 0 0 1 2-2h6"})),openLinkProperties:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M4 22h14a2 2 0 0 0 2-2V7.5L14.5 2H6a2 2 0 0 0-2 2v7"}),React__namespace.createElement("polyline",{points:"14 2 14 8 20 8",fill:"var(--icon-fill-color)"}),React__namespace.createElement("path",{d:"m10 18 3-3-3-3"}),React__namespace.createElement("path",{d:"M4 18v-1a2 2 0 0 1 2-2h6"})),switchToMarkdown:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",stroke:"var(--icon-fill-color)",strokeWidth:"10",fill:"var(--icon-fill-color)"},React__namespace.createElement("path",{d:"M593.8 59.1H46.2C20.7 59.1 0 79.8 0 105.2v301.5c0 25.5 20.7 46.2 46.2 46.2h547.7c25.5 0 46.2-20.7 46.1-46.1V105.2c0-25.4-20.7-46.1-46.2-46.1zM338.5 360.6H277v-120l-61.5 76.9-61.5-76.9v120H92.3V151.4h61.5l61.5 76.9 61.5-76.9h61.5v209.2zm135.3 3.1L381.5 256H443V151.4h61.5V256H566z"})),gotoFullScreen:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M128 32H32C14.31 32 0 46.31 0 64v96c0 17.69 14.31 32 32 32s32-14.31 32-32V96h64c17.69 0 32-14.31 32-32S145.7 32 128 32zM416 32h-96c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32V64C448 46.31 433.7 32 416 32zM128 416H64v-64c0-17.69-14.31-32-32-32s-32 14.31-32 32v96c0 17.69 14.31 32 32 32h96c17.69 0 32-14.31 32-32S145.7 416 128 416zM416 320c-17.69 0-32 14.31-32 32v64h-64c-17.69 0-32 14.31-32 32s14.31 32 32 32h96c17.69 0 32-14.31 32-32v-96C448 334.3 433.7 320 416 320z"})),exitFullScreen:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 448 512",stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M128 320H32c-17.69 0-32 14.31-32 32s14.31 32 32 32h64v64c0 17.69 14.31 32 32 32s32-14.31 32-32v-96C160 334.3 145.7 320 128 320zM416 320h-96c-17.69 0-32 14.31-32 32v96c0 17.69 14.31 32 32 32s32-14.31 32-32v-64h64c17.69 0 32-14.31 32-32S433.7 320 416 320zM320 192h96c17.69 0 32-14.31 32-32s-14.31-32-32-32h-64V64c0-17.69-14.31-32-32-32s-32 14.31-32 32v96C288 177.7 302.3 192 320 192zM128 32C110.3 32 96 46.31 96 64v64H32C14.31 128 0 142.3 0 160s14.31 32 32 32h96c17.69 0 32-14.31 32-32V64C160 46.31 145.7 32 128 32z"})),releaseNotes:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M0 219.2v212.5c0 14.25 11.62 26.25 26.5 27C75.32 461.2 180.2 471.3 240 511.9V245.2C181.4 205.5 79.99 194.8 29.84 192C13.59 191.1 0 203.6 0 219.2zM482.2 192c-50.09 2.848-151.3 13.47-209.1 53.09C272.1 245.2 272 245.3 272 245.5v266.5c60.04-40.39 164.7-50.76 213.5-53.28C500.4 457.9 512 445.9 512 431.7V219.2C512 203.6 498.4 191.1 482.2 192zM352 96c0-53-43-96-96-96S160 43 160 96s43 96 96 96S352 149 352 96z"})),rawMode:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 100 60"},React__namespace.createElement("path",{stroke:"var(--icon-fill-color)",strokeWidth:"4",d:"M20 10H10m10 0H10m0 0v40m0-40v40m0 0h10m-10 0h10M40 10H30m10 0H30m0 0v40m0-40v40m0 0h10m-10 0h10M60 10h10m-10 0h10m0 0v40m0-40v40m0 0H60m10 0H60M80 10h10m-10 0h10m0 0v40m0-40v40m0 0H80m10 0H80"})),parsedMode:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",stroke:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M574.1 280.4l-45.38-181.8c-5.875-23.63-21.62-44-43-55.75c-21.5-11.75-46.1-14.13-70.25-6.375l-15.25 5.125c-8.375 2.75-12.87 11.88-10 20.25l5 15.13c2.75 8.375 11.88 12.88 20.25 10.13l13.12-4.375c10.88-3.625 23-3.625 33.25 1.75c10.25 5.375 17.5 14.5 20.38 25.75l38.38 153.9c-22.12-6.875-49.75-12.5-81.13-12.5c-34.88 0-73.1 7-114.9 26.75H251.4C210.5 258.6 171.4 251.6 136.5 251.6c-31.38 0-59 5.625-81.12 12.5l38.38-153.9c2.875-11.25 10.12-20.38 20.5-25.75C124.4 79.12 136.5 79.12 147.4 82.74l13.12 4.375c8.375 2.75 17.5-1.75 20.25-10.13l5-15.13C188.6 53.49 184.1 44.37 175.6 41.62l-15.25-5.125c-23.13-7.75-48.75-5.375-70.13 6.375c-21.37 11.75-37.12 32.13-43 55.75L1.875 280.4C.6251 285.4 .0001 290.6 .0001 295.9v70.25C.0001 428.1 51.63 480 115.3 480h37.13c60.25 0 110.4-46 114.9-105.4l2.875-38.63h35.75l2.875 38.63C313.3 433.1 363.4 480 423.6 480h37.13c63.62 0 115.2-51 115.2-113.9V295.9C576 290.6 575.4 285.5 574.1 280.4zM203.4 369.7c-2 26-24.38 46.25-51 46.25H115.2C87 415.1 64 393.6 64 366.1v-37.5c18.12-6.5 43.38-13 72.62-13c23.88 0 47.25 4.375 69.88 13L203.4 369.7zM512 366.1c0 27.5-23 49.88-51.25 49.88h-37.13c-26.62 0-49-20.25-51-46.25l-3.125-41.13c22.62-8.625 46.13-13 70-13c29 0 54.38 6.5 72.5 13V366.1z"})),convertFile:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",viewBox:"0 110 700 340",xmlns:"http://www.w3.org/2000/svg",stroke:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"m593.95 239.4v-1.5742c-0.85547-1.8828-2.043-3.6016-3.5-5.0742l-52.5-52.5c-1.4688-1.457-3.1875-2.6445-5.0742-3.5h-1.5742c-1.4727-0.49219-3.0039-0.78516-4.5508-0.875h-124.25c-4.6406 0-9.0938 1.8438-12.375 5.125s-5.125 7.7344-5.125 12.375v87.5h-70v-105.88-1.0508c-0.089844-1.5469-0.38281-3.0781-0.875-4.5508v-1.5742c-0.85547-1.8828-2.043-3.6016-3.5-5.0742l-52.5-52.5c-1.4727-1.457-3.1914-2.6445-5.0742-3.5h-1.5742c-1.7031-0.875-3.5352-1.4688-5.4258-1.75h-123.55c-4.6406 0-9.0938 1.8438-12.375 5.125s-5.125 7.7344-5.125 12.375v245c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h175c4.6406 0 9.0938-1.8438 12.375-5.125s5.125-7.7344 5.125-12.375v-52.5h70v122.5c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h175c4.6406 0 9.0938-1.8438 12.375-5.125s5.125-7.7344 5.125-12.375v-192.5-1.0508c-0.14453-1.5547-0.5-3.0859-1.0508-4.5508zm-313.95 110.6h-140v-210h87.5v35c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h35v87.5h-52.5c-6.2539 0-12.031 3.3359-15.156 8.75s-3.125 12.086 0 17.5 8.9023 8.75 15.156 8.75h52.5zm140 70v-105h27.824l-5.0742 5.0742c-3.7031 3.1719-5.9141 7.7461-6.1055 12.617-0.1875 4.8711 1.668 9.6016 5.1133 13.051 3.4492 3.4453 8.1797 5.3008 13.051 5.1133 4.8711-0.19141 9.4453-2.4023 12.617-6.1055l35-35c3.2578-3.2773 5.0898-7.7148 5.0898-12.336 0-4.625-1.832-9.0586-5.0898-12.34l-35-35c-4.5078-3.8555-10.66-5.1719-16.348-3.4883-5.6875 1.6797-10.137 6.1289-11.816 11.816-1.6836 5.6914-0.37109 11.844 3.4883 16.348l5.0742 5.0742h-27.824v-69.824h87.5v35c0 4.6406 1.8438 9.0938 5.125 12.375s7.7344 5.125 12.375 5.125h35v157.5z"})),cog:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:"var(--icon-fill-color)",stroke:"none"},React__namespace.createElement("path",{d:"M495.9 166.6C499.2 175.2 496.4 184.9 489.6 191.2L446.3 230.6C447.4 238.9 448 247.4 448 256C448 264.6 447.4 273.1 446.3 281.4L489.6 320.8C496.4 327.1 499.2 336.8 495.9 345.4C491.5 357.3 486.2 368.8 480.2 379.7L475.5 387.8C468.9 398.8 461.5 409.2 453.4 419.1C447.4 426.2 437.7 428.7 428.9 425.9L373.2 408.1C359.8 418.4 344.1 427 329.2 433.6L316.7 490.7C314.7 499.7 307.7 506.1 298.5 508.5C284.7 510.8 270.5 512 255.1 512C241.5 512 227.3 510.8 213.5 508.5C204.3 506.1 197.3 499.7 195.3 490.7L182.8 433.6C167 427 152.2 418.4 138.8 408.1L83.14 425.9C74.3 428.7 64.55 426.2 58.63 419.1C50.52 409.2 43.12 398.8 36.52 387.8L31.84 379.7C25.77 368.8 20.49 357.3 16.06 345.4C12.82 336.8 15.55 327.1 22.41 320.8L65.67 281.4C64.57 273.1 64 264.6 64 256C64 247.4 64.57 238.9 65.67 230.6L22.41 191.2C15.55 184.9 12.82 175.3 16.06 166.6C20.49 154.7 25.78 143.2 31.84 132.3L36.51 124.2C43.12 113.2 50.52 102.8 58.63 92.95C64.55 85.8 74.3 83.32 83.14 86.14L138.8 103.9C152.2 93.56 167 84.96 182.8 78.43L195.3 21.33C197.3 12.25 204.3 5.04 213.5 3.51C227.3 1.201 241.5 0 256 0C270.5 0 284.7 1.201 298.5 3.51C307.7 5.04 314.7 12.25 316.7 21.33L329.2 78.43C344.1 84.96 359.8 93.56 373.2 103.9L428.9 86.14C437.7 83.32 447.4 85.8 453.4 92.95C461.5 102.8 468.9 113.2 475.5 124.2L480.2 132.3C486.2 143.2 491.5 154.7 495.9 166.6V166.6zM256 336C300.2 336 336 300.2 336 255.1C336 211.8 300.2 175.1 256 175.1C211.8 175.1 176 211.8 176 255.1C176 300.2 211.8 336 256 336z"})),trayMode:React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 512",stroke:"var(--icon-fill-color)",fill:"var(--icon-fill-color)",strokeWidth:"20"},React__namespace.createElement("path",{d:"M618.1 97.67c-13.02-4.375-27.45 .1562-35.72 11.16L464 266.7l-118.4-157.8c-8.266-11.03-22.64-15.56-35.72-11.16C296.8 102 288 114.2 288 128v256c0 17.69 14.33 32 32 32s32-14.31 32-32v-160l86.41 115.2c12.06 16.12 39.13 16.12 51.19 0L576 224v160c0 17.69 14.33 32 32 32s32-14.31 32-32v-256C640 114.2 631.2 102 618.1 97.67zM224 96.01H32c-17.67 0-32 14.31-32 32s14.33 32 32 32h64v223.1c0 17.69 14.33 31.99 32 31.99s32-14.3 32-31.99V160h64c17.67 0 32-14.31 32-32S241.7 96.01 224 96.01z"})),copyElementLink:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 260 260","aria-hidden":"true",focusable:"false",role:"img"},React__namespace.createElement("path",{stroke:"var(--icon-fill-color)",fill:"none",strokeLinecap:"round",strokeWidth:"8",d:"M10 10h40m-40 0h40m0 0v40m0-40v40m0 0H10m40 0H10m0 0V10m0 40V10M210 10h40m-40 0h40m0 0v40m0-40v40m0 0h-40m40 0h-40m0 0V10m0 40V10M210 210h40m-40 0h40m0 0v40m0-40v40m0 0h-40m40 0h-40m0 0v-40m0 40v-40M10 210h40m-40 0h40m0 0v40m0-40v40m0 0H10m40 0H10m0 0v-40m0 40v-40M30 210V50m0 160V50M50 30h160M50 30h160M230 50v160m0-160v160M50 230h160m-160 0h160"}),React__namespace.createElement("path",{stroke:"var(--icon-fill-color)",fill:"none",strokeLinecap:"round",strokeWidth:"16",d:"M110 90c-6.67 1.67-30 3.11-40 10-10 6.89-20 21.37-20 31.37S60 153.56 70 160c10 6.44 33.33 8.33 40 10m0-80c-6.67 1.67-30 3.11-40 10-10 6.89-20 21.37-20 31.37S60 153.56 70 160c10 6.44 33.33 8.33 40 10M150 90c6.67 1.67 30 3.11 40 10 10 6.89 20 21.37 20 31.37s-10 22.19-20 28.63c-10 6.44-33.33 8.33-40 10m0-80c6.67 1.67 30 3.11 40 10 10 6.89 20 21.37 20 31.37s-10 22.19-20 28.63c-10 6.44-33.33 8.33-40 10"}),React__namespace.createElement("path",{stroke:"var(--icon-fill-color)",fill:"none",strokeLinecap:"round",strokeWidth:"16",d:"M89.868 130.198c13.36-.03 66.78-.17 80.13-.2m-80.13.2c13.36-.03 66.78-.17 80.13-.2"})),importSVG:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 526 526"},React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"var(--input-bg-color)",strokeWidth:"0",d:"m133.462 71 .33-6.54.97-6.34 1.58-6.13 2.16-5.88 2.69-5.6 3.21-5.27 3.69-4.93 4.13-4.55 4.55-4.13 4.93-3.69 5.27-3.21 5.6-2.69 5.88-2.16 6.13-1.58 6.34-.97 6.54-.33h160v128l.16 3.28.49 3.18.79 3.07 1.07 2.94 1.35 2.8 1.6 2.63 1.84 2.47 2.06 2.27 2.27 2.06 2.47 1.84 2.63 1.6 2.8 1.35 2.94 1.07 3.07.79 3.18.49 3.28.16h128v288l-.33 6.54-.97 6.34-1.58 6.13-2.16 5.88-2.69 5.6-3.21 5.27-3.69 4.93-4.13 4.55-4.55 4.13-4.93 3.69-5.27 3.21-5.6 2.69-5.88 2.16-6.13 1.58-6.34.97-6.54.33h-256l-6.54-.33-6.34-.97-6.13-1.58-5.88-2.16-5.6-2.69-5.27-3.21-4.93-3.69-4.55-4.13-4.13-4.55-3.69-4.93-3.21-5.27-2.69-5.6-2.16-5.88-1.58-6.13-.97-6.34-.33-6.54V343h174.1l-39 39-1.65 1.83-1.43 1.94-1.22 2.05-.99 2.13-.77 2.2-.55 2.25-.33 2.29-.11 2.3.11 2.3.33 2.28.55 2.24.77 2.19.99 2.12 1.22 2.04 1.43 1.93 1.65 1.81 1.83 1.64 1.94 1.42 2.05 1.2 2.13.99 2.2.76 2.25.56 2.29.33 2.3.11 2.3-.1 2.28-.33 2.24-.54 2.19-.77 2.12-.98 2.04-1.21 1.93-1.43 1.81-1.65 80-80 1.65-1.83 1.43-1.94 1.22-2.05.99-2.13.77-2.2.55-2.25.33-2.29.11-2.3-.11-2.3-.33-2.28-.55-2.24-.77-2.19-.99-2.12-1.22-2.04-1.43-1.93-1.65-1.81-80-80-1.83-1.65-1.94-1.43-2.05-1.22-2.13-.99-2.2-.77-2.25-.55-2.29-.33-2.3-.11-2.3.11-2.28.33-2.24.55-2.19.77-2.12.99-2.04 1.22-1.93 1.43-1.81 1.65-1.64 1.83-1.42 1.94-1.2 2.05-.99 2.13-.76 2.2-.56 2.25-.33 2.29-.11 2.3.1 2.3.33 2.28.54 2.24.77 2.19.98 2.12 1.21 2.04 1.43 1.93 1.65 1.81 39 39h-174.1V71"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"18",d:"M133.462 71s0 0 0 0m0 0s0 0 0 0m0 0 .33-6.54m-.33 6.54c.13-2.57.26-5.13.33-6.54m0 0c.36-2.33.72-4.67.97-6.34m-.97 6.34c.35-2.26.69-4.53.97-6.34m0 0c.51-1.99 1.03-3.98 1.58-6.13m-1.58 6.13c.4-1.56.81-3.12 1.58-6.13m0 0c.81-2.22 1.62-4.43 2.16-5.88m-2.16 5.88c.45-1.22.9-2.44 2.16-5.88m0 0c.72-1.51 1.45-3.01 2.69-5.6m-2.69 5.6c.69-1.45 1.39-2.9 2.69-5.6m0 0c.93-1.52 1.86-3.05 3.21-5.27m-3.21 5.27c.97-1.59 1.94-3.18 3.21-5.27m0 0c.86-1.15 1.71-2.29 3.69-4.93m-3.69 4.93c.78-1.04 1.56-2.08 3.69-4.93m0 0c1.53-1.69 3.07-3.38 4.13-4.55m-4.13 4.55c1.54-1.69 3.07-3.38 4.13-4.55m0 0c1.03-.93 2.06-1.87 4.55-4.13m-4.55 4.13c.98-.89 1.97-1.78 4.55-4.13m0 0c1.64-1.23 3.28-2.46 4.93-3.69m-4.93 3.69c1.72-1.29 3.45-2.58 4.93-3.69m0 0c1.11-.68 2.23-1.35 5.27-3.21m-5.27 3.21c1.5-.91 3.01-1.83 5.27-3.21m0 0c1.87-.89 3.73-1.79 5.6-2.69m-5.6 2.69c2.09-1 4.17-2.01 5.6-2.69m0 0c1.72-.64 3.44-1.27 5.88-2.16m-5.88 2.16c1.94-.72 3.89-1.43 5.88-2.16m0 0c2.3-.59 4.6-1.19 6.13-1.58m-6.13 1.58c2.32-.6 4.65-1.2 6.13-1.58m0 0c2.06-.31 4.12-.63 6.34-.97m-6.34.97c2.34-.36 4.69-.72 6.34-.97m0 0c2.05-.1 4.09-.21 6.54-.33m-6.54.33c2.06-.1 4.12-.21 6.54-.33m0 0h160m-160 0h160m0 0v128m0-128v128m0 0s0 0 0 0m0 0s0 0 0 0m0 0 .16 3.28m-.16-3.28c.06 1.16.12 2.32.16 3.28m0 0c.13.82.26 1.64.49 3.18m-.49-3.18c.18 1.13.35 2.26.49 3.18m0 0c.24.95.49 1.91.79 3.07m-.79-3.07c.28 1.1.56 2.2.79 3.07m0 0c.39 1.06.78 2.13 1.07 2.94m-1.07-2.94c.42 1.15.84 2.3 1.07 2.94m0 0c.38.79.76 1.57 1.35 2.8m-1.35-2.8c.4.82.79 1.64 1.35 2.8m0 0c.45.75.91 1.5 1.6 2.63m-1.6-2.63c.4.65.8 1.31 1.6 2.63m0 0c.56.76 1.13 1.52 1.84 2.47m-1.84-2.47c.58.79 1.17 1.57 1.84 2.47m0 0c.75.82 1.5 1.65 2.06 2.27m-2.06-2.27c.75.82 1.5 1.65 2.06 2.27m0 0c.74.66 1.47 1.33 2.27 2.06m-2.27-2.06c.89.81 1.78 1.61 2.27 2.06m0 0c.69.51 1.37 1.02 2.47 1.84m-2.47-1.84c.68.5 1.35 1.01 2.47 1.84m0 0c.81.49 1.62.99 2.63 1.6m-2.63-1.6c.74.45 1.47.9 2.63 1.6m0 0c.72.35 1.43.69 2.8 1.35m-2.8-1.35c.61.3 1.22.59 2.8 1.35m0 0c.85.31 1.69.62 2.94 1.07m-2.94-1.07c1.03.38 2.07.75 2.94 1.07m0 0c.83.22 1.67.43 3.07.79m-3.07-.79 3.07.79m0 0c1.07.16 2.14.33 3.18.49m-3.18-.49c1.2.18 2.39.36 3.18.49m0 0 3.28.16m-3.28-.16c.97.04 1.93.09 3.28.16m0 0h128m-128 0h128m0 0v288m0-288v288m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.1 2.02-.2 4.04-.33 6.54m.33-6.54c-.13 2.52-.26 5.05-.33 6.54m0 0c-.33 2.14-.66 4.29-.97 6.34m.97-6.34c-.32 2.06-.63 4.12-.97 6.34m0 0c-.59 2.28-1.17 4.55-1.58 6.13m1.58-6.13c-.53 2.07-1.07 4.14-1.58 6.13m0 0c-.73 1.99-1.46 3.97-2.16 5.88m2.16-5.88c-.72 1.97-1.44 3.94-2.16 5.88m0 0c-.94 1.97-1.89 3.93-2.69 5.6m2.69-5.6c-.91 1.89-1.82 3.77-2.69 5.6m0 0c-.89 1.46-1.78 2.92-3.21 5.27m3.21-5.27c-.65 1.05-1.29 2.11-3.21 5.27m0 0c-1.13 1.51-2.25 3.01-3.69 4.93m3.69-4.93c-1.29 1.72-2.58 3.44-3.69 4.93m0 0c-1.29 1.42-2.58 2.84-4.13 4.55m4.13-4.55-4.13 4.55m0 0-4.55 4.13m4.55-4.13-4.55 4.13m0 0c-1.2.9-2.41 1.8-4.93 3.69m4.93-3.69-4.93 3.69m0 0c-1.56.95-3.13 1.9-5.27 3.21m5.27-3.21c-1.99 1.21-3.98 2.42-5.27 3.21m0 0c-1.8.86-3.6 1.73-5.6 2.69m5.6-2.69c-1.34.64-2.67 1.28-5.6 2.69m0 0c-2.24.82-4.48 1.65-5.88 2.16m5.88-2.16c-1.38.51-2.77 1.02-5.88 2.16m0 0c-1.46.38-2.93.76-6.13 1.58m6.13-1.58c-1.54.4-3.09.79-6.13 1.58m0 0c-2.12.32-4.24.65-6.34.97m6.34-.97c-2.47.38-4.94.75-6.34.97m0 0c-2.23.11-4.46.22-6.54.33m6.54-.33c-1.97.1-3.93.2-6.54.33m0 0h-256m256 0h-256m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-2.33-.12-4.66-.24-6.54-.33m6.54.33c-1.33-.07-2.65-.13-6.54-.33m0 0c-1.88-.29-3.77-.58-6.34-.97m6.34.97c-2.07-.32-4.14-.63-6.34-.97m0 0c-1.52-.39-3.04-.79-6.13-1.58m6.13 1.58c-2.02-.52-4.04-1.04-6.13-1.58m0 0c-1.6-.59-3.19-1.17-5.88-2.16m5.88 2.16c-1.9-.7-3.8-1.39-5.88-2.16m0 0c-1.41-.68-2.82-1.36-5.6-2.69m5.6 2.69c-1.6-.77-3.2-1.54-5.6-2.69m0 0c-1.4-.86-2.81-1.71-5.27-3.21m5.27 3.21c-2.08-1.27-4.17-2.54-5.27-3.21m0 0c-1.72-1.29-3.43-2.57-4.93-3.69m4.93 3.69c-1.79-1.34-3.57-2.67-4.93-3.69m0 0c-1.18-1.07-2.36-2.15-4.55-4.13m4.55 4.13c-1.64-1.49-3.27-2.97-4.55-4.13m0 0c-1.07-1.19-2.15-2.37-4.13-4.55m4.13 4.55c-1.46-1.61-2.93-3.23-4.13-4.55m0 0-3.69-4.93m3.69 4.93c-.88-1.17-1.76-2.35-3.69-4.93m0 0c-.83-1.37-1.67-2.75-3.21-5.27m3.21 5.27c-1.15-1.89-2.3-3.79-3.21-5.27m0 0c-1.03-2.14-2.05-4.27-2.69-5.6m2.69 5.6c-.68-1.43-1.37-2.85-2.69-5.6m0 0c-.8-2.17-1.59-4.34-2.16-5.88m2.16 5.88c-.82-2.22-1.63-4.44-2.16-5.88m0 0c-.47-1.82-.94-3.64-1.58-6.13m1.58 6.13c-.37-1.44-.74-2.88-1.58-6.13m0 0-.97-6.34m.97 6.34c-.3-1.98-.61-3.97-.97-6.34m0 0c-.13-2.54-.26-5.07-.33-6.54m.33 6.54-.33-6.54m0 0V343m0 112V343m0 0h174.1m-174.1 0h174.1m0 0-39 39m39-39-39 39m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.65.72-1.3 1.44-1.65 1.83m1.65-1.83c-.34.38-.68.76-1.65 1.83m0 0c-.35.47-.7.95-1.43 1.94m1.43-1.94c-.38.5-.75 1.01-1.43 1.94m0 0c-.32.54-.64 1.08-1.22 2.05m1.22-2.05c-.38.64-.76 1.28-1.22 2.05m0 0c-.2.45-.41.89-.99 2.13m.99-2.13c-.38.82-.76 1.64-.99 2.13m0 0c-.18.53-.36 1.05-.77 2.2m.77-2.2c-.3.88-.61 1.75-.77 2.2m0 0c-.15.61-.3 1.22-.55 2.25m.55-2.25c-.16.68-.33 1.35-.55 2.25m0 0-.33 2.29m.33-2.29c-.13.9-.26 1.79-.33 2.29m0 0-.11 2.3m.11-2.3c-.03.59-.06 1.19-.11 2.3m0 0c.03.54.05 1.08.11 2.3m-.11-2.3c.03.72.07 1.44.11 2.3m0 0c.1.71.21 1.43.33 2.28m-.33-2.28c.1.71.21 1.42.33 2.28m0 0c.22.88.44 1.77.55 2.24m-.55-2.24c.16.66.33 1.32.55 2.24m0 0c.26.72.51 1.45.77 2.19m-.77-2.19c.25.69.49 1.39.77 2.19m0 0c.33.7.65 1.4.99 2.12m-.99-2.12c.37.79.74 1.57.99 2.12m0 0c.38.63.75 1.25 1.22 2.04m-1.22-2.04c.4.67.8 1.35 1.22 2.04m0 0c.38.52.77 1.05 1.43 1.93m-1.43-1.93c.38.52.77 1.05 1.43 1.93m0 0c.46.5.91 1 1.65 1.81m-1.65-1.81c.35.39.7.77 1.65 1.81m0 0c.37.33.75.67 1.83 1.64m-1.83-1.64c.43.39.87.78 1.83 1.64m0 0c.62.45 1.25.91 1.94 1.42m-1.94-1.42c.45.32.9.65 1.94 1.42m0 0c.53.3 1.05.61 2.05 1.2m-2.05-1.2c.43.25.86.5 2.05 1.2m0 0c.78.36 1.56.72 2.13.99m-2.13-.99c.54.25 1.08.5 2.13.99m0 0c.67.23 1.33.46 2.2.76m-2.2-.76c.51.17 1.03.35 2.2.76m0 0c.87.22 1.73.43 2.25.56m-2.25-.56c.79.2 1.57.39 2.25.56m0 0 2.29.33m-2.29-.33c.58.08 1.16.16 2.29.33m0 0c.91.04 1.82.09 2.3.11m-2.3-.11c.89.04 1.79.09 2.3.11m0 0c.48-.02.96-.04 2.3-.1m-2.3.1c.73-.03 1.47-.06 2.3-.1m0 0c.61-.09 1.22-.18 2.28-.33m-2.28.33c.58-.09 1.17-.17 2.28-.33m0 0c.79-.19 1.59-.38 2.24-.54m-2.24.54c.88-.21 1.75-.42 2.24-.54m0 0c.7-.25 1.4-.49 2.19-.77m-2.19.77c.5-.18 1.01-.35 2.19-.77m0 0c.56-.26 1.13-.52 2.12-.98m-2.12.98c.69-.31 1.37-.63 2.12-.98m0 0c.63-.37 1.25-.74 2.04-1.21m-2.04 1.21c.8-.48 1.6-.95 2.04-1.21m0 0c.67-.5 1.34-.99 1.93-1.43m-1.93 1.43c.52-.39 1.05-.78 1.93-1.43m0 0c.43-.39.87-.79 1.81-1.65m-1.81 1.65c.42-.38.83-.76 1.81-1.65m0 0 80-80m-80 80 80-80m0 0s0 0 0 0m0 0s0 0 0 0m0 0c.33-.37.67-.74 1.65-1.83m-1.65 1.83c.63-.7 1.27-1.4 1.65-1.83m0 0c.3-.4.59-.79 1.43-1.94m-1.43 1.94c.42-.57.84-1.13 1.43-1.94m0 0c.4-.68.8-1.35 1.22-2.05m-1.22 2.05c.47-.79.93-1.57 1.22-2.05m0 0c.28-.62.57-1.23.99-2.13m-.99 2.13c.3-.65.6-1.31.99-2.13m0 0c.26-.74.51-1.47.77-2.2m-.77 2.2.77-2.2m0 0 .55-2.25m-.55 2.25c.2-.84.41-1.68.55-2.25m0 0 .33-2.29m-.33 2.29c.11-.75.21-1.49.33-2.29m0 0c.03-.54.05-1.08.11-2.3m-.11 2.3c.04-.91.09-1.81.11-2.3m0 0c-.03-.7-.07-1.41-.11-2.3m.11 2.3c-.04-.75-.07-1.49-.11-2.3m0 0c-.08-.52-.15-1.04-.33-2.28m.33 2.28c-.09-.63-.18-1.26-.33-2.28m0 0-.55-2.24m.55 2.24c-.19-.79-.39-1.58-.55-2.24m0 0-.77-2.19m.77 2.19c-.25-.72-.51-1.44-.77-2.19m0 0c-.23-.5-.46-.99-.99-2.12m.99 2.12c-.39-.83-.78-1.66-.99-2.12m0 0c-.42-.7-.83-1.39-1.22-2.04m1.22 2.04c-.32-.53-.64-1.06-1.22-2.04m0 0c-.47-.64-.95-1.28-1.43-1.93m1.43 1.93c-.47-.63-.94-1.27-1.43-1.93m0 0c-.44-.49-.89-.98-1.65-1.81m1.65 1.81c-.64-.7-1.28-1.4-1.65-1.81m0 0-80-80m80 80-80-80m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.72-.65-1.44-1.3-1.83-1.65m1.83 1.65c-.68-.62-1.37-1.23-1.83-1.65m0 0c-.51-.38-1.02-.75-1.94-1.43m1.94 1.43c-.58-.43-1.17-.87-1.94-1.43m0 0c-.73-.43-1.45-.86-2.05-1.22m2.05 1.22c-.77-.45-1.53-.9-2.05-1.22m0 0c-.46-.21-.93-.43-2.13-.99m2.13.99-2.13-.99m0 0c-.83-.29-1.65-.57-2.2-.77m2.2.77c-.56-.19-1.12-.39-2.2-.77m0 0c-.65-.16-1.29-.31-2.25-.55m2.25.55c-.57-.14-1.13-.27-2.25-.55m0 0c-.74-.11-1.48-.21-2.29-.33m2.29.33c-.51-.07-1.02-.15-2.29-.33m0 0c-.77-.04-1.54-.07-2.3-.11m2.3.11c-.88-.04-1.76-.08-2.3-.11m0 0c-.49.02-.98.05-2.3.11m2.3-.11c-.88.04-1.77.09-2.3.11m0 0c-.62.09-1.23.18-2.28.33m2.28-.33c-.6.09-1.2.17-2.28.33m0 0c-.45.11-.91.22-2.24.55m2.24-.55c-.79.2-1.58.39-2.24.55m0 0c-.56.2-1.12.4-2.19.77m2.19-.77c-.51.18-1.01.36-2.19.77m0 0c-.85.4-1.7.8-2.12.99m2.12-.99c-.51.24-1.02.48-2.12.99m0 0c-.6.36-1.2.71-2.04 1.22m2.04-1.22c-.46.27-.91.55-2.04 1.22m0 0c-.49.36-.99.73-1.93 1.43m1.93-1.43-1.93 1.43m0 0c-.42.38-.85.77-1.81 1.65m1.81-1.65c-.69.63-1.39 1.27-1.81 1.65m0 0-1.64 1.83m1.64-1.83c-.54.6-1.08 1.21-1.64 1.83m0 0c-.53.73-1.07 1.47-1.42 1.94m1.42-1.94c-.36.5-.73 1-1.42 1.94m0 0c-.35.61-.7 1.21-1.2 2.05m1.2-2.05c-.33.58-.67 1.15-1.2 2.05m0 0c-.26.57-.53 1.15-.99 2.13m.99-2.13c-.39.85-.78 1.69-.99 2.13m0 0c-.24.7-.48 1.4-.76 2.2m.76-2.2c-.17.51-.35 1.01-.76 2.2m0 0c-.17.68-.33 1.35-.56 2.25m.56-2.25c-.2.79-.39 1.57-.56 2.25m0 0c-.09.65-.18 1.29-.33 2.29m.33-2.29c-.06.48-.13.95-.33 2.29m0 0c-.03.71-.07 1.43-.11 2.3m.11-2.3-.11 2.3m0 0c.04.86.08 1.73.1 2.3m-.1-2.3c.03.8.07 1.6.1 2.3m0 0c.13.88.25 1.76.33 2.28m-.33-2.28c.11.73.21 1.47.33 2.28m0 0c.18.74.36 1.49.54 2.24m-.54-2.24c.15.64.31 1.28.54 2.24m0 0c.2.57.4 1.15.77 2.19m-.77-2.19c.21.58.41 1.17.77 2.19m0 0c.23.5.46 1.01.98 2.12m-.98-2.12c.35.76.71 1.53.98 2.12m0 0c.38.64.76 1.29 1.21 2.04m-1.21-2.04 1.21 2.04m0 0c.45.6.89 1.21 1.43 1.93m-1.43-1.93c.3.4.6.81 1.43 1.93m0 0 1.65 1.81m-1.65-1.81c.47.52.94 1.03 1.65 1.81m0 0 39 39m-39-39 39 39m0 0h-174.1m174.1 0h-174.1m0 0V71m0 223.9V71m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeLinecap:"round",strokeWidth:"18",d:"M135 343.068H31m104 0H31m0 0s0 0 0 0m0 0s0 0 0 0m0 0c-.74-.04-1.48-.07-2.46-.12m2.46.12c-.77-.04-1.54-.08-2.46-.12m0 0c-.87-.14-1.75-.27-2.39-.37m2.39.37c-.55-.09-1.1-.17-2.39-.37m0 0c-.87-.22-1.74-.44-2.3-.59m2.3.59c-.62-.15-1.24-.31-2.3-.59m0 0c-.82-.29-1.64-.59-2.21-.8m2.21.8c-.52-.18-1.03-.37-2.21-.8m0 0c-.55-.26-1.09-.52-2.1-1.01m2.1 1.01c-.64-.31-1.28-.61-2.1-1.01m0 0c-.74-.45-1.48-.89-1.98-1.2m1.98 1.2c-.42-.25-.84-.51-1.98-1.2m0 0c-.7-.52-1.41-1.05-1.84-1.38m1.84 1.38c-.37-.28-.75-.56-1.84-1.38m0 0c-.4-.36-.8-.71-1.71-1.54m1.71 1.54c-.35-.31-.7-.63-1.71-1.54m0 0c-.43-.47-.85-.95-1.54-1.71m1.54 1.71c-.61-.68-1.23-1.36-1.54-1.71m0 0c-.29-.38-.58-.76-1.38-1.84m1.38 1.84c-.54-.71-1.08-1.43-1.38-1.84m0 0c-.46-.76-.92-1.52-1.2-1.98m1.2 1.98c-.45-.74-.89-1.47-1.2-1.98m0 0c-.37-.77-.74-1.53-1.01-2.1m1.01 2.1c-.3-.62-.6-1.25-1.01-2.1m0 0c-.2-.54-.39-1.07-.8-2.21m.8 2.21c-.2-.54-.4-1.09-.8-2.21m0 0c-.22-.85-.44-1.71-.59-2.3m.59 2.3c-.12-.46-.24-.92-.59-2.3m0 0c-.11-.72-.22-1.43-.37-2.39m.37 2.39c-.08-.48-.15-.96-.37-2.39m0 0c-.03-.74-.07-1.48-.12-2.46m.12 2.46c-.04-.79-.08-1.59-.12-2.46m0 0c.04-.74.07-1.49.12-2.46m-.12 2.46.12-2.46m0 0c.08-.53.16-1.07.37-2.39m-.37 2.39c.09-.56.17-1.12.37-2.39m0 0c.17-.69.35-1.38.59-2.3m-.59 2.3c.15-.61.31-1.23.59-2.3m0 0c.17-.48.34-.96.8-2.21m-.8 2.21c.2-.55.4-1.1.8-2.21m0 0c.25-.52.49-1.03 1.01-2.1m-1.01 2.1c.36-.76.73-1.52 1.01-2.1m0 0c.43-.72.87-1.44 1.2-1.98m-1.2 1.98c.27-.45.55-.91 1.2-1.98m0 0c.54-.73 1.09-1.47 1.38-1.84m-1.38 1.84c.4-.54.81-1.09 1.38-1.84m0 0c.53-.59 1.07-1.18 1.54-1.71m-1.54 1.71c.59-.66 1.19-1.32 1.54-1.71m0 0c.54-.49 1.08-.97 1.71-1.54m-1.71 1.54c.48-.43.95-.86 1.71-1.54m0 0c.46-.35.92-.7 1.84-1.38m-1.84 1.38c.5-.38 1.01-.76 1.84-1.38m0 0c.52-.32 1.04-.63 1.98-1.2m-1.98 1.2c.72-.44 1.44-.88 1.98-1.2m0 0 2.1-1.01m-2.1 1.01c.84-.4 1.67-.81 2.1-1.01m0 0c.45-.17.91-.33 2.21-.8m-2.21.8c.56-.21 1.12-.41 2.21-.8m0 0c.89-.23 1.79-.46 2.3-.59m-2.3.59c.48-.13.95-.25 2.3-.59m0 0c.51-.08 1.02-.16 2.39-.37m-2.39.37 2.39-.37m0 0c.52-.02 1.03-.05 2.46-.12m-2.46.12c.74-.03 1.48-.07 2.46-.12m0 0 103.34-.27m-103.34.27c30.04-.08 60.08-.16 103.34-.27"}),React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"var(--input-bg-color)",strokeWidth:"0",d:"M517.462 135h-128V7l128 128"}),React__namespace.createElement("path",{fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"18",d:"M517.462 135h-128m128 0h-128m0 0V7m0 128V7m0 0 128 128m-128-128 128 128m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"}))),obsidian:React__namespace.createElement("svg",{focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512"},React__namespace.createElement("defs",null,React__namespace.createElement("radialGradient",{id:"b",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-48 -185 123 -32 179 429.7)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".4"}),React__namespace.createElement("stop",{offset:"1",stopOpacity:".1"})),React__namespace.createElement("radialGradient",{id:"c",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(41 -310 229 30 341.6 351.3)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".6"}),React__namespace.createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".1"})),React__namespace.createElement("radialGradient",{id:"d",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(57 -261 178 39 190.5 296.3)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".8"}),React__namespace.createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})),React__namespace.createElement("radialGradient",{id:"e",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-79 -133 153 -90 321.4 464.2)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".3"}),React__namespace.createElement("stop",{offset:"1",stopOpacity:".3"})),React__namespace.createElement("radialGradient",{id:"f",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-29 136 -92 -20 300.7 149.9)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:"0"}),React__namespace.createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".2"})),React__namespace.createElement("radialGradient",{id:"g",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(72 73 -155 153 137.8 225.2)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".2"}),React__namespace.createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".4"})),React__namespace.createElement("radialGradient",{id:"h",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(20 118 -251 43 215.1 273.7)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".1"}),React__namespace.createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".3"})),React__namespace.createElement("radialGradient",{id:"i",cx:"0",cy:"0",r:"1",gradientUnits:"userSpaceOnUse",gradientTransform:"matrix(-162 -85 268 -510 374.4 371.7)"},React__namespace.createElement("stop",{stopColor:"#fff",stopOpacity:".2"}),React__namespace.createElement("stop",{offset:".5",stopColor:"#fff",stopOpacity:".2"}),React__namespace.createElement("stop",{offset:"1",stopColor:"#fff",stopOpacity:".3"})),React__namespace.createElement("filter",{id:"a",x:"80.1",y:"37",width:"351.1",height:"443.2",filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},React__namespace.createElement("feFlood",{floodOpacity:"0",result:"BackgroundImageFix"}),React__namespace.createElement("feBlend",{in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),React__namespace.createElement("feGaussianBlur",{stdDeviation:"6.5",result:"effect1_foregroundBlur_744_9191"}))),React__namespace.createElement("g",{filter:"url(#a)"},React__namespace.createElement("path",{d:"M359.2 437.5c-2.6 19-21.3 33.9-40 28.7-26.5-7.2-57.2-18.6-84.8-20.7l-42.4-3.2a28 28 0 0 1-18-8.3l-73-74.8a27.7 27.7 0 0 1-5.4-30.7s45-98.6 46.8-103.7c1.6-5.1 7.8-49.9 11.4-73.9a28 28 0 0 1 9-16.5L249 57.2a28 28 0 0 1 40.6 3.4l72.6 91.6a29.5 29.5 0 0 1 6.2 18.3c0 17.3 1.5 53 11.2 76a301.3 301.3 0 0 0 35.6 58.2 14 14 0 0 1 1 15.6c-6.3 10.7-18.9 31.3-36.6 57.6a142.2 142.2 0 0 0-20.5 59.6Z",fill:"#000",fillOpacity:".3"})),React__namespace.createElement("path",{id:"arrow",d:"M359.9 434.3c-2.6 19.1-21.3 34-40 28.9-26.4-7.3-57-18.7-84.7-20.8l-42.3-3.2a27.9 27.9 0 0 1-18-8.4l-73-75a27.9 27.9 0 0 1-5.4-31s45.1-99 46.8-104.2c1.7-5.1 7.8-50 11.4-74.2a28 28 0 0 1 9-16.6l86.2-77.5a28 28 0 0 1 40.6 3.5l72.5 92a29.7 29.7 0 0 1 6.2 18.3c0 17.4 1.5 53.2 11.1 76.3a303 303 0 0 0 35.6 58.5 14 14 0 0 1 1.1 15.7c-6.4 10.8-18.9 31.4-36.7 57.9a143.3 143.3 0 0 0-20.4 59.8Z",fill:"#6c31e3"}),React__namespace.createElement("path",{d:"M182.7 436.4c33.9-68.7 33-118 18.5-153-13.2-32.4-37.9-52.8-57.3-65.5-.4 1.9-1 3.7-1.8 5.4L96.5 324.8a27.9 27.9 0 0 0 5.5 31l72.9 75c2.3 2.3 5 4.2 7.8 5.6Z",fill:"url(#b)"}),React__namespace.createElement("path",{d:"M274.9 297c9.1.9 18 2.9 26.8 6.1 27.8 10.4 53.1 33.8 74 78.9 1.5-2.6 3-5.1 4.6-7.5a1222 1222 0 0 0 36.7-57.9 14 14 0 0 0-1-15.7 303 303 0 0 1-35.7-58.5c-9.6-23-11-58.9-11.1-76.3 0-6.6-2.1-13.1-6.2-18.3l-72.5-92-1.2-1.5c5.3 17.5 5 31.5 1.7 44.2-3 11.8-8.6 22.5-14.5 33.8-2 3.8-4 7.7-5.9 11.7a140 140 0 0 0-15.8 58c-1 24.2 3.9 54.5 20 95Z",fill:"url(#c)"}),React__namespace.createElement("path",{d:"M274.8 297c-16.1-40.5-21-70.8-20-95 1-24 8-42 15.8-58l6-11.7c5.8-11.3 11.3-22 14.4-33.8a78.5 78.5 0 0 0-1.7-44.2 28 28 0 0 0-39.4-2l-86.2 77.5a28 28 0 0 0-9 16.6L144.2 216c0 .7-.2 1.3-.3 2 19.4 12.6 44 33 57.3 65.3 2.6 6.4 4.8 13.1 6.4 20.4a200 200 0 0 1 67.2-6.8Z",fill:"url(#d)"}),React__namespace.createElement("path",{d:"M320 463.2c18.6 5.1 37.3-9.8 39.9-29a153 153 0 0 1 15.9-52.2c-21-45.1-46.3-68.5-74-78.9-29.5-11-61.6-7.3-94.2.6 7.3 33.1 3 76.4-24.8 132.7 3.1 1.6 6.6 2.5 10.1 2.8l43.9 3.3c23.8 1.7 59.3 14 83.2 20.7Z",fill:"url(#e)"}),React__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M255 200.5c-1.1 24 1.9 51.4 18 91.8l-5-.5c-14.5-42.1-17.7-63.7-16.6-88 1-24.3 8.9-43 16.7-59 2-4 6.6-11.5 8.6-15.3 5.8-11.3 9.7-17.2 13-27.5 4.8-14.4 3.8-21.2 3.2-28 3.7 24.5-10.4 45.8-21 67.5a145 145 0 0 0-17 59Z",fill:"url(#f)"}),React__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M206 285.1c2 4.4 3.7 8 4.9 13.5l-4.3 1c-1.7-6.4-3-11-5.5-16.5-14.6-34.3-38-52-57-65 23 12.4 46.7 31.9 61.9 67Z",fill:"url(#g)"}),React__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M211.1 303c8 37.5-1 85.2-27.5 131.6 22.2-46 33-90.1 24-131l3.5-.7Z",fill:"url(#h)"}),React__namespace.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M302.7 299.5c43.5 16.3 60.3 52 72.8 81.9-15.5-31.2-37-65.7-74.4-78.5-28.4-9.8-52.4-8.6-93.5.7l-.9-4c43.6-10 66.4-11.2 96 0Z",fill:"url(#i)"})),"add-file":React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M14.5 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7.5L14.5 2z"}),React__namespace.createElement("polyline",{points:"14 2 14 8 20 8"}),React__namespace.createElement("line",{x1:"12",x2:"12",y1:"18",y2:"12"}),React__namespace.createElement("line",{x1:"9",x2:"15",y1:"15",y2:"15"})),ExcalidrawSword:React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 537.9 1150.7"},React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"#FFF6F0",d:"m281 988 113-124-77-569H213l-37 574 106 120-4 2"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M279 989c37-42 82-84 116-122M279 990c33-33 59-66 113-123m0-1c-22-191-51-385-78-570m78 570c-31-196-58-391-78-570m-4-1c-30-1-56 1-97-1m102 3c-41 1-81 0-106-3m1 3c-11 185-20 369-30 574m30-574c-7 165-16 330-32 575m2-3c38 47 73 81 97 121m-98-116c39 41 76 86 100 114m0 1s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("path",{fill:"none",stroke:"#af7e00",strokeLinecap:"round",strokeWidth:"4",d:"M279 614v264m-3-259c2 43 8 211 8 254"}),React__namespace.createElement("g",{fill:"none",fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{stroke:"#646261",strokeWidth:".5",d:"M209 300c2-1 6-5 9-3m-8 3 7-5m-4 7c-1-1 2-6 5-8m-6 9 5-9m-9 16c3-3 6-11 12-18m-11 14c5-2 10-7 12-10m-13 17c5-7 9-15 15-21m-13 18c4-7 8-10 13-15m-15 17c7-2 14-11 18-20m-19 20c7-3 7-8 21-15m-18 17c6-8 11-15 13-15m-12 17c6-7 11-16 14-23m-19 24 28-22m-25 25 25-25m-24 25c7-7 13-14 23-28m-21 30 18-27m-20 29c4-9 17-13 25-30m-28 30c10-4 17-12 31-30m-28 34c11-9 20-20 26-34m-26 34c10-11 15-20 30-32m-32 40c5-12 16-20 31-40m-31 36c9-10 20-20 34-38m-34 38c11-12 23-22 35-37m-33 39c10-12 24-25 33-40m-34 44c10-12 19-25 42-43m-43 46 41-44m-36 42c9-13 31-32 32-44m-35 46c12-11 22-23 38-45m-43 48c13-14 27-20 47-52m-44 52c16-14 33-35 47-50m-43 51c8-12 25-25 38-50m-40 54 43-56m-43 56c9-9 25-28 46-58m-51 61c13-15 30-30 56-57m-51 58c17-20 35-40 46-57m-47 61c14-16 25-32 48-61m-48 63c15-18 27-27 57-63m-62 64c18-20 33-37 59-63m-51 61c13-19 34-37 48-65m-53 70c16-19 31-34 58-68m-61 69c30-25 48-55 63-67m-63 66c20-17 38-40 66-65m-58 67c23-23 42-48 53-67m-55 71c18-27 42-50 59-74m-60 78c12-21 33-35 64-75m-66 74c20-26 46-53 67-77m-63 80c24-27 43-54 66-77m-70 75c30-31 55-63 68-76m-74 80c15-17 32-32 78-85m-75 86c23-25 48-49 74-83m-66 88c18-21 36-50 66-90m-69 88c21-29 43-55 70-87m-77 93c36-34 59-66 80-93m-79 89c27-25 49-54 81-88m-73 89c23-32 48-61 71-89m-76 94 79-96m-77 96c27-32 58-65 84-90m-89 92c34-38 69-78 86-94m-81 98 84-96m-86 97c32-42 66-82 83-100m-82 100c29-39 62-74 87-98m-92 98c27-24 50-52 93-100m-86 105c34-44 72-83 86-106m-87 105c34-36 63-73 88-104m-91 105c26-24 50-47 94-104m-94 106c27-31 57-67 95-107m-96 109c38-39 71-78 99-112m-97 113 96-110M200 414c35-34 57-67 102-115m-98 110c38-42 77-83 102-112m-96 116c17-27 44-59 96-117m-99 116c23-25 45-55 99-117M205 415c35-45 77-87 110-122M203 418c43-43 81-91 108-122M208 420c44-45 84-97 100-128M205 419l108-123M201 421c40-44 83-86 114-127M203 425c33-41 70-82 111-127M205 425c24-29 50-53 107-131M206 428c38-41 72-83 108-132M205 430l109-132M204 429c30-38 65-73 112-125M204 435c31-35 63-72 111-130M205 433c40-46 76-96 112-132M205 441c20-34 43-60 112-135M200 439c33-34 59-66 116-133M202 436c29-30 56-63 114-129M206 440c27-36 57-70 111-133M201 442c26-31 58-61 120-127M202 445c20-30 46-54 117-131M201 450c41-51 79-93 113-138M204 444c34-40 71-82 113-133M203 450c33-42 68-79 115-135M200 451l120-132M204 449c33-26 65-68 113-132M205 451l115-133M200 458l117-138M201 458l119-135M202 459c35-38 69-74 119-139M205 460c31-42 65-82 113-135M199 467c29-29 52-60 119-135M201 462c32-40 70-80 118-135M203 462c47-52 93-98 116-135M205 466c39-47 76-90 113-139M196 472c35-33 62-58 123-137M199 470c31-36 63-68 120-136M205 469c26-33 56-67 114-132M204 473c42-44 80-91 115-137M197 477c45-52 96-107 121-137M199 477c31-42 67-79 122-137M199 481c44-51 78-97 120-145M200 479c39-46 78-94 123-140M196 485c37-47 76-83 124-144M201 483c31-32 59-68 120-138M204 486c41-56 89-104 115-145M204 485l118-142M196 487c35-29 63-70 124-136M201 491c35-48 73-91 123-143M201 494c36-40 66-71 121-147M204 493c26-38 55-69 120-143M196 498c37-47 79-94 125-147M200 495c38-39 76-82 123-139M200 496c48-48 89-100 127-139M200 499c28-32 55-62 125-146M199 500c26-32 62-68 125-137M198 502c42-47 81-95 125-143M204 506c32-42 60-73 122-145M203 504c37-42 75-90 121-142M202 512c37-51 83-95 121-150M197 507c49-52 92-102 127-140M203 515c45-54 89-106 119-153M203 512c37-45 78-93 121-148M196 518c47-61 104-120 127-145M197 514c32-36 67-72 131-145M198 515c38-40 71-78 127-145M198 518c46-52 89-105 127-149M193 521c47-53 96-111 133-149M199 522c42-47 86-94 127-147M203 523c33-45 71-89 124-149M201 524c44-52 88-104 124-149M199 532c38-55 81-97 127-154M199 527c49-60 104-115 127-148M201 533c28-43 61-84 126-150M199 529c50-53 95-113 128-147M199 533c31-34 63-69 132-148M197 533c43-46 86-97 132-145M195 541l135-157M200 536c42-53 86-105 127-148M198 543c33-41 65-79 128-152M196 540c38-46 75-89 131-150M199 542c40-48 85-93 128-148M198 544c28-36 57-69 130-153M194 549c56-57 105-117 137-150M197 546c37-46 79-89 132-148M197 550c39-44 81-94 131-155M201 552c38-51 80-99 130-155M197 554c30-39 62-72 134-153M195 553c37-40 73-79 136-152M199 555c50-61 102-120 131-150M199 558c43-53 84-102 131-155M196 563c34-40 68-82 132-153M193 561c52-54 99-110 139-154M198 564c29-31 56-66 136-157M198 565c39-45 77-86 131-156M192 566c36-40 73-82 143-153M195 568c28-35 57-71 135-154M195 569c53-55 107-115 138-154M198 569l133-157M196 576c32-34 58-75 133-159M193 572c26-33 57-64 141-154M195 579c54-57 103-117 134-158M198 575c36-40 70-82 133-157M190 579c64-65 117-122 141-155M195 582c39-47 82-94 138-158M196 581c28-38 64-72 138-154M198 583l134-159M191 588c52-61 101-114 145-158M194 588c51-64 102-124 141-160M195 586c41-45 85-97 138-154M197 590c41-47 82-95 135-162M195 594c30-42 63-76 139-162M193 594c32-34 59-68 140-161M195 596c42-50 76-93 141-163M197 594c32-37 65-72 136-160M192 603l142-162M192 598c30-31 59-64 144-157M197 604c43-59 95-112 138-164M195 603c54-64 106-127 139-164M194 605l144-163M192 608c39-42 79-87 146-164M199 612c31-46 66-86 139-170M197 608c38-47 79-93 141-163M190 611c62-65 121-129 149-163M193 614c55-69 111-132 144-164M197 615c33-31 64-68 136-162M196 615c49-57 101-120 141-165M195 620c52-65 115-133 142-162M190 621c35-37 66-73 147-167M195 625c35-47 75-89 141-169M194 621c47-50 89-100 143-166M189 623c58-58 112-122 149-163M192 624l147-165M196 631c36-45 73-91 143-173M195 629c33-46 70-89 142-168M193 633c57-61 112-124 146-170M190 631c55-60 109-121 148-167M192 633c34-34 67-76 149-166M193 633c44-46 82-94 147-167M194 638c30-35 61-66 144-168M191 638c55-63 113-125 148-169M193 643c50-63 108-130 148-172M194 643c38-48 76-95 145-173M193 646c55-67 111-135 151-170M189 646c35-43 71-82 152-170M196 649c46-56 91-113 141-171M193 648c36-41 71-86 147-172M193 651c47-56 96-116 146-171M191 654c60-70 123-141 150-174M196 656c40-56 85-105 143-172M194 653c34-42 71-88 146-171M186 659c44-45 78-87 153-171M188 659c54-62 108-119 153-173M195 661c32-40 64-83 147-173M193 661c37-39 70-81 147-176M192 663c59-67 124-133 151-173M190 666c41-50 83-99 152-174M193 666c61-63 115-131 149-173M193 666c59-70 120-136 150-173M189 672c34-38 62-73 157-177M189 673l155-176M190 676c45-55 91-112 157-177M192 674l150-176M188 675c38-33 71-73 156-172M188 678c55-63 108-120 155-176M191 679c51-56 107-118 151-174M191 680c50-56 102-118 152-179M186 682c45-48 92-97 158-173M189 684c34-35 64-74 155-176M187 690c51-51 87-102 161-185M191 687c48-60 95-114 154-180M185 688c32-34 68-69 157-178M188 692l158-181M190 692c43-47 83-101 152-178M191 696l154-184M188 700c47-56 93-114 161-185M188 698c63-70 128-142 158-181M189 700c40-49 79-94 154-179M190 700c45-47 85-98 157-183M188 703c35-35 67-72 157-181M186 703c44-53 91-106 161-180M192 708c61-69 116-137 155-186M188 708c51-54 96-108 158-184M186 709l161-179M185 710c52-54 101-111 163-182M189 712c54-64 111-131 161-185M191 713l158-183M187 720c43-50 83-97 160-183M187 718l161-184M191 719c49-54 99-112 156-184M189 719c56-63 114-131 159-186M183 723c52-52 97-102 169-186M184 725c49-54 96-104 165-187M186 729c62-67 115-138 160-191M189 728c46-57 95-113 160-189M185 728c57-64 116-127 163-183M185 732c33-43 69-80 165-188M187 730c33-38 75-85 159-188M190 732c48-53 96-112 158-188M184 736c57-52 102-110 169-187M186 737c34-43 72-87 163-187M191 742l157-194M189 740c34-44 67-82 162-189M187 746c51-73 111-134 163-188M185 744c62-77 129-150 166-189M187 744c42-47 87-98 162-188M189 747c58-66 115-134 160-191M186 748c61-74 127-141 163-185M186 748c44-47 92-98 166-190M188 750c38-47 79-98 166-193M188 754c48-58 97-118 164-194M185 756c44-55 90-105 168-189M184 755l167-189M187 759c59-63 114-134 166-193M187 758l164-194M186 762c59-64 119-133 169-193M185 761c54-65 111-127 170-191M186 762c40-41 77-85 168-195M187 766c63-71 127-143 165-197M181 767c57-65 116-128 176-192M183 770l171-192M185 773c70-78 131-153 169-195M186 773c41-53 82-101 169-196M182 778l176-200M181 775l174-193M185 777c66-76 126-148 168-198M185 778c41-50 86-101 171-195M180 785c66-74 131-151 177-198M184 783c46-55 96-110 172-195M184 784c59-61 114-126 174-196M185 784c62-68 122-136 171-197M185 789c43-49 90-97 174-200M182 788l174-197M187 792c39-50 80-100 168-198M184 793l172-202M180 797c41-49 86-98 174-203M183 794c38-45 77-91 173-198M184 801c48-61 103-123 171-205M184 798c44-45 85-94 173-202M179 805c45-53 87-102 179-200M182 802c48-56 94-111 176-198M186 805c55-71 115-146 170-200M184 803l174-202M183 807c55-64 111-130 178-200M180 809c64-76 132-150 179-200M185 810c35-47 74-91 171-200M183 811l174-202M180 812c43-41 87-91 177-201M180 816c41-52 83-100 178-205M187 820c35-49 74-96 175-206M184 818c63-77 133-157 176-205M182 818c43-57 95-109 178-201M180 821c41-48 84-94 180-203M182 822c44-46 83-91 175-205M182 824c54-56 105-115 179-206M181 831c44-54 90-101 181-206M178 828c41-48 83-96 183-204M180 828c74-77 141-155 182-205M184 830c60-68 118-135 178-206M180 835c56-66 117-132 183-207M180 834c66-73 127-143 180-204M183 839c41-51 86-99 181-208M183 838c50-61 103-121 178-208M178 843c63-70 120-139 184-207M179 841l184-209M184 845c71-85 135-166 177-214M182 842c73-79 141-162 179-207M181 849c46-58 95-112 179-211M180 849l182-208M181 849c69-77 140-159 179-208M183 848c63-73 131-150 179-210M181 857c46-64 96-123 182-213M177 854c73-84 146-165 185-211M181 859c59-75 121-141 182-213M182 856c74-85 144-170 183-212M176 858c70-78 139-156 188-208M179 862c70-80 137-157 184-213M182 861c35-38 72-84 181-214M180 864c63-77 127-153 184-215M176 865c62-70 125-142 190-208M179 867l186-211M179 871c67-76 129-151 187-215M180 871c67-77 134-156 184-216M178 871c47-55 95-110 190-214M180 872c57-67 115-135 187-211M184 875c40-44 78-91 179-212M183 874l183-213M183 877c62-72 126-144 182-214M181 875l184-209M187 874c69-76 133-157 179-212M186 876c55-69 112-134 181-211M186 874c60-70 126-136 182-205M185 877c41-45 76-88 183-207M190 883l174-212M189 881c52-62 108-128 176-212M185 878c54-62 113-129 183-201M188 880c55-67 112-131 178-205M192 883c56-70 124-145 176-205M191 882c51-58 97-115 176-208M187 886c50-56 93-108 183-203M189 882l181-201M190 885c66-65 126-134 181-201M192 885c58-68 113-135 176-202M190 884c52-51 101-104 179-200M192 886c47-49 90-101 177-200M193 891c71-79 138-160 176-206M196 890l173-203M198 889c36-44 76-92 170-199M195 889c47-50 90-100 174-196M197 893c55-66 106-121 170-202M199 893c59-66 118-135 171-202M201 895c47-56 90-106 167-201M197 891c46-49 90-98 174-194M203 895c34-38 72-85 170-197M201 895l171-197M203 896c50-55 98-112 167-194M201 895c40-47 85-94 170-192M205 899c57-72 118-149 165-194M203 899c63-69 121-141 167-195M204 899c49-58 104-118 169-193M203 898c45-53 93-104 170-192M203 900c61-63 121-138 169-190M207 900c37-38 72-80 165-193M207 901c45-45 84-94 163-186M206 901c41-50 88-101 168-189M209 904c45-56 88-105 162-190M210 906c37-41 72-81 163-194M210 904c33-39 72-81 162-186M209 905c32-44 72-85 165-188M215 909c51-65 107-131 160-193M213 906c35-38 69-79 160-189M213 906c57-71 123-141 162-184M210 908c36-38 73-79 163-183M216 908c53-64 112-124 158-182M215 910c52-62 106-122 159-186M214 910c41-47 79-94 163-185M213 911l163-182M218 914c45-59 97-119 155-183M218 912l157-184M219 911c39-47 81-94 154-179M217 913l158-180M220 915c50-52 92-109 156-181M219 917c48-60 94-115 158-183M222 920c32-35 64-77 156-179M219 918l159-180M219 920c32-34 66-71 158-179M220 920c61-69 123-143 156-181M222 918l156-174M223 920l155-175M228 922c42-49 80-104 146-174M223 922c64-72 124-144 153-177M224 926c53-60 100-123 156-178M223 925l155-176M227 929c48-61 97-116 152-181M227 926c34-39 66-79 152-176M226 927c48-49 89-95 151-172M226 926c52-55 104-109 152-169M228 927l151-174M231 930c30-41 58-74 149-175M231 930c35-42 71-83 148-171M230 929c50-51 92-102 150-169M230 933c55-65 113-138 151-174M231 934c33-37 63-75 148-176M235 933c37-38 74-81 142-164M232 932l147-166M234 936c26-34 58-76 149-171M235 935c49-59 102-121 146-168M234 932c57-65 111-125 147-163M235 934c44-51 90-103 146-164M240 936c51-58 98-115 142-168M237 937c32-34 64-71 144-166M241 936c42-48 85-100 139-159M238 940c48-52 92-102 143-163M240 943c32-39 62-72 142-165M241 942c38-48 76-92 141-167M244 941c54-57 102-118 137-163M242 941c49-60 100-118 139-159M246 943l139-159M242 943c33-40 68-84 139-162M239 944c45-46 81-88 147-160M244 946l138-161M247 948c52-55 100-111 133-162M244 947c55-57 106-120 140-161M243 944c37-32 65-72 142-154M246 946l138-155M247 952c35-44 68-86 133-157M249 952c49-58 90-109 136-159M250 952l131-151M246 950l137-154M249 954c53-55 99-110 132-158M250 952c39-44 77-87 133-154M250 956c30-31 53-60 132-155M250 955c45-57 94-111 134-150M252 960c34-46 66-87 135-154M253 958l131-154M254 953c34-35 75-72 135-142M254 957c27-35 58-67 132-148M260 960c39-57 82-105 124-150M255 958c32-35 61-68 130-149M257 963l129-147M256 962c41-45 86-97 128-150M262 964c27-42 61-78 127-152M260 964l124-151M258 963c47-49 92-99 130-145M259 964l127-147M259 962c30-29 59-66 126-140M260 965c28-34 55-67 128-147M258 966c53-57 99-107 133-139M260 965c29-30 59-66 127-143M262 968c47-52 100-112 126-146M265 967c34-35 64-73 123-141M265 967c24-33 58-66 120-138M263 970c42-45 83-92 124-141M270 974c43-58 90-108 118-142M269 971c37-40 71-84 119-143M268 975c23-31 54-64 122-139M267 971l124-136M269 978c47-55 97-108 122-141M271 975c40-50 83-98 120-142M272 976c46-50 90-107 119-137M267 977c32-33 59-69 122-136M270 977c34-43 69-80 122-135M273 977c30-34 58-71 117-136M275 981c34-41 61-79 115-139M271 978c46-49 91-103 119-131M275 984c47-47 86-101 119-142M275 981l115-136M277 982c24-29 57-62 112-128M273 980c43-45 83-91 119-131M277 983c39-39 76-81 114-130M276 984c36-42 74-85 113-134M275 988c48-55 94-108 120-131M277 985c27-36 59-67 114-130M282 990c29-31 51-64 112-135M281 985l112-128M276 985c46-51 93-91 113-122M278 989c44-50 89-99 116-127M282 989c46-48 79-90 111-132M284 991c36-47 75-96 108-131"}),React__namespace.createElement("path",{stroke:"#000",d:"M283 989c39-52 86-95 106-127M282 989c38-44 73-85 112-126m-2 1c-27-190-56-380-78-570m79 570c-33-223-64-446-78-568m-1 2c-40 1-79 1-101-6m100 5H210m2-4c-15 208-26 416-31 578m31-576c-14 162-22 325-32 575m0 1c25 33 57 69 96 113m-96-114c29 41 62 76 98 117m2 1s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("g",{fillOpacity:".8",fillRule:"evenodd",strokeLinecap:"round",strokeOpacity:".8"},React__namespace.createElement("path",{fill:"#dbc9f3",d:"m325 490-71-1-133 118-5 3-4 4-3 5-3 5-19 127 20 15 19 15 16 16 14 17 12 18 9 18 8 20 6 20 15-4 15-3 13-2 13-2 12-1 11-1 15 1 5 1-4-11-5-20-5-20-3-19-2-20-1-19v-19l2-19 2-18 3-19 4-18 6-18 6-19 6-18 8-18 4-9 9-18 4-8 2-8 3-10 1-10v-12l-5-39"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M325 490s0 0 0 0m0 0s0 0 0 0m0 0-71-1m71 1-71-1m0 0L121 607m133-118L121 607m0 0s0 0 0 0m0 0s0 0 0 0m0 0-5 3m5-3-5 3m0 0-4 4m4-4-4 4m0 0-3 5m3-5-3 5m0 0-3 5m3-5-3 5m0 0L87 751m19-127L87 751m0 0s0 0 0 0m0 0s0 0 0 0m0 0 20 15m-20-15 20 15m0 0 19 15m-19-15 19 15m0 0 16 16m-16-16 16 16m0 0 14 17m-14-17 14 17m0 0 12 18m-12-18 12 18m0 0 9 18m-9-18 9 18m0 0 8 20m-8-20 8 20m0 0 6 20m-6-20 6 20m0 0 15-4m-15 4 15-4m0 0 15-3m-15 3 15-3m0 0 13-2m-13 2 13-2m0 0 13-2m-13 2 13-2m0 0 12-1m-12 1 12-1m0 0 11-1m-11 1 11-1m0 0 15 1m-15-1 15 1m0 0 5 1m-5-1 5 1m0 0-4-11m4 11-4-11m0 0-5-20m5 20-5-20m0 0-5-20m5 20-5-20m0 0-3-19m3 19-3-19m0 0-2-20m2 20-2-20m0 0-1-19m1 19-1-19m0 0v-19m0 19v-19m0 0 2-19m-2 19 2-19m0 0 2-18m-2 18 2-18m0 0 3-19m-3 19 3-19m0 0 4-18m-4 18 4-18m0 0 6-18m-6 18 6-18m0 0 6-19m-6 19 6-19m0 0 6-18m-6 18 6-18m0 0 8-18m-8 18 8-18m0 0 4-9m-4 9 4-9m0 0 9-18m-9 18 9-18m0 0 4-8m-4 8 4-8m0 0 2-8m-2 8 2-8m0 0 3-10m-3 10 3-10m0 0 1-10m-1 10 1-10m0 0v-12m0 12v-12m0 0-5-39m5 39-5-39m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("g",{fillOpacity:".8",fillRule:"evenodd",strokeLinecap:"round",strokeOpacity:".8"},React__namespace.createElement("path",{fill:"#a887e8",d:"m439 634 10 20 4 24 2 26 3 25 5 25 8 25 9 24 12 24 13 24 8 11 9 12 7 10 2 6 2 6v5l-2 5-2 5-5 8-61 99-8-17-8-16-9-14-9-14-9-12-10-11-10-10-11-10-11-8-11-7-12-6-12-5-13-4-13-3-14-2-6-1h-7l-7-20-5-20-4-20-3-19-1-19-1-19 1-28 2-19 3-18 4-18 5-19 6-18 7-18 8-18 9-19 7-14 7-20 2-21-5-41 114 144"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M439 634s0 0 0 0m0 0s0 0 0 0m0 0 10 20m-10-20 10 20m0 0 4 24m-4-24 4 24m0 0 2 26m-2-26 2 26m0 0 3 25m-3-25 3 25m0 0 5 25m-5-25 5 25m0 0 8 25m-8-25 8 25m0 0 9 24m-9-24 9 24m0 0 12 24m-12-24 12 24m0 0 13 24m-13-24 13 24m0 0 8 11m-8-11 8 11m0 0 9 12m-9-12 9 12m0 0 7 10m-7-10 7 10m0 0 2 6m-2-6 2 6m0 0 2 6m-2-6 2 6m0 0v5m0-5v5m0 0-2 5m2-5-2 5m0 0-2 5m2-5-2 5m0 0-5 8m5-8-5 8m0 0-61 99m61-99-61 99m0 0s0 0 0 0m0 0s0 0 0 0m0 0-8-17m8 17-8-17m0 0-8-16m8 16-8-16m0 0-9-14m9 14-9-14m0 0-9-14m9 14-9-14m0 0-9-12m9 12-9-12m0 0-10-11m10 11-10-11m0 0-10-10m10 10-10-10m0 0-11-10m11 10-11-10m0 0-11-8m11 8-11-8m0 0-11-7m11 7-11-7m0 0-12-6m12 6-12-6m0 0-12-5m12 5-12-5m0 0-13-4m13 4-13-4m0 0-13-3m13 3-13-3m0 0-14-2m14 2-14-2m0 0-6-1m6 1-6-1m0 0h-7m7 0h-7m0 0-7-20m7 20-7-20m0 0-5-20m5 20-5-20m0 0-4-20m4 20-4-20m0 0-3-19m3 19-3-19m0 0-1-19m1 19-1-19m0 0-1-19m1 19-1-19m0 0 1-28m-1 28 1-28m0 0 2-19m-2 19 2-19m0 0 3-18m-3 18 3-18m0 0 4-18m-4 18 4-18m0 0 5-19m-5 19 5-19m0 0 6-18m-6 18 6-18m0 0 7-18m-7 18 7-18m0 0 8-18m-8 18 8-18m0 0 9-19m-9 19 9-19m0 0 7-14m-7 14 7-14m0 0 7-20m-7 20 7-20m0 0 2-21m-2 21 2-21m0 0-5-41m5 41-5-41m0 0 114 144M325 490l114 144m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("g",{fillOpacity:".8",fillRule:"evenodd",strokeLinecap:"round",strokeOpacity:".8"},React__namespace.createElement("path",{fill:"#6342a0",d:"m190 890 6 29 2 29-1 27-2 14-6 27-8 26-11 25-13 25-7 12 28 1 27 1 27 3 27 4 27 5 25 6 26 7 25 9 12 4 12 2 11-1 10-3 9-5 8-9 6-8 8-18 25-85-10-22-11-20-11-18-13-16-13-14-15-13-15-11-17-9-17-7-19-5-19-3-21-2h-21l-23 3-24 4-24 6"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M190 890s0 0 0 0m0 0s0 0 0 0m0 0 6 29m-6-29 6 29m0 0 2 29m-2-29 2 29m0 0-1 27m1-27-1 27m0 0-2 14m2-14-2 14m0 0-6 27m6-27-6 27m0 0-8 26m8-26-8 26m0 0-11 25m11-25-11 25m0 0-13 25m13-25-13 25m0 0-7 12m7-12-7 12m0 0 28 1m-28-1 28 1m0 0 27 1m-27-1 27 1m0 0 27 3m-27-3 27 3m0 0 27 4m-27-4 27 4m0 0 27 5m-27-5 27 5m0 0 25 6m-25-6 25 6m0 0 26 7m-26-7 26 7m0 0 25 9m-25-9 25 9m0 0 12 4m-12-4 12 4m0 0 12 2m-12-2 12 2m0 0 11-1m-11 1 11-1m0 0 10-3m-10 3 10-3m0 0 9-5m-9 5 9-5m0 0 8-9m-8 9 8-9m0 0 6-8m-6 8 6-8m0 0 8-18m-8 18 8-18m0 0 25-85m-25 85 25-85m0 0s0 0 0 0m0 0s0 0 0 0m0 0-10-22m10 22-10-22m0 0-11-20m11 20-11-20m0 0-11-18m11 18-11-18m0 0-13-16m13 16-13-16m0 0-13-14m13 14-13-14m0 0-15-13m15 13-15-13m0 0-15-11m15 11-15-11m0 0-17-9m17 9-17-9m0 0-17-7m17 7-17-7m0 0-19-5m19 5-19-5m0 0-19-3m19 3-19-3m0 0-21-2m21 2-21-2m0 0h-21m21 0h-21m0 0-23 3m23-3-23 3m0 0-24 4m24-4-24 4m0 0-24 6m24-6-24 6m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("g",{fillOpacity:".8",fillRule:"evenodd",strokeLinecap:"round",strokeOpacity:".8"},React__namespace.createElement("path",{fill:"#390f8c",d:"m87 751 25 19 22 20 20 22 16 24 12 26 9 28 6 27 2 26v27l-4 26-6 26-10 27-13 27-17 26L21 976l-8-12-7-11-1-9v-11l3-9 10-22 69-151"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M87 751s0 0 0 0m0 0s0 0 0 0m0 0 25 19m-25-19 25 19m0 0 22 20m-22-20 22 20m0 0 20 22m-20-22 20 22m0 0 16 24m-16-24 16 24m0 0 12 26m-12-26 12 26m0 0 9 28m-9-28 9 28m0 0 6 27m-6-27 6 27m0 0 2 26m-2-26 2 26m0 0v27m0-27v27m0 0-4 26m4-26-4 26m0 0-6 26m6-26-6 26m0 0-10 27m10-27-10 27m0 0-13 27m13-27-13 27m0 0-17 26m17-26-17 26m0 0L21 976m128 126L21 976m0 0s0 0 0 0m0 0s0 0 0 0m0 0-8-12m8 12-8-12m0 0-7-11m7 11-7-11m0 0-1-9m1 9-1-9m0 0v-11m0 11v-11m0 0 3-9m-3 9 3-9m0 0 10-22M8 924l10-22m0 0 69-151M18 902l69-151m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("path",{fill:"none",stroke:"#CECDCC",strokeLinecap:"round",strokeWidth:"10",d:"M91 753s0 0 0 0m0 0s0 0 0 0m0 0 21 16m-21-16 21 16m0 0 18 17m-18-17 18 17m0 0 16 16m-16-16 16 16m0 0 13 17m-13-17 13 17m0 0 11 17m-11-17 11 17m0 0 8 17m-8-17 8 17m0 0 7 18m-7-18 7 18m0 0 6 18m-6-18 6 18m0 0 15-4m-15 4 15-4m0 0 14-2m-14 2 14-2m0 0 14-2m-14 2 14-2m0 0 13-2m-13 2 13-2m0 0 12-1m-12 1 12-1m0 0 11-1m-11 1 11-1m0 0h10m-10 0h10m0 0h8m-8 0h8m0 0-6-21m6 21-6-21m0 0-6-20m6 20-6-20m0 0-4-20m4 20-4-20m0 0-3-20m3 20-3-20m0 0-1-19m1 19-1-19m0 0-1-19m1 19-1-19m0 0 1-19m-1 19 1-19m0 0 2-18m-2 18 2-18m0 0 2-19m-2 19 2-19m0 0 4-18m-4 18 4-18m0 0 5-18m-5 18 5-18m0 0 6-18m-6 18 6-18m0 0 7-18m-7 18 7-18m0 0 7-18m-7 18 7-18m0 0 9-18m-9 18 9-18m0 0 9-19m-9 19 9-19m0 0 8-22m-8 22 8-22m0 0 2-10m-2 10 2-10"}),React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"#FFF6F0",d:"m154 297-20-26 25-24 207-6 19 26-27 25-205 1-1-3"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"m156 295-20-23m20 24c-7-11-16-19-22-27m6 1c1-11 10-13 21-21m-25 18c6-6 10-11 25-23m0 4c64-2 125-5 200-5m-198 3c64-1 133-4 201-2m-4 0c7 5 16 16 24 23m-20-25c5 6 7 12 20 23m-1 2c-2 8-12 14-18 25m18-24c-7 6-13 13-20 24m-4 1c-82-4-161-3-203 3m207-5c-56 1-110 0-206 4m-1-1s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"#FFF6F0",d:"m275 618 12-35 6-12 11-14 23-18 21-16-29-185-5-43-3-5-5-1-45 4-1 14 17 311"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M277 617c2-5 4-24 9-34 4-10 10-19 17-26 7-8 18-13 23-17l10-8c3-3 9-4 11-9 1-5 3 10-2-20l-26-163c-5-31-2-20-3-27l-3-11c-1-4 0-10-2-12s-6 0-11 0l-15 2h-14c-4 0-8-2-10 0s0 7 0 14v30l10 205c3 38 3 13 3 26l1 50m1-1c2-5 7-22 12-31 5-10 11-20 17-27 7-7 17-13 22-17l7-9c4-3 12-5 14-10s3 10-2-20l-28-162c-5-31-2-19-3-25l-1-13c-1-4-1-9-3-11s-5-1-9-1l-17 1h-15c-5 0-10-2-12 0-1 2 3 5 3 13l2 32 10 202c2 39 0 16 0 29l2 49"})),React__namespace.createElement("g",{fill:"none",fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{stroke:"#bcb9b8",strokeWidth:".5",d:"m259 300 6-5m-6 5 7-4m-4 7 3-8m-3 8 4-8m-7 10c4-3 6-3 12-9m-12 10 13-11m-11 13c5-4 5-8 10-14m-8 14 8-14m-11 17c6-4 12-9 15-15m-16 16 17-17m-13 20c1-3 7-8 12-19m-13 17c6-5 8-10 15-17m-15 21c5-9 14-16 21-21m-23 22 22-24m-18 24 19-25m-19 26 18-24m-21 27c8-7 18-19 25-27m-27 28 29-28m-24 29c4-5 13-13 24-28m-25 30 25-32m-28 36c10-10 17-19 33-34m-34 34c8-9 15-17 35-35m-30 37 29-38m-30 38 29-37m-32 38c12-10 24-24 37-39m-36 40 38-40m-37 43c13-13 22-27 36-43m-35 43 36-42m-38 45c11-11 24-24 42-46m-42 46 44-46m-41 50c16-18 29-37 40-52m-40 51c14-19 28-35 41-49m-43 51 46-51m-46 51 45-50m-41 53 42-54m-44 55 45-54m-49 58c15-14 24-29 55-57m-54 56c13-14 26-27 51-57m-46 61c17-23 35-45 49-60m-49 58c11-16 24-32 46-59m-51 64 55-60m-54 60 52-59m-51 61c14-19 32-36 50-61m-48 60 49-60m-52 65c10-14 24-25 55-59m-55 59 54-60m-50 59c13-13 25-28 51-59m-52 62 50-62m-54 66c14-16 27-29 53-60m-53 59c18-21 35-40 54-58m-49 61 50-60m-51 59 50-61m-52 65c12-16 23-27 52-61m-53 60c15-15 29-32 54-60m-49 63 51-63m-52 64 51-63m-55 65 55-60m-54 59c15-15 29-31 53-59m-51 61 52-61m-52 62 53-61m-53 65c14-18 30-36 53-62m-55 62 56-60m-51 61 49-63m-50 64c11-15 23-29 51-62m-53 65c15-18 34-38 55-60m-56 61c15-20 34-39 55-60m-52 61c11-10 20-26 52-63m-53 64c12-15 24-31 52-62m-53 67c11-17 26-35 54-64m-55 63 54-61m-50 63c21-26 41-50 52-61m-54 61 52-63m-55 67c20-26 44-50 57-61m-56 61c21-25 44-50 56-62m-52 64 51-63m-52 64 52-65m-56 65c20-17 39-40 55-60m-54 62 56-63m-53 64 53-64m-54 65 54-64m-53 67c10-14 22-29 55-63m-58 64 57-63m-55 66c20-25 42-52 56-66m-54 65c20-24 39-50 54-64m-57 69c19-23 41-44 56-63m-56 61c18-18 33-37 56-61m-51 62 50-62m-51 63 53-64m-56 68c15-16 31-32 56-64m-57 65c19-23 39-43 58-65m-55 68 56-65m-57 64 55-67m-57 69c20-19 37-43 58-65m-59 66c21-20 38-41 60-64m-57 66c22-26 45-52 59-65m-57 65 54-66m-58 70c23-25 43-44 59-67m-58 66c15-15 27-32 57-64m-56 68c16-16 30-36 57-68m-56 67 56-66m-58 69c19-18 35-40 58-63m-59 63c16-16 28-32 60-65m-55 66 55-66m-56 68 57-68m-62 71c18-17 39-39 62-66m-60 66c16-18 32-37 61-67m-60 71 58-69m-56 68c18-19 33-41 57-69m-59 70c21-19 39-40 62-64m-63 65c25-27 48-53 62-66m-60 70c12-14 25-29 57-71m-56 70 58-70m-60 72c19-22 41-40 59-64m-59 66c19-24 40-45 60-67m-58 68 60-69m-59 71 58-71m-59 72c23-23 46-52 62-67m-65 69 63-68m-60 68c18-18 36-39 60-68m-58 71 57-71m-60 72c14-15 32-34 62-69m-63 71c22-26 45-52 63-70m-60 70c19-20 34-38 61-71m-61 72 61-71m-64 73c23-19 41-40 62-68m-62 70 62-70m-60 72 61-72m-59 72 59-71m-60 74c22-26 45-50 60-71m-63 72 64-70m-61 71c14-14 24-29 63-71m-61 72 59-73m-63 75c23-26 46-52 65-70m-65 71 64-71m-62 75c17-17 33-37 62-75m-60 73 61-73m-64 79 62-71m-63 69 64-71m-60 74c19-23 38-43 60-75m-61 74c19-21 37-43 61-73m-62 79c23-26 46-56 65-76m-67 74 66-72m-64 75c25-26 47-55 65-75m-64 75c17-18 31-36 64-76m-64 78c19-22 38-42 62-72m-64 73c15-17 30-35 66-73m-65 74 64-73m-62 75c14-16 26-34 63-75m-68 76c24-22 44-45 67-69m-65 71 67-73m-64 75 64-76m-64 77 62-77m-66 78c15-13 29-31 68-72m-66 72 67-72m-64 77c13-18 28-31 64-79m-64 78 64-76m-66 77c19-20 37-42 66-71m-67 73 67-74m-62 76c19-26 43-52 62-75m-65 74 66-75m-67 81 66-76m-68 75c27-28 55-58 68-75m-62 78c15-21 30-41 64-78m-67 78 65-78m-67 82c20-21 37-40 69-78m-68 76 67-75m-63 78 65-80m-66 81c12-16 26-32 65-78m-68 81c14-19 32-36 69-79m-70 77c26-26 50-55 69-75m-64 81c14-21 29-38 66-79m-68 77c18-20 33-38 66-80m-66 83c18-22 39-44 66-78m-68 78 69-77m-66 81c21-23 39-48 65-81m-66 81c27-31 50-60 67-81m-70 83c29-29 57-63 72-79m-70 79 70-77m-66 79c13-18 25-35 66-79m-68 78 67-79m-68 82c15-13 28-29 68-76m-68 77 69-78m-66 82 65-81m-67 79c18-18 33-39 69-79m-69 83c18-22 40-48 69-76m-72 77c19-19 36-39 71-79m-68 81c25-31 53-59 69-80m-69 81 69-83m-71 84c15-17 32-34 70-78m-69 79 70-79m-68 84 68-86m-69 84c17-19 30-37 70-82m-70 83 70-79m-72 81c16-17 32-34 72-81m-69 82 69-81m-68 82 69-81m-72 85 71-79m-70 78c21-23 43-46 71-81m-70 83c16-16 33-34 71-84m-71 85 71-82m-74 84 21-18m-19 19 20-21m-19 25c6-7 13-17 20-23m-19 22 18-24m11-13c10-13 23-28 42-45m-43 45c12-16 26-29 43-47m-42 48c11-8 18-20 41-48m-40 49 41-49m-72 87c4-6 9-9 10-13m-11 12 14-11m-10 13 8-15m-9 16 10-14m27-38c13-10 26-27 33-33m-30 34 29-32m-25 34 26-35m-29 35 30-34m-75 87c5-3 7-5 9-8m-8 9c2-4 5-6 10-9m-8 11 7-12m-6 11c1-4 4-7 7-10m42-52 24-21m-24 21 22-23m-20 24c5-3 9-13 18-24m-17 25 19-25m-75 90 8-6m-8 5 8-5m-4 7 4-7m-4 8 3-7m-6 9h3m-3 1 4-1m-1 3v-4m0 4 1-3"}),React__namespace.createElement("path",{stroke:"transparent",d:"M276 614c2-6 5-24 10-33 4-10 11-19 17-26 7-7 17-13 22-17l8-6c4-3 12-5 13-11 2-5 2 9-3-21s-22-128-26-159c-5-30-2-17-3-23l-2-15c0-4 1-8-1-9-3-1-7 1-11 1l-17-2c-4 0-9 3-13 4-3 0-8-4-9-2-2 2-1 6 0 13l2 32 10 198 1 28 1 46m0 1c2-5 5-21 10-31 4-10 11-22 18-29 6-7 17-11 22-14 6-4 7-3 10-6s8-7 10-12c1-5 2 10-2-20l-24-160-4-24-2-15c-1-4 0-6-2-7h-28l-14 2c-3 0-6-2-8 0v12l2 29c1 38 7 163 10 201 2 37 2 11 3 24l-1 50"})),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"4",d:"M276 613c1-5 6-23 11-33 5-9 11-17 18-24l19-15 10-9c4-3 11-7 12-12 2-5 4 11-1-19l-27-160c-5-31-1-17-2-24l-2-13c-1-4 0-9-2-10-3-2-7 0-11 0h-16l-14 1c-4 0-10-3-11-1-2 2 3 6 3 13 1 8-2-7-1 32l11 198 2 27 1 48m1 0c2-5 5-21 10-31 5-9 14-17 20-24l18-18 8-6c3-3 10-5 11-11 2-5 3 9-2-22l-25-160c-5-31-2-18-3-24l1-12c-1-4-1-8-3-10h-9l-17-1-15 2c-5 0-10 0-11 2-2 2 0 4 1 11s1-7 3 31l7 198c2 37 2 14 3 27l3 50"}),React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"#FFF6F0",d:"m275 626-20-52-11-9-23-19-13-7-11-3-1-9 15-233v-1h41l6 1v12l4 61 12 260"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"m276 625-12-22c-4-9-5-20-10-28s-12-14-20-20c-7-7-19-15-25-18s-9 1-11-2c-2-4 0-5 0-17l4-55 8-154c1-28-3-13 1-16s13 0 21 0c8 1 23-2 27 1 4 4-2-6-1 18l6 128 12 186m-1 1-9-26c-3-9-8-18-13-26l-19-20c-6-6-17-14-23-18-6-3-9 1-11-3-2-3-1-6-1-18l3-53 9-155c2-28-3-10 0-12 4-3 13-2 21-2s22-2 26 1-1-8 0 17l5 128 14 186"})),React__namespace.createElement("g",{fill:"none",fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{stroke:"#000",strokeWidth:".3",d:"M211 291s0 0 0 0m0 0s0 0 0 0m0 3h1m-1 0 1-1m-1 5 3-4m-3 4 2-3m-3 6c3-1 5-5 5-6m-5 7 5-7m-3 11 6-10m-6 9c0-4 4-6 6-9m-8 12c7-3 4-8 8-13m-7 13 12-15m-14 20c5-13 11-15 18-17m-19 13c8-6 15-12 15-17m-16 25c10-8 13-16 21-26m-19 24c3-4 9-11 18-19m-16 19c8-9 15-16 20-24m-23 26c8-6 9-9 23-23m-23 23c8-5 11-9 28-26m-25 31c5-8 10-15 22-27m-23 25c5-2 17-12 29-26m-28 28 24-30m-28 33c7-4 14-17 32-28m-31 32c8-12 20-23 30-36m-25 38c6-14 12-22 25-41m-29 41c10-14 19-25 32-36m-35 42 36-47m-34 44c16-15 31-33 34-42m-37 44c9-11 19-21 42-40m-39 40c15-14 26-29 40-41m-38 47c9-14 22-32 42-49m-45 48c10-11 21-24 40-50m-41 52c19-14 35-33 42-49m-41 49c17-15 29-30 46-51m-47 51c18-11 30-32 53-48m-50 52c10-14 20-23 47-55m-47 56c14-10 20-24 52-54m-53 55c17-15 28-33 50-56m-49 59c13-16 23-28 53-58m-52 57c10-14 25-27 49-59m-54 64c21-18 33-32 56-65m-53 64c16-19 34-38 54-59m-54 64c14-19 32-44 52-64m-53 63c14-16 31-31 54-60m-57 62c17-15 22-27 53-55m-50 55c15-16 28-32 53-57m-55 59c23-18 32-35 53-56m-51 58c12-11 22-26 54-58m-55 60c21-22 41-42 53-59m-53 61c15-14 29-30 55-60m-54 65c8-15 23-30 52-62m-50 59c6-14 20-23 51-62m-52 63c15-11 28-27 50-54m-53 56c21-25 46-46 56-59m-53 64c20-19 38-38 54-62m-54 62c14-16 30-34 51-63m-53 64c22-19 31-39 53-59m-52 60 52-59m-49 65c17-26 37-50 51-63m-56 62c16-17 29-30 57-63m-57 64c16-12 28-31 56-59m-54 62c10-15 21-30 55-65m-60 65c18-17 41-43 62-60m-56 63c18-24 38-48 53-64m-59 64c16-19 36-36 55-64m-49 67c12-17 28-34 54-63m-59 64c21-19 37-38 57-65m-53 65c11-16 25-29 54-62m-54 66c10-11 21-22 51-62m-52 61 56-62m-57 67c13-18 28-35 56-64m-56 63 56-63m-53 69c23-29 39-54 56-64m-60 60c22-24 48-48 59-64m-58 72c25-24 40-57 59-67m-59 64c25-27 46-52 58-67m-61 69c22-22 47-48 55-63m-52 65c22-24 41-50 58-65m-60 68 62-68m-59 66c18-19 35-42 56-65m-58 71 61-64m-61 63 59-65m-57 67 53-64m-55 64c23-21 40-48 59-65m-58 69c22-22 42-43 57-66m-56 68c10-15 20-30 58-66m-61 66c15-14 34-36 56-63m-54 65c14-21 32-40 56-67m-56 66c17-11 31-29 55-65m-56 69c18-21 38-42 57-66m-60 65c19-17 34-33 59-61m-57 63c21-21 39-43 60-66m-59 69c20-20 41-47 59-64m-59 66 58-69m-55 69c11-18 29-35 56-68m-58 72c19-24 39-49 57-68m-56 74c10-22 31-44 54-73m-58 69c24-25 44-49 61-69m-57 76c15-20 30-38 58-70m-63 68 61-70m-57 72c25-25 45-54 58-70m-58 69 60-69m-65 77c12-21 33-33 66-71m-63 68c18-24 38-46 60-72m-58 77c18-20 34-39 60-76m-60 72 58-71m-63 73c21-21 47-45 60-71m-59 74c18-18 36-37 64-71m-61 77c22-27 43-52 59-74m-59 71 59-70m-63 76c16-21 36-42 66-75m-63 71c13-13 25-29 63-71m-66 74c16-15 36-32 67-68m-66 71c23-23 44-46 64-74m-67 77c21-17 39-38 62-74m-60 72 64-72m-65 79c23-31 45-58 64-77m-60 73c16-21 38-41 63-72m-67 80c32-28 54-58 68-75m-64 69c15-20 32-41 61-71m-62 81c15-24 38-45 60-81m-62 79c18-22 35-42 66-74m-63 78c14-23 30-41 60-78m-62 76c15-19 28-35 64-73m-63 72c22-27 44-44 63-70m-65 72 65-75m-66 78c16-15 31-35 68-77m-66 76c23-26 46-54 66-72m-65 77c14-25 37-45 63-74m-64 73c15-17 29-32 64-74m-67 80c22-26 48-59 68-76m-67 75c23-25 46-50 67-76m-62 77c7-10 25-28 59-71m-62 73 65-76m-65 78c16-19 38-41 61-78m-61 79 66-76m-70 79c32-30 56-65 72-80m-67 82c22-29 43-55 66-78m-66 78c22-28 47-62 62-75m-64 76c17-18 32-36 66-77m-65 84c18-29 39-48 63-77m-65 72 68-75m-70 84c21-25 41-54 70-80m-69 76c17-16 33-35 69-76m-68 78c26-27 46-52 69-74m-70 73c24-24 46-49 69-75m-68 84c25-31 50-58 65-78m-66 76 69-81m-69 84c25-24 41-49 73-83m-73 82 70-80m-70 80c21-27 42-49 72-79m-71 83c19-24 41-48 70-80m-69 76c11-9 25-29 71-71m-71 73c23-22 47-49 66-74m-62 75c19-17 33-40 67-74m-67 74c22-23 45-50 63-72m-61 71 62-71m-64 76c14-20 31-39 66-77m-67 74c27-27 46-46 64-71m-61 71c15-17 28-33 62-67m-59 73c22-25 44-55 61-72m-61 71c16-18 30-39 60-71m-62 73c28-28 47-55 65-69m-63 66c23-26 47-50 61-65m-59 69c14-21 30-30 61-64m-59 60c21-23 38-46 54-62m-52 61c10-15 30-32 58-59m-60 61c20-22 39-39 56-61m-52 64c18-22 29-39 50-62m-53 63 56-64m-55 64c19-24 34-42 52-57m-49 55 50-57m-45 59c15-24 37-44 46-55m-49 54c18-19 32-38 51-55m-53 53c17-8 27-18 50-50m-48 54c9-12 22-22 50-55m-49 58c21-25 34-41 51-58m-47 57c7-15 19-25 46-54m-50 57c15-13 24-29 47-57m-43 54c12-11 21-23 46-52m-48 55c22-22 36-39 45-55m-42 55c16-20 29-34 46-53m-44 50c12-13 19-22 46-48m-45 53c10-18 21-28 40-53m-36 49c4-8 14-25 37-43m-42 45 44-46m-39 47c8-16 17-24 39-49m-42 52 39-48m-36 51c13-19 25-29 37-51m-37 48c10-10 16-22 39-47m-40 47c13-6 21-17 40-39m-40 41 40-46m-37 43c15-6 20-20 33-42m-31 47c8-13 15-19 33-43m-33 42c14-12 22-28 32-37m-31 36 35-40m-31 39c7-8 17-17 26-33m-32 35c8-7 17-15 34-36m-31 35c9-8 18-20 35-36m-34 42c8-13 19-23 32-37m-30 35c8-4 13-18 27-34m-27 34c10-13 18-22 30-34m-29 33c11-5 15-16 27-31m-28 33c12-10 24-24 32-32m-27 34c3-9 11-15 24-34m-27 36c13-13 25-27 28-32m-22 28 20-25m-23 30 24-32m-23 34 26-27m-26 25 24-28m-21 31c6-6 11-13 23-30m-25 28c5-8 13-14 22-28m-19 33c3-10 15-20 19-29m-21 28 21-29m-23 31c11-9 15-9 25-30m-21 28c4-6 8-13 23-26m-23 27 23-22m-21 22c5-10 16-16 19-22m-20 27c3-12 13-12 16-28m-14 24c4-3 9-9 17-21m-17 27c2-10 8-11 17-22m-15 19 16-22m-20 20c7 0 12-4 19-13m-14 19c2-8 10-16 14-21m-15 19c0 1 6-8 18-17m-17 18 15-19m-14 20c6-2 3-6 19-18m-20 20c4-6 11-12 17-19m-15 17c4-2 11-8 13-16m-14 20c4-6 6-10 14-17m-9 15 9-10m-12 14c4-7 10-10 15-15m-14 20c4-9 7-10 12-15m-11 11 12-16m-12 20c-1-2 7-10 9-14m-11 11c6-1 8-7 16-14m-11 22c-1-11 6-11 9-16m-11 11 12-14m-10 14 6-11m-9 13c6-5 10-9 10-13m-9 18c0-7 5-5 9-12m-9 10c4-3 9-8 12-14m-11 14 9-13m-8 14c3-3 6-5 8-9m-6 11c2-1 6-6 6-8m-8 9c4-3 7-5 9-11m-6 10c-1-2 7-4 6-8m-7 11c-1-1 3-6 9-10m-9 14c1-4 3-6 6-11m-8 9 10-9m-8 9c3-2 2-3 10-6m-10 7c2 0 3-3 8-9m-8 13c2-2 8-5 7-10m-5 9 6-8m-6 9 7-6m-6 8 5-8m-5 9 5-4m-6 5 7-7m-5 8c1-2 4-2 4-6m-3 7c0-3 2-4 3-6m-3 8 5-5m-5 5 4-5m-4 6c2 0 3 0 4-3m-3 4 3-5m-3 7 4-4m-3 4 2-3m-1 4 2-2m-3 3 2-3m-1 5 1-1m-1 1 2-2"}),React__namespace.createElement("path",{stroke:"transparent",strokeWidth:".5",d:"m277 624-11-21c-4-9-7-22-11-30-5-8-10-13-17-19-8-6-22-15-29-18-6-3-10 1-12-1-2-3 1-5 2-17l4-55 8-153c2-29-2-15 1-17 4-2 13 2 21 2s23-3 27-1c4 3-4-8-3 16 2 24 7 76 10 128 3 53 6 155 7 186m0 5-10-31-11-23c-4-7-7-13-13-19-7-6-19-16-26-20-7-3-12 0-15-3-2-4 1-5 2-17v-53c1-35 4-127 7-156 2-28 2-14 6-16 5-1 13 7 20 7 8 0 19-7 23-4s-1-3 0 21c2 24 7 71 10 122l6 186"})),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"4",d:"m275 627-10-24c-4-9-6-20-11-27-5-8-12-13-19-19l-25-19c-6-4-10-1-12-4-2-4 0-5 0-17l4-55 9-154c2-28-2-12 2-14 3-2 10 0 18 0s23-3 27 1c5 3-2-7-1 18l6 129 12 184m2 0-13-25c-4-9-5-17-10-25a124 124 0 0 0-45-38c-6-3-8 1-10-2s0-5 0-17l3-54 8-155c2-28 0-11 4-13 3-3 10-2 17-2 7-1 22-4 26-1 4 4-2-3 0 21l9 127 9 183"}),React__namespace.createElement("path",{fill:"none",stroke:"#E6E6E5",strokeLinecap:"round",strokeWidth:"10",d:"M460 1010s0 0 0 0m0 0s0 0 0 0m0 0-10-21m10 21-10-21m0 0-11-19m11 19-11-19m0 0-11-17m11 17-11-17m0 0-13-15m13 15-13-15m0 0-13-14m13 14-13-14m0 0-14-11m14 11-14-11m0 0-16-10m16 10-16-10m0 0-16-9m16 9-16-9m0 0-17-6m17 6-17-6m0 0-18-5m18 5-18-5m0 0-19-3m19 3-19-3m0 0-20-2m20 2-20-2m0 0-21 1m21-1-21 1m0 0-22 2m22-2-22 2m0 0-24 4m24-4-24 4m0 0-24 5m24-5-24 5m0 0 6 29m-6-29 6 29m0 0 2 27m-2-27 2 27m0 0v26m0-26v26m0 0-4 26m4-26-4 26m0 0-7 24m7-24-7 24m0 0-9 24m9-24-9 24m0 0-11 24m11-24-11 24m0 0-13 25m13-25-13 25"}),React__namespace.createElement("path",{fill:"none",stroke:"#6d6d6d",strokeLinecap:"round",strokeWidth:"10",d:"M190 890s0 0 0 0m0 0s0 0 0 0m0 0 6 27m-6-27 6 27m0 0 2 26m-2-26 2 26m0 0v26m0-26v26m0 0-3 25m3-25-3 25m0 0-6 25m6-25-6 25m0 0-9 26m9-26-9 26m0 0-12 25m12-25-12 25m0 0-15 26m15-26-15 26"}),React__namespace.createElement("g",{fill:"none",fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{stroke:"#ea0",strokeWidth:".3",d:"M137 269s0 0 0 0m0 0s0 0 0 0m0 0c3-5 5-6 12-12m-11 15c2-4 7-9 11-13m-11 10c2 2 6-7 25-17m-25 19c7-5 16-15 20-21m-17 23c9-4 11-13 24-25m-23 25 20-23m-19 23c4-7 18-21 22-26m-25 31c5-9 13-17 27-32m-28 29c13-12 19-16 28-29m-24 30c6-7 11-14 25-26m-23 33c10-12 20-28 28-36m-29 34c8-9 13-20 28-34m-30 37c16-16 23-29 35-35m-34 32 32-31m-29 35c7-14 18-16 34-33m-32 29c11-11 19-24 27-32m-27 32c5-8 19-18 35-32m-37 34c13-12 24-21 34-34m-30 37c12-14 17-24 30-39m-32 40 35-40m-35 42c14-18 23-30 35-38m-33 36 34-38m-29 40c10-17 26-32 32-38m-35 37c13-13 23-27 37-38m-40 37c15-5 22-12 39-37m-37 41c7-9 18-17 39-43m-38 47c18-22 28-35 43-50m-39 49c5-14 15-21 38-46m-43 49c14-12 22-26 43-52m-39 49c11-10 19-20 41-47m-42 50c20-21 33-36 42-52m-40 52 44-50m-41 47c11-12 18-22 45-48m-45 53c10-17 21-27 40-53m-34 48c4-9 14-26 37-45m-43 47 46-47m-39 46c8-16 18-25 42-52m-46 55c13-14 25-28 43-51m-39 54c15-21 28-32 42-57m-41 54c10-12 18-26 43-52m-43 50c14-7 23-20 44-45m-44 47c15-19 32-37 45-52m-41 48c17-9 24-25 40-50m-38 55c10-15 18-23 40-51m-38 48c16-15 27-34 39-46m-39 45c14-14 26-29 43-49m-38 47c10-12 23-24 36-44m-41 46c10-10 21-20 43-47m-40 45c13-13 26-29 46-48m-45 54c11-17 25-30 42-50m-39 47c10-8 18-24 40-49m-40 49c14-18 27-31 43-48m-40 46c14-11 24-26 40-47m-42 48c18-16 34-36 46-47m-40 48c8-13 19-25 39-52m-42 54c20-20 37-40 43-49m-35 44c12-17 26-32 36-45m-40 49 41-51m-38 52 44-47m-44 45 42-49m-38 50c10-10 19-22 42-51m-44 49c11-13 23-25 42-49m-37 53c9-18 29-37 39-53m-41 52 42-53m-42 53c16-14 24-19 46-55m-42 53c9-12 18-25 43-51m-42 50 45-47m-43 47c13-19 32-34 40-47m-40 52c8-19 25-26 40-56m-38 51c9-9 20-21 40-48m-39 52c10-18 23-27 42-50m-39 47 40-50m-42 46c13-8 24-19 44-42m-40 48c11-16 27-34 40-50m-38 46c6-7 18-23 43-47m-42 47 40-48m-38 47c13-9 17-21 45-47m-46 50 43-49m-39 45c13-13 30-30 40-48m-41 51c12-13 21-26 41-47m-35 45 37-44m-40 47c13-17 29-32 43-47m-40 50c13-19 26-31 41-49m-40 45c9-10 20-22 41-49m-39 50c5-8 21-24 38-46m-40 44c14-11 26-27 45-48m-38 53c8-20 25-31 39-49m-41 44 41-47m-37 45c6-7 15-17 36-46m-39 49c17-19 33-36 41-49m-39 52c8-17 22-22 40-48m-40 46c15-16 30-33 44-51m-41 48c6-9 15-17 41-50m-40 52 41-47m-35 46c9-11 22-26 35-44m-39 46c14-15 26-27 41-48m-34 43c8-16 32-32 37-45m-39 48c5-8 16-22 42-47m-41 51c6-13 16-22 38-51m-41 48c17-18 34-34 45-48m-41 45c12-11 16-21 46-45m-45 47c9-8 17-20 42-49m-41 52c13-17 34-32 41-52m-39 49c13-11 23-27 41-47m-39 45c9-13 17-17 44-47m-42 51c12-18 26-30 41-50m-40 48c15-15 25-23 41-45m-43 47c12-13 26-27 45-51m-41 49c12-15 27-25 43-51m-40 53c12-20 29-37 40-51m-39 52c9-12 22-24 45-52m-45 51c15-19 28-35 43-51m-43 49c14-10 23-17 46-47m-44 50c14-16 24-32 44-52m-44 53c11-10 17-20 49-55m-45 52c13-18 31-35 41-48m-38 45c5-8 19-19 45-48m-48 49c19-16 32-34 45-48m-41 54 41-49m-41 47c16-19 32-40 45-50m-40 51c8-14 22-30 36-55m-37 53c17-18 31-37 41-49m-36 47c11-18 27-33 37-50m-38 50 41-48m-41 49c8-13 22-25 46-48m-46 48c12-11 23-23 42-50m-37 47c13-16 22-31 42-46m-46 48c12-8 19-20 46-49m-38 54c9-23 30-38 39-54m-43 50c15-20 35-37 45-49m-42 47 40-47m-38 48 40-48m-37 50c13-17 26-36 44-49m-47 47c10-10 17-20 42-49m-34 50c9-15 24-28 34-47m-36 45c10-13 23-25 41-45m-44 47c18-23 35-42 46-46m-43 45c19-18 34-34 44-49m-40 47 38-43m-38 44c14-14 26-28 41-49m-38 52c9-17 23-26 42-53m-44 51c13-16 29-29 44-46m-39 44c17-19 31-33 42-49m-42 52c16-16 29-36 40-47m-40 48c8-15 17-23 46-50m-46 47c15-15 28-31 44-45m-38 47c9-18 23-32 43-48m-45 47c11-13 27-28 43-49m-40 51c13-17 20-32 43-49m-43 49c17-17 28-35 43-48m-40 46c14-17 31-32 42-48m-44 47c14-14 28-34 42-47m-37 50c12-14 22-26 37-49m-37 47c13-17 25-33 40-47m-35 45c10-12 23-31 42-44m-45 47c13-17 22-27 44-50m-43 51c10-15 22-30 45-47m-45 44c17-16 32-37 43-46m-41 43c11-11 24-18 45-44m-43 48c15-19 33-36 39-46m-38 47c11-17 26-27 43-41m-40 38 36-41m-36 46c14-15 27-30 36-45m-34 40c7-11 19-23 37-41m-36 46c10-16 26-30 37-47m-37 46c10-10 20-20 37-41m-33 39c11-11 17-22 37-42m-37 40c8-7 17-15 35-38m-34 39c11-15 22-23 37-41m-36 41c10-10 19-19 34-38m-29 41c7-12 15-24 33-36m-33 35 30-38m-28 36c10-8 22-25 29-35m-29 37c8-11 19-22 27-36m-22 33c5-9 15-18 27-31m-31 33c10-11 23-26 29-35m-30 34c10-13 26-24 33-31m-29 31c10-7 15-18 26-30m-20 34c0-10 7-13 20-30m-22 27c6-7 12-13 23-30m-24 28c11-6 15-13 27-31m-24 33c8-7 12-15 25-28m-18 27c-1-6 13-18 17-26m-20 28c6-12 14-19 22-27m-21 24c9-7 17-16 19-20m-20 19 23-23m-228 28s0 0 0 0m0 0s0 0 0 0m3 0-7-7m7 7-8-8m11 5c-9-2-15-11-14-15m16 17c-6-4-11-9-19-13m22 17c-14-12-22-18-27-29m27 27-27-24m31 23c-14-6-19-18-30-26m29 26c-15-9-26-20-32-29m32 30c-3-5-15-17-31-33m30 30-30-28m31 27c-9-7-19-21-28-27m30 27-34-26m36 31c-9-13-22-25-30-34m32 33c-5-7-15-16-32-32m39 30c-11-10-23-12-37-31m34 32c-11-12-20-19-35-32m35 30c-8-14-27-28-31-29m35 28c-16-10-29-26-41-30m41 30c-9-11-21-19-35-31m36 31-40-32m44 31c-17-8-30-24-41-32m41 33c-13-7-25-21-42-33m43 37c-7-12-20-24-38-38m42 38c-16-15-32-27-45-40m49 42c-15-11-29-25-43-43m39 39c-10-11-24-22-45-38m52 41c-14-10-26-19-49-39m46 35c-18-12-32-29-44-37m45 35c-15-11-28-29-48-40m52 44-51-40m51 37c-9-10-18-14-51-37m52 40-48-44m52 42c-20-11-30-27-55-43m53 45-49-45m52 45c-19-15-35-33-49-48m48 46c-10-10-20-21-50-43m54 47c-15-22-34-37-52-46m54 41-55-45m54 46c-16-16-26-29-50-45m55 45c-22-18-44-36-58-45m61 50c-19-22-40-38-55-52m52 49-54-48m58 44c-14-15-35-28-56-44m58 45c-20-13-36-28-57-47m55 48c-12-13-20-15-55-50m59 49c-14-9-25-20-55-46m53 50c-12-16-26-28-49-55m53 52c-12-11-27-21-55-49m56 51c-17-21-41-33-57-50m60 51c-22-16-39-35-56-50m61 51c-17-16-36-33-61-52m58 49c-20-18-35-35-55-50m59 46c-14-9-36-27-53-42m52 47c-16-15-28-27-57-51m62 47c-22-15-49-36-56-43m53 47c-17-17-35-32-53-51m55 51c-6-9-22-23-54-48m57 46c-13-9-28-21-56-49m55 52c-14-19-37-37-57-49m60 45-58-48m57 51c-10-14-32-31-54-52m57 51c-12-14-29-26-56-48m64 45c-17-16-34-30-60-46m56 47-57-47m63 44c-20-12-35-20-60-41m56 46c-14-11-28-25-53-49m61 46c-19-12-33-24-64-46m62 47c-15-13-33-24-57-47m57 48c-19-20-44-36-52-50m52 51-53-48m55 45c-6-5-21-14-56-43m58 46c-15-17-34-32-56-49m58 50c-11-12-26-24-53-50m53 50-57-52m64 54c-20-24-40-38-61-49m58 43c-15-10-28-22-57-48m63 51c-24-24-49-41-61-50m58 51c-15-13-28-28-55-51m56 46c-13-12-31-30-58-47m61 51c-20-18-35-32-59-50m64 47c-17-10-37-25-55-47m52 49c-19-17-38-34-56-48m59 46c-15-16-31-28-53-50m54 52c-17-15-33-26-58-49m61 46c-18-14-44-31-59-48m60 51-57-48m59 47c-16-10-35-24-60-46m61 46c-17-11-31-26-57-46m58 46c-13-12-26-17-53-51m53 50c-17-11-35-29-57-47m62 46c-15-11-27-21-61-50m57 53c-15-16-30-29-54-49m61 47c-15-12-33-26-58-48m55 51c-18-19-42-41-54-49m55 48c-12-16-26-32-52-50m57 49c-18-13-35-30-56-48m55 47-50-50m52 51c-15-12-32-27-55-49m55 47c-16-13-35-29-56-50m60 52c-21-22-46-41-58-49m60 53c-14-14-20-26-57-53m58 50c-21-20-42-39-55-47m54 45c-5-5-25-20-52-50m56 51c-19-19-42-36-58-49m60 47c-18-13-39-26-52-49m53 52c-20-16-39-31-57-51m56 52c-11-15-27-29-57-54m60 50c-17-13-37-30-57-48m63 48c-23-11-46-28-56-42m52 43-54-46m58 46-57-48m58 47c-22-15-41-31-56-46m56 45c-19-10-31-32-54-44m55 45c-12-8-26-21-57-47m61 49c-18-14-36-37-53-50m53 52-57-52m58 50-55-47m56 45c-11-9-22-17-53-47m60 46c-25-12-42-35-56-48m54 49c-12-11-25-19-57-48m60 48c-17-11-34-25-59-47m60 50c-18-14-33-27-58-50m62 46c-22-11-36-28-56-43m51 46c-11-11-19-20-53-49m58 50c-18-21-38-39-55-52m55 52c-15-14-30-28-55-48m59 45c-15-12-27-24-58-47m55 47-55-48m62 50c-22-17-40-29-56-52m54 54c-13-17-29-28-55-51m62 47c-20-14-42-28-63-45m58 48c-20-21-43-40-56-52m63 54c-15-17-33-32-60-55m57 49c-21-15-38-30-57-47m62 49c-20-15-36-29-55-48m53 49c-16-16-32-32-55-50m61 47c-26-15-46-34-58-49m53 52c-12-14-24-24-52-49m53 47c-9-16-18-22-50-50m50 48-51-46m54 44c-13-10-26-23-48-40m50 42c-15-10-28-22-54-43m56 40c-19-16-37-33-51-43m50 45c-18-17-36-33-51-42m48 39c-10-9-26-23-44-44m48 44c-11-8-20-17-51-40m52 39c-11-7-22-19-44-43m43 43c-18-13-31-27-48-42m51 37c-19-12-37-30-49-37m47 41-44-38m45 37c-15-8-25-23-40-41m42 40c-7-5-17-15-46-36m47 32c-11-4-25-16-43-30m41 34c-12-14-29-32-39-37m41 36c-15-17-27-24-36-33m35 31c-14-10-27-23-37-33m38 29c-12-5-15-15-34-27m36 29c-12-8-24-17-37-33m42 32c-16-13-29-22-40-28m35 29c-11-13-26-22-36-32m38 31c-3-11-15-15-34-29m35 30c-8-10-16-18-34-32m35 31c-9-6-12-16-32-31m32 31c-10-9-21-17-35-31m37 28-33-30m33 30c-7-9-17-15-33-30m33 31c-8-11-18-19-26-26m26 21c-9-7-19-18-28-23m32 25c-9-8-14-15-29-26m28 24c-12-8-22-19-30-24m30 22c-7-2-10-13-27-26m26 27c-5-7-13-13-26-24m17 13c-5-3-7-7-13-15m12 12c-4 0-6-4-14-8"}),React__namespace.createElement("path",{stroke:"transparent",strokeWidth:".5",d:"M160 294c-10-1-8-9-26-22m23 24c-6-8-12-13-21-27m1 0c5-5 16-11 21-25m-21 25 25-22m-3-1c86-2 164-7 206-5m-202 7c70-1 138-1 202-4m0 0c3 10 11 15 17 24m-19-24 20 23m2 5c-6-1-10 10-25 24m23-29-20 25m-3 4c-61 0-123-4-204 1m205-5-205 5m0-1s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0m0 0s0 0 0 0"})),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeWidth:"4",d:"M153 298c0-10-9-23-15-29m19 23c-8-6-14-14-21-25m1 4c4-9 16-15 21-29m-23 27c8-8 14-14 27-22m1 1c50-4 103-3 198-6m-200 5c46-2 90-3 201-3m2-4c9 6 16 22 20 27m-23-25 22 23m-1 1c-7 10-12 15-19 21m21-22c-9 10-17 19-20 25m-1 0c-64 2-119 5-208 4m207-5c-48-1-97 2-207 4m1 1s0 0 0 0m0 0s0 0 0 0"}),React__namespace.createElement("g",{fillRule:"evenodd",strokeLinecap:"round"},React__namespace.createElement("path",{fill:"#FFF6F0",d:"m305 241-9-42-4-18v-21l6-46 9-35 11-32 8-17-10 1-27-4-20-12-11-8-14 11-16 8-25 7-8-4-4 9 21 70 9 43 1 36-5 57 6 2 78-4"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M303 241c-1-10-11-36-11-61 0-24 7-62 11-85 5-22 12-39 16-50 3-11 7-11 7-14-1-3-2-1-8-2s-21-1-29-4c-9-2-16-7-21-10s-6-7-9-8c-2 0-2 2-6 5-5 3-14 12-22 15-9 3-24 3-30 4-7 0-7-3-8 0-1 2 1 8 2 13l5 15a771 771 0 0 1 22 106c2 16-1 27-1 37l-1 25c-1 6-3 12-1 15s6 2 14 2l34-2 36-1m-1 0c-1-11-8-38-8-63 0-24 5-60 9-82s12-39 16-50c4-12 9-15 8-18 0-2-5 4-11 3a170 170 0 0 1-49-16c-5-3-4-8-6-9-2 0-3 2-8 5s-13 10-21 14c-9 3-22 4-29 5s-11-3-13 0c-1 2 2 9 4 14 2 4 4 4 7 14s9 29 12 47a465 465 0 0 1 10 97l-1 22c-1 7-4 17-3 20 2 3 4 0 13 0h36l35-4"})),React__namespace.createElement("g",{fill:"none",fillOpacity:".8",fillRule:"evenodd",strokeLinecap:"round",strokeOpacity:".8"},React__namespace.createElement("path",{stroke:"#c24c0e",strokeWidth:".5",d:"M191 30s0 0 0 0m0 0s0 0 0 0m-1 5c2 0 3 0 5-6m-4 7 6-5m-4 8 8-9m-7 9c2-3 5-7 7-7m-4 13c2-9 5-10 7-13m-10 11c6-5 7-8 14-13m-8 20c1-5 8-13 13-23m-16 20c7-8 11-14 17-18m-18 25c3-11 8-14 22-22m-20 23c7-11 17-24 23-27m-25 30 27-29m-24 28c8-8 12-16 25-29m-23 34c2-6 9-17 27-39m-29 39c7-7 16-15 33-35m-34 40c14-13 20-18 45-46m-41 47c16-18 30-38 41-47m-40 46c13-16 33-34 56-60m-58 65c18-18 34-37 56-65m-57 71c15-19 33-35 65-72m-59 69c14-16 26-33 54-64m-56 70c17-23 40-41 56-70m-53 69c20-25 45-53 58-65m-62 73c15-17 31-29 61-72m-58 70c21-27 46-51 60-70m-55 76c19-24 40-49 63-73m-66 71c16-19 31-38 63-71m-59 76c18-27 36-47 62-75m-64 74c14-18 33-33 63-73m-61 78c24-31 50-58 70-78m-71 79c23-33 48-59 66-80m-63 87c21-34 43-56 67-82m-71 77c24-24 45-46 71-80m-65 85c21-22 42-43 70-80m-71 83 71-86m-69 91c24-37 54-65 71-86m-73 85c16-24 36-46 75-88m-77 96c31-35 66-75 84-91m-81 85 79-90m-79 100c15-20 34-46 80-94m-79 89c32-35 65-72 82-93m-85 101c28-27 51-53 91-98m-88 97c18-23 38-45 87-99m-90 105c28-27 46-50 93-105m-88 104c28-32 56-62 88-104m-87 110c17-25 37-42 90-108m-93 108c25-27 51-55 95-107m-93 113c19-23 44-47 95-114m-93 114c30-33 59-70 97-114m-98 121c37-43 75-94 102-118M220 150c27-34 52-65 103-119m-99 121c30-36 67-77 99-122M220 155c27-31 49-58 106-122M223 162c40-45 79-92 103-117M221 161c23-27 44-55 103-117M222 166c17-25 44-48 98-113m-97 112c20-27 45-56 94-112m-96 122c35-39 73-81 96-112m-93 108c27-35 51-65 92-107m-96 114c21-27 41-46 89-95m-85 94c17-22 39-47 82-94m-79 98c14-22 39-50 74-93m-77 96c22-31 52-60 80-94m-77 99c13-20 27-34 78-90m-82 87c24-23 42-46 81-90m-81 98c25-31 59-66 76-94m-76 95c23-24 42-47 78-92m-81 94c20-13 31-32 85-87m-84 91c17-22 35-38 81-91m-76 100c22-36 50-65 77-90m-80 85c17-22 36-43 77-87m-82 100 83-90m-80 88c29-34 56-66 79-90m-78 98c16-22 35-45 74-94m-73 90c23-28 44-50 73-87m-71 95c16-25 38-44 71-83m-74 81 74-85m-76 96c30-36 54-64 76-87m-74 82c25-30 49-60 71-84m-73 96c18-23 37-46 74-88m-77 85c30-34 56-63 75-87m-72 93c34-40 60-66 77-84m-72 80c22-26 43-53 69-81m-63 79c17-17 30-33 62-77m-66 78 67-75m-56 73c18-22 47-49 56-67m-60 70 60-68m-56 71c20-32 48-56 57-64m-56 62c19-24 39-47 57-63m-48 59c8-15 27-25 47-51m-49 54c13-17 23-30 49-58m-42 55c15-13 23-31 38-51m-38 53c10-17 25-31 43-50m-42 47c10-6 13-13 38-44m-36 46 36-41m-28 43c10-17 27-27 31-41m-33 42 32-40m-28 36c6-7 14-12 32-28m-31 30c6-9 16-16 27-32m-25 33c15-10 16-18 26-32m-25 30c7-7 14-15 27-25m-16 25c-1-5 8-17 15-19m-18 20c5-4 11-10 20-25m-16 21c6 1 14-11 14-14m-12 18c3-6 7-9 15-18m-12 19c1-2 7-11 13-13m-13 13c3-6 5-8 14-14m-6 12c2-4 3-7 7-8m-7 8 5-7m0 7 2-2m-3 1 2-2m-84 4s0 0 0 0m0 0s0 0 0 0m6 0s-4-4-7-4m8 4-7-5m10 2c0 1-4-6-12-6m13 9-10-9m20 10c-8-5-11-7-16-19m11 16c-3-1-6-5-14-12m22 16c-12-8-14-12-19-20m18 18c-6-4-10-11-21-18m25 17c-1-2-12-8-25-24m26 27c-7-12-18-20-28-27m33 23c-5-6-16-21-29-30m31 31-34-29m42 31c-5-11-13-17-39-35m39 34-42-36m44 39c-8-13-23-26-44-39m48 35c-12-8-19-17-46-40m50 43c-20-18-37-32-47-46m48 42-50-43m59 43c-24-20-48-40-60-52m58 55c-24-19-46-38-59-51m61 49c-13-18-37-35-62-53m65 53-61-55m68 54c-17-21-40-32-66-58m65 60c-17-18-35-30-68-58m74 53c-24-17-53-43-74-56m73 62c-25-25-48-46-72-65m80 62c-23-18-45-39-84-67m83 69c-30-26-57-53-78-69m79 68c-20-22-41-41-80-76m83 72c-30-24-56-48-83-73m83 64-81-67m77 70c-21-14-42-33-80-69m79 66-83-72m86 69c-28-21-51-40-81-71m78 64c-23-21-44-36-76-68m74 69c-27-22-54-48-79-68m81 59c-25-17-45-36-83-65m81 67c-31-27-63-57-79-69m82 59c-31-13-54-33-81-68m75 72c-15-16-31-30-77-69m74 61c-25-20-48-43-76-63m75 60-73-64m77 62c-25-21-54-42-76-68m73 66-77-66m74 58c-11-15-33-28-77-61m81 63c-26-19-48-39-79-66m77 63c-27-31-56-51-78-68m81 68c-32-27-63-55-82-69m81 60c-20-18-47-43-85-66m83 69c-25-25-55-47-82-72m83 64c-28-23-57-48-83-74m83 76-83-74m86 68c-23-17-46-38-89-77m85 79c-18-13-32-29-85-77m88 71c-31-27-66-50-93-80m90 79c-32-27-67-54-87-74m86 73c-20-26-48-52-86-82m90 79c-27-25-54-50-91-80m90 72c-22-17-48-41-92-75m94 76c-23-13-40-30-93-79m94 76c-24-21-50-47-100-84m98 86-94-84m95 77c-22-16-42-38-94-83m95 83c-25-17-47-36-99-85m103 82c-39-30-74-60-102-85m99 85c-42-38-82-71-103-87m101 82c-35-34-79-65-104-92m106 91c-35-27-66-56-102-88m101 87c-39-33-76-68-104-95m106 90c-26-20-54-47-104-91m107 84c-30-19-52-41-107-85m102 88c-40-32-80-70-106-92m110 91c-29-20-50-43-104-91m104 88L197 31m106 82c-34-23-55-44-100-87m96 85c-34-26-67-57-97-84m98 81c-28-27-62-53-92-85m93 83c-28-21-52-47-96-79m99 76c-38-26-72-58-93-74m91 75c-23-20-43-35-90-80m93 72c-24-17-45-36-88-69m86 72c-27-19-48-39-85-73m85 66c-30-25-64-51-83-71m82 73c-27-24-57-53-81-70m84 67c-19-14-35-30-74-63m73 62c-14-13-33-25-75-67m76 66c-24-26-47-41-75-64m73 59c-14-12-33-27-71-64m70 58c-19-25-51-42-69-59m71 62c-20-19-42-37-66-62m66 60-62-59m65 56c-25-21-53-43-66-56m67 50c-28-19-51-40-69-55m71 55c-23-18-46-38-69-53m67 52c-10-9-29-22-65-56m67 55c-26-23-47-42-64-53m63 51-61-56m62 55c-21-22-48-44-62-55m63 49c-18-12-40-29-55-49m56 51c-13-13-29-25-57-53m61 50c-23-14-41-35-49-44m46 42-48-42m0 2-8-10m9 10-10-8m62 41c-12-5-18-11-35-27m34 32-36-31m37 28c-7-4-14-9-26-29m25 26c-9-7-22-16-28-22m33 20c-13-6-16-12-27-17m22 17c-2-5-7-12-22-22m22 18c0-7-10-12-10-19m13 16c-4-2-14-10-15-14m16 15c-4-3-5-12-13-14m15 12c-6-5-12-10-12-12m12 6c-2-1-6-4-5-5m5 6c-3-3-4-5-7-5"}),React__namespace.createElement("path",{stroke:"transparent",d:"M300 239c-2-10-8-38-8-62 1-24 6-60 11-82s13-41 17-52c3-11 7-12 6-15-1-2-5 0-12-1s-21 0-29-2-13-7-18-10c-4-2-5-7-8-7-2-1-2 2-7 5s-14 10-23 12c-8 3-21 3-28 3-6 1-8-2-9 1-1 2 1 12 2 17l3 12c3 10 10 28 14 46l7 62c2 16 2 27 2 37l-2 25c-1 6-1 11 1 14s4 3 12 3l37-4 32 1m5-6c-3-10-14-34-14-57s8-59 11-81l11-54c4-11 10-13 10-15 1-2 0 4-6 3-7-1-23-8-32-11-8-2-15-4-20-7-5-2-7-9-9-9s2 3-2 7c-5 4-14 12-23 16-10 4-26 6-32 7s-5-3-6-1v12l4 10c4 11 12 32 16 51 5 18 9 45 10 61s-5 27-6 37c-2 10-4 18-3 24 1 7 4 14 7 17 2 2 1-3 7-3 7 0 21 3 33 3s31-4 38-5"})),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeLinecap:"round",strokeOpacity:".8",strokeWidth:"4",d:"M301 240c-2-10-9-37-9-62 0-24 4-60 9-83 4-22 13-40 18-50 4-11 8-13 7-15 0-3-3 0-9-1l-28-5-22-7c-5-3-7-8-9-9-3-1 0 1-5 4s-15 10-24 13-23 5-29 6-8-3-8 0c-1 2 2 8 3 13l3 14 13 47c4 18 7 44 9 60s1 25 1 35l-1 26c0 7-4 13-2 16s6 1 14 1h33l37-2m1-1c-2-10-12-37-12-61 0-23 7-60 12-83 5-22 13-40 16-51 4-11 7-12 6-15s-5-1-11-1l-25-3c-8-2-18-6-23-9s-4-9-7-10c-2-1-3 2-8 5s-13 11-21 14-22 5-28 5c-6 1-9-3-10-1s1 8 2 13l4 15c3 10 10 31 14 49s9 43 10 59c1 15-2 24-3 34v27c0 7-2 14 0 17 2 2 4-1 12-2l34-1 37-1"}),React__namespace.createElement("g",{strokeLinecap:"round"},React__namespace.createElement("path",{fill:"#ff0800",d:"M257 42c2 0 7 1 9 3 3 2 5 6 5 10v15c-1 4-3 6-5 8l-9 3c-3-1-6-3-8-7-2-3-3-8-3-13 0-4 1-9 4-12 2-3 8-5 10-5h2m-6-1c3-2 5-2 7 0 3 2 7 6 9 10 1 4-1 9-1 13-1 4-1 8-3 10-2 3-6 6-9 6s-8-2-10-5c-3-3-4-9-4-13s1-8 3-11l6-9c2-1 2 2 2 2"}),React__namespace.createElement("path",{fill:"none",stroke:"#000",strokeWidth:"4",d:"M257 42c2-1 6 1 8 2 2 2 5 6 6 10s2 9 1 13c0 4-3 9-6 11-2 3-6 4-9 4l-7-8-4-12c0-4 0-9 2-12 1-3 7-6 9-7 1-1 1 1 1 1m5 0c3 1 6 5 8 8s3 8 2 12c0 4-4 9-6 12s-4 5-6 5c-3 0-6-3-9-5-3-3-6-6-7-10s1-11 3-14c2-4 4-7 7-8h10"})))},saveIcon=e=>React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:e?"var(--color-accent)":"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M19 21H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11l5 5v11a2 2 0 0 1-2 2z"}),React__namespace.createElement("polyline",{points:"17 21 17 13 7 13 7 21"}),React__namespace.createElement("polyline",{points:"7 3 7 8 15 8"})),penIcon=e=>{var t,A,i,n,a,r,s,o,l,c,d,h;switch(e.type){case"highlighter":return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{fill:null!==(t=e.strokeColor)&&void 0!==t?t:"var(--icon-fill-color)",strokeWidth:"2",d:"m9 11-6 6v3h9l3-3"}),React__namespace.createElement("path",{fill:"none",strokeWidth:"2",d:"m22 12-4.6 4.6a2 2 0 0 1-2.8 0l-5.2-5.2a2 2 0 0 1 0-2.8L14 4"}));case"finetip":return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:null!==(A=e.strokeColor)&&void 0!==A?A:"var(--icon-fill-color)",stroke:null!==(i=e.strokeColor)&&void 0!==i?i:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{strokeWidth:"2",d:"M17 3a2.828 2.828 0 1 1 4 4L7.5 20.5 2 22l1.5-5.5L17 3z"}));case"fountain":return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 24 24",fill:"none",stroke:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{fill:null!==(n=e.strokeColor)&&void 0!==n?n:"var(--icon-fill-color)",d:"m12 19 7-7 3 3-7 7-3-3z"}),React__namespace.createElement("path",{fill:"none",d:"m18 13-1.5-7.5L2 2l3.5 14.5L13 18l5-5z"}),React__namespace.createElement("path",{fill:"none",d:"m2 2 7.586 7.586"}),React__namespace.createElement("circle",{fill:"none",cx:"11",cy:"11",r:"2"}));case"marker":return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 576 512",fill:null!==(a=e.strokeColor)&&void 0!==a?a:"var(--icon-fill-color)",stroke:null!==(r=e.strokeColor)&&void 0!==r?r:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M331 315l158.4-215L460.1 70.6 245 229 331 315zm-187 5l0 0V248.3c0-15.3 7.2-29.6 19.5-38.6L436.6 8.4C444 2.9 453 0 462.2 0c11.4 0 22.4 4.5 30.5 12.6l54.8 54.8c8.1 8.1 12.6 19 12.6 30.5c0 9.2-2.9 18.2-8.4 25.6L350.4 396.5c-9 12.3-23.4 19.5-38.6 19.5H240l-25.4 25.4c-12.5 12.5-32.8 12.5-45.3 0l-50.7-50.7c-12.5-12.5-12.5-32.8 0-45.3L144 320zM23 466.3l63-63 70.6 70.6-31 31c-4.5 4.5-10.6 7-17 7H40c-13.3 0-24-10.7-24-24v-4.7c0-6.4 2.5-12.5 7-17z"}));case"thick-thin":return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 108 106",strokeWidth:"2",fill:null!==(s=e.strokeColor)&&void 0!==s?s:"var(--icon-fill-color)",stroke:null!==(o=e.strokeColor)&&void 0!==o?o:"var(--icon-fill-color)"},React__namespace.createElement("path",{d:"m-.58 95.628.22-.89q.22-.89.49-2.44.26-1.54.77-3.35t1.31-3.43q.79-1.61.2-.26-.6 1.34-.03-.14.58-1.49 1.54-2.97.96-1.49 2.54-3.18 1.59-1.68 3.46-2.96 1.86-1.27.81-.54-1.04.73.6-.46 1.64-1.19 2.8-1.81 1.16-.63.16-.08-.99.54 1.21-.5 2.2-1.03 1.11-.58-1.1.45-.03-.07 1.06-.53 2.32-.82 1.26-.3 2.91-.52 1.64-.23 3.05-.18 1.4.05 2.5.12 1.09.07 2.25.24 1.16.17 2.3.49 1.15.32 2.11.78.96.47 2.21 1.01 1.25.55 2.37 1.04t2.34.89q1.22.4 2.5.65 1.29.25 2.44.33 1.16.08 2.35.17 1.18.08 2.26-.1 1.08-.19 2-1.1.92-.91 1.25-1.93.32-1.02.38-2.15t.57.21q.51 1.34-.03-.02-.55-1.37-.96-2.83-.41-1.45.5-.67.92.79-.03-.06-.95-.85-1.52-1.8-.57-.94-1.5-1.52-.93-.57-1.94-1.22-1.01-.65-1.97-1.88-.96-1.22-1.44-2.54-.49-1.32-.65-2.57-.17-1.24-.11-2.35.06-1.11.31-2.91.24-1.79.76-2.77.51-.97 1.29-1.8.77-.84 1.64-1.55.88-.72 1.9-1.33 1.03-.61 2.43-1.15 1.41-.55 2.69-.92 1.29-.37 2.81-.68 1.53-.31 2.83-.58 1.31-.27 2.78-.47 1.47-.2 2.58-.49 1.12-.28 2.19-.58 1.08-.31 2.13-.73 1.05-.42 2.44-1.32 1.39-.9 2.68-1.85 1.3-.95 2.25-1.87.95-.91 2.06-2 1.11-1.09 1.92-1.93.82-.84 1.54-1.82.71-.98 1.4-1.88.69-.9 1.38-1.96.69-1.07 1.25-2.04.55-.97 1.21-1.94.65-.96 1.35-1.79.69-.83 1.46-1.74.77-.9 1.66-1.73.89-.84 2.72-2.31 1.84-1.48 1.84-1.47v.01l-1.1 1.03q-1.1 1.02-1.77 1.92-.68.9-1.39 1.85-.71.96-1.41 1.91-.7.96-1.19 1.92-.48.95-.95 1.92-.46.96-.9 1.95-.43.99-1.02 2.16-.59 1.17-1.17 2.15-.58.97-1.23 2.13t-1.29 2.02q-.64.86-1.3 1.73-.66.88-1.42 1.78-.75.9-1.72 2.03-.97 1.14-1.81 1.89-.85.75-1.98 1.71-1.14.96-2.05 1.61-.91.64-2.42 1.38-1.51.73-2.71 1.21t-2.49.92q-1.3.44-2.35.69-1.06.24-2.1.59-1.03.34-2.06.74-1.03.4-2.29.94-1.26.54-2.27 1.11-1.01.58-1.57 1.57-.56.99-.81 2.06-.25 1.08.56 2.02.8.94-.21-.02-1.02-.96-.01-.48 1 .49 1.87 1.25.87.77 0 0-.88-.77.46-.01 1.34.75 2.6 1.68 1.26.94 2.08 2.03.81 1.09.01.27-.8-.82.3.26 1.11 1.08 1.71 2.1.61 1.02 1.21 2.25.6 1.24.92 2.36.32 1.12-.16.13-.49-.98.02.36.51 1.35.71 2.69.2 1.34.24 2.46.03 1.12-.09 2.42-.13 1.29-.72 3.21-.6 1.92-1.4 3.49-.81 1.58-1.77 2.83-.96 1.24-2.88 2.72-1.92 1.48-2.95 1.85-1.04.36-2.47.76-1.44.41-3.33.72-1.89.32-3.37.41-1.48.09-2.63.15-1.15.05-2.74-.06-1.59-.1-2.8-.29-1.2-.19-3.2-.63-1.99-.45-3.63-.92-1.63-.48-3.28-.79-1.65-.31-2.76-.2-1.11.1-2.21.42-1.11.32.39-.29 1.49-.6-.12.21-1.61.8-.39.19 1.21-.61.29.13-.92.74-1.83 1.34-.92.61.15-.19t.3-.05q-.77.75-1.58 1.57-.81.82.01-.18.82-1 .24.23t-.72 2.72q-.15 1.48-.08 2.4.07.91-.19 2.16-.26 1.26-.81 2.41-.55 1.16-1.36 2.15t-1.84 1.75q-1.03.77-2.21 1.27t-2.44.7q-1.27.2-2.53.1-1.28-.11-2.49-.52-1.22-.41-2.3-1.1-1.08-.68-1.96-1.61-.89-.92-1.52-2.04-.64-1.11-.99-2.34-.36-1.23-.41-2.51l-.04-1.27Z"}));case"thin-thick-thin":return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 114 113",strokeWidth:"2",fill:null!==(l=e.strokeColor)&&void 0!==l?l:"var(--icon-fill-color)",stroke:null!==(c=e.strokeColor)&&void 0!==c?c:"var(--icon-fill-color)"},React__namespace.createElement("path",{d:"m10 103.405.13-1.22q.14-1.22 1.3-3.16 1.15-1.94 2.74-3.46 1.59-1.53 3.35-2.72 1.77-1.2 4-1.95 2.23-.76 4.45-1t4.86-.4q2.64-.15 5.14-.34 2.51-.19 4.85-.94 2.35-.75 4.55-1.71 2.21-.97 4.16-2.26 1.95-1.3 4.03-2.97 2.07-1.67 3.85-3.05 1.78-1.37 3.72-2.48 1.94-1.11 3.3-2.99 1.36-1.89 2.58-3.74 1.22-1.85-.63-3.42-1.85-1.57-3.82-2.86-1.97-1.3-4.11-2.08-2.15-.78-4.21-1.6-2.06-.81-4.02-1.96-1.96-1.14-3.71-2.48-1.74-1.33-3.37-2.77-1.63-1.43-3.23-3.62-1.6-2.18-2.23-4.64-.62-2.46-.36-4.96.27-2.49 1.19-4.46.91-1.97 2.42-3.7 1.5-1.73 3.5-3.15t4.11-2.28q2.1-.86 4.33-1.44 2.24-.58 4.92-.84 2.68-.26 4.83-.19t4.69.35q2.53.28 4.75.66 2.23.38 4.48.2 2.26-.19 4.43-1.3 2.17-1.12 4.2-2.36 2.04-1.24 3.93-2.43 1.9-1.19 3.84-2.14 1.95-.95 4.04-1.78 2.09-.83 4.56-2.28 2.46-1.46 2.46-1.45h.01q.01 0-1.38 1.3-1.38 1.29-3.08 2.59-1.7 1.3-3.5 2.5t-3.42 2.65q-1.62 1.45-3.18 3-1.57 1.56-3.37 3.13-1.8 1.57-3.6 2.91-1.81 1.33-3.92 2.12t-4.24.92q-2.13.14-4.31.26-2.18.12-4.5.39t-4.56.88q-2.25.61-4.24 1.6-1.99 1-3.83 2.29-1.83 1.29.18 2.44 2.01 1.15 4.2 1.92 2.2.78 4.34 1 2.15.22 4.4.69 2.25.46 4.34 1.16 2.08.71 4.33 1.91 2.25 1.21 4.11 2.73 1.87 1.52 3.68 4.03 1.82 2.5 2.74 5 .93 2.5 1.18 5.03.26 2.53-.04 4.81t-1.4 4.85q-1.09 2.58-2.4 4.26-1.3 1.68-3.1 3.44t-4.02 3.62q-2.23 1.85-4.32 3.07-2.08 1.23-4.34 1.99-2.25.76-4.46 1.96t-4.37 2.14q-2.15.93-4.22 1.81t-4.36 1.35q-2.3.46-4.52.82-2.22.35-4.76.38-2.54.04-4.87-.28t-4.67-.67q-2.34-.35-4.72-.54-2.39-.19-4.64.37-2.25.56-4.16 1.66-1.91 1.11-3.52 2.71-1.61 1.6-2.55 2.39l-.94.78Z"}));default:return React__namespace.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 512 512",fill:null!==(d=e.strokeColor)&&void 0!==d?d:"var(--icon-fill-color)",stroke:null!==(h=e.strokeColor)&&void 0!==h?h:"var(--icon-fill-color)",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round"},React__namespace.createElement("path",{d:"M453.3 19.3l39.4 39.4c25 25 25 65.5 0 90.5l-52.1 52.1 0 0-1-1 0 0-16-16-96-96-17-17 52.1-52.1c25-25 65.5-25 90.5 0zM241 114.9c-9.4-9.4-24.6-9.4-33.9 0L105 217c-9.4 9.4-24.6 9.4-33.9 0s-9.4-24.6 0-33.9L173.1 81c28.1-28.1 73.7-28.1 101.8 0L288 94.1l17 17 96 96 16 16 1 1-17 17L229.5 412.5c-48 48-109.2 80.8-175.8 94.1l-25 5c-7.9 1.6-16-.9-21.7-6.6s-8.1-13.8-6.6-21.7l5-25c13.3-66.6 46.1-127.8 94.1-175.8L254.1 128 241 114.9z"}))}},stringToSVG=e=>(e=e.replace(/stroke\s*=\s*['"][^"']*['"]/g,"").replace(/[^-]width\s*=\s*['"][^"']*['"]/g,"").replace(/[^-]height\s*=\s*['"][^"']*['"]/g,"").replace("<svg ",'<svg style="stroke:var(--icon-fill-color);color:var(--icon-fill-color);fill:var(--icon-fill-color);strokeWidth:6;" '),React__namespace.createElement("div",{dangerouslySetInnerHTML:{__html:e}})),LogoWrapper=({children:e})=>React__namespace.createElement("div",{className:"welcome-screen-center__logo virgil welcome-screen-decor"},e," ");var top="top",bottom="bottom",right="right",left="left",auto="auto",basePlacements=[top,bottom,right,left],start="start",end="end",clippingParents="clippingParents",viewport="viewport",popper="popper",reference="reference",variationPlacements=basePlacements.reduce((function(e,t){return e.concat([t+"-"+start,t+"-"+end])}),[]),placements=[].concat(basePlacements,[auto]).reduce((function(e,t){return e.concat([t,t+"-"+start,t+"-"+end])}),[]),beforeRead="beforeRead",read="read",afterRead="afterRead",beforeMain="beforeMain",main="main",afterMain="afterMain",beforeWrite="beforeWrite",write="write",afterWrite="afterWrite",modifierPhases=[beforeRead,read,afterRead,beforeMain,main,afterMain,beforeWrite,write,afterWrite];function getNodeName(e){return e?(e.nodeName||"").toLowerCase():null}function getWindow(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function isElement(e){return e instanceof getWindow(e).Element||e instanceof Element}function isHTMLElement(e){return e instanceof getWindow(e).HTMLElement||e instanceof HTMLElement}function isShadowRoot(e){return"undefined"!=typeof ShadowRoot&&(e instanceof getWindow(e).ShadowRoot||e instanceof ShadowRoot)}function applyStyles(e){var t=e.state;Object.keys(t.elements).forEach((function(e){var A=t.styles[e]||{},i=t.attributes[e]||{},n=t.elements[e];isHTMLElement(n)&&getNodeName(n)&&(Object.assign(n.style,A),Object.keys(i).forEach((function(e){var t=i[e];!1===t?n.removeAttribute(e):n.setAttribute(e,!0===t?"":t)})))}))}function effect$2(e){var t=e.state,A={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,A.popper),t.styles=A,t.elements.arrow&&Object.assign(t.elements.arrow.style,A.arrow),function(){Object.keys(t.elements).forEach((function(e){var i=t.elements[e],n=t.attributes[e]||{},a=Object.keys(t.styles.hasOwnProperty(e)?t.styles[e]:A[e]).reduce((function(e,t){return e[t]="",e}),{});isHTMLElement(i)&&getNodeName(i)&&(Object.assign(i.style,a),Object.keys(n).forEach((function(e){i.removeAttribute(e)})))}))}}var applyStyles$1={name:"applyStyles",enabled:!0,phase:"write",fn:applyStyles,effect:effect$2,requires:["computeStyles"]};function getBasePlacement(e){return e.split("-")[0]}var max=Math.max,min=Math.min,round=Math.round;function getUAString(){var e=navigator.userAgentData;return null!=e&&e.brands?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}function isLayoutViewport(){return!/^((?!chrome|android).)*safari/i.test(getUAString())}function getBoundingClientRect(e,t,A){void 0===t&&(t=!1),void 0===A&&(A=!1);var i=e.getBoundingClientRect(),n=1,a=1;t&&isHTMLElement(e)&&(n=e.offsetWidth>0&&round(i.width)/e.offsetWidth||1,a=e.offsetHeight>0&&round(i.height)/e.offsetHeight||1);var r=(isElement(e)?getWindow(e):window).visualViewport,s=!isLayoutViewport()&&A,o=(i.left+(s&&r?r.offsetLeft:0))/n,l=(i.top+(s&&r?r.offsetTop:0))/a,c=i.width/n,d=i.height/a;return{width:c,height:d,top:l,right:o+c,bottom:l+d,left:o,x:o,y:l}}function getLayoutRect(e){var t=getBoundingClientRect(e),A=e.offsetWidth,i=e.offsetHeight;return Math.abs(t.width-A)<=1&&(A=t.width),Math.abs(t.height-i)<=1&&(i=t.height),{x:e.offsetLeft,y:e.offsetTop,width:A,height:i}}function contains(e,t){var A=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(A&&isShadowRoot(A)){var i=t;do{if(i&&e.isSameNode(i))return!0;i=i.parentNode||i.host}while(i)}return!1}function getComputedStyle$1(e){return getWindow(e).getComputedStyle(e)}function isTableElement(e){return["table","td","th"].indexOf(getNodeName(e))>=0}function getDocumentElement(e){return((isElement(e)?e.ownerDocument:e.document)||window.document).documentElement}function getParentNode(e){return"html"===getNodeName(e)?e:e.assignedSlot||e.parentNode||(isShadowRoot(e)?e.host:null)||getDocumentElement(e)}function getTrueOffsetParent(e){return isHTMLElement(e)&&"fixed"!==getComputedStyle$1(e).position?e.offsetParent:null}function getContainingBlock(e){var t=/firefox/i.test(getUAString());if(/Trident/i.test(getUAString())&&isHTMLElement(e)&&"fixed"===getComputedStyle$1(e).position)return null;var A=getParentNode(e);for(isShadowRoot(A)&&(A=A.host);isHTMLElement(A)&&["html","body"].indexOf(getNodeName(A))<0;){var i=getComputedStyle$1(A);if("none"!==i.transform||"none"!==i.perspective||"paint"===i.contain||-1!==["transform","perspective"].indexOf(i.willChange)||t&&"filter"===i.willChange||t&&i.filter&&"none"!==i.filter)return A;A=A.parentNode}return null}function getOffsetParent(e){for(var t=getWindow(e),A=getTrueOffsetParent(e);A&&isTableElement(A)&&"static"===getComputedStyle$1(A).position;)A=getTrueOffsetParent(A);return A&&("html"===getNodeName(A)||"body"===getNodeName(A)&&"static"===getComputedStyle$1(A).position)?t:A||getContainingBlock(e)||t}function getMainAxisFromPlacement(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function within(e,t,A){return max(e,min(t,A))}function withinMaxClamp(e,t,A){var i=within(e,t,A);return i>A?A:i}function getFreshSideObject(){return{top:0,right:0,bottom:0,left:0}}function mergePaddingObject(e){return Object.assign({},getFreshSideObject(),e)}function expandToHashMap(e,t){return t.reduce((function(t,A){return t[A]=e,t}),{})}var toPaddingObject=function(e,t){return mergePaddingObject("number"!=typeof(e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e)?e:expandToHashMap(e,basePlacements))};function arrow(e){var t,A=e.state,i=e.name,n=e.options,a=A.elements.arrow,r=A.modifiersData.popperOffsets,s=getBasePlacement(A.placement),o=getMainAxisFromPlacement(s),l=[left,right].indexOf(s)>=0?"height":"width";if(a&&r){var c=toPaddingObject(n.padding,A),d=getLayoutRect(a),h="y"===o?top:left,u="y"===o?bottom:right,g=A.rects.reference[l]+A.rects.reference[o]-r[o]-A.rects.popper[l],p=r[o]-A.rects.reference[o],m=getOffsetParent(a),w=m?"y"===o?m.clientHeight||0:m.clientWidth||0:0,f=g/2-p/2,E=c[h],B=w-d[l]-c[u],b=w/2-d[l]/2+f,v=within(E,b,B),C=o;A.modifiersData[i]=((t={})[C]=v,t.centerOffset=v-b,t)}}function effect$1(e){var t=e.state,A=e.options.element,i=void 0===A?"[data-popper-arrow]":A;null!=i&&("string"!=typeof i||(i=t.elements.popper.querySelector(i)))&&contains(t.elements.popper,i)&&(t.elements.arrow=i)}var arrow$1={name:"arrow",enabled:!0,phase:"main",fn:arrow,effect:effect$1,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function getVariation(e){return e.split("-")[1]}var unsetSides={top:"auto",right:"auto",bottom:"auto",left:"auto"};function roundOffsetsByDPR(e){var t=e.x,A=e.y,i=window.devicePixelRatio||1;return{x:round(t*i)/i||0,y:round(A*i)/i||0}}function mapToStyles(e){var t,A=e.popper,i=e.popperRect,n=e.placement,a=e.variation,r=e.offsets,s=e.position,o=e.gpuAcceleration,l=e.adaptive,c=e.roundOffsets,d=e.isFixed,h=r.x,u=void 0===h?0:h,g=r.y,p=void 0===g?0:g,m="function"==typeof c?c({x:u,y:p}):{x:u,y:p};u=m.x,p=m.y;var w=r.hasOwnProperty("x"),f=r.hasOwnProperty("y"),E=left,B=top,b=window;if(l){var v=getOffsetParent(A),C="clientHeight",y="clientWidth";v===getWindow(A)&&"static"!==getComputedStyle$1(v=getDocumentElement(A)).position&&"absolute"===s&&(C="scrollHeight",y="scrollWidth"),v=v,(n===top||(n===left||n===right)&&a===end)&&(B=bottom,p-=(d&&v===b&&b.visualViewport?b.visualViewport.height:v[C])-i.height,p*=o?1:-1),n!==left&&(n!==top&&n!==bottom||a!==end)||(E=right,u-=(d&&v===b&&b.visualViewport?b.visualViewport.width:v[y])-i.width,u*=o?1:-1)}var F,x=Object.assign({position:s},l&&unsetSides),T=!0===c?roundOffsetsByDPR({x:u,y:p}):{x:u,y:p};return u=T.x,p=T.y,o?Object.assign({},x,((F={})[B]=f?"0":"",F[E]=w?"0":"",F.transform=(b.devicePixelRatio||1)<=1?"translate("+u+"px, "+p+"px)":"translate3d("+u+"px, "+p+"px, 0)",F)):Object.assign({},x,((t={})[B]=f?p+"px":"",t[E]=w?u+"px":"",t.transform="",t))}function computeStyles(e){var t=e.state,A=e.options,i=A.gpuAcceleration,n=void 0===i||i,a=A.adaptive,r=void 0===a||a,s=A.roundOffsets,o=void 0===s||s,l={placement:getBasePlacement(t.placement),variation:getVariation(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:n,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,mapToStyles(Object.assign({},l,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:r,roundOffsets:o})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,mapToStyles(Object.assign({},l,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:o})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}var computeStyles$1={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:computeStyles,data:{}},passive={passive:!0};function effect(e){var t=e.state,A=e.instance,i=e.options,n=i.scroll,a=void 0===n||n,r=i.resize,s=void 0===r||r,o=getWindow(t.elements.popper),l=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&l.forEach((function(e){e.addEventListener("scroll",A.update,passive)})),s&&o.addEventListener("resize",A.update,passive),function(){a&&l.forEach((function(e){e.removeEventListener("scroll",A.update,passive)})),s&&o.removeEventListener("resize",A.update,passive)}}var eventListeners={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:effect,data:{}},hash$1={left:"right",right:"left",bottom:"top",top:"bottom"};function getOppositePlacement(e){return e.replace(/left|right|bottom|top/g,(function(e){return hash$1[e]}))}var hash={start:"end",end:"start"};function getOppositeVariationPlacement(e){return e.replace(/start|end/g,(function(e){return hash[e]}))}function getWindowScroll(e){var t=getWindow(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}function getWindowScrollBarX(e){return getBoundingClientRect(getDocumentElement(e)).left+getWindowScroll(e).scrollLeft}function getViewportRect(e,t){var A=getWindow(e),i=getDocumentElement(e),n=A.visualViewport,a=i.clientWidth,r=i.clientHeight,s=0,o=0;if(n){a=n.width,r=n.height;var l=isLayoutViewport();(l||!l&&"fixed"===t)&&(s=n.offsetLeft,o=n.offsetTop)}return{width:a,height:r,x:s+getWindowScrollBarX(e),y:o}}function getDocumentRect(e){var t,A=getDocumentElement(e),i=getWindowScroll(e),n=null==(t=e.ownerDocument)?void 0:t.body,a=max(A.scrollWidth,A.clientWidth,n?n.scrollWidth:0,n?n.clientWidth:0),r=max(A.scrollHeight,A.clientHeight,n?n.scrollHeight:0,n?n.clientHeight:0),s=-i.scrollLeft+getWindowScrollBarX(e),o=-i.scrollTop;return"rtl"===getComputedStyle$1(n||A).direction&&(s+=max(A.clientWidth,n?n.clientWidth:0)-a),{width:a,height:r,x:s,y:o}}function isScrollParent(e){var t=getComputedStyle$1(e),A=t.overflow,i=t.overflowX,n=t.overflowY;return/auto|scroll|overlay|hidden/.test(A+n+i)}function getScrollParent(e){return["html","body","#document"].indexOf(getNodeName(e))>=0?e.ownerDocument.body:isHTMLElement(e)&&isScrollParent(e)?e:getScrollParent(getParentNode(e))}function listScrollParents(e,t){var A;void 0===t&&(t=[]);var i=getScrollParent(e),n=i===(null==(A=e.ownerDocument)?void 0:A.body),a=getWindow(i),r=n?[a].concat(a.visualViewport||[],isScrollParent(i)?i:[]):i,s=t.concat(r);return n?s:s.concat(listScrollParents(getParentNode(r)))}function rectToClientRect(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function getInnerBoundingClientRect(e,t){var A=getBoundingClientRect(e,!1,"fixed"===t);return A.top=A.top+e.clientTop,A.left=A.left+e.clientLeft,A.bottom=A.top+e.clientHeight,A.right=A.left+e.clientWidth,A.width=e.clientWidth,A.height=e.clientHeight,A.x=A.left,A.y=A.top,A}function getClientRectFromMixedType(e,t,A){return t===viewport?rectToClientRect(getViewportRect(e,A)):isElement(t)?getInnerBoundingClientRect(t,A):rectToClientRect(getDocumentRect(getDocumentElement(e)))}function getClippingParents(e){var t=listScrollParents(getParentNode(e)),A=["absolute","fixed"].indexOf(getComputedStyle$1(e).position)>=0&&isHTMLElement(e)?getOffsetParent(e):e;return isElement(A)?t.filter((function(e){return isElement(e)&&contains(e,A)&&"body"!==getNodeName(e)})):[]}function getClippingRect(e,t,A,i){var n="clippingParents"===t?getClippingParents(e):[].concat(t),a=[].concat(n,[A]),r=a[0],s=a.reduce((function(t,A){var n=getClientRectFromMixedType(e,A,i);return t.top=max(n.top,t.top),t.right=min(n.right,t.right),t.bottom=min(n.bottom,t.bottom),t.left=max(n.left,t.left),t}),getClientRectFromMixedType(e,r,i));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function computeOffsets(e){var t,A=e.reference,i=e.element,n=e.placement,a=n?getBasePlacement(n):null,r=n?getVariation(n):null,s=A.x+A.width/2-i.width/2,o=A.y+A.height/2-i.height/2;switch(a){case top:t={x:s,y:A.y-i.height};break;case bottom:t={x:s,y:A.y+A.height};break;case right:t={x:A.x+A.width,y:o};break;case left:t={x:A.x-i.width,y:o};break;default:t={x:A.x,y:A.y}}var l=a?getMainAxisFromPlacement(a):null;if(null!=l){var c="y"===l?"height":"width";switch(r){case start:t[l]=t[l]-(A[c]/2-i[c]/2);break;case end:t[l]=t[l]+(A[c]/2-i[c]/2)}}return t}function detectOverflow(e,t){void 0===t&&(t={});var A=t,i=A.placement,n=void 0===i?e.placement:i,a=A.strategy,r=void 0===a?e.strategy:a,s=A.boundary,o=void 0===s?clippingParents:s,l=A.rootBoundary,c=void 0===l?viewport:l,d=A.elementContext,h=void 0===d?popper:d,u=A.altBoundary,g=void 0!==u&&u,p=A.padding,m=void 0===p?0:p,w=mergePaddingObject("number"!=typeof m?m:expandToHashMap(m,basePlacements)),f=h===popper?reference:popper,E=e.rects.popper,B=e.elements[g?f:h],b=getClippingRect(isElement(B)?B:B.contextElement||getDocumentElement(e.elements.popper),o,c,r),v=getBoundingClientRect(e.elements.reference),C=computeOffsets({reference:v,element:E,strategy:"absolute",placement:n}),y=rectToClientRect(Object.assign({},E,C)),F=h===popper?y:v,x={top:b.top-F.top+w.top,bottom:F.bottom-b.bottom+w.bottom,left:b.left-F.left+w.left,right:F.right-b.right+w.right},T=e.modifiersData.offset;if(h===popper&&T){var S=T[n];Object.keys(x).forEach((function(e){var t=[right,bottom].indexOf(e)>=0?1:-1,A=[top,bottom].indexOf(e)>=0?"y":"x";x[e]+=S[A]*t}))}return x}function computeAutoPlacement(e,t){void 0===t&&(t={});var A=t,i=A.placement,n=A.boundary,a=A.rootBoundary,r=A.padding,s=A.flipVariations,o=A.allowedAutoPlacements,l=void 0===o?placements:o,c=getVariation(i),d=c?s?variationPlacements:variationPlacements.filter((function(e){return getVariation(e)===c})):basePlacements,h=d.filter((function(e){return l.indexOf(e)>=0}));0===h.length&&(h=d);var u=h.reduce((function(t,A){return t[A]=detectOverflow(e,{placement:A,boundary:n,rootBoundary:a,padding:r})[getBasePlacement(A)],t}),{});return Object.keys(u).sort((function(e,t){return u[e]-u[t]}))}function getExpandedFallbackPlacements(e){if(getBasePlacement(e)===auto)return[];var t=getOppositePlacement(e);return[getOppositeVariationPlacement(e),t,getOppositeVariationPlacement(t)]}function flip(e){var t=e.state,A=e.options,i=e.name;if(!t.modifiersData[i]._skip){for(var n=A.mainAxis,a=void 0===n||n,r=A.altAxis,s=void 0===r||r,o=A.fallbackPlacements,l=A.padding,c=A.boundary,d=A.rootBoundary,h=A.altBoundary,u=A.flipVariations,g=void 0===u||u,p=A.allowedAutoPlacements,m=t.options.placement,w=getBasePlacement(m),f=o||(w!==m&&g?getExpandedFallbackPlacements(m):[getOppositePlacement(m)]),E=[m].concat(f).reduce((function(e,A){return e.concat(getBasePlacement(A)===auto?computeAutoPlacement(t,{placement:A,boundary:c,rootBoundary:d,padding:l,flipVariations:g,allowedAutoPlacements:p}):A)}),[]),B=t.rects.reference,b=t.rects.popper,v=new Map,C=!0,y=E[0],F=0;F<E.length;F++){var x=E[F],T=getBasePlacement(x),S=getVariation(x)===start,I=[top,bottom].indexOf(T)>=0,M=I?"width":"height",k=detectOverflow(t,{placement:x,boundary:c,rootBoundary:d,altBoundary:h,padding:l}),U=I?S?right:left:S?bottom:top;B[M]>b[M]&&(U=getOppositePlacement(U));var Q=getOppositePlacement(U),O=[];if(a&&O.push(k[T]<=0),s&&O.push(k[U]<=0,k[Q]<=0),O.every((function(e){return e}))){y=x,C=!1;break}v.set(x,O)}if(C)for(var L=function(e){var t=E.find((function(t){var A=v.get(t);if(A)return A.slice(0,e).every((function(e){return e}))}));if(t)return y=t,"break"},N=g?3:1;N>0&&"break"!==L(N);N--);t.placement!==y&&(t.modifiersData[i]._skip=!0,t.placement=y,t.reset=!0)}}var flip$1={name:"flip",enabled:!0,phase:"main",fn:flip,requiresIfExists:["offset"],data:{_skip:!1}};function getSideOffsets(e,t,A){return void 0===A&&(A={x:0,y:0}),{top:e.top-t.height-A.y,right:e.right-t.width+A.x,bottom:e.bottom-t.height+A.y,left:e.left-t.width-A.x}}function isAnySideFullyClipped(e){return[top,right,bottom,left].some((function(t){return e[t]>=0}))}function hide(e){var t=e.state,A=e.name,i=t.rects.reference,n=t.rects.popper,a=t.modifiersData.preventOverflow,r=detectOverflow(t,{elementContext:"reference"}),s=detectOverflow(t,{altBoundary:!0}),o=getSideOffsets(r,i),l=getSideOffsets(s,n,a),c=isAnySideFullyClipped(o),d=isAnySideFullyClipped(l);t.modifiersData[A]={referenceClippingOffsets:o,popperEscapeOffsets:l,isReferenceHidden:c,hasPopperEscaped:d},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":c,"data-popper-escaped":d})}var hide$1={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:hide};function distanceAndSkiddingToXY(e,t,A){var i=getBasePlacement(e),n=[left,top].indexOf(i)>=0?-1:1,a="function"==typeof A?A(Object.assign({},t,{placement:e})):A,r=a[0],s=a[1];return r=r||0,s=(s||0)*n,[left,right].indexOf(i)>=0?{x:s,y:r}:{x:r,y:s}}function offset(e){var t=e.state,A=e.options,i=e.name,n=A.offset,a=void 0===n?[0,0]:n,r=placements.reduce((function(e,A){return e[A]=distanceAndSkiddingToXY(A,t.rects,a),e}),{}),s=r[t.placement],o=s.x,l=s.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=o,t.modifiersData.popperOffsets.y+=l),t.modifiersData[i]=r}var offset$1={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:offset};function popperOffsets(e){var t=e.state,A=e.name;t.modifiersData[A]=computeOffsets({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}var popperOffsets$1={name:"popperOffsets",enabled:!0,phase:"read",fn:popperOffsets,data:{}};function getAltAxis(e){return"x"===e?"y":"x"}function preventOverflow(e){var t=e.state,A=e.options,i=e.name,n=A.mainAxis,a=void 0===n||n,r=A.altAxis,s=void 0!==r&&r,o=A.boundary,l=A.rootBoundary,c=A.altBoundary,d=A.padding,h=A.tether,u=void 0===h||h,g=A.tetherOffset,p=void 0===g?0:g,m=detectOverflow(t,{boundary:o,rootBoundary:l,padding:d,altBoundary:c}),w=getBasePlacement(t.placement),f=getVariation(t.placement),E=!f,B=getMainAxisFromPlacement(w),b=getAltAxis(B),v=t.modifiersData.popperOffsets,C=t.rects.reference,y=t.rects.popper,F="function"==typeof p?p(Object.assign({},t.rects,{placement:t.placement})):p,x="number"==typeof F?{mainAxis:F,altAxis:F}:Object.assign({mainAxis:0,altAxis:0},F),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,S={x:0,y:0};if(v){if(a){var I,M="y"===B?top:left,k="y"===B?bottom:right,U="y"===B?"height":"width",Q=v[B],O=Q+m[M],L=Q-m[k],N=u?-y[U]/2:0,D=f===start?C[U]:y[U],R=f===start?-y[U]:-C[U],H=t.elements.arrow,P=u&&H?getLayoutRect(H):{width:0,height:0},V=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:getFreshSideObject(),K=V[M],G=V[k],W=within(0,C[U],P[U]),z=E?C[U]/2-N-W-K-x.mainAxis:D-W-K-x.mainAxis,X=E?-C[U]/2+N+W+G+x.mainAxis:R+W+G+x.mainAxis,Y=t.elements.arrow&&getOffsetParent(t.elements.arrow),j=Y?"y"===B?Y.clientTop||0:Y.clientLeft||0:0,_=null!=(I=null==T?void 0:T[B])?I:0,J=Q+X-_,Z=within(u?min(O,Q+z-_-j):O,Q,u?max(L,J):L);v[B]=Z,S[B]=Z-Q}if(s){var q,$="x"===B?top:left,ee="x"===B?bottom:right,te=v[b],Ae="y"===b?"height":"width",ie=te+m[$],ne=te-m[ee],ae=-1!==[top,left].indexOf(w),re=null!=(q=null==T?void 0:T[b])?q:0,se=ae?ie:te-C[Ae]-y[Ae]-re+x.altAxis,oe=ae?te+C[Ae]+y[Ae]-re-x.altAxis:ne,le=u&&ae?withinMaxClamp(se,te,oe):within(u?se:ie,te,u?oe:ne);v[b]=le,S[b]=le-te}t.modifiersData[i]=S}}var preventOverflow$1={name:"preventOverflow",enabled:!0,phase:"main",fn:preventOverflow,requiresIfExists:["offset"]};function getHTMLElementScroll(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function getNodeScroll(e){return e!==getWindow(e)&&isHTMLElement(e)?getHTMLElementScroll(e):getWindowScroll(e)}function isElementScaled(e){var t=e.getBoundingClientRect(),A=round(t.width)/e.offsetWidth||1,i=round(t.height)/e.offsetHeight||1;return 1!==A||1!==i}function getCompositeRect(e,t,A){void 0===A&&(A=!1);var i=isHTMLElement(t),n=isHTMLElement(t)&&isElementScaled(t),a=getDocumentElement(t),r=getBoundingClientRect(e,n,A),s={scrollLeft:0,scrollTop:0},o={x:0,y:0};return(i||!i&&!A)&&(("body"!==getNodeName(t)||isScrollParent(a))&&(s=getNodeScroll(t)),isHTMLElement(t)?((o=getBoundingClientRect(t,!0)).x+=t.clientLeft,o.y+=t.clientTop):a&&(o.x=getWindowScrollBarX(a))),{x:r.left+s.scrollLeft-o.x,y:r.top+s.scrollTop-o.y,width:r.width,height:r.height}}function order(e){var t=new Map,A=new Set,i=[];function n(e){A.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!A.has(e)){var i=t.get(e);i&&n(i)}})),i.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){A.has(e.name)||n(e)})),i}function orderModifiers(e){var t=order(e);return modifierPhases.reduce((function(e,A){return e.concat(t.filter((function(e){return e.phase===A})))}),[])}function debounce(e){var t;return function(){return t||(t=new Promise((function(A){Promise.resolve().then((function(){t=void 0,A(e())}))}))),t}}function mergeByName(e){var t=e.reduce((function(e,t){var A=e[t.name];return e[t.name]=A?Object.assign({},A,t,{options:Object.assign({},A.options,t.options),data:Object.assign({},A.data,t.data)}):t,e}),{});return Object.keys(t).map((function(e){return t[e]}))}var DEFAULT_OPTIONS={placement:"bottom",modifiers:[],strategy:"absolute"};function areValidElements(){for(var e=arguments.length,t=new Array(e),A=0;A<e;A++)t[A]=arguments[A];return!t.some((function(e){return!(e&&"function"==typeof e.getBoundingClientRect)}))}function popperGenerator(e){void 0===e&&(e={});var t=e,A=t.defaultModifiers,i=void 0===A?[]:A,n=t.defaultOptions,a=void 0===n?DEFAULT_OPTIONS:n;return function(e,t,A){void 0===A&&(A=a);var n={placement:"bottom",orderedModifiers:[],options:Object.assign({},DEFAULT_OPTIONS,a),modifiersData:{},elements:{reference:e,popper:t},attributes:{},styles:{}},r=[],s=!1,o={state:n,setOptions:function(A){var s="function"==typeof A?A(n.options):A;l(),n.options=Object.assign({},a,n.options,s),n.scrollParents={reference:isElement(e)?listScrollParents(e):e.contextElement?listScrollParents(e.contextElement):[],popper:listScrollParents(t)};var c=orderModifiers(mergeByName([].concat(i,n.options.modifiers)));return n.orderedModifiers=c.filter((function(e){return e.enabled})),n.orderedModifiers.forEach((function(e){var t=e.name,A=e.options,i=void 0===A?{}:A,a=e.effect;if("function"==typeof a){var s=a({state:n,name:t,instance:o,options:i});r.push(s||function(){})}})),o.update()},forceUpdate:function(){if(!s){var e=n.elements,t=e.reference,A=e.popper;if(areValidElements(t,A)){n.rects={reference:getCompositeRect(t,getOffsetParent(A),"fixed"===n.options.strategy),popper:getLayoutRect(A)},n.reset=!1,n.placement=n.options.placement,n.orderedModifiers.forEach((function(e){return n.modifiersData[e.name]=Object.assign({},e.data)}));for(var i=0;i<n.orderedModifiers.length;i++)if(!0!==n.reset){var a=n.orderedModifiers[i],r=a.fn,l=a.options,c=void 0===l?{}:l,d=a.name;"function"==typeof r&&(n=r({state:n,options:c,name:d,instance:o})||n)}else n.reset=!1,i=-1}}},update:debounce((function(){return new Promise((function(e){o.forceUpdate(),e(n)}))})),destroy:function(){l(),s=!0}};if(!areValidElements(e,t))return o;function l(){r.forEach((function(e){return e()})),r=[]}return o.setOptions(A).then((function(e){!s&&A.onFirstUpdate&&A.onFirstUpdate(e)})),o}}var defaultModifiers=[eventListeners,popperOffsets$1,computeStyles$1,applyStyles$1,offset$1,flip$1,preventOverflow$1,arrow$1,hide$1],createPopper=popperGenerator({defaultModifiers:defaultModifiers});class Suggester{constructor(e,t,A){this.containerEl=t,this.owner=e,t.on("click",".suggestion-item",this.onSuggestionClick.bind(this)),t.on("mousemove",".suggestion-item",this.onSuggestionMouseover.bind(this)),A.register([],"ArrowUp",(()=>(this.setSelectedItem(this.selectedItem-1,!0),!1))),A.register([],"ArrowDown",(()=>(this.setSelectedItem(this.selectedItem+1,!0),!1))),A.register([],"Enter",(e=>(this.useSelectedItem(e),!1))),A.register([],"Tab",(e=>(this.chooseSuggestion(e),!1)))}chooseSuggestion(e){if(!this.items||!this.items.length)return;const t=this.items[this.selectedItem];t&&this.owner.onChooseSuggestion(t,e)}onSuggestionClick(e,t){if(e.preventDefault(),!this.suggestions||!this.suggestions.length)return;const A=this.suggestions.indexOf(t);this.setSelectedItem(A,!1),this.useSelectedItem(e)}onSuggestionMouseover(e,t){if(!this.suggestions||!this.suggestions.length)return;const A=this.suggestions.indexOf(t);this.setSelectedItem(A,!1)}empty(){this.containerEl.empty()}setSuggestions(e){this.containerEl.empty();const t=[];e.forEach((e=>{const A=this.containerEl.createDiv("suggestion-item");this.owner.renderSuggestion(e,A),t.push(A)})),this.items=e,this.suggestions=t,this.setSelectedItem(0,!1)}useSelectedItem(e){if(!this.items||!this.items.length)return;const t=this.items[this.selectedItem];t&&this.owner.selectSuggestion(t,e)}wrap(e,t){return(e%t+t)%t}setSelectedItem(e,t){const A=this.wrap(e,this.suggestions.length),i=this.suggestions[this.selectedItem],n=this.suggestions[A];i&&i.removeClass("is-selected"),n&&n.addClass("is-selected"),this.selectedItem=A,t&&n.scrollIntoView(!1)}}class SuggestionModal extends obsidian_module.FuzzySuggestModal{constructor(e,t,A){super(e),this.items=[],this.scope=new obsidian_module.Scope(this.app.scope),this.emptyStateText="No match found",this.limit=100,this.inputEl=t,this.items=A,this.suggestEl=createDiv("suggestion-container"),this.contentEl=this.suggestEl.createDiv("suggestion"),this.suggester=new Suggester(this,this.contentEl,this.scope),this.scope.register([],"Escape",this.onEscape.bind(this)),this.inputEl.addEventListener("input",this.onInputChanged.bind(this)),this.inputEl.addEventListener("focus",this.onFocus.bind(this)),this.inputEl.addEventListener("blur",this.close.bind(this)),this.suggestEl.on("mousedown",".suggestion-container",(e=>{e.preventDefault()}))}empty(){this.suggester.empty()}onInputChanged(){if(this.shouldNotOpen)return;const e=this.modifyInput(this.inputEl.value),t=this.getSuggestions(e);t.length>0?this.suggester.setSuggestions(t.slice(0,this.limit)):this.onNoSuggestion(),this.open()}onFocus(){this.shouldNotOpen=!1,this.onInputChanged()}modifyInput(e){return e}onNoSuggestion(){this.empty(),this.renderSuggestion(null,this.contentEl.createDiv("suggestion-item"))}open(){this.app.keymap.pushScope(this.scope),this.inputEl.ownerDocument.body.appendChild(this.suggestEl),this.popper=createPopper(this.inputEl,this.suggestEl,{placement:"bottom-start",modifiers:[{name:"offset",options:{offset:[0,10]}},{name:"flip",options:{fallbackPlacements:["top"]}}]})}onEscape(){this.close(),this.shouldNotOpen=!0}close(){this.app.keymap.popScope(this.scope),this.suggester.setSuggestions([]),this.popper&&this.popper.destroy(),this.suggestEl.detach()}createPrompt(e){this.promptEl||(this.promptEl=this.suggestEl.createDiv("prompt-instructions"));const t=this.promptEl.createDiv("prompt-instruction");for(const A of e)t.appendChild(A)}}class FileSuggestionModal extends SuggestionModal{constructor(e,t,A){super(e,t.inputEl,A),this.limit=20,this.files=[...A],this.text=t,this.inputEl.addEventListener("input",(()=>this.getFile()))}getFile(){const e=this.inputEl.value,t=this.app.vault.getAbstractFileByPath(e);t!==this.file&&t instanceof obsidian_module.TFile&&(this.file=t,this.onInputChanged())}getSelectedItem(){return this.file}getItemText(e){return e.path}onChooseItem(e){this.file=e,this.text.setValue(e.path),this.text.onChanged()}selectSuggestion({item:e}){this.file=e,this.text.setValue(e.path),this.onClose(),this.text.onChanged(),this.close()}renderSuggestion(e,t){const{item:A,match:i}=e||{},n=t.createDiv({cls:"suggestion-content"});if(!A)return n.setText(this.emptyStateText),void n.parentElement.addClass("is-selected");const a=A.path.length-A.name.length,r=i.matches.map((e=>createSpan("suggestion-highlight")));for(let e=a;e<A.path.length;e++){const t=i.matches.find((t=>t[0]===e));if(t){const a=r[i.matches.indexOf(t)];n.appendChild(a),a.appendText(A.path.substring(t[0],t[1])),e+=t[1]-t[0]-1}else n.appendText(A.path[e])}t.createDiv({cls:"suggestion-note",text:A.path})}getItems(){return this.files}}const insertImageToView=async(e,t,A,i)=>{e.clear(),e.style.strokeColor="transparent",e.style.backgroundColor="transparent";const n=e.getExcalidrawAPI();e.canvas.theme=n.getAppState().theme;const a=await e.addImage(t.x,t.y,A,i);return await e.addElementsToView(!1,!0,!0),a},insertEmbeddableToView=async(e,t,A,i)=>{if(e.clear(),e.style.strokeColor="transparent",e.style.backgroundColor="transparent",A&&IMAGE_TYPES.contains(A.extension)||e.isExcalidrawFile(A))return await insertImageToView(e,t,A);{const n=e.addEmbeddable(t.x,t.y,500,500,i,A);return await e.addElementsToView(!1,!0,!0),n}},getEA=e=>{try{return window.ExcalidrawAutomate.getAPI(e)}catch(e){return console.log({message:"Excalidraw not available",fn:getEA}),null}};class InsertPDFModal extends obsidian_module.Modal{constructor(e,t){super(app),this.plugin=e,this.view=t,this.borderBox=!0,this.gapSize=20,this.numColumns=1,this.lockAfterImport=!0,this.pagesToImport=[],this.pageDimensions={width:0,height:0},this.importScale=.3,this.dirty=!1,this.setImageSizeMessage=()=>this.imageSizeMessage.innerText=`${Math.round(this.pageDimensions.width*this.importScale)} x ${Math.round(this.pageDimensions.height*this.importScale)}`}open(e){e&&"pdf"===e.extension.toLowerCase()&&(this.pdfFile=e),super.open()}onOpen(){this.containerEl.classList.add("excalidraw-release"),this.titleEl.setText("Import PDF"),this.createForm()}async onClose(){this.dirty&&(this.plugin.settings.pdfImportScale=this.importScale,this.plugin.settings.pdfBorderBox=this.borderBox,this.plugin.settings.pdfGapSize=this.gapSize,this.plugin.settings.pdfNumColumns=this.numColumns,this.plugin.settings.pdfLockAfterImport=this.lockAfterImport,this.plugin.saveSettings()),this.pdfDoc&&(this.pdfDoc.destroy(),this.pdfDoc=null)}async getPageDimensions(e){try{const t=this.plugin.settings.pdfScale,A=createEl("canvas"),i=(await e.getPage(1)).getViewport({scale:t});this.pageDimensions.height=i.height,this.pageDimensions.width=i.width,A.width=0,A.height=0,this.setImageSizeMessage()}catch(e){console.log(e)}}createPageListFromString(e){const t=e=>e.replace(/\D/g,"");return this.pagesToImport=[],e.split(",").forEach((e=>{const A=e.split("-");if(1===A.length){const e=parseInt(t(A[0]));!isNaN(e)&&this.pagesToImport.push(e)}else if(2===A.length){const e=parseInt(t(A[0])),i=parseInt(t(A[1]));if(isNaN(e)||isNaN(i))return;for(let t=e;t<=i;t++)this.pagesToImport.push(t)}})),this.pagesToImport}async createForm(){await this.plugin.loadSettings(),this.borderBox=this.plugin.settings.pdfBorderBox,this.gapSize=this.plugin.settings.pdfGapSize,this.numColumns=this.plugin.settings.pdfNumColumns,this.lockAfterImport=this.plugin.settings.pdfLockAfterImport,this.importScale=this.plugin.settings.pdfImportScale;const e=this.contentEl;let t,A,i,n;const a=()=>this.pdfDoc?0===this.pagesToImport.length?(i.buttonEl.style.display="none",void(n.innerText="Please select pages to import")):Math.max(...this.pagesToImport)<=this.pdfDoc.numPages?(i.buttonEl.style.display="block",void(n.innerText="")):(i.buttonEl.style.display="none",void(n.innerText=`The selected document has ${this.pdfDoc.numPages} pages. Please select pages between 1 and ${this.pdfDoc.numPages}`)):(n.innerText="Please select a PDF file",void(i.buttonEl.style.display="none")),r=()=>{0!==A?t.innerHTML=`There are <b>${A}</b> pages in the selected document.`:t.innerText="Please select a PDF file"},s=async e=>{this.pdfDoc&&await this.pdfDoc.destroy(),this.pdfDoc=null,e&&(this.pdfDoc=await getPDFDoc(e),this.pdfFile=e,this.pdfDoc?(A=this.pdfDoc.numPages,a(),r(),this.getPageDimensions(this.pdfDoc)):i.setDisabled(!0))},o=new obsidian_module.TextComponent(e);o.inputEl.style.width="100%";const l=new FileSuggestionModal(this.app,o,app.vault.getFiles().filter((e=>"pdf"===e.extension.toLowerCase())));let c,d,h,u;o.onChange((async()=>{const e=l.getSelectedItem();await s(e)})),t=e.createEl("p",{text:""}),r(),new obsidian_module.Setting(e).setName("Pages to import").addText((e=>{d=e,e.setPlaceholder("e.g.: 1,3-5,7,9-10").onChange((e=>{const t=this.createPageListFromString(e);t.length>15?c.innerHTML=`You are importing <b>${t.length}</b> pages. ⚠️ This may take a while. ⚠️`:c.innerHTML=`You are importing <b>${t.length}</b> pages.`,a()})),e.inputEl.style.width="100%"})),c=e.createEl("p",{text:""}),new obsidian_module.Setting(e).setName("Add border box").addToggle((e=>e.setValue(this.borderBox).onChange((e=>{this.borderBox=e,this.dirty=!0})))),new obsidian_module.Setting(e).setName("Lock pages on canvas after import").addToggle((e=>e.setValue(this.lockAfterImport).onChange((e=>{this.lockAfterImport=e,this.dirty=!0})))),new obsidian_module.Setting(e).setName("Number of columns").addSlider((e=>e.setLimits(1,100,1).setValue(this.numColumns).onChange((e=>{this.numColumns=e,h.innerText=` ${e.toString()}`,this.dirty=!0})))).settingEl.createDiv("",(e=>{h=e,e.style.minWidth="2.3em",e.style.textAlign="right",e.innerText=` ${this.numColumns.toString()}`})),new obsidian_module.Setting(e).setName("Size of gap between pages").addSlider((e=>e.setLimits(10,200,10).setValue(this.gapSize).onChange((e=>{this.gapSize=e,u.innerText=` ${e.toString()}`,this.dirty=!0})))).settingEl.createDiv("",(e=>{u=e,e.style.minWidth="2.3em",e.style.textAlign="right",e.innerText=` ${this.gapSize.toString()}`}));const g=new obsidian_module.Setting(e).setName("Imported page size").setDesc(`${this.pageDimensions.width*this.importScale} x ${this.pageDimensions.height*this.importScale}`).addSlider((e=>e.setLimits(.1,1.5,.1).setValue(this.importScale).onChange((e=>{this.importScale=e,this.dirty=!0,this.setImageSizeMessage()}))));this.imageSizeMessage=g.descEl;const p=new obsidian_module.Setting(e).setDesc("Select a document first").addButton((e=>{e.setButtonText("Import PDF").setCta().onClick((async()=>{const e=getEA(this.view);let t=0,A=0;const i=Math.round(this.pageDimensions.width*this.importScale),a=Math.round(this.pageDimensions.height*this.importScale);for(let r=0;r<this.pagesToImport.length;r++){const s=this.pagesToImport[r];n.innerText=`Importing page ${s} (${r+1} of ${this.pagesToImport.length})`;const o=Math.round(this.pageDimensions.width*this.importScale*t+this.gapSize*t),l=Math.round(this.pageDimensions.height*this.importScale*A+this.gapSize*A);e.style.strokeColor=this.borderBox?"#000000":"transparent";const c=e.addRect(o,l,i,a),d=e.getElement(c);this.lockAfterImport&&(d.locked=!0);const h=await e.addImage(o,l,this.pdfFile.path+`#page=${s}`,!1),u=e.getElement(h);u.width=i,u.height=a,this.lockAfterImport&&(u.locked=!0),e.addToGroup([c,h]),t=(t+1)%this.numColumns,0===t&&A++}await e.addElementsToView(!0,!0,!1);const r=e.getExcalidrawAPI(),s=e.getElements().map((e=>e.id)),o=e.getViewElements().filter((e=>s.includes(e.id)));r.selectElements(o),r.zoomToFit(o),this.close()})),i=e,i.buttonEl.style.display="none"}));n=p.descEl,n.addClass("mod-warning"),this.pdfFile?(o.setValue(this.pdfFile.path),await s(this.pdfFile),l.close(),d.inputEl.focus()):o.inputEl.focus(),a()}}class UniversalInsertFileModal extends obsidian_module.Modal{constructor(e,t){super(app),this.plugin=e,this.view=t,this.center={x:0,y:0};const A=t.excalidrawAPI.getAppState(),i=t.containerEl.getBoundingClientRect(),n=window.innerWidth||document.documentElement.clientWidth,a=window.innerHeight||document.documentElement.clientHeight,r=sceneCoordsToViewportCoords({sceneX:t.currentPosition.x,sceneY:t.currentPosition.y},A);if(r.x>=i.left+150&&r.y<=i.right-150&&r.y>=i.top+150&&r.y<=i.bottom-150){const e=t.currentPosition.x-250,A=t.currentPosition.y-250;this.center={x:e,y:A}}else{const e=i.left+i.width/2,t=i.top+i.height/2,r=Math.max(0,Math.min(n,e)),s=Math.max(0,Math.min(a,t));this.center=viewportCoordsToSceneCoords({clientX:r,clientY:s},A),this.center={x:this.center.x-250,y:this.center.y-250}}}open(e,t){this.file=e,this.center=null!=t?t:this.center,super.open()}onOpen(){this.containerEl.classList.add("excalidraw-release"),this.titleEl.setText("Insert File From Vault"),this.createForm()}async createForm(){const e=this.contentEl;let t,A,i,n,a,r,s=!1,o=this.file;const l=async()=>{const e=this.plugin.ea,s=o&&"md"===o.extension&&!e.isExcalidrawFile(o),l=o&&(IMAGE_TYPES.contains(o.extension)||e.isExcalidrawFile(o)),c=o&&!l,d=o&&"pdf"===o.extension,h=o&&e.isExcalidrawFile(o);if(s){for(A.settingEl.style.display="",t.selectEl.style.display="block";t.selectEl.options.length>0;)t.selectEl.remove(0);t.addOption("",""),(await app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},o)).blocks.filter((e=>{var t;return e.display&&"heading"===(null===(t=e.node)||void 0===t?void 0:t.type)})).forEach((e=>{t.addOption(`#${e.display.replaceAll(REG_BLOCK_REF_CLEAN,"").trim()}`,e.display)}))}else A.settingEl.style.display="none",t.selectEl.style.display="none";r.settingEl.style.display=h?"":"none",l||"md"===(null==o?void 0:o.extension)?n.buttonEl.style.display="block":n.buttonEl.style.display="none",i.buttonEl.style.display=c?"block":"none",a.buttonEl.style.display=d?"block":"none"},c=new obsidian_module.TextComponent(e);c.inputEl.style.width="100%";const d=new FileSuggestionModal(this.app,c,app.vault.getFiles().filter((e=>e!==this.view.file)));c.onChange((()=>{o=d.getSelectedItem(),l()})),A=new obsidian_module.Setting(e).setName("Select section heading").addDropdown((e=>{t=e,t.selectEl.style.width="100%"})),r=new obsidian_module.Setting(e).setName("Anchor to 100% of original size").setDesc("This is a pro feature, use it only if you understand how it works. If enabled even if you change the size of the imported image in Excalidraw, the next time you open the drawing this image will pop back to 100% size. This is useful when embedding an atomic Excalidraw idea into another note and preserving relative sizing of text and icons.").addToggle((e=>{e.setValue(s).onChange((e=>{s=e}))})),new obsidian_module.Setting(e).addButton((e=>{e.setButtonText("as iFrame").onClick((async()=>{const e=app.metadataCache.fileToLinktext(o,this.view.file.path,"md"===o.extension),A=getEA(this.view);A.selectElementsInView([await insertEmbeddableToView(A,this.center,void 0,`[[${e}${t.selectEl.value}]]`)]),this.close()})),i=e})).addButton((e=>{e.setButtonText("as Pdf").onClick((()=>{new InsertPDFModal(this.plugin,this.view).open(o),this.close()})),a=e})).addButton((e=>{e.setButtonText("as Image").onClick((async()=>{const e=getEA(this.view),A=o&&"md"===o.extension&&!e.isExcalidrawFile(o);e.selectElementsInView([await insertImageToView(e,this.center,A&&t.selectEl.value&&""!==t.selectEl.value?`${o.path}${t.selectEl.value}`:o,e.isExcalidrawFile(o)?!s:void 0)]),this.close()})),n=e})),this.view.ownerWindow.addEventListener("keydown",this.onKeyDown=e=>{const t=e=>"none"!==e.buttonEl.style.display;switch(e.key){case"Escape":return void this.close();case"Enter":return!t(i)||t(n)||t(a)?!t(n)||t(i)||t(a)?!t(a)||t(i)||t(n)?void 0:void a.buttonEl.click():void n.buttonEl.click():void i.buttonEl.click();case"i":return void(t(n)&&n.buttonEl.click());case"p":return void(t(a)&&a.buttonEl.click());case"f":return void(t(i)&&i.buttonEl.click())}}),c.inputEl.focus(),o&&(c.setValue(o.path),d.close()),l()}onClose(){this.view.ownerWindow.removeEventListener("keydown",this.onKeyDown)}}const setPen=(e,t)=>{const A=t.getAppState();t.updateScene({appState:Object.assign(Object.assign(Object.assign(Object.assign(Object.assign(Object.assign({currentStrokeOptions:e.penOptions},e.strokeWidth&&0!==e.strokeWidth?{currentItemStrokeWidth:e.strokeWidth}:null),e.backgroundColor?{currentItemBackgroundColor:e.backgroundColor}:null),e.strokeColor?{currentItemStrokeColor:e.strokeColor}:null),""===e.fillStyle?null:{currentItemFillStyle:e.fillStyle}),e.roughness?null:{currentItemRoughness:e.roughness}),e.freedrawOnly&&!A.resetCustomPen?{resetCustomPen:{currentItemStrokeWidth:A.currentItemStrokeWidth,currentItemBackgroundColor:A.currentItemBackgroundColor,currentItemStrokeColor:A.currentItemStrokeColor,currentItemFillStyle:A.currentItemFillStyle,currentItemRoughness:A.currentItemRoughness}}:null)})},resetStrokeOptions=(e,t,A)=>{t.updateScene({appState:Object.assign(Object.assign(Object.assign({},e?{currentItemStrokeWidth:e.currentItemStrokeWidth,currentItemBackgroundColor:e.currentItemBackgroundColor,currentItemStrokeColor:e.currentItemStrokeColor,currentItemFillStyle:e.currentItemFillStyle,currentItemRoughness:e.currentItemRoughness}:null),{resetCustomPen:null}),A?{currentStrokeOptions:null}:null)})};class ObsidianMenu{constructor(e,t,A){this.plugin=e,this.toolsRef=t,this.view=A,this.renderCustomPens=(e,t)=>{var A;return null===(A=t.customPens)||void 0===A?void 0:A.map(((A,i)=>{const n=this.plugin.settings.customPens[i];return t.resetCustomPen&&"freedraw"!==t.activeTool.type&&t.currentStrokeOptions===n.penOptions&&setTimeout((()=>resetStrokeOptions(t.resetCustomPen,this.view.excalidrawAPI,!1))),!t.resetCustomPen&&"freedraw"===t.activeTool.type&&t.currentStrokeOptions===n.penOptions&&n.freedrawOnly&&setTimeout((()=>setPen(this.activePen,this.view.excalidrawAPI))),this.activePen&&t.resetCustomPen&&"freedraw"===t.activeTool.type&&t.currentStrokeOptions===n.penOptions&&n.freedrawOnly&&(this.activePen.strokeWidth=t.currentItemStrokeWidth,this.activePen.backgroundColor=t.currentItemBackgroundColor,this.activePen.strokeColor=t.currentItemStrokeColor,this.activePen.fillStyle=t.currentItemFillStyle,this.activePen.roughness=t.currentItemRoughness),React__namespace.createElement("label",{key:i,className:clsx("ToolIcon","ToolIcon_size_medium",{"is-mobile":e}),onClick:()=>{const e=Date.now();if(e-this.clickTimestamp[i]<500){const e=new PenSettingsModal(this.plugin,this.view,i);return void(async()=>{await this.plugin.loadSettings(),e.open()})()}this.clickTimestamp[i]=e;const t=this.view.excalidrawAPI,A=t.getAppState();A.currentStrokeOptions!==n.penOptions||"freedraw"!==A.activeTool.type?(this.activePen=Object.assign({},n),setPen(n,t),t.setActiveTool({type:"freedraw"})):resetStrokeOptions(A.resetCustomPen,t,!0)}},React__namespace.createElement("div",{className:"ToolIcon__icon","aria-label":n.type,style:Object.assign({},"freedraw"===t.activeTool.type&&t.currentStrokeOptions===n.penOptions?{background:"var(--color-primary)"}:{})},penIcon(n)))}))},this.longpressTimeout={},this.renderPinnedScriptButtons=(e,t)=>{var A;let i=0;return null===(A=null==t?void 0:t.pinnedScripts)||void 0===A?void 0:A.map(((t,A)=>{var n;const a=this.plugin.scriptEngine.scriptIconMap[t],r=null!==(n=null==a?void 0:a.name)&&void 0!==n?n:"",s=(null==a?void 0:a.svgString)?stringToSVG(a.svgString):ICONS.cog;return this.longpressTimeout[A]||(this.longpressTimeout[A]=0),React__namespace.createElement("label",{key:A,className:clsx("ToolIcon","ToolIcon_size_medium",{"is-mobile":e}),onPointerUp:()=>{this.longpressTimeout[A]&&(window.clearTimeout(this.longpressTimeout[A]),this.longpressTimeout[A]=0,(async()=>{const e=app.vault.getAbstractFileByPath(t);e&&e instanceof obsidian_module.TFile&&this.plugin.scriptEngine.executeScript(this.view,await app.vault.read(e),this.plugin.scriptEngine.getScriptName(e),e)})())},onPointerDown:()=>{const e=Date.now();this.longpressTimeout[A]>0&&(window.clearTimeout(this.longpressTimeout[A]),this.longpressTimeout[A]=0),e-i>=500&&(this.longpressTimeout[A]=window.setTimeout((()=>{this.longpressTimeout[A]=0,(async()=>{var e;await this.plugin.loadSettings();const A=this.plugin.settings.pinnedScripts.indexOf(t);A>-1&&(this.plugin.settings.pinnedScripts.splice(A,1),null===(e=this.view.excalidrawAPI)||void 0===e||e.setToast({message:`Pin removed: ${r}`,duration:3e3,closable:!0})),await this.plugin.saveSettings(),app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&e.view.updatePinnedScripts()}))})()}),1500)),i=e}},React__namespace.createElement("div",{className:"ToolIcon__icon","aria-label":r},s))}))},this.renderButton=(e,t)=>React__namespace.createElement(React__namespace.Fragment,null,React__namespace.createElement("label",{className:clsx("ToolIcon","ToolIcon_size_medium",{"is-mobile":e}),onClick:()=>{this.toolsRef.current.setTheme(t.theme),this.toolsRef.current.toggleVisibility(t.zenModeEnabled||e)}},React__namespace.createElement("div",{className:"ToolIcon__icon","aria-label":t$d("OBSIDIAN_TOOLS_PANEL")},ICONS.obsidian)),React__namespace.createElement("label",{className:clsx("ToolIcon","ToolIcon_size_medium",{"is-mobile":e}),onClick:()=>{new UniversalInsertFileModal(this.plugin,this.view).open()}},React__namespace.createElement("div",{className:"ToolIcon__icon","aria-label":t$d("UNIVERSAL_ADD_FILE")},ICONS["add-file"])),this.renderCustomPens(e,t),this.renderPinnedScriptButtons(e,t)),this.clickTimestamp=Array.from({length:Object.keys(PENS).length},(()=>0))}}class ActionButton extends React__namespace.Component{constructor(e){super(e),this.toastMessageTimeout=0,this.longpressTimeout=0,this.state={visible:!0}}render(){return React__namespace.createElement("button",{style:{},className:"ToolIcon_type_button ToolIcon_size_small ToolIcon_type_button--show ToolIcon",title:this.props.title,onClick:e=>{this.toastMessageTimeout&&(window.clearTimeout(this.toastMessageTimeout),this.toastMessageTimeout=0,this.props.action(e)),this.longpressTimeout&&(window.clearTimeout(this.longpressTimeout),this.longpressTimeout=0)},onPointerDown:e=>{this.toastMessageTimeout=window.setTimeout((()=>{var e;null===(e=this.props.view.excalidrawAPI)||void 0===e||e.setToast({message:this.props.title,duration:3e3,closable:!0}),this.toastMessageTimeout=0}),400),this.longpressTimeout=window.setTimeout((()=>{var t;this.props.longpress?this.props.longpress(e):null===(t=this.props.view.excalidrawAPI)||void 0===t||t.setToast({message:"Cannot pin this action",duration:3e3,closable:!0}),this.longpressTimeout=0}),1500)}},React__namespace.createElement("div",{className:"ToolIcon__icon","aria-hidden":"true"},this.props.icon))}}const FIRST_RUN='\nThe Excalidraw Obsidian plugin is much more than "just" a drawing tool. To help you get started here\'s a showcase of the key Excalidraw plugin features.\n\nIf you\'d like to learn more, please subscribe to my YouTube channel: [Visual PKM](https://www.youtube.com/channel/UCC0gns4a9fhVkGkngvSumAQ) where I regularly share videos about Obsidian-Excalidraw and about tools and techniques for Visual Personal Knowledge Management.\n\nThank you & Enjoy!\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/o0exK-xFP3k" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n',RELEASE_NOTES={Intro:'After each update you\'ll be prompted with the release notes. You can disable this in plugin settings.\n\nI develop this plugin as a hobby, spending my free time doing this. If you find it valuable, then please say THANK YOU or...\n\n<div class="ex-coffee-div"><a href="https://ko-fi.com/zsolt"><img src="https://cdn.ko-fi.com/cdn/kofi3.png?v=3" height=45></a></div>\n',"1.9.12":`\n## New\n- If you create a Text Element that includes only a transclusion e.g.: ${String.fromCharCode(96)}![[My Image.png]]${String.fromCharCode(96)} then excalidraw will automatically replace the transclusion with the embedded image.\n- New Excalidraw splash screen icon contributed by Felix Häberle. 😍\n\n<div class="excalidraw-image-wrapper">\n<img src='https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/excalidraw-sword-mini.png'/>\n</div>\n\n## Fixed\n- Popout windows behaved inconsistently losing focus at the time when a markdown file was embedded. Hopefully, this is now working as intended.\n- A number of small fixes that will also improve the ExcaliBrain experience\n`,"1.9.11":"\n# New\n- I added 2 new command palette actions: 1) to toggle frame clipping and 2) to toggle frame rendering.\n\n# Updated\n- I released a minor update to the slideshow script. Frame sequence (Frame 1, 2, 3, ...) will now be displayed in proper order. Frames will be hidden during the presentation (this was there before, but there was a change to excalidraw.com that broke this feature of the slideshow script).\n\n# Fixed: \n- Excalidraw Automate error introduced with 1.9.10 - when elements are repositioned to cursor and no ExcalidrawView is active\n","1.9.10":'\n## New\n- @mazurov added a new script: [Ellipse Selected Elements](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Ellipse%20Selected%20Elements.md)\n\n## Fixed\n- **Image Saving Error**: Previously, inserting an image from Firebase Storage or other URLs could result in an error that prevented the entire drawing from being saved. I have now improved the error handling and image fetching from the web, ensuring smooth image insertion and saving. \n- **Text Search Bug**: There was an issue where text search failed when frames had default names like "Frame 1," "Frame 2," etc. This has been resolved, and now the text search works correctly in such cases. ([#1239](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1239)) \n- **Image Positioning Fix**: An annoying bug caused the image to jump after inserting it using the "Insert Image" command palette action. I\'ve fixed this issue, and now the image behaves as expected when positioning it for the first time.\n',"1.9.9":`\n## ⚠️⚠️ IMPORTANT: PLEASE READ ⚠️⚠️\n\nI updated embedded frames for compatibility with excalidraw.com. To ensure everything works smoothly:\n\n🔄 Update Excalidraw on all your devices.\n\nThis will avoid any issues with converted files and let you enjoy the new features seamlessly.\n\nThank you for your understanding. If you have any questions, feel free to reach out.\n\n---\n\n## Fixed:\n- PNG image caching resulting in broken images after Obsidian restarts\n- SVG export now displays embedded iframes with the correct embed link (note this feature only works when you open the SVGs in a browser outside Obsidian).\n\n## Updated / fixed in Excalidraw Automate\n- I updated ${String.fromCharCode(96)}lib/ExcalidrawAutomate.d.ts${String.fromCharCode(96)} and published a new version of obsidian-excalidraw-plugin type library to npmjs.\n- Added new ExcalidrawAutomate functions: ${String.fromCharCode(96)} addEmbeddable()${String.fromCharCode(96)}, ${String.fromCharCode(96)}DEVICE${String.fromCharCode(96)}, ${String.fromCharCode(96)}newFilePrompt()${String.fromCharCode(96)}, and ${String.fromCharCode(96)}getLeaf()${String.fromCharCode(96)}\n- ${String.fromCharCode(96)}addImage${String.fromCharCode(96)} and ${String.fromCharCode(96)}addElementsToView${String.fromCharCode(96)} were extended with 1-1 additional optional parameter. As a result of ${String.fromCharCode(96)}shouldRestoreElements${String.fromCharCode(96)} defaulting to false, all elements in the scene will no longer be updated (iframes will not blink) when you add elements via script.\n- There is a new event hook: ${String.fromCharCode(96)}onPasteHook${String.fromCharCode(96)}. This will be called whenever the user pastes something to the canvas. You can use this callback if you want to do something additional during the onPaste event. In case you want to prevent the Excalidraw default onPaste action you must return false\n\n${String.fromCharCode(96,96,96)}typescript\nasync addImage(\n topX: number,\n topY: number,\n imageFile: TFile | string,\n scale: boolean = true,\n anchor: boolean = true,\n): Promise<string>;\n\nasync addElementsToView(\n repositionToCursor: boolean = false,\n save: boolean = true,\n newElementsOnTop: boolean = false,\n shouldRestoreElements: boolean = false,\n): Promise<boolean>;\n\n onPasteHook: (data: {\n ea: ExcalidrawAutomate;\n payload: ClipboardData;\n event: ClipboardEvent;\n excalidrawFile: TFile;\n view: ExcalidrawView;\n pointerPosition: { x: number; y: number };\n }) => boolean = null;\n\naddEmbeddable(\n topX: number,\n topY: number,\n width: number,\n height: number,\n url?: string,\n file?: TFile\n): string;\n\nget DEVICE(): DeviceType;\n\nnewFilePrompt(\n newFileNameOrPath: string,\n shouldOpenNewFile: boolean,\n targetPane?: PaneTarget,\n parentFile?: TFile\n): Promise<TFile | null>;\n\ngetLeaf(\n origo: WorkspaceLeaf,\n targetPane?: PaneTarget\n): WorkspaceLeaf;\n${String.fromCharCode(96,96,96)}\n`,"1.9.8":'\n## New Features\n- Zoom to heading and block in markdown frames.\n- Added an iframe menu that allows users to change heading/block zoom, center the element, and open it in the browser.\n- Replaced twitframe with platform.twitter for tweets. The "Read more" and "Reply" buttons now work. Embedded tweets will honor theme settings.\n\n## Bug Fixes\n- Fixed an issue where embedded markdown frames disappeared in fullscreen mode. [#1197](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1197)\n- Resolved a problem with the "Embed Markdown as Image" feature where changes to embed properties were not always honored. [#1201](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1201)\n- When inserting any file from the Vault and embedding a Markdown document as an image, the embed now correctly honors the section heading if specified. [#1200](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1200)\n- SVG and PNG autoexport now function properly when closing a popout window. [#1209](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1209)\n- Many other minor fixes\n',"1.9.7":`\n## Fixed:\n\n- Fixed an issue where using the color picker shortcut would cause the UI to disappear in mobile view mode.\n- You can now add YouTube playlists to iframes.\n- Fixed a bug where the "Add any file" dropdown suggester opened in the main Obsidian workspace instead of the popout window when Excalidraw was running. ([#1179](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1191))\n- Made some improvements to the logic of opening in the adjacent pane, although it is still not perfect.\n- Fixed an issue where Obsidian sync would result in the loss of the last approximately 20 seconds of work. Excalidraw's handling of sync is now fixed. ([#1189](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1189))\n\n## New:\n\n- Introducing Image Cache: Excalidraw will now cache rendered images embedded in Markdown documents, which will enhance the markdown rendering experience.\n- Backup Cache: Excalidraw now stores a backup on your device when saving, in case the application is terminated during a save operation. If you are using sync, you can find the latest backup on the device you last used to edit your drawing.\n- Added ${String.fromCharCode(96)}frame=${String.fromCharCode(96)} parameter to image references. ([#1194](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1194)) For more details about this feature, check out this [YouTube video](https://youtu.be/yZQoJg2RCKI).\n- When an SVG image from Draw.io is embedded in Excalidraw, clicking the image will open the file in the [Diagram plugin](https://github.com/zapthedingbat/drawio-obsidian) (if available).\n- Added the [Create DrawIO file](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Create%20DrawIO%20file.md) Excalidraw Automate Script to the library, which allows you to create a new draw.io drawing and add it to the current Excalidraw canvas.\n\n## New in ExcalidrawAutomate\n\n${String.fromCharCode(96,96,96)}typescript\nasync getAttachmentFilepath(filename: string): Promise<string>\n${String.fromCharCode(96,96,96)}\n\nThis asynchronous function retrieves the filepath to a new file, taking into account the attachments preference settings in Obsidian. It creates the attachment folder if it doesn't already exist. The function returns the complete path to the file. If the provided filename already exists, the function will append '_[number]' before the extension to generate a unique filename.\n\n${String.fromCharCode(96,96,96)}typescript\ngetElementsInFrame(frameElement: ExcalidrawElement, elements: ExcalidrawElement[]): ExcalidrawElement[];\n${String.fromCharCode(96,96,96)}\n\nThis function returns the elements contained within a frame.\n`,"1.9.6":`\n## Fixed\n- help shortcuts are really hard to see [#1176](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1179)\n- link icons not visible on elements after 1.9.5 release (reported on Discord)\n- PDFs in iFrames will now respect the ${String.fromCharCode(96)}[[document.pdf#page=155]]${String.fromCharCode(96)} format\n- Keyboard shortcuts were not working properly on external drop. Check [updated keyboard map](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/excalidraw-modifiers.png)\n\n<a href="https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/excalidraw-modifiers.png"><img src="https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/excalidraw-modifiers.png" width="100%" alt="Keyboard map"/></a>\n`,"1.9.5":`\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/ICpoyMv6KSs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## New\n- IFrame support: insert documents from your Obsidian Vault and insert youtube, Vimeo, and generally any website from the internet\n- Frame support: use frames to group items on your board\n\n## New in ExcalidrawAutomate\n- selectElementsInView now also accepts a list of element IDs\n- new addIFrame function that accepts an Obsidian file or a URL string\n${String.fromCharCode(96,96,96)}typescript\nselectElementsInView(elements: ExcalidrawElement[] | string[]): void;\naddIFrame(topX: number, topY: number, width: number, height: number, url?: string, file?: TFile): string;\n${String.fromCharCode(96,96,96)}\n`,"1.9.3":'\n## New from Excalidraw.com\n- Eyedropper tool. The eyedropper is triggered with "i". If you hold the ALT key while clicking the color it will set the stroke color of the selected element, else the background color.\n- Flipping multiple elements\n- Improved stencil library rendering performance + the stencil library will remember the scroll position from the previous time it was open\n\n## Fixed\n- Replaced command palette and tab export SVG/PNG/Excalidraw actions with "export image" which will take the user to the export image dialog.\n',"1.9.2":`\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/diBT5iaoAYo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## New\n- Excalidraw.com Color Picker redesign [#6216](https://github.com/excalidraw/excalidraw/pull/6216)\n- Updated palette loader script in the script library\n- New ExcalidrawAutomate API to load Elements and AppState from another Excalidraw file.\n${String.fromCharCode(96,96,96)}typescript\nasync getSceneFromFile(file: TFile): Promise<{elements: ExcalidrawElement[]; appState: AppState;}>\n${String.fromCharCode(96,96,96)}\n`,"1.9.1":'\n## Updates from Excalidraw.com\n- "Unlock all elements" - new action available via the context menu [#5894](https://github.com/excalidraw/excalidraw/pull/5894)\n- Minor improvements to improve the speed [#6560](https://github.com/excalidraw/excalidraw/pull/6560)\n- Retain Seed on Shift Paste [#6509](https://github.com/excalidraw/excalidraw/pull/6509)\n\n## New/Fixed\n- Clicking on the link handle (top right corner) will open the link in the same window\n- CTRL/CMD click on a link will open the link in a new tab and will focus on the new tab\n- Linking to parts of images. In some cases clicking search results, links, or backlinks did not focus on the right element according to the link. Fixed.\n',"1.9.0":`\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/nB4cOfn0xAs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## Fixed\n- Embedded images, markdowns, PDFs will load one by one, not in one go after a long wait\n\n## New\n- Embed PDF\n\n## New in ExcalidrawAutomate\n- onFileCreateHook: if set this hook is called whenever a new drawing is created using Excalidraw command palette menu actions. If the excalidraw file is created using Templater or other means, the trigger will not fire. [#1124](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1124)\n${String.fromCharCode(96,96,96)}typescript\n onFileCreateHook: (data: {\n ea: ExcalidrawAutomate;\n excalidrawFile: TFile; //the file being created\n view: ExcalidrawView;\n }) => Promise<void>;\n ${String.fromCharCode(96,96,96)}\n`,"1.8.26":"\n## Fixed\n- Dynamic styling did not pick up correctly\n - the accent color with the default Obsidian theme\n - the drawing theme color with the out of the box, default new drawing (not using a template)\n- The Obsidian tools panel did not pick up user scripts when installing your very first script. A reload of Obsidian was required.\n","1.8.25":'\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/BvYkOaly-QM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## New & improved\n- Multi-link support\n- Updated [Scribble Helper](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Scribble%20Helper.md) script for better handwritten text support. \n - Add links to text elements\n - Creating wrapped text in transparent sticky notes\n - Add text to arrows and lines\n - Handwriting support on iOS via Scribble\n\n## Fixed\n - The long-standing issue of jumping text\n \n',"1.8.24":`\n## Updates from Excalidraw.com\n- fix: color picker keyboard handling not working\n- fix: center align text when bind to the container via context menu\n- fix: split "Edit selected shape" shortcut\n\n## Fixed\n- BUG: Area embed link of svg inside excalidraw embed entire svg instead of area [#1098](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1098)\n\n## New\n- I updated the [Scribble Helper](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Scribble%20Helper.md) script with tons of new features. I am still beta testing the script. I will release a demo video in the next few days.\n\n## New in Excalidraw Automate\n- I added many more configuration options for the scriptEngine utils.inputPrompt function. See [Scribble Helper](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Scribble%20Helper.md) for a demonstration of this new feature.\n${String.fromCharCode(96,96,96)}typescript\n public static async inputPrompt(\n view: ExcalidrawView,\n plugin: ExcalidrawPlugin,\n app: App,\n header: string,\n placeholder?: string,\n value?: string,\n buttons?: { caption: string; tooltip?:string; action: Function }[],\n lines?: number,\n displayEditorButtons?: boolean,\n customComponents?: (container: HTMLElement) => void\n )\n${String.fromCharCode(96,96,96)}`,"1.8.23":'\n## Fixes\n- Fixed palm rejection to prevent unwanted spikes when using the freedraw tool. ([#1065](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1065))\n- Fixed issue where images disappeared when zoomed in. ([#6417](https://github.com/excalidraw/excalidraw/pull/6417))\n- Autosave will now save the drawing when you change the theme from dark to light or vice versa. ([#1080](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1080))\n- Added padding to short LaTeX formulas to prevent cropping. ([#1053](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1053))\n\n## New Features\n- Added a new command palette action: Toggle to invert default binding behavior. This new feature allows you to switch between normal and inverted mode. In normal mode, arrows will bind to objects unless you hold the CTRL/CMD key while drawing the arrow or moving objects. In inverted mode, arrows will not bind to objects unless you hold the CTRL/CMD key while drawing the arrow or moving objects.\n- You can now set a template LaTeX formula in the plugin settings (under experimental features) to be used when creating a new LaTeX formula. ([#1090](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1090))\n- Redesigned the Image Export dialog. I hope dropdowns are now more intuitive than the toggles were.\n- Added the ability to export only the selected part of a drawing. See the Export dialog for more information.\n- Added a zigzag fill easter egg. See a demo of this feature [here](https://twitter.com/excalidraw/status/1645428942344445952?s=61&t=nivKLx2vgl6hdv2EbW4mZg).\n- Added a new expert function: recolor embedded Excalidraw and SVG images (not JPG, PNG, BMP, WEBP, GIF). See a demo of this feature here:\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/MIZ5hv-pSSs" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n',"1.8.22":`\n## Fixed\n- Styling of custom pen and script buttons in the side panel was inverted.\n- Minor tweaks to dynamic styling. [see this video to understand dynamic styling](https://youtu.be/fypDth_-8q0)\n\n## New\n- New scripts by @threethan:\n - [Auto Draw for Pen](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Auto%20Draw%20for%20Pen.md): Automatically switches between the select and draw tools, based on whether a pen is being used. Supports most pens including Apple Pencil.\n - [Hardware Eraser Support](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Hardware%20Eraser%20Support.md): Adds support for pen inversion, a.k.a. the hardware eraser on the back of your pen. Supports Windows based styluses. Does not suppoprt Apple Pencil or S-Pen.\n- Added separate buttons to support copying link, area or group references to objects on the drawing. [#1063](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1063). See [this video](https://youtu.be/yZQoJg2RCKI) for more details on how this works.\n- Hover preview will no longer trigger for image files (.png, .svg, .jpg, .gif, .webp, .bmp, .ico, .excalidraw)\n- Minor updates to the [Slideshow](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Slideshow.md) script. You can download the updated script from the Excalidraw script library. The slideshow will now correctly run also when initiated in a popout window. When the drawing is in a popout window, the slideshow will not be full screen, but will only occupy the popout window. If you run the slideshow from the main Obsidian workspace, it will be displayed in full-screen mode.\n- Updated the Icon Library script to now include image keywords under each of the images to allow searching for keywords (CTRL/CMD+F). I've uploaded the new script to [here](https://gist.github.com/zsviczian/33ff695d5b990de1ebe8b82e541c26ad). If you need further information watch this [video](https://youtu.be/_OEljzZ33H8)\n\n## New in ExcalidrawAutomate\n- ${String.fromCharCode(96)}addText${String.fromCharCode(96)} ${String.fromCharCode(96)}formatting${String.fromCharCode(96)} parameter now accepts ${String.fromCharCode(96)}boxStrokeColor${String.fromCharCode(96)} and ${String.fromCharCode(96)}textVerticalAlign${String.fromCharCode(96)} values.\n${String.fromCharCode(96,96,96)}typescript\naddText(\n topX: number,\n topY: number,\n text: string,\n formatting?: {\n wrapAt?: number;\n width?: number;\n height?: number;\n textAlign?: "left" | "center" | "right";\n box?: boolean | "box" | "blob" | "ellipse" | "diamond";\n boxPadding?: number;\n boxStrokeColor?: string;\n textVerticalAlign?: "top" | "middle" | "bottom";\n },\n id?: string,\n ): string;\n${String.fromCharCode(96,96,96)}\n- new ${String.fromCharCode(96)}onFileOpenHook${String.fromCharCode(96)}. If set, this callback is triggered, when an Excalidraw file is opened. You can use this callback in case you want to do something additional when the file is opened. This will run before the file level script defined in the ${String.fromCharCode(96)}excalidraw-onload-script${String.fromCharCode(96)} frontmatter is executed. Excalidraw will await the result of operations here. Handle with care. If you change data such as the frontmatter of the underlying file, I haven't tested how it will behave.\n${String.fromCharCode(96,96,96)}typescript\nonFileOpenHook: (data: {\n ea: ExcalidrawAutomate;\n excalidrawFile: TFile; //the file being loaded\n view: ExcalidrawView;\n}) => Promise<void>;\n${String.fromCharCode(96,96,96)}`,"1.8.21":'\n## Quality of Life improvements\n- Dynamic Styling (see plugin settings / Display). When Dynamic Styling is enabled it fixes Excalidraw issues with the Minimal Theme\n- New "Invert Colors" script\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/fypDth_-8q0" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n### Note\nThe few of you, that are using the Dynamic Styling Templater script, please remove it and restart Obsidian.\n',"1.8.20":"\n## Fixed\n- Excalidraw froze Obsidian in certain rare situations [#1054](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1054)\n- File loading error [#1062](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1062)\n- Embedded images in markdown documents no longer have the line on the side. Image sizing works better. [#1059](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1059)\n- Locked elements will not show a hover preview [#1060](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1060)\n- CTRL/CMD + K correctly triggers add link [#1056](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1056)\n\n## New\n- Grid color adjusts to the view background color\n\nI'm sorry, but the sticky note editing issue on Android with the on-screen keyboard has still not been resolved. If you also experience this error, please help raise the priority with the core Excalidraw team by commenting on this issue: [#6330](https://github.com/excalidraw/excalidraw/issues/6330)\n","1.8.19":"\n## Fixed: Text wrapping issue in sticky notes\n\nI fixed an issue where text would wrap differently and words would disappear during text editing in sticky notes. You can check out the details on [GitHub #6318](https://github.com/excalidraw/excalidraw/issues/6331).\n\nI am aware of three additional issues related to container text editing that are still open. I apologize for any inconvenience caused by the recent change in how text size is calculated on Excalidraw.com, which has had a knock-on effect on Obsidian. I am actively working to address the following issues:\n\n- Pinch zooming while editing text in a text container [GitHub #6331](https://github.com/excalidraw/excalidraw/issues/6331)\n- Container text jumps on edit on Android with on-screen keyboard [GitHub #6330](https://github.com/excalidraw/excalidraw/issues/6330)\n- Shadow text when editing text containers without a keyboard on iOS [GitHub #6329](https://github.com/excalidraw/excalidraw/issues/6329)\n\nThank you for your patience while I work on resolving these issues.\n","1.8.18":`\n## Fixed\n- Text scaling issue introduced in 1.8.17\n- [#1043](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1043): Error handling when ${String.fromCharCode(96)}onCanvasColorChangeHook${String.fromCharCode(96)} is executed. This is used in the [Dynamic Styling Script](https://youtu.be/LtR04fNTKTM). \n`,"1.8.17":'\n## New from Excalidraw.com\n- Improved text wrapping in the ellipse and diamond shapes [6172](https://github.com/excalidraw/excalidraw/pull/6172)\n\n## New\n- Updated slideshow script\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/mQ2eLk_0TV4" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## Fixed: \n- "Save to..." in the Stencil Library menu now works as expected [#1032](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1032)\n',"1.8.16":'\n**!!! Modifier keys have changed, please review the table below !!!**\n[Click this to see the new shortcuts overview image](https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/images/excalidraw-modifiers.png)\n\n## Fixed \n- This version was extensively tested and developed on MacOS to remove usability issues.\n- New command palette action to create a new drawing in a new tab\n- Modifier keys to open links in the active window, splitting the current view to the right, in a new tab, or in a popout window now behave consistently both in Excalidraw and when clicking a drawing that is embedded in a markdown note.\n- Drag & Drop properly works from within Obsidian, from a web browser, and from the OS file explorer\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/9HlipSIzRhc" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n',"1.8.14":"\n## Fixed\n- text element link gets deleted when the drawing is reloaded\n","1.8.13":'\n## Fixed\n- When changing a text element in markdown mode, the change seem to have showed up when switching back to Excalidraw mode, but then lost these changes when loading the file the next time.\n- Scrolling through a page that has embedded drawings on Obsidian Mobile accidently opens the drawing in Excalidraw when touching the image. Now you need to press and hold to open the image in Excalidraw. [#1003](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/1003)\n- The scrollbar is no longer visible when presenting using the SlideShow script\n- Stroke properties could not be changed when custom pen settings had "Stroke & fill applies to: All shapes". It works now.\n\n## QoL\n- Custom pens will remember the stroke changes until you press the pen preset button again.\n - This is a bit hard to explain, let me try... Essentially, when you use a custom pen, it will keep the changes you made to the pen (like changing the stroke width) until you press the pen-prereset button again. So, for example, if you\'re using a mind mapping custom pen and change its color, and then switch to a different tool like text, when you switch back to the freedraw tool using the Excalidraw tools panel, the pen will still have the same color you set earlier, but if you press the mind mapping pen-preset button, it will default back to your custom pen settings including your preset color.\n- Added new buttons to load current stroke color and background color in the pen settings dialog. Also added an edit box so you can configure any valid color string (including with transparency) for pen stroke and background colors. [#991](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/991)\n',"1.8.11":'\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/rBarRfcSxNo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n# New\n- Support for referencing images from the internet in Excalidraw drawings, including YouTube thumbnail support. [#913](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/913)\n - Link to images on the internet without creating a copy in your Vault by holding down the CTRL key while dropping the link or image.\n - Automatic conversion of image URLs and YouTube links into image elements with original links added as a link on the element when pasting. Note, that if you only want to paste the plain text link (not the image), first double-click the canvas to start a new text element, then paste the link.\n- Two new options added to plugin settings:\n - Make mouse wheel zoom by default [#474](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/474)\n - Allow pinch zoom in pen mode [#828](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/828)\n- Update to the [Set Grid](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Set%20Grid.svg) script now saves the grid setting for the current file.\n',"1.8.10":'\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/wTtaXmRJ7wg" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n# QoL improvements\n- You can structure icons in the Obsidian tools panel by moving scripts to folders\n\n- I added useful actions to the hamburger menu in both tray-mode and normal-mode. \n\n- I added a new Export Image dialog. You can access the new export screen from the hamburger-menu\n\n- Links in help now point to Obsidian-Excalidraw relevant content.\n- I added a welcome screen\n\n- I updated the alternative dark mode / dynamic styling [script](https://gist.github.com/zsviczian/c7223c5b4af30d5c88a0cae05300305c)\n',"1.8.9":"\n# Minor QoL improvements\n- When you open a second drawing in the same Excalidraw view (i.e. by navigating a link) and make a change to this drawing, and then press UNDO, the entire drawing disappeared. Redo brought the image back, however, this behavior was frustrating. Not anymore...\n- On iPad\n - when you open the command palette, autozoom resized the drawing. If the Obsidian command palette or some other modal window is shown Excalidraw will not resize the view.\n - when you add a link to the drawing using the Command Palette, sometimes the link was added in a far corner of the drawing outside the current view area. This should be fixed now.","1.8.8":`\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/uZz5MgzWXiM" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n# New\n- The plugin now includes support for [Perfect Freehand](https://perfect-freehand-example.vercel.app/) pen-options. I've also added a new [Alternative Pens](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Alternative%20Pens.md) script.\n- Embed scene in exported PNG and SVG images [#860](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/860). This means that the export will be a normal PNG or SVG image with the added functionality that if someone loads the image into excalidraw.com it will open as a normal excalidraw file.\n - I've added 2 new Command Palette actions (export PNG, export SVG with embedded scene).\n - If you SHIFT click ${String.fromCharCode(96)} Save as PNG (or SVG)${String.fromCharCode(96)} in the workspace-tab menu, Excalidraw will embed the scene in the export.\n- I updated the [Organic Line](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Organic%20Line.md) script. It has an improved thick-to-thin look and a new thin-to-thick-to-thin line type.\n\n# Fixed\n- Intelligent image width setting [#955](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/955). Before this change, when the embedded image was small, the image would be extended to meet the image width setting in plugin settings. From now on, if the image is smaller than max-width, it will only extend to max-width. You can still set 100% width using custom CSS. See more on that [here](https://github.com/zsviczian/obsidian-excalidraw-plugin#embedded-images).\n\n# New in ExcalidrawAutomate\n- I added the ${String.fromCharCode(96)} plaintext${String.fromCharCode(96)} parameter to ${String.fromCharCode(96)}ExcalidrawAutomate.create${String.fromCharCode(96)} . Using this, you can add some text below the frontmatter but above the ${String.fromCharCode(96)}# Text Elements${String.fromCharCode(96)} section. Use this for example to add metadata to your file. (e.g. I use this in my Daily Quote template to add a Dataview field for the ${String.fromCharCode(96)}Author::${String.fromCharCode(96)} and add the quote with a standard block reference, so I can easily reference it in other files. I also add the ${String.fromCharCode(96)}#quote${String.fromCharCode(96)} tag to the file using this.)\n- The script running in the ScriptEngine now also receives the ${String.fromCharCode(96)}TFile${String.fromCharCode(96)} object for the script itself. You can access this object during execution via the ${String.fromCharCode(96)}utils.scriptFile${String.fromCharCode(96)} variable. \n`,"1.8.7":'\n## New from Excalidraw.com\n- Support shrinking text containers to their original height when text is removed [#6025](https://github.com/excalidraw/excalidraw/pull/6025)\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://user-images.githubusercontent.com/14358394/209404092-579d54e9-7003-48ef-8b82-84be08ba6246.mp4" title="Demo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## Fixed\n- removed the white background when editing arrow-label [#6033](https://github.com/excalidraw/excalidraw/pull/6033)\n- Minor style tweaks\n - for embedding Excalidraw into Obsidian Canvas. e.g. dragging no longer accidentally creates an image copy of the drawing, and\n - style tweaks on the Excalidraw canvas\n\n## New\n- If you set a different text color and sticky note border color, now if you change the border color, the text color will not be changed.\n',"1.8.6":`\n## New from Excalidraw.com:\n- Better default radius for rectangles [#5553](https://github.com/excalidraw/excalidraw/pull/5553). Existing drawings will look unchanged, this applies only to new rectangles.\n\n> [!attention]- ExcalidrawAutomate technical details\n> - ${String.fromCharCode(96)}strokeSharpness${String.fromCharCode(96)} is now deprecated\n> - use roundness instead\n> - ${String.fromCharCode(96)}roundness === null${String.fromCharCode(96)} is legacy ${String.fromCharCode(96)}strokeSharpness = "sharp"${String.fromCharCode(96)}\n> - ${String.fromCharCode(96)}roundness = { type: RoundnessType; value?: number }${String.fromCharCode(96)}\n> - type: 1, LEGACY, type:2 PROPORTIONAL_RADIUS, type:3 ADAPTIVE_RADIUS: 3\n> - value:\n> - Radius represented as % of element's largest side (width/height).\n> DEFAULT_PROPORTIONAL_RADIUS = 0.25;\n> - Fixed radius for the ADAPTIVE_RADIUS algorithm. In pixels.\n> DEFAULT_ADAPTIVE_RADIUS = 32;\n\n## New\n- For Obsidian 1.1.6 and above\n - Improved embedding into Obsidian Canvas\n - Improved embedding into Markdown documents\n- Added setting under ${String.fromCharCode(96)}Display/Default mode when opening Excalidraw${String.fromCharCode(96)} to always open the drawing in view mode on Mobile, but in normal mode on desktop. [#939](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/939)\n\n## Fixed\n- Zoom reset tooltip appears twice [#942](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/942)\n- Hid export library from library menu as it does not work due to Obsidian limitations. Use the command palette export library instead.\n- Arrow with label did not get exported and embedded correctly [#941](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/941)\n\n`,"1.8.4":'\n## New from Excalidraw.com\n- Labels on Arrows!!! [#5723](https://github.com/excalidraw/excalidraw/pull/5723)\n - To add a label press "Enter" or "Double click" on the arrow\n - Use "Cmd/Ctrl+double click" to enter the line editor\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://user-images.githubusercontent.com/11256141/192515552-6b6ddc06-5de0-4931-abdd-6ac3a804656d.mp4" title="Demo" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## New\n- **Changed behavior**: In the Obsidian markdown editor clicking an Excalidraw image will not open the image (to avoid accidentally opening the image on a tablet). To open a drawing for editing in Excalidraw double click or long-tap on it. [#920](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/920)\n\n## Fixed \n- Text stroke color is not honored when pasting a HEX color string to an Excalidraw canvas open in an Obsidian popout window [#921](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/921)\n- The new [multi-line >> multi-element paste behavior](https://github.com/excalidraw/excalidraw/pull/5786) introduced in the previous release did not work as expected in Obsidian. Now it does.\n',"1.8.2":`\nIntroducing the [Excalidraw Slideshow Script](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Slideshow.md) - available in the script store\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/HhRHFhWkmCk" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## Fixed\n- Obsidian tools panel gets misplaced after switching Obsidian workspace tabs\n\n## New in ExcalidrawAutomate\n- changed ${String.fromCharCode(96)}viewToggleFullScreen(forceViewMode: boolean = false): void${String.fromCharCode(96)}: the function will toggle view mode on when going to full screen and view mode off when terminating full screen.\n- new functions\n${String.fromCharCode(96,96,96)}typescript\nsetViewModeEnabled(enabled: boolean):void;\nviewUpdateScene(\n scene: {\n elements?: ExcalidrawElement[];\n appState?: AppState;\n files?: BinaryFileData;\n commitToHistory?: boolean;\n },\n restore: boolean = false,\n ):void;\nviewZoomToElements(\n selectElements: boolean,\n elements: ExcalidrawElement[]\n ):void;\n${String.fromCharCode(96,96,96)}\n\n`,"1.8.1":`\n## New and fixes from Excalidraw.com\n- New text paste behavior. Pasting multiline text will generate separate text elements unless you hold down the shift button while pasting [#5786](https://github.com/excalidraw/excalidraw/pull/5786)\n- line editor fixes [#5927](https://github.com/excalidraw/excalidraw/pull/5927)\n\n## Fixed\n- The Command Palette "Insert link" action now inserts the new link at the top drawing layer, not at the bottom.\n- Updated, hopefully, better organized, Plugin Readme.\n\n## New\n- Second attempt at moving to React 18. This upgrade is required to maintain alignment with the core Excalidraw product and to continue to benefit from Excalidraw.com enhancements.\n- Added options to Plugin Settings\n - to disable autozoom when loading a drawing for the first time [#907](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/907)\n - to modify autosave interval. You can now set an autosave interval for desktop and for mobile [#888](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/888)\n\n## New in ExcalidrawAutomate\n- Published the obsidian_module on the ExcalidrawAutomate object. ${String.fromCharCode(96)}ExcalidrawAutomate.obsidian${String.fromCharCode(96)}. Publishing this object will give script developers increased flexibility and control over script automation.\n`,"1.8.0":'\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/7gu4ETx7zro" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## New\n- Optical Character Recognition (OCR). Introducing the MVP (minimum viable product) release of the integration of [Taskbone](https://taskbone.com) OCR into Excalidraw. See the new scan button on the Obsidian tools panel.\n- New and improved full-screen mode\n - Activate using the Obsidian tools panel, the Obsidian Command Palette, or the Alt+F11 shortcut\n - The ESC key no longer closes full-screen\n - Full-screen mode works properly on iOS as well\n- Improved Icon visibility on the Obsidian tools panel\n- Added 3 additional buttons to the tools panel\n - Force save\n - Open link (useful on Mobile devices). In the case of LaTeX equations, the button opens the equation properties.\n - Open the link in a new pane. In the case of embedded markdown documents, the button opens the embed properties.\n\n## Fixed\n- The [deconstruct selected elements into a new drawing](https://github.com/zsviczian/obsidian-excalidraw-plugin/blob/master/ea-scripts/Deconstruct%20selected%20elements%20into%20new%20drawing.md) script now also correctly decomposes transcluded text elements.\n',"1.7.30":"\nFix:\n- Forcing the embedded image to always scale to 100% (a feature introduced in [1.7.26](https://github.com/zsviczian/obsidian-excalidraw-plugin/releases/tag/1.7.26)) scaled the embedded excalidraw drawings incorrectly on devices with a pixel ratio of 2 or 3 (e.g. iPads). This is now fixed, however, this fix might retrospectively impact drawings that use this feature. Sorry for that.\n","1.7.29":"\n- This is a big update that accommodates the **UI redesign** on Excalidraw.com [#5780](https://github.com/excalidraw/excalidraw/pull/5780). The change on the surface may seem superficial, however, I had to tweak a number of things to make it work in Obsidian. I hope I found everything that broke and fixed it, if not, I'll try to fix it quickly...\n- This update also comes with changes under the hood that **fix issues with Excalidraw Automate** - paving the way for further scripts, plus some smaller bug fixes.\n- I **reworked text wrapping**. In some cases, text wrapping in SVG exports looked different compared to how the text looked in Excalidraw. This should now be fixed.\n- If you are using the **Experimental Dynamic Styling** of the Excalidraw Toolbar, then I recommend updating your styling script following base on [this](https://gist.github.com/zsviczian/c7223c5b4af30d5c88a0cae05300305c)\n","1.7.27":'## New\n- Import SVG drawing as an Excalidraw object. [#679](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/679)\n\n<div class="excalidraw-videoWrapper"><div>\n<iframe src="https://www.youtube.com/embed/vlC1-iBvIfo" title="YouTube video player" frameborder="0" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe>\n</div></div>\n\n## Fixed\n- Large drawings freeze on the iPad when opening the file. I implemented a workaround whereby Excalidraw will avoid zoom-to-fit drawings with over 1000 elements. [#863](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/863)\n- Reintroduced copy/paste to the context menu\n',"1.7.26":'## Fixed\n- Transcluded block with a parent bullet does not embed sub-bullet [#853](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/853)\n- Transcluded text will now exclude ^block-references at end of lines\n- Phantom duplicates of the drawing appear when "zoom to fit" results in a zoom value below 10% and there are many objects on the canvas [#850](https://github.com/zsviczian/obsidian-excalidraw-plugin/issues/850)\n- CTRL+Wheel will increase/decrease zoom in steps of 5% matching the behavior of the "+" & "-" zoom buttons.\n- Latest updates from Excalidarw.com\n - Freedraw flip not scaling correctly [#5752](https://github.com/excalidraw/excalidraw/pull/5752)\n - Multiple elements resizing regressions [#5586](https://github.com/excalidraw/excalidraw/pull/5586)\n\n## New - power user features\n- Force the embedded image to always scale to 100%. Note: this is a very niche feature with a very particular behavior that I built primarily for myself (even more so than other features in Excalidraw Obsidian - also built primarily for myself 😉)... This will reset your embedded image to 100% size every time you open the Excalidraw drawing, or in case you have embedded an Excalidraw drawing on your canvas inserted using this function, every time you update the embedded drawing, it will be scaled back to 100% size. This means that even if you resize the image on the drawing, it will reset to 100% the next time you open the file or you modify the original embedded object. This feature is useful when you decompose a drawing into separate Excalidraw files, but when combined onto a single canvas you want the individual pieces to maintain their actual sizes. I use this feature to construct Book-on-a-Page summaries from atomic drawings.\n- I added an action to the command palette to temporarily disable/enable Excalidraw autosave. When autosave is disabled, Excalidraw will still save your drawing when changing to another Obsidian window, but it will not save every 10 seconds. On a mobile device (but also on a desktop) this can lead to data loss if you terminate Obsidian abruptly (i.e. swipe the application away, or close Obsidian without first closing the drawing). Use this feature if you find Excalidraw laggy.'};class ReleaseNotes extends obsidian_module.Modal{constructor(e,t,A){super(e),this.plugin=t,this.version=A}onOpen(){var e;this.containerEl.classList.add("excalidraw-release"),this.titleEl.setText(`Welcome to Excalidraw ${null!==(e=this.version)&&void 0!==e?e:""}`),this.createForm()}async onClose(){this.contentEl.empty(),await this.plugin.loadSettings(),this.plugin.settings.previousRelease=PLUGIN_VERSION,await this.plugin.saveSettings()}async createForm(){let e=this.plugin.settings.previousRelease;e=this.version===e?"0.0.0":e;const t=this.version?Object.keys(RELEASE_NOTES).filter((t=>"Intro"===t||isVersionNewerThanOther(t,e))).map((e=>`${"Intro"===e?"":`# ${e}\n`}${RELEASE_NOTES[e]}`)).slice(0,10).join("\n\n---\n"):FIRST_RUN;await obsidian_module.MarkdownRenderer.renderMarkdown(t,this.contentEl,"",this.plugin),this.contentEl.createEl("p",{text:""},(e=>{e.style.textAlign="right",e.createEl("button",{text:"Close"}).onclick=()=>this.close()}))}}class ExportDialog extends obsidian_module.Modal{constructor(e,t,A){super(app),this.plugin=e,this.view=t,this.file=A,this.dirty=!1,this.hasSelectedElements=!1,this.ea=getEA(this.view),this.api=this.ea.getExcalidrawAPI(),this.padding=getExportPadding(this.plugin,this.file),this.scale=getPNGScale(this.plugin,this.file),this.theme=getExportTheme(this.plugin,this.file,this.api.getAppState().theme),this.boundingBox=this.ea.getBoundingBox(this.ea.getViewElements()),this.embedScene=!1,this.exportSelectedOnly=!1,this.saveToVault=!0,this.transparent=!getWithBackground(this.plugin,this.file),this.saveSettings=!1}onOpen(){this.containerEl.classList.add("excalidraw-release"),this.titleEl.setText("Export Image"),this.hasSelectedElements=this.view.getViewSelectedElements().length>0,this.selectedOnlySetting.setVisibility(this.hasSelectedElements)}async onClose(){this.dirty=this.saveSettings}async createForm(){let e,t;this.contentEl.createEl("h1",{text:"Image settings"}),this.contentEl.createEl("p",{text:"Transparency only affects PNGs. Excalidraw files can only be exported outside the Vault. PNGs copied to clipboard may not include the scene."});const A=()=>{const e=Math.round(this.scale*this.boundingBox.width+2*this.padding),t=Math.round(this.scale*this.boundingBox.height+2*this.padding);return fragWithHTML(`The lager the scale, the larger the image.<br>Scale: <b>${this.scale}</b><br>Image size: <b>${e}x${t}</b>`)},i=()=>fragWithHTML(`Current image padding is <b>${this.padding}</b>`);t=new obsidian_module.Setting(this.contentEl).setName("Image padding").setDesc(i()).addSlider((n=>{n.setLimits(0,50,1).setValue(this.padding).onChange((n=>{this.padding=n,e.setDesc(A()),t.setDesc(i())}))})),e=new obsidian_module.Setting(this.contentEl).setName("PNG Scale").setDesc(A()).addSlider((t=>t.setLimits(.5,5,.5).setValue(this.scale).onChange((t=>{this.scale=t,e.setDesc(A())})))),new obsidian_module.Setting(this.contentEl).setName("Export theme").addDropdown((e=>e.addOption("light","Light").addOption("dark","Dark").setValue(this.theme).onChange((e=>{this.theme=e})))),new obsidian_module.Setting(this.contentEl).setName("Background color").addDropdown((e=>e.addOption("transparent","Transparent").addOption("with-color","Use scene background color").setValue(this.transparent?"transparent":"with-color").onChange((e=>{this.transparent="transparent"===e})))),new obsidian_module.Setting(this.contentEl).setName("Save or one-time settings?").addDropdown((e=>e.addOption("save","Save these settings as the preset for this image").addOption("one-time","These are one-time settings").setValue(this.saveSettings?"save":"one-time").onChange((e=>{this.saveSettings="save"===e})))),this.contentEl.createEl("h1",{text:"Export settings"}),new obsidian_module.Setting(this.contentEl).setName("Embed the Excalidraw scene in the exported file?").addDropdown((e=>e.addOption("embed","Embed scene").addOption("no-embed","Do not embed scene").setValue(this.embedScene?"embed":"no-embed").onChange((e=>{this.embedScene="embed"===e})))),DEVICE.isDesktop&&new obsidian_module.Setting(this.contentEl).setName("Where to save the image?").addDropdown((e=>e.addOption("vault","Save image to your Vault").addOption("outside","Export image outside your Vault").setValue(this.saveToVault?"vault":"outside").onChange((e=>{this.saveToVault="vault"===e})))),this.selectedOnlySetting=new obsidian_module.Setting(this.contentEl).setName("Export entire scene or just selected elements?").addDropdown((e=>e.addOption("all","Export entire scene").addOption("selected","Export selected elements").setValue(this.exportSelectedOnly?"selected":"all").onChange((e=>{this.exportSelectedOnly="selected"===e}))));const n=this.contentEl.createDiv({cls:"excalidraw-prompt-buttons-div"});n.createEl("button",{text:"PNG to File",cls:"excalidraw-prompt-button"}).onclick=()=>{this.saveToVault?this.view.savePNG(this.view.getScene(this.hasSelectedElements&&this.exportSelectedOnly)):this.view.exportPNG(this.embedScene,this.hasSelectedElements&&this.exportSelectedOnly),this.close()},n.createEl("button",{text:"SVG to File",cls:"excalidraw-prompt-button"}).onclick=()=>{this.saveToVault?this.view.saveSVG(this.view.getScene(this.hasSelectedElements&&this.exportSelectedOnly)):this.view.exportSVG(this.embedScene,this.hasSelectedElements&&this.exportSelectedOnly),this.close()},n.createEl("button",{text:"Excalidraw",cls:"excalidraw-prompt-button"}).onclick=()=>{this.view.exportExcalidraw(this.hasSelectedElements&&this.exportSelectedOnly),this.close()},DEVICE.isDesktop&&(n.createEl("button",{text:"PNG to Clipboard",cls:"excalidraw-prompt-button"}).onclick=()=>{this.view.exportPNGToClipboard(this.embedScene,this.hasSelectedElements&&this.exportSelectedOnly),this.close()})}}const TOOLS_PANEL_WIDTH=228;class ToolsPanel extends React__namespace.Component{constructor(e){super(e),this.pos1=0,this.pos2=0,this.pos3=0,this.pos4=0,this.penDownX=0,this.penDownY=0,this.previousWidth=0,this.previousHeight=0,this.onRightEdge=!1,this.onBottomEdge=!1;const t=e.view.plugin.getPackage(e.view.ownerWindow).react;this.containerRef=t.createRef(),this.state={visible:e.visible,top:50,left:200,theme:"dark",excalidrawViewMode:!1,minimized:!1,isDirty:!1,isFullscreen:!1,isPreviewMode:!0,scriptIconMap:{}}}updateScriptIconMap(e){this.setState((()=>({scriptIconMap:e})))}setPreviewMode(e){this.setState((()=>({isPreviewMode:e})))}setFullscreen(e){this.setState((()=>({isFullscreen:e})))}setDirty(e){this.setState((()=>({isDirty:e})))}setExcalidrawViewMode(e){this.setState((()=>({excalidrawViewMode:e})))}toggleVisibility(e){this.setTopCenter(e),this.setState((e=>({visible:!e.visible})))}setTheme(e){this.setState((t=>({theme:e})))}setTopCenter(e){this.setState((()=>({left:(this.containerRef.current.clientWidth-228-(e?0:232))/2+this.containerRef.current.parentElement.offsetLeft+(e?0:232),top:64+this.containerRef.current.parentElement.offsetTop})))}updatePosition(e=0,t=0){this.setState((()=>{const{offsetTop:A,offsetLeft:i,clientWidth:n,clientHeight:a}=this.containerRef.current.firstElementChild,r=A-e,s=i-t,{clientWidth:o,clientHeight:l,offsetTop:c,offsetLeft:d}=this.containerRef.current.parentElement;return this.previousHeight=l,this.previousWidth=o,this.onBottomEdge=r>=l-a+c,this.onRightEdge=s>=o-n+d,{top:r<c?c:this.onBottomEdge?l-a+c:r,left:s<d?d:this.onRightEdge?o-n+d:s}}))}render(){return React__namespace.createElement("div",{ref:this.containerRef,className:clsx("excalidraw",{"theme--dark":"dark"===this.state.theme}),style:{width:"100%",height:"100%",position:"absolute",touchAction:"none"}},React__namespace.createElement("div",{className:"Island",style:{top:`${this.state.top}px`,left:`${this.state.left}px`,width:"228px",display:this.state.visible&&!this.state.excalidrawViewMode?"block":"none",height:"fit-content",maxHeight:"400px",zIndex:5}},React__namespace.createElement("div",{style:{height:"26px",width:"100%",cursor:"move"},onClick:e=>{e.preventDefault(),Math.abs(this.penDownX-this.pos3)>5||Math.abs(this.penDownY-this.pos4)>5||this.setState((e=>({minimized:!e.minimized})))},onPointerDown:e=>{const t=e=>{e.preventDefault(),this.pos1=this.pos3-e.clientX,this.pos2=this.pos4-e.clientY,this.pos3=e.clientX,this.pos4=e.clientY,this.updatePosition(this.pos2,this.pos1)},A=()=>{var e,i;null===(e=this.props.view.ownerDocument)||void 0===e||e.removeEventListener("pointerup",A),null===(i=this.props.view.ownerDocument)||void 0===i||i.removeEventListener("pointermove",t)};e.preventDefault(),this.penDownX=this.pos3=e.clientX,this.penDownY=this.pos4=e.clientY,this.props.view.ownerDocument.addEventListener("pointerup",A),this.props.view.ownerDocument.addEventListener("pointermove",t)}},React__namespace.createElement("svg",{"aria-hidden":"true",focusable:"false",role:"img",xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 228 26"},React__namespace.createElement("path",{stroke:"var(--icon-fill-color)",strokeWidth:"2",d:"M40,7 h148 M40,13 h148 M40,19 h148"}))),React__namespace.createElement("div",{className:"Island App-menu__left scrollbar",style:{maxHeight:"350px",width:"initial","--padding":2,display:this.state.minimized?"none":"block"}},React__namespace.createElement("div",{className:"panelColumn"},React__namespace.createElement("fieldset",null,React__namespace.createElement("legend",null,"Utility actions"),React__namespace.createElement("div",{className:"buttonList buttonListIcon"},React__namespace.createElement(ActionButton,{key:"scriptEngine",title:t$d("INSTALL_SCRIPT_BUTTON"),action:()=>{new ScriptInstallPrompt(this.props.view.plugin).open()},icon:ICONS.scriptEngine,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"release-notes",title:t$d("READ_RELEASE_NOTES"),action:()=>{new ReleaseNotes(this.props.view.app,this.props.view.plugin,PLUGIN_VERSION).open()},icon:ICONS.releaseNotes,view:this.props.view}),null===this.state.isPreviewMode?React__namespace.createElement(ActionButton,{key:"convert",title:t$d("CONVERT_FILE"),action:()=>{this.props.view.convertExcalidrawToMD()},icon:ICONS.convertFile,view:this.props.view}):React__namespace.createElement(ActionButton,{key:"viewmode",title:this.state.isPreviewMode?t$d("PARSED"):t$d("RAW"),action:()=>{this.state.isPreviewMode?this.props.view.changeTextMode(TextMode.raw):this.props.view.changeTextMode(TextMode.parsed)},icon:this.state.isPreviewMode?ICONS.rawMode:ICONS.parsedMode,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"tray-mode",title:t$d("TRAY_MODE"),action:()=>{this.props.view.toggleTrayMode()},icon:ICONS.trayMode,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"fullscreen",title:this.state.isFullscreen?t$d("EXIT_FULLSCREEN"):t$d("GOTO_FULLSCREEN"),action:()=>{this.state.isFullscreen?this.props.view.exitFullscreen():this.props.view.gotoFullscreen()},icon:this.state.isFullscreen?ICONS.exitFullScreen:ICONS.gotoFullScreen,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"search",title:t$d("SEARCH"),action:()=>{search(this.props.view)},icon:ICONS.search,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"ocr",title:t$d("RUN_OCR"),action:e=>{this.props.view.plugin.settings.taskboneEnabled?this.props.view.plugin.taskbone.getTextForView(this.props.view,isCTRL(e)):new obsidian_module.Notice("Taskbone OCR is not enabled. Please go to plugins settings to enable it.",4e3)},icon:ICONS.ocr,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"openLink",title:t$d("OPEN_LINK_CLICK"),action:e=>{const t=new MouseEvent("click",{ctrlKey:e.ctrlKey||!(DEVICE.isIOS||DEVICE.isMacOS),metaKey:e.metaKey||DEVICE.isIOS||DEVICE.isMacOS,shiftKey:e.shiftKey,altKey:e.altKey});this.props.view.handleLinkClick(t)},icon:ICONS.openLink,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"openLinkProperties",title:t$d("OPEN_LINK_PROPS"),action:()=>{const e=new MouseEvent("click",{ctrlKey:!0,metaKey:!0,shiftKey:!1,altKey:!1});this.props.view.handleLinkClick(e)},icon:ICONS.openLinkProperties,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"save",title:t$d("FORCE_SAVE"),action:()=>{this.props.view.forceSave()},icon:saveIcon(this.state.isDirty),view:this.props.view}))),React__namespace.createElement("fieldset",null,React__namespace.createElement("legend",null,"Export actions"),React__namespace.createElement("div",{className:"buttonList buttonListIcon"},React__namespace.createElement(ActionButton,{key:"lib",title:t$d("DOWNLOAD_LIBRARY"),action:()=>{this.props.view.plugin.exportLibrary()},icon:ICONS.exportLibrary,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"exportIMG",title:t$d("EXPORT_IMAGE"),action:()=>{const e=this.props.view;e.exportDialog||(e.exportDialog=new ExportDialog(e.plugin,e,e.file),e.exportDialog.createForm()),e.exportDialog.open()},icon:ICONS.ExportImage,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"md",title:t$d("OPEN_AS_MD"),action:()=>{this.props.view.openAsMarkdown()},icon:ICONS.switchToMarkdown,view:this.props.view}))),React__namespace.createElement("fieldset",null,React__namespace.createElement("legend",null,"Insert actions"),React__namespace.createElement("div",{className:"buttonList buttonListIcon"},React__namespace.createElement(ActionButton,{key:"image",title:t$d("INSERT_IMAGE"),action:()=>{this.props.centerPointer(),this.props.view.plugin.insertImageDialog.start(this.props.view)},icon:ICONS.insertImage,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"pdf",title:t$d("INSERT_PDF"),action:()=>{this.props.centerPointer(),new InsertPDFModal(this.props.view.plugin,this.props.view).open()},icon:ICONS.insertPDF,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"insertMD",title:t$d("INSERT_MD"),action:()=>{this.props.centerPointer(),this.props.view.plugin.insertMDDialog.start(this.props.view)},icon:ICONS.insertMD,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"latex",title:t$d("INSERT_LATEX"),action:e=>{isALT(e)?this.props.view.openExternalLink("https://youtu.be/r08wk-58DPk"):(this.props.centerPointer(),insertLaTeXToView(this.props.view))},icon:ICONS.insertLaTeX,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"link",title:t$d("INSERT_LINK"),action:()=>{this.props.centerPointer(),this.props.view.plugin.insertLinkDialog.start(this.props.view.file.path,this.props.view.addText)},icon:ICONS.insertLink,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"link-to-element",title:t$d("INSERT_LINK_TO_ELEMENT"),action:e=>{isALT(e)?this.props.view.openExternalLink("https://youtu.be/yZQoJg2RCKI"):this.props.view.copyLinkToSelectedElementToClipboard(isCTRL(e)?"group=":isSHIFT(e)?"area=":"")},icon:ICONS.copyElementLink,view:this.props.view}),React__namespace.createElement(ActionButton,{key:"import-svg",title:t$d("IMPORT_SVG"),action:e=>{this.props.view.plugin.importSVGDialog.start(this.props.view)},icon:ICONS.importSVG,view:this.props.view}))),this.renderScriptButtons(!1),this.renderScriptButtons(!0)))))}renderScriptButtons(e){if(0===Object.keys(this.state.scriptIconMap).length)return"";const t=`${this.props.view.plugin.settings.scriptFolderPath}/Downloaded/`,A=A=>e?A.startsWith(t):!A.startsWith(t);if(0===Object.keys(this.state.scriptIconMap).filter((e=>A(e))).length)return"";const i=new Set;Object.keys(this.state.scriptIconMap).filter((e=>A(e))).forEach((e=>i.add(this.state.scriptIconMap[e].group)));const n=Array.from(i).sort(((e,t)=>e>t?1:-1));return n.push(n.shift()),React__namespace.createElement(React__namespace.Fragment,null,n.map(((t,A)=>React__namespace.createElement("fieldset",{key:`${t}-${A}`},React__namespace.createElement("legend",null,e?t:""===t?"User":"User/"+t),React__namespace.createElement("div",{className:"buttonList buttonListIcon"},Object.entries(this.state.scriptIconMap).filter((([e,A])=>A.group===t)).sort().map((([e,t])=>React__namespace.createElement(ActionButton,{key:e,title:t.name,action:async()=>{const t=this.props.view,A=t.plugin,i=app.vault.getAbstractFileByPath(e);i&&i instanceof obsidian_module.TFile&&A.scriptEngine.executeScript(t,await app.vault.read(i),A.scriptEngine.getScriptName(i),i)},longpress:async()=>{const A=this.props.view,i=A.excalidrawAPI,n=A.plugin;await n.loadSettings();const a=n.settings.pinnedScripts.indexOf(e);a>-1?(n.settings.pinnedScripts.splice(a,1),null==i||i.setToast({message:`Pin removed: ${t.name}`,duration:3e3,closable:!0})):(n.settings.pinnedScripts.push(e),null==i||i.setToast({message:`Pinned: ${t.name}`,duration:3e3,closable:!0})),await n.saveSettings(),app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&e.view.updatePinnedScripts()}))},icon:t.svgString?stringToSVG(t.svgString):ICONS.cog,view:this.props.view}))))))))}}const getElementsAtPointer=(e,t,A)=>t.filter((t=>{if(A&&t.type!==A)return!1;if(t.locked)return!1;const[i,n,a,r]=rotatedDimensions(t);return i<=e.x&&i+a>=e.x&&n<=e.y&&n+r>=e.y})),getTextElementAtPointer=(e,t)=>{const A=t.excalidrawAPI;if(!A)return{id:null,text:null};const i=getElementsAtPointer(e,A.getSceneElements(),"text");if(0==i.length)return{id:null,text:null};if(1===i.length)return{id:i[0].id,text:i[0].text};const n=i.filter((e=>{const A=t.textMode===TextMode.parsed?t.excalidrawData.getRawText(e.id):e.text;return!!A&&(!!A.match(REG_LINKINDEX_HYPERLINK)||!!REGEX_LINK.getRes(A).next().value)}));return 0==n.length?{id:i[0].id,text:i[0].text}:{id:n[0].id,text:n[0].text}},getImageElementAtPointer=(e,t)=>{const A=t.excalidrawAPI;if(!A)return;const i=getElementsAtPointer(e,A.getSceneElements(),"image");return 0===i.length?{id:null,fileId:null}:i.length>=1?{id:i[0].id,fileId:i[0].fileId}:void 0},getElementWithLinkAtPointer=(e,t)=>{const A=t.excalidrawAPI;if(!A)return;const i=getElementsAtPointer(e,A.getSceneElements()).filter((e=>e.link));return 0===i.length?{id:null,text:null}:i.length>=1?{id:i[0].id,text:i[0].link}:void 0},setDynamicStyle=(e,t,A,i)=>{var n,a,r,s,o,l,c,d,h,u,g,p,m,w;if("none"===i){null===(n=t.excalidrawContainer)||void 0===n||n.removeAttribute("style"),setTimeout((()=>t.updateScene({appState:{dynamicStyle:""}})));const e=null===(s=null===(r=null===(a=t.toolsPanelRef)||void 0===a?void 0:a.current)||void 0===r?void 0:r.containerRef)||void 0===s?void 0:s.current;if(e){let t=e.getAttribute("style");t=t.replace(/\-\-color\-primary.*/,""),e.setAttribute("style",t)}return}t.ownerDocument;const f="light"===(null===(c=null===(l=null===(o=null==t?void 0:t.excalidrawAPI)||void 0===o?void 0:o.getAppState)||void 0===l?void 0:l.call(o))||void 0===c?void 0:c.theme)||"light"===(null===(u=null===(h=null===(d=null==t?void 0:t.excalidrawData)||void 0===d?void 0:d.scene)||void 0===h?void 0:h.appState)||void 0===u?void 0:u.theme),E=()=>f?e.getCM(A):(t=>{const A=e.getCM(t),i=A.lightness;return A.lightnessTo(Math.abs(i-100))})(A),B=E().lightness,b=E().isDark(),v=app.getAccentColor(),C=()=>e.getCM(v),y=()=>e.getCM("#000000").lightnessTo(B),F="gray"===i,x=F?b?y().lighterBy(15):y().darkerBy(15):b?E().lighterBy(15).mix({color:y(),ratio:.6}):E().darkerBy(15).mix({color:y(),ratio:.6}),T=F?b?y().lighterBy(5):y().darkerBy(5):b?E().lighterBy(5).mix({color:y(),ratio:.6}):E().darkerBy(5).mix({color:y(),ratio:.6}),S=E().mix({color:b?"#f0f0f0":"#101010",ratio:.8}),I=e=>e.stringHEX({alpha:!1}),M=`--color-primary: ${I(C())};--color-primary-darker: ${I(C().darkerBy(10))};--color-primary-darkest: ${I(C().darkerBy(10))};--button-gray-1: ${I(x)};--button-gray-2: ${I(T)};--input-border-color: ${I(x)};--input-bg-color: ${I(T)};--input-label-color: ${I(S)};--island-bg-color: ${T.alphaTo(.93).stringHEX()};--popup-secondary-bg-color: ${T.alphaTo(.93).stringHEX()};--icon-fill-color: ${I(S)};--text-primary-color: ${I(S)};--overlay-bg-color: ${T.alphaTo(.6).stringHEX()};--popup-bg-color: ${I(x)};--color-gray-100: ${I(S)};--color-gray-40: ${I(S)};--color-gray-30: ${I(x)};--color-gray-80: ${I(x)};--sidebar-border-color: ${I(x)};--color-primary-light: ${I(C().lighterBy(10))};--button-hover-bg: ${I(x)};--sidebar-bg-color: ${T.alphaTo(.93).stringHEX()};--sidebar-shadow: ${I(x)};--popup-text-color: ${I(S)};--code-normal: ${I(S)};--code-background: ${I(T)};--h1-color: ${I(S)};--h2-color: ${I(S)};--h3-color: ${I(S)};--h4-color: ${I(S)};color: ${I(S)};--select-highlight-color: ${I(x)};`;null===(g=t.excalidrawContainer)||void 0===g||g.setAttribute("style",M),setTimeout((()=>t.updateScene({appState:{dynamicStyle:M}})));const k=null===(w=null===(m=null===(p=t.toolsPanelRef)||void 0===p?void 0:p.current)||void 0===m?void 0:m.containerRef)||void 0===w?void 0:w.current;if(k){let e=k.getAttribute("style");e=e.replace(/\-\-color\-primary.*/,""),k.setAttribute("style",e+M)}},renderWebView=(e,t,A,i)=>DEVICE.isDesktop?React__namespace.createElement("webview",{ref:e=>t.updateEmbeddableRef(A,e),className:"excalidraw__embeddable",title:"Excalidraw Embedded Content",allowFullScreen:!0,src:e,style:{overflow:"hidden",borderRadius:"var(--embeddable-radius)"}}):React__namespace.createElement("iframe",{ref:e=>t.updateEmbeddableRef(A,e),className:"excalidraw__embeddable",title:"Excalidraw Embedded Content",allowFullScreen:!0,allow:"accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture",src:e,style:{overflow:"hidden",borderRadius:"var(--embeddable-radius)"}});function RenderObsidianView({element:e,linkText:t,view:A,containerRef:i,appState:n,theme:a}){var r,s,o;const{subpath:l,file:c}=processLinkText(t,A);if(!c)return null;const d=A.plugin.getPackage(A.ownerWindow).react,h=d.useRef(null),u=d.useRef(!1),g=d.useRef(!1),p=d.useCallback((e=>{g.current&&e.stopPropagation()}),[g.current]);d.useEffect((()=>{if(null==i?void 0:i.current)return KEYBOARD_EVENT_TYPES.forEach((e=>i.current.addEventListener(e,p))),i.current.addEventListener("click",m),()=>{(null==i?void 0:i.current)&&(KEYBOARD_EVENT_TYPES.forEach((e=>i.current.removeEventListener(e,p))),EXTENDED_EVENT_TYPES.forEach((e=>i.current.removeEventListener(e,p))),i.current.removeEventListener("click",m))}}),[]),d.useEffect((()=>{if(EXTENDED_EVENT_TYPES.forEach((e=>i.current.removeEventListener(e,p))),null==i?void 0:i.current)return g.current&&EXTENDED_EVENT_TYPES.forEach((e=>i.current.addEventListener(e,p))),()=>{(null==i?void 0:i.current)&&EXTENDED_EVENT_TYPES.forEach((e=>i.current.removeEventListener(e,p)))}}),[g.current,i.current]),d.useEffect((()=>{if(!(null==i?void 0:i.current))return;for(;i.current.hasChildNodes();)i.current.removeChild(i.current.lastChild);const t=A.ownerDocument,n=new obsidian_module.WorkspaceSplit(app.workspace,"vertical");n.getRoot=()=>app.workspace[t===document?"rootSplit":"floatingSplit"],n.getContainer=()=>getContainerForDocument(t),n.containerEl.style.width="100%",n.containerEl.style.height="100%",n.containerEl.style.borderRadius="var(--embeddable-radius)",h.current={leaf:app.workspace.createLeafInParent(n,0),node:null};const a=()=>{app.workspace.activeLeaf===A.leaf&&DEVICE.isDesktop&&(A.ownerWindow.electronWindow.isAlwaysOnTop()||(A.ownerWindow.electronWindow.setAlwaysOnTop(!0),setTimeout((()=>{A.ownerWindow.electronWindow.setAlwaysOnTop(!1)}),500)))};return l&&A.canvasNodeFactory.isInitialized()?(a(),h.current.node=A.canvasNodeFactory.createFileNote(c,l,i.current,e.id)):(async()=>{var t,r;await h.current.leaf.openFile(c,Object.assign({active:!1,state:{mode:"preview"}},l?{eState:{subpath:l}}:{}));const s=null===(t=h.current.leaf.view)||void 0===t?void 0:t.getViewType();if("canvas"===s&&(null===(r=h.current.leaf.view.canvas)||void 0===r||r.setReadonly(!0)),"markdown"===s&&A.canvasNodeFactory.isInitialized())a(),await h.current.leaf.setViewState({state:{file:null}}),h.current.node=A.canvasNodeFactory.createFileNote(c,l,i.current,e.id);else{const e=n.containerEl.querySelector("div.workspace-leaf");e&&(e.style.borderRadius="var(--embeddable-radius)"),i.current.appendChild(n.containerEl)}patchMobileView(A)})(),()=>{}}),[t,l,i]),d.useEffect((()=>{var e;u.current&&((null===(e=h.current)||void 0===e?void 0:e.node)&&A.canvasNodeFactory.stopEditing(h.current.node),u.current=!1)}),[u.current,h]);const m=d.useCallback((t=>{var i,n,r;if(g.current&&t.stopPropagation(),g.current&&!u.current&&(null===(i=h.current)||void 0===i?void 0:i.leaf))if("markdown"===(null===(n=h.current.leaf.view)||void 0===n?void 0:n.getViewType())){const t=A.excalidrawAPI.getSceneElements().filter((t=>t.id===e.id))[0];if(!t||0!==t.angle)return void new obsidian_module.Notice("Sorry, cannot edit rotated markdown documents");const i=h.current.leaf.view.modes;if(!i)return;h.current.leaf.view.setMode(i.source),u.current=!0,patchMobileView(A)}else(null===(r=h.current)||void 0===r?void 0:r.node)&&A.canvasNodeFactory.startEditing(h.current.node,a)}),[null===(r=h.current)||void 0===r?void 0:r.leaf,e.id]);return d.useEffect((()=>{var t,a,r,s,o;if(!(null==i?void 0:i.current)||!(null==h?void 0:h.current))return;const l=g.current;if(g.current=(null===(t=n.activeEmbeddable)||void 0===t?void 0:t.element.id)===e.id&&"active"===(null===(a=n.activeEmbeddable)||void 0===a?void 0:a.state),l!==g.current)if("markdown"===(null===(s=null===(r=h.current.leaf)||void 0===r?void 0:r.view)||void 0===s?void 0:s.getViewType())){const e=h.current.leaf.view.modes;if(!e)return;if(!g.current)return h.current.leaf.view.setMode(e.preview),void(u.current=!1)}else(null===(o=h.current)||void 0===o?void 0:o.node)&&A.canvasNodeFactory.stopEditing(h.current.node)}),[i,h,g,null===(s=n.activeEmbeddable)||void 0===s?void 0:s.element,null===(o=n.activeEmbeddable)||void 0===o?void 0:o.state,e,A,t,l,c,a,u,A.canvasNodeFactory]),null}const CustomEmbeddable=({element:e,view:t,appState:A,linkText:i})=>{const n=t.plugin.getPackage(t.ownerWindow).react.useRef(null),a="dark"===t.excalidrawData.embeddableTheme?"theme-dark":"light"===t.excalidrawData.embeddableTheme?"theme-light":"auto"===t.excalidrawData.embeddableTheme?"dark"===A.theme?"theme-dark":"theme-light":isObsidianThemeDark()?"theme-dark":"theme-light";return React__namespace.createElement("div",{ref:n,style:{width:"100%",height:"100%",borderRadius:"var(--embeddable-radius)",color:"var(--text-normal)"},className:a},React__namespace.createElement(RenderObsidianView,{element:e,linkText:i,view:t,containerRef:n,appState:A,theme:a}))},DB_NAME="Excalidraw "+app.appId,CACHE_STORE="imageCache",BACKUP_STORE="drawingBAK",getKey=e=>`${e.filepath}#${e.blockref}#${e.sectionref}#${e.isDark?1:0}#${e.isSVG?1:0}#${e.scale}`;class ImageCache{constructor(e,t,A){this.initializationNotice=!1,this.obsidanURLCache=new Map,this.dbName=e,this.cacheStoreName=t,this.backupStoreName=A,this.db=null,this.isInitializing=!1,this.plugin=null,app.workspace.onLayoutReady((()=>this.initializeDB()))}async initializeDB(){if(!this.isInitializing&&null===this.db){this.isInitializing=!0;try{const e=indexedDB.open(this.dbName);if(e.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.cacheStoreName)||t.createObjectStore(this.cacheStoreName),t.objectStoreNames.contains(this.backupStoreName)||t.createObjectStore(this.backupStoreName)},this.db=await new Promise(((t,A)=>{e.onsuccess=e=>{const A=e.target.result;t(A)},e.onerror=()=>{A(new Error(`Failed to open or create IndexedDB database: ${this.dbName}`))}})),!this.db.objectStoreNames.contains(this.cacheStoreName)||!this.db.objectStoreNames.contains(this.backupStoreName)){const e=this.db.version+1;this.db.close();const t=indexedDB.open(this.dbName,e);t.onupgradeneeded=e=>{const t=e.target.result;t.objectStoreNames.contains(this.cacheStoreName)||t.createObjectStore(this.cacheStoreName),t.objectStoreNames.contains(this.backupStoreName)||t.createObjectStore(this.backupStoreName)},await new Promise(((e,A)=>{t.onsuccess=()=>{t.result.close(),e()},t.onerror=()=>{A(new Error(`Failed to upgrade IndexedDB database: ${this.dbName}`))}})),this.db=await new Promise(((e,t)=>{const A=indexedDB.open(this.dbName);A.onsuccess=()=>{const t=A.result;e(t)},A.onerror=()=>{t(new Error(`Failed to open IndexedDB database: ${this.dbName}`))}}))}await this.purgeInvalidCacheFiles(),await this.purgeInvalidBackupFiles()}finally{this.isInitializing=!1,this.initializationNotice&&(new obsidian_module.Notice("Excalidraw Image Cache is Initialized - You may now retry opening your damaged drawing."),this.initializationNotice=!1),console.log("Initialized Excalidraw Image Cache")}}}async purgeInvalidCacheFiles(){const e=this.db.transaction(this.cacheStoreName,"readwrite").objectStore(this.cacheStoreName),t=app.vault.getFiles(),A=[],i=e.openCursor();return new Promise(((n,a)=>{i.onsuccess=i=>{const r=i.target.result;if(r){const i=r.key,n=i.split("#")[0],a=t.some((e=>e.path===n)),s=a?t.find((e=>e.path===n)):null;(!s||s&&s.stat.mtime>r.value.mtime||!r.value.blob)&&A.push(new Promise(((t,A)=>{const n=e.delete(r.primaryKey);n.onsuccess=()=>t(),n.onerror=()=>A(new Error(`Failed to delete file with key: ${i}`))}))),r.continue()}else Promise.all(A).then((()=>n())).catch((e=>a(e)))},i.onerror=()=>{a(new Error("Failed to purge invalid files from IndexedDB."))}}))}async purgeInvalidBackupFiles(){const e=this.db.transaction(this.backupStoreName,"readwrite").objectStore(this.backupStoreName),t=app.vault.getFiles(),A=[],i=e.openCursor();return new Promise(((n,a)=>{i.onsuccess=i=>{const r=i.target.result;if(r){const i=r.key,n=t.some((e=>e.path===i));n||A.push(new Promise(((t,A)=>{const n=e.delete(r.primaryKey);n.onsuccess=()=>t(),n.onerror=()=>A(new Error(`Failed to delete backup file with key: ${i}`))}))),r.continue()}else Promise.all(A).then((()=>n())).catch((e=>a(e)))},i.onerror=()=>{a(new Error("Failed to purge invalid backup files from IndexedDB."))}}))}async getObjectStore(e,t){return this.db.transaction(t,e).objectStore(t)}async getCacheData(e){const t=(await this.getObjectStore("readonly",this.cacheStoreName)).get(e);return new Promise(((e,A)=>{t.onsuccess=()=>{const A=t.result;e(A||null)},t.onerror=()=>{A(new Error("Failed to retrieve data from IndexedDB."))}}))}async getBackupData(e){const t=(await this.getObjectStore("readonly",this.backupStoreName)).get(e);return new Promise(((e,A)=>{t.onsuccess=()=>{const A=t.result;e(A||null)},t.onerror=()=>{A(new Error("Failed to retrieve backup data from IndexedDB."))}}))}isReady(){return!!this.db&&!this.isInitializing&&!!this.plugin&&this.plugin.settings.allowImageCache}async getImageFromCache(e){if(!this.isReady())return null;const t=getKey(e),A=await this.getCacheData(t),i=app.vault.getAbstractFileByPath(e.filepath.split("#")[0]);if(i&&i instanceof obsidian_module.TFile&&A&&A.mtime===i.stat.mtime){if(this.obsidanURLCache.has(t))return this.obsidanURLCache.get(t);const e=URL.createObjectURL(A.blob);return this.obsidanURLCache.set(t,e),e}}async getBAKFromCache(e){return this.isReady()?this.getBackupData(e):null}addImageToCache(e,t,A){if(!this.isReady())return;const i=app.vault.getAbstractFileByPath(e.filepath.split("#")[0]);if(!(i&&i instanceof obsidian_module.TFile))return;const n={mtime:i.stat.mtime,blob:A},a=this.db.transaction(this.cacheStoreName,"readwrite").objectStore(this.cacheStoreName),r=getKey(e);a.put(n,r),this.obsidanURLCache.set(r,t)}async addBAKToCache(e,t){this.isReady()&&this.db.transaction(this.backupStoreName,"readwrite").objectStore(this.backupStoreName).put(t,e)}async clearImageCache(){if(this.isReady())return this.clear(this.cacheStoreName,"Image cache was cleared")}async clearBackupCache(){if(this.isReady())return this.clear(this.backupStoreName,"All backups were cleared")}async clear(e,t){if(!this.isReady())return;const A=this.db.transaction([e],"readwrite").objectStore(e);return new Promise(((i,n)=>{const a=A.clear();a.onsuccess=()=>{new obsidian_module.Notice(t),i()},a.onerror=()=>n(new Error(`Failed to clear ${e}.`))}))}}const imageCache=new ImageCache(DB_NAME,CACHE_STORE,"drawingBAK");class CanvasNodeFactory{constructor(e){this.view=e,this.nodes=new Map,this.initialized=!1,this.isInitialized=()=>this.initialized}async initialize(){const e=app.internalPlugins.plugins.canvas;e._loaded||await e.load();const t=this.view.ownerDocument,A=new obsidian_module.WorkspaceSplit(app.workspace,"vertical");A.getRoot=()=>app.workspace[t===document?"rootSplit":"floatingSplit"],A.getContainer=()=>getContainerForDocument(t),this.leaf=app.workspace.createLeafInParent(A,0),this.canvas=e.views.canvas(this.leaf).canvas,this.initialized=!0}createFileNote(e,t,A,i){if(!this.initialized)return;t=null!=t?t:"",this.nodes.has(i)&&(this.canvas.removeNode(this.nodes.get(i)),this.nodes.delete(i));const n=this.canvas.createFileNode({pos:{x:0,y:0},file:e,subpath:t,save:!1});return n.setFilePath(e.path,t),n.render(),A.style.background="var(--background-primary)",A.appendChild(n.contentEl),this.nodes.set(i,n),n}startEditing(e,t){if(!this.initialized||!e)return;e.startEditing();const A=isObsidianThemeDark()?"theme-dark":"theme-light";A!==t&&(async()=>{var i,n,a,r,s,o;let l=0;for(;!(null===(a=null===(n=null===(i=e.child.editor)||void 0===i?void 0:i.containerEl)||void 0===n?void 0:n.parentElement)||void 0===a?void 0:a.parentElement)&&l++<100;)await sleep(25);(null===(o=null===(s=null===(r=e.child.editor)||void 0===r?void 0:r.containerEl)||void 0===s?void 0:s.parentElement)||void 0===o?void 0:o.parentElement)&&(e.child.editor.containerEl.parentElement.parentElement.classList.remove(A),e.child.editor.containerEl.parentElement.parentElement.classList.add(t),new MutationObserver((e=>{for(const i of e)if("attributes"===i.type&&"class"===i.attributeName){const e=i.target;e.classList.contains(A)&&(e.classList.remove(A),e.classList.add(t))}})).observe(e.child.editor.containerEl.parentElement.parentElement,{attributes:!0}))})()}stopEditing(e){this.initialized&&e&&e.child.editMode&&e.child.showPreview()}purgeNodes(){this.initialized&&(this.nodes.forEach((e=>{this.canvas.removeNode(e)})),this.nodes.clear())}}class EmbeddableMenu{constructor(e,t){this.view=e,this.containerRef=t,this.updateElement=(e,t,A)=>{if(!t)return;const i=this.view,n=`[[${app.metadataCache.fileToLinktext(A,i.file.path,"md"===A.extension)}${e}]]`;mutateElement(t,{link:n}),i.excalidrawData.elementLinks.set(t.id,n),i.setDirty(99),i.updateScene({appState:{activeEmbeddable:null}})},this.menuFadeTimeout=0,this.menuElementId=null}handleMouseEnter(){var e;clearTimeout(this.menuFadeTimeout),null===(e=this.containerRef.current)||void 0===e||e.style.setProperty("opacity","1")}handleMouseLeave(){const e=this;this.menuFadeTimeout=window.setTimeout((()=>{var t;null===(t=e.containerRef.current)||void 0===t||t.style.setProperty("opacity","0.2")}),5e3)}renderButtons(e){var t,A;const i=this.view,n=null==i?void 0:i.excalidrawAPI;if(!n)return null;if(!e.activeEmbeddable||"active"!==e.activeEmbeddable.state||e.viewModeEnabled)return this.menuElementId=null,this.menuFadeTimeout&&(clearTimeout(this.menuFadeTimeout),this.menuFadeTimeout=0),null;const a=null===(t=e.activeEmbeddable)||void 0===t?void 0:t.element;this.menuElementId!==a.id&&(this.menuElementId=a.id,this.handleMouseLeave());let r=a.link;if(!r)return null;const s=useDefaultExcalidrawFrame(a);let o=null===(A=a.link)||void 0===A?void 0:A.match(REG_LINKINDEX_HYPERLINK);if(!s&&!o){const t=REGEX_LINK.getRes(a.link).next();if(!t||!t.value&&t.done)return null;if(r=REGEX_LINK.getLink(t),o=r.match(REG_LINKINDEX_HYPERLINK),!o){const{subpath:t,file:A}=processLinkText(r,i);if(!A||"md"!==A.extension)return null;const{x:s,y:o}=sceneCoordsToViewportCoords({sceneX:a.x,sceneY:a.y},e),l=o-2.5*ROOTELEMENTSIZE-e.offsetTop+"px",c=s-e.offsetLeft+"px";return React__namespace.createElement("div",{ref:this.containerRef,className:"embeddable-menu",style:{top:l,left:c,opacity:1},onMouseEnter:()=>this.handleMouseEnter(),onPointerDown:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},React__namespace.createElement("div",{className:"Island",style:{position:"relative"}},React__namespace.createElement(ActionButton,{key:"MarkdownSection",title:t$d("NARROW_TO_HEADING"),action:async()=>{const e=(await app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},A)).blocks.filter((e=>{var t;return e.display&&"heading"===(null===(t=e.node)||void 0===t?void 0:t.type)})),i=[""].concat(e.map((e=>`#${e.display.replaceAll(REG_BLOCK_REF_CLEAN,"").trim()}`))),n=[t$d("SHOW_ENTIRE_FILE")].concat(e.map((e=>e.display))),r=await ScriptEngine.suggester(app,n,i,"Select section from document");(r||""===r)&&r!==t&&this.updateElement(r,a,A)},icon:ICONS.ZoomToSection,view:i}),React__namespace.createElement(ActionButton,{key:"MarkdownBlock",title:t$d("NARROW_TO_BLOCK"),action:async()=>{var e,i,n;if(!A)return;const r=(await app.metadataCache.blockCache.getForFile({isCancelled:()=>!1},A)).blocks.filter((e=>{var t;return e.display&&"paragraph"===(null===(t=e.node)||void 0===t?void 0:t.type)})),s=["entire-file"].concat(r),o=[t$d("SHOW_ENTIRE_FILE")].concat(r.map((e=>{var t;return`${(null===(t=e.node)||void 0===t?void 0:t.id)?`#^${e.node.id}: `:""}${e.display.trim()}`}))),l=await ScriptEngine.suggester(app,o,s,"Select section from document");if(!l)return;if("entire-file"===l){if(""===t)return;return void this.updateElement("",a,A)}let c=l.node.id;if(!c||`#^${c}`!==t){if(!c){const t=null===(n=null===(i=null===(e=l.node)||void 0===e?void 0:e.position)||void 0===i?void 0:i.end)||void 0===n?void 0:n.offset;if(!t)return;c=nanoid();const a=await app.vault.cachedRead(A);if(!a)return;await app.vault.modify(A,a.slice(0,t)+` ^${c}`+a.slice(t)),await sleep(200)}this.updateElement(`#^${c}`,a,A)}},icon:ICONS.ZoomToBlock,view:i}),React__namespace.createElement(ActionButton,{key:"ZoomToElement",title:t$d("ZOOM_TO_FIT"),action:()=>{a&&n.zoomToFit([a],i.plugin.settings.zoomToFitMaxLevel,.1)},icon:ICONS.ZoomToSelectedElement,view:i})))}}if(o||s){const t=s?n.getHTMLIFrameElement(a.id):i.getEmbeddableElementById(a.id);if(!t||!t.contentWindow)return null;const{x:A,y:o}=sceneCoordsToViewportCoords({sceneX:a.x,sceneY:a.y},e),l=o-2.5*ROOTELEMENTSIZE-e.offsetTop+"px",c=A-e.offsetLeft+"px";return React__namespace.createElement("div",{ref:this.containerRef,className:"embeddable-menu",style:{top:l,left:c,opacity:1},onMouseEnter:()=>this.handleMouseEnter(),onPointerDown:()=>this.handleMouseEnter(),onMouseLeave:()=>this.handleMouseLeave()},React__namespace.createElement("div",{className:"Island",style:{position:"relative"}},t.src!==r&&!t.src.startsWith("https://www.youtube.com")&&!t.src.startsWith("https://player.vimeo.com")&&React__namespace.createElement(ActionButton,{key:"Reload",title:t$d("RELOAD"),action:()=>{t.src=r},icon:ICONS.Reload,view:i}),React__namespace.createElement(ActionButton,{key:"Open",title:t$d("OPEN_IN_BROWSER"),action:()=>{i.openExternalLink(t.src)},icon:ICONS.Globe,view:i}),React__namespace.createElement(ActionButton,{key:"ZoomToElement",title:t$d("ZOOM_TO_FIT"),action:()=>{a&&n.zoomToFit([a],i.plugin.settings.zoomToFitMaxLevel,.1)},icon:ICONS.ZoomToSelectedElement,view:i})))}}}var TextMode;!function(e){e.parsed="parsed",e.raw="raw"}(TextMode||(TextMode={}));const HIDE="excalidraw-hidden",SHOW="excalidraw-visible",addFiles=async(e,t,A)=>{if(!e||0===e.length||!t)return;const i=t.excalidrawAPI;if(!i)return;if(e=e.filter((e=>e&&e.size&&e.size.height>0&&e.size.width>0)),0===e.length)return;const n=scaleLoadedImage(t.getScene(),e);void 0===A&&(A=n.scene.appState.theme),n.dirty&&t.updateScene({elements:n.scene.elements,appState:n.scene.appState,commitToHistory:!1});for(const i of e)if(t.excalidrawData.hasFile(i.id)&&t.excalidrawData.getFile(i.id).setImage(i.dataURL,i.mimeType,i.size,A,i.hasSVGwithBitmap),t.excalidrawData.hasEquation(i.id)){const e=t.excalidrawData.getEquation(i.id).latex;t.excalidrawData.setEquation(i.id,{latex:e,isLoaded:!0})}i.addFiles(e)},warningUnknowSeriousError=()=>{new obsidian_module.Notice("WARNING: Excalidraw ran into an unknown problem!\n\nThere is a risk that your most recent changes cannot be saved.\n\nTo be on the safe side...\n1) Please select your drawing using CTRL/CMD+A and make a copy with CTRL/CMD+C.\n2) Then create an empty drawing in a new pane by CTRL/CMD+clicking the Excalidraw ribbon button,\n3) and paste your work to the new document with CTRL/CMD+V.",6e4)};class ExcalidrawView extends obsidian_module.TextFileView{constructor(e,t){super(e),this.getScene=null,this.addElements=null,this.getSelectedTextElement=null,this.getSelectedImageElement=null,this.getSelectedElementWithLink=null,this.addText=null,this.refresh=null,this.excalidrawRef=null,this.excalidrawAPI=null,this.excalidrawWrapperRef=null,this.toolsPanelRef=null,this.embeddableMenuRef=null,this.linksAlwaysOpenInANewPane=!1,this.lastSaveTimestamp=0,this.lastLoadedFile=null,this.modifierKeyDown={shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1},this.currentPosition={x:0,y:0},this.embeddableRefs=new Map,this.semaphores={popoutUnload:!1,viewunload:!1,scriptsReady:!1,justLoaded:!1,preventAutozoom:!1,autosaving:!1,dirty:null,preventReload:!1,isEditingText:!1,saving:!1,forceSaving:!1,hoverSleep:!1,wheelTimeout:null},this.autosaveTimer=null,this.textMode=TextMode.raw,this.compatibilityMode=!1,this.isEditingTextResetTimer=null,this.id=this.leaf.id,this.getHookServer=()=>{var e;return null!==(e=this.hookServer)&&void 0!==e?e:this.plugin.ea},this.preventReloadResetTimer=null,this.hiddenMobileLeaves=[],this.offsetLeft=0,this.offsetTop=0,this.blockTextModeChange=!1,this.isLoaded=!1,this.activeLoader=null,this.nextLoader=null,this.initialContainerSizeUpdate=!1,this.previousSceneVersion=0,this.previousBackgroundColor="",this.previousTheme="",this.colorChangeTimer=null,this.plugin=t,this.excalidrawData=new ExcalidrawData(t),this.hookServer=t.ea,this.canvasNodeFactory=new CanvasNodeFactory(this)}setHookServer(e){this.hookServer=e||this.plugin.ea}preventAutozoom(){this.semaphores.preventAutozoom=!0,setTimeout((()=>this.semaphores.preventAutozoom=!1),1500)}saveExcalidraw(e){if(!e){if(!this.getScene)return!1;e=this.getScene()}const t=`${this.file.path.substring(0,this.file.path.lastIndexOf(".md"))}.excalidraw`,A=app.vault.getAbstractFileByPath(obsidian_module.normalizePath(t));A&&A instanceof obsidian_module.TFile?app.vault.modify(A,JSON.stringify(e,null,"\t")):app.vault.create(t,JSON.stringify(e,null,"\t"))}async exportExcalidraw(e){this.getScene&&this.file&&(app.isMobile?new Prompt(app,"Please provide filename",this.file.basename,"filename, leave blank to cancel action").openAndGetValue((async e=>{if(!e)return;e=`${e}.excalidraw`;const t=splitFolderAndFilename(this.file.path).folderpath;await checkAndCreateFolder(t);const A=getNewUniqueFilepath(app.vault,e,t);app.vault.create(A,JSON.stringify(this.getScene(),null,"\t")),new obsidian_module.Notice(`Exported to ${A}`,6e3)})):download("data:text/plain;charset=utf-8",encodeURIComponent(JSON.stringify(this.getScene(e),null,"\t")),`${this.file.basename}.excalidraw`))}async svg(e,t,A){const i=this.exportDialog,n={withBackground:i?!i.transparent:getWithBackground(this.plugin,this.file),withTheme:!0};return await getSVG(Object.assign(Object.assign({},e),{appState:Object.assign(Object.assign({},e.appState),{theme:null!=t?t:i?i.theme:getExportTheme(this.plugin,this.file,e.appState.theme),exportEmbedScene:void 0===A?!!i&&i.embedScene:A})}),n,i?i.padding:getExportPadding(this.plugin,this.file))}async saveSVG(e,t){if(!e){if(!this.getScene)return!1;e=this.getScene()}const A=async(A,i)=>{const n=app.vault.getAbstractFileByPath(obsidian_module.normalizePath(A)),a=await this.svg(e,i,t);if(!a)return;const r=(new XMLSerializer).serializeToString(embedFontsInSVG(a,this.plugin));n&&n instanceof obsidian_module.TFile?await app.vault.modify(n,r):await app.vault.create(A,r)};this.plugin.settings.autoExportLightAndDark?(await A(getIMGFilename(this.file.path,"dark.svg"),"dark"),await A(getIMGFilename(this.file.path,"light.svg"),"light")):await A(getIMGFilename(this.file.path,"svg"))}async exportSVG(e,t){if(!this.getScene||!this.file)return;let A=await this.svg(this.getScene(t),void 0,e);A&&(A=embedFontsInSVG(A,this.plugin),download(null,svgToBase64(A.outerHTML),`${this.file.basename}.svg`))}async png(e,t,A){const i=this.exportDialog,n={withBackground:i?!i.transparent:getWithBackground(this.plugin,this.file),withTheme:!0};return await getPNG(Object.assign(Object.assign({},e),{appState:Object.assign(Object.assign({},e.appState),{theme:null!=t?t:i?i.theme:getExportTheme(this.plugin,this.file,e.appState.theme),exportEmbedScene:void 0===A?!!i&&i.embedScene:A})}),n,i?i.padding:getExportPadding(this.plugin,this.file),i?i.scale:getPNGScale(this.plugin,this.file))}async savePNG(e,t){if(!e){if(!this.getScene)return!1;e=this.getScene()}const A=async(A,i)=>{const n=app.vault.getAbstractFileByPath(obsidian_module.normalizePath(A)),a=await this.png(e,i,t);a&&(n&&n instanceof obsidian_module.TFile?await app.vault.modifyBinary(n,await a.arrayBuffer()):await app.vault.createBinary(A,await a.arrayBuffer()))};this.plugin.settings.autoExportLightAndDark?(await A(getIMGFilename(this.file.path,"dark.png"),"dark"),await A(getIMGFilename(this.file.path,"light.png"),"light")):await A(getIMGFilename(this.file.path,"png"))}async exportPNGToClipboard(e,t){if(!this.getScene||!this.file)return;const A=await this.png(this.getScene(t),void 0,e);A&&await navigator.clipboard.write([new window.ClipboardItem({"image/png":A})])}async exportPNG(e,t){if(!this.getScene||!this.file)return;const A=await this.png(this.getScene(t),void 0,e);if(!A)return;const i=new FileReader;i.readAsDataURL(A);const n=this;i.onloadend=function(){const e=i.result;download(null,e,`${n.file.basename}.png`)}}async save(e=!0,t=!1){if(!this.isLoaded)return;if(this.semaphores.saving)return;this.semaphores.saving=!0;let A=!1;if(this.getScene&&this.excalidrawAPI&&this.isLoaded&&this.file&&app.vault.getAbstractFileByPath(this.file.path)){try{const i=Boolean(null!==this.semaphores.dirty&&this.semaphores.dirty||this.semaphores.autosaving||t),n=this.getScene();if(this.compatibilityMode?await this.excalidrawData.syncElements(n):await this.excalidrawData.syncElements(n,this.excalidrawAPI.getAppState().selectedElementIds)&&!this.semaphores.popoutUnload&&await this.loadDrawing(!1,this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>e.isDeleted))),i){this.preventReloadResetTimer&&(clearTimeout(this.preventReloadResetTimer),this.preventReloadResetTimer=null),this.semaphores.preventReload=e,await super.save();const i=this.file.path,n=this.lastSavedData;if(setTimeout((()=>imageCache.addBAKToCache(i,n)),50),A=this.lastSaveTimestamp===this.file.stat.mtime&&!e&&t,this.lastSaveTimestamp=this.file.stat.mtime,this.clearDirty(),e){const e=this;this.preventReloadResetTimer=setTimeout((()=>e.semaphores.preventReload=!1),2e3)}}if(!A&&!this.semaphores.autosaving&&(!this.semaphores.viewunload||this.semaphores.popoutUnload)){const e=this.excalidrawData.autoexportPreference;(e===AutoexportPreference.inherit&&this.plugin.settings.autoexportSVG||e===AutoexportPreference.both||e===AutoexportPreference.svg)&&this.saveSVG(),(e===AutoexportPreference.inherit&&this.plugin.settings.autoexportPNG||e===AutoexportPreference.both||e===AutoexportPreference.png)&&this.savePNG(),!this.compatibilityMode&&this.plugin.settings.autoexportExcalidraw&&this.saveExcalidraw()}}catch(e){errorlog({where:"ExcalidrawView.save",fn:this.save,error:e}),warningUnknowSeriousError()}this.semaphores.saving=!1,A&&this.reload(!0,this.file)}else this.semaphores.saving=!1}getViewData(){var e,t,A;if(!this.getScene||!this.excalidrawData.loaded)return this.data;const i=this.getScene();if(!i)return this.data;if(!this.compatibilityMode){let i=this.data.search(/(^%%\n)?# Text Elements\n/m);if(-1==i&&(i=this.data.search(/(%%\n)?# Drawing\n/)),-1==i)return this.data;const n=(null===(e=this.exportDialog)||void 0===e?void 0:e.dirty)&&(null===(t=this.exportDialog)||void 0===t?void 0:t.saveSettings)?[["excalidraw-export-padding",this.exportDialog.padding.toString()],["excalidraw-export-pngscale",this.exportDialog.scale.toString()],["excalidraw-export-dark","dark"===this.exportDialog.theme?"true":"false"],["excalidraw-export-transparent",this.exportDialog.transparent?"true":"false"],[FRONTMATTER_KEY,this.textMode===TextMode.raw?"raw":"parsed"]]:[[FRONTMATTER_KEY,this.textMode===TextMode.raw?"raw":"parsed"]];(null===(A=this.exportDialog)||void 0===A?void 0:A.dirty)&&(this.exportDialog.dirty=!1);let a=updateFrontmatterInString(this.data.substring(0,i),n);const r=/(^---[\w\W]*?---\n)(!\[\[.*?]]\n(%%\n)?)/m;a.match(r)&&(a=a.replace(r,"$1")),this.excalidrawData.disableCompression||(this.excalidrawData.disableCompression=this.isEditedAsMarkdownInOtherView());const s=a+this.excalidrawData.generateMD(this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>e.isDeleted)));return this.excalidrawData.disableCompression=!1,s}return this.compatibilityMode?JSON.stringify(i,null,"\t"):this.data}restoreMobileLeaves(){this.hiddenMobileLeaves.length>0&&(this.hiddenMobileLeaves.forEach((e=>{e[0].containerEl.style.display=e[1]})),this.hiddenMobileLeaves=[])}toggleDisableBinding(){const e=!this.excalidrawAPI.getAppState().invertBindingBehaviour;this.updateScene({appState:{invertBindingBehaviour:e}}),new obsidian_module.Notice(e?"Inverted Mode: Default arrow binding is now disabled. Use CTRL/CMD to temporarily enable binding when needed.":"Normal Mode: Arrow binding is now enabled. Use CTRL/CMD to temporarily disable binding when needed.")}toggleFrameRendering(){const e=this.excalidrawAPI.getAppState().frameRendering;this.updateScene({appState:{frameRendering:Object.assign(Object.assign({},e),{enabled:!e.enabled})}}),new obsidian_module.Notice(e.enabled?"Frame Rendering: Enabled":"Frame Rendering: Disabled")}toggleFrameClipping(){const e=this.excalidrawAPI.getAppState().frameRendering;this.updateScene({appState:{frameRendering:Object.assign(Object.assign({},e),{clip:!e.clip})}}),new obsidian_module.Notice(e.clip?"Frame Clipping: Enabled":"Frame Clipping: Disabled")}gotoFullscreen(){this.plugin.leafChangeTimeout&&(clearTimeout(this.plugin.leafChangeTimeout),this.plugin.leafChangeTimeout=null),this.excalidrawWrapperRef&&(this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.setFullscreen(!0),(e=>{for(;e&&!e.hasClass("workspace-split");)e.addClass(SHOW),e=e.parentElement;e&&(e.addClass(SHOW),e.querySelectorAll(`div.workspace-split:not(.${SHOW})`).forEach((e=>e.addClass(SHOW))),e.querySelector(`div.workspace-leaf-content.${SHOW} > .view-header`).addClass(SHOW),e.querySelectorAll(`div.workspace-tab-container.${SHOW} > div.workspace-leaf:not(.${SHOW})`).forEach((e=>e.addClass(SHOW))),e.querySelectorAll(`div.workspace-tabs.${SHOW} > div.workspace-tab-header-container`).forEach((e=>e.addClass(SHOW))),e.querySelectorAll(`div.workspace-split.${SHOW} > div.workspace-tabs:not(.${SHOW})`).forEach((e=>e.addClass(SHOW))));const t=this.ownerDocument;t.body.querySelectorAll(`div.workspace-split:not(.${SHOW})`).forEach((e=>e.addClass(HIDE))),t.body.querySelector(`div.workspace-leaf-content.${SHOW} > .view-header`).addClass(HIDE),t.body.querySelectorAll(`div.workspace-tab-container.${SHOW} > div.workspace-leaf:not(.${SHOW})`).forEach((e=>e.addClass(HIDE))),t.body.querySelectorAll(`div.workspace-tabs.${SHOW} > div.workspace-tab-header-container`).forEach((e=>e.addClass(HIDE))),t.body.querySelectorAll(`div.workspace-split.${SHOW} > div.workspace-tabs:not(.${SHOW})`).forEach((e=>e.addClass(HIDE))),t.body.querySelectorAll("div.workspace-ribbon").forEach((e=>e.addClass(HIDE))),t.body.querySelectorAll("div.mobile-navbar").forEach((e=>e.addClass(HIDE))),t.body.querySelectorAll("div.status-bar").forEach((e=>e.addClass(HIDE)))})(this.contentEl))}isFullscreen(){return Boolean(document.body.querySelector(".excalidraw-hidden"))}exitFullscreen(){this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.setFullscreen(!1);const e=this.ownerDocument;e.querySelectorAll(".excalidraw-hidden").forEach((e=>e.removeClass(HIDE))),e.querySelectorAll(".excalidraw-visible").forEach((e=>e.removeClass(SHOW)))}removeLinkTooltip(){const e=this.ownerDocument.body.querySelector("body>div.excalidraw-tooltip,div.excalidraw-tooltip--visible");e&&e.classList.remove("excalidraw-tooltip--visible")}handleLinkHookCall(e,t,A){if(this.getHookServer().onLinkClickHook)try{if(!this.getHookServer().onLinkClickHook(e,t,A,this,this.getHookServer()))return!0}catch(e){errorlog({where:"ExcalidrawView.onLinkOpen",fn:this.getHookServer().onLinkClickHook,error:e})}return!1}openExternalLink(e,t){return!!e.match(REG_LINKINDEX_HYPERLINK)&&(window.open(e,"_blank"),!0)}openTagSearch(e){const t=e.matchAll(/#([\p{Letter}\p{Emoji_Presentation}\p{Number}\/_-]+)/gu).next();if(!t.value||t.value.length<2)return;const A=app.workspace.getLeavesOfType("search");0!=A.length&&(A[0].view.setQuery(`tag:${t.value[1]}`),app.workspace.revealLeaf(A[0]),this.isFullscreen()&&this.exitFullscreen())}async linkClick(e,t,A,i,n){var a,r,s,o,l;t||(t={id:null,text:null}),A||(A={id:null,fileId:null}),i||(i={id:null,text:null}),n||(n={shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey});const c=linkClickModifierType(n);let d=null,h=null,u=null;if((null==t?void 0:t.id)||(null==i?void 0:i.id)){if(u=null!==(a=null==i?void 0:i.text)&&void 0!==a?a:this.textMode===TextMode.parsed?this.excalidrawData.getRawText(t.id):t.text,!u)return;u=u.replaceAll("\n","");const A=null!==(r=t.id)&&void 0!==r?r:i.id,n=this.excalidrawAPI.getSceneElements().filter((e=>e.id===A))[0];if(this.handleLinkHookCall(n,u,e))return;if(this.openExternalLink(u))return;const s=REGEX_LINK.getResList(u);let o=s[0];if(s.length>1&&(o=await ScriptEngine.suggester(app,s.filter((e=>Boolean(e.value))).map((e=>REGEX_LINK.getLink(e))),s.filter((e=>Boolean(e.value))),"Select link to open"),!o))return;if(!(null==o?void 0:o.value))return void this.openTagSearch(u);if(u=REGEX_LINK.getLink(o),this.openExternalLink(u))return;if(u.search("#")>-1){const e=getLinkParts(u,this.file);h=`#${e.isBlockRef?"^":""}${e.ref}`,u=e.path}if(u.match(REG_LINKINDEX_INVALIDCHARS))return void new obsidian_module.Notice(t$d("FILENAME_INVALID_CHARS"),4e3);d=this.app.metadataCache.getFirstLinkpathDest(u,this.file.path)}if(null==A?void 0:A.id){if(this.excalidrawData.hasEquation(A.fileId)){const e=this.excalidrawData.getEquation(A.fileId).latex;return void new Prompt(app,t$d("ENTER_LATEX"),e,"").openAndGetValue((async t=>{t&&t!==e&&(this.excalidrawData.setEquation(A.fileId,{latex:t,isLoaded:!1}),await this.save(!1),await updateEquation(t,A.fileId,this,addFiles,this.plugin),this.setDirty(1))}))}if(await this.save(!1),this.excalidrawData.hasFile(A.fileId)){const e=this.excalidrawData.getFile(A.fileId);if(e.isHyperlink)return void window.open(e.hyperlink,"_blank");if("md-properties"===c&&"md"===e.file.extension&&!this.plugin.isExcalidrawFile(e.file)){const t=async t=>{t&&e.linkParts.original!==t&&(e.resetImage(this.file.path,t),this.setDirty(2),await this.save(!1),await this.loadSceneFiles())};return void GenericInputPrompt.Prompt(this,this.plugin,app,"Customize the link",void 0,e.linkParts.original,[{caption:"✅",action:t}],1,!1,(e=>e.createEl("p",{text:fragWithHTML("Do not add [[square brackets]] around the filename!<br>Follow this format when editing your link:<br><mark>filename#^blockref|WIDTHxMAXHEIGHT</mark>")})),!1).then(t,(()=>{}))}u=e.file.path,d=e.file,"pdf"===d.extension.toLowerCase()&&(h=null===(s=e.linkParts.original.match(/(#.*)$/))||void 0===s?void 0:s[1])}}if(!u)return void new obsidian_module.Notice(t$d("LINK_BUTTON_CLICK_NO_TEXT"),2e4);const g=null!==(l=null!==(o=A.id)&&void 0!==o?o:t.id)&&void 0!==l?l:i.id,p=this.excalidrawAPI.getSceneElements().filter((e=>e.id===g))[0];if(!this.handleLinkHookCall(p,u,e))try{if("active-pane"!==c&&this.isFullscreen()&&this.exitFullscreen(),!d)return void new NewFileActions(this.plugin,u,n,this).open();this.linksAlwaysOpenInANewPane&&!anyModifierKeysPressed(n)&&(n=emulateKeysForLinkClick("new-pane"));const e=getLeaf(this.plugin,this.leaf,n);try{const t=app.plugins.plugins["drawio-obsidian"];if(t&&t._loaded&&"svg"===d.extension){const t=await this.app.vault.cachedRead(d);if(/(<|\<)(mxfile|mxgraph)/i.test(t))return void e.setViewState({type:"diagram-edit",state:{file:d.path}})}}catch(e){console.error(e)}await e.openFile(d,Object.assign({active:!this.linksAlwaysOpenInANewPane},h?{eState:{subpath:h}}:{}))}catch(e){new obsidian_module.Notice(e,4e3)}}async handleLinkClick(e){this.removeLinkTooltip();const t=this.getSelectedTextElement(),A=(null==t?void 0:t.id)?null:this.getSelectedImageElement(),i=(null==A?void 0:A.id)||(null==t?void 0:t.id)?null:this.getSelectedElementWithLink();this.linkClick(e,t,A,i)}onResize(){var e,t;if(this.plugin.leafChangeTimeout)return;const A=this.excalidrawAPI;this.plugin.settings.zoomToFitOnResize&&this.excalidrawRef&&!this.semaphores.isEditingText&&A&&"text"!==(null===(t=null===(e=A.getAppState())||void 0===e?void 0:e.editingElement)||void 0===t?void 0:t.type)&&this.zoomToFit(!1)}getSceneVersion(e){return this.excalidrawGetSceneVersion||(this.excalidrawGetSceneVersion=this.plugin.getPackage(this.ownerWindow).excalidrawLib.getSceneVersion),this.excalidrawGetSceneVersion(e.filter((e=>!e.isDeleted)))}async forceSave(e=!1){this.semaphores.autosaving||this.semaphores.saving?e||new obsidian_module.Notice("Force Save aborted because saving is in progress)"):(this.preventReloadResetTimer&&(clearTimeout(this.preventReloadResetTimer),this.preventReloadResetTimer=null),this.semaphores.preventReload=!1,this.semaphores.forceSaving=!0,await this.save(!1,!0),this.plugin.triggerEmbedUpdates(),this.loadSceneFiles(),this.semaphores.forceSaving=!1,e||new obsidian_module.Notice("Save successful",1e3))}onload(){const e=Boolean(void 0===this.containerEl.onWindowMigrated);app.isMobile||e||this.containerEl.onWindowMigrated((()=>this.leaf.rebuildView()));const t=app.isMobile?document:this.containerEl.ownerDocument;this.ownerDocument=t,this.ownerWindow=this.ownerDocument.defaultView,this.plugin.getPackage(this.ownerWindow),this.semaphores.scriptsReady=!0,this.wheelEvent=e=>{this.semaphores.wheelTimeout&&clearTimeout(this.semaphores.wheelTimeout),this.semaphores.hoverSleep&&this.clearHoverPreview&&this.clearHoverPreview(),this.semaphores.wheelTimeout=setTimeout((()=>{clearTimeout(this.semaphores.wheelTimeout),this.semaphores.wheelTimeout=null}),1e3)},this.containerEl.addEventListener("wheel",this.wheelEvent,{passive:!1}),this.addAction("ScriptEngine",t$d("INSTALL_SCRIPT_BUTTON"),(()=>{new ScriptInstallPrompt(this.plugin).open()})),this.diskIcon=this.addAction("save",t$d("FORCE_SAVE"),(async()=>this.forceSave())),this.textIsRaw_Element=this.addAction("presentation",t$d("RAW"),(()=>this.changeTextMode(TextMode.parsed))),this.textIsParsed_Element=this.addAction("quote-glyph",t$d("PARSED"),(()=>this.changeTextMode(TextMode.raw))),this.linkAction_Element=this.addAction("link",t$d("OPEN_LINK"),(e=>this.handleLinkClick(e))),app.isMobile||this.addAction("fullscreen","Use the action on the Excalidraw Obsidian Panel or the Command Palette to exit fullscreen mode. You can set up a hotkey for toggling fullscreen mode in Obsidian settings under Hotkeys.",(()=>this.gotoFullscreen()));const A=this;app.workspace.onLayoutReady((async()=>{this.canvasNodeFactory.initialize(),A.contentEl.addClass("excalidraw-view"),await A.addSlidingPanesListner(),A.addParentMoveObserver(),A.onKeyUp=e=>{A.modifierKeyDown={shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}},A.onKeyDown=e=>{this.modifierKeyDown={shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,altKey:e.altKey,metaKey:e.metaKey}},A.ownerWindow.addEventListener("keydown",A.onKeyDown,!1),A.ownerWindow.addEventListener("keyup",A.onKeyUp,!1)})),this.setupAutosaveTimer(),super.onload()}async addSlidingPanesListner(){const e=this;this.slidingPanesListner=()=>{e.refresh&&e.refresh()};let t=app.workspace.rootSplit;for(;!t;)await sleep(50),t=app.workspace.rootSplit;t.containerEl.addEventListener("scroll",this.slidingPanesListner)}removeSlidingPanesListner(){var e;this.slidingPanesListner&&(null===(e=app.workspace.rootSplit.containerEl)||void 0===e||e.removeEventListener("scroll",this.slidingPanesListner))}addParentMoveObserver(){var e;const t=null!==(e=getParentOfClass(this.containerEl,"popover"))&&void 0!==e?e:getParentOfClass(this.containerEl,"workspace-leaf");if(!t)return;const A=t.classList.contains("popover");this.offsetLeft=t.offsetLeft,this.offsetTop=t.offsetTop;const i=this;this.parentMoveObserver=new MutationObserver((async e=>{const t=e[0].target;if(!(t instanceof HTMLElement))return;const{offsetLeft:A,offsetTop:n}=t;A===i.offsetLeft&&n==i.offsetTop||(i.refresh&&i.refresh(),i.offsetLeft=A,i.offsetTop=n)})),this.parentMoveObserver.observe(t,{attributeOldValue:!0,attributeFilter:A?["data-x","data-y"]:["class","style"]})}removeParentMoveObserver(){this.parentMoveObserver&&this.parentMoveObserver.disconnect()}setTheme(e){const t=this.excalidrawAPI;if(!this.excalidrawRef||!t)return;if(this.file&&hasExportTheme(this.plugin,this.file))return;const A=t.getAppState();this.excalidrawData.scene.theme=e,this.updateScene({appState:Object.assign(Object.assign({},A),{theme:e}),commitToHistory:!1})}async changeTextMode(e,t=!0){if(this.compatibilityMode)return;if(this.blockTextModeChange)return;this.blockTextModeChange=!0,this.textMode=e,e===TextMode.parsed?(this.textIsRaw_Element.hide(),this.textIsParsed_Element.show()):(this.textIsRaw_Element.show(),this.textIsParsed_Element.hide()),this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.setPreviewMode(e===TextMode.parsed);const A=this.excalidrawAPI;A&&t&&(await this.save(),this.preventAutozoom(),await this.excalidrawData.loadData(this.data,this.file,this.textMode),this.excalidrawData.scene.appState.theme=A.getAppState().theme,await this.loadDrawing(!1),A.history.clear()),this.prevTextMode=this.textMode,this.blockTextModeChange=!1}setupAutosaveTimer(){const e=async()=>{var t;if(!this.isLoaded)return void(this.autosaveTimer=setTimeout(e,this.plugin.settings.autosaveInterval));const A=this.excalidrawAPI;if(!A)return void warningUnknowSeriousError();const i=A.getAppState(),n=null!==i.editingElement;if(this.refresh(),!this.semaphores.dirty||this.semaphores.dirty!=(null===(t=this.file)||void 0===t?void 0:t.path)||!this.plugin.settings.autosave||this.semaphores.forceSaving||this.semaphores.autosaving||n||null!==i.draggingElement)this.autosaveTimer=setTimeout(e,this.plugin.activeExcalidrawView===this&&this.semaphores.dirty&&this.plugin.settings.autosave?1e3:this.plugin.settings.autosaveInterval);else{if(this.autosaveTimer=null,this.excalidrawRef){this.semaphores.autosaving=!0;const e=this;this.save().then((()=>e.semaphores.autosaving=!1))}this.autosaveTimer=setTimeout(e,this.plugin.settings.autosaveInterval)}};this.autosaveFunction=e,this.autosaveTimer&&(clearTimeout(this.autosaveTimer),this.autosaveTimer=null),this.autosaveTimer=setTimeout(e,this.plugin.settings.autosaveInterval)}onunload(){var e,t,A,i,n,a;if(this.restoreMobileLeaves(),this.semaphores.viewunload=!0,this.semaphores.popoutUnload=this.ownerDocument!==document&&0===this.ownerDocument.body.querySelectorAll(".workspace-tab-header").length,null===(e=this.ownerWindow)||void 0===e||e.removeEventListener("keydown",this.onKeyDown,!1),null===(t=this.ownerWindow)||void 0===t||t.removeEventListener("keyup",this.onKeyUp,!1),this.containerEl.removeEventListener("wheel",this.wheelEvent,!1),this.getHookServer().onViewUnloadHook)try{this.getHookServer().onViewUnloadHook(this)}catch(e){errorlog({where:"ExcalidrawView.onunload",fn:this.getHookServer().onViewUnloadHook,error:e})}const r=null===(i=null===(A=this.containerEl)||void 0===A?void 0:A.ownerDocument)||void 0===i?void 0:i.body.querySelector("body>div.excalidraw-tooltip,div.excalidraw-tooltip--visible");r&&(null===(a=null===(n=this.containerEl)||void 0===n?void 0:n.ownerDocument)||void 0===a||a.body.removeChild(r)),this.removeParentMoveObserver(),this.removeSlidingPanesListner(),this.autosaveTimer&&(clearInterval(this.autosaveTimer),this.autosaveTimer=null)}async reload(e=!1,t){if(this.semaphores.preventReload)return void(this.semaphores.preventReload=!1);if(this.semaphores.saving)return;if(this.lastLoadedFile=null,this.diskIcon.querySelector("svg").removeClass("excalidraw-dirty"),this.compatibilityMode)return void this.clearDirty();const A=this.excalidrawAPI;if(!this.excalidrawRef||!this.file||!A)return;const i=t&&t===this.file;i&&(this.data=await app.vault.read(t),this.preventAutozoom()),e?await this.excalidrawData.loadData(this.data,this.file,this.textMode):await this.excalidrawData.setTextMode(this.textMode),this.excalidrawData.scene.appState.theme=A.getAppState().theme,await this.loadDrawing(i),this.clearDirty()}async zoomToElementId(e,t){let A=0;for(;!this.excalidrawAPI&&A++<100;)await sleep(50);const i=this.excalidrawAPI;if(!i)return;const n=i.getSceneElements();let a=n.filter((t=>t.id===e));if(0!==a.length){if(t){const e=this.plugin.ea.getElementsInTheSameGroupWithElement(a[0],n);e.length>0&&(a=e)}this.preventAutozoom(),this.zoomToElements(!i.getAppState().viewModeEnabled,a)}}setEphemeralState(e){if(!e)return;const t=this;let A=null;e.match&&e.match.content&&e.match.matches&&1===e.match.matches.length&&2===e.match.matches[0].length&&(A=[e.match.content.substring(e.match.matches[0][0],e.match.matches[0][1])]);const i=async()=>{var e,A;let i=0;for(;(t.semaphores.justLoaded||!t.isLoaded||!t.excalidrawAPI||(null===(A=null===(e=t.excalidrawAPI)||void 0===e?void 0:e.getAppState())||void 0===A?void 0:A.isLoading))&&i++<100;)await sleep(50)},n=getEmbeddedFilenameParts(e.subpath);n.hasBlockref&&setTimeout((async()=>{await i(),setTimeout((()=>t.zoomToElementId(n.blockref,n.hasGroupref)))})),n.hasSectionref?A=[`# ${n.sectionref}`]:e.line&&e.line>0&&(A=[this.data.split("\n")[e.line-1]]),A&&setTimeout((async()=>{await i();const e=t.excalidrawAPI;if(!e)return;if(e.getAppState().isLoading)return;const a=e.getSceneElements();if(1===A.length&&A[0].startsWith("[")){let i=REGEX_LINK.getResList(A[0])[0];if(i){const A=REGEX_LINK.getLink(i);if(A){const i=t.plugin.app.metadataCache.getFirstLinkpathDest(A,t.file.path);if(i){let A=[];if(t.excalidrawData.files.forEach(((e,t)=>{var n;(null===(n=e.file)||void 0===n?void 0:n.path)===i.path&&A.push(t)})),A.length>0){const i=a.filter((e=>"image"===e.type&&A.includes(e.fileId)));i.length>0&&(this.preventAutozoom(),setTimeout((()=>t.zoomToElements(!e.getAppState().viewModeEnabled,i))))}}}}}t.selectElementsMatchingQuery(a,A,!e.getAppState().viewModeEnabled,n.hasSectionref,n.hasGroupref)})),super.setEphemeralState(e)}clear(){this.canvasNodeFactory.purgeNodes(),this.embeddableRefs.clear(),delete this.exportDialog;const e=this.excalidrawAPI;this.excalidrawRef&&e&&(this.activeLoader&&(this.activeLoader.terminate=!0,this.activeLoader=null),this.nextLoader=null,e.resetScene(),this.previousSceneVersion=0)}async setViewData(e,t=!1){this.lastLoadedFile!==this.file&&(this.isLoaded=!1,this.file&&(this.plugin.settings.showNewVersionNotification&&checkExcalidrawVersion(app),t&&this.clear(),this.lastSaveTimestamp=this.file.stat.mtime,this.lastLoadedFile=this.file,e=this.data=e.replaceAll("\r\n","\n").replaceAll("\r","\n"),app.workspace.onLayoutReady((async()=>{if(this.compatibilityMode="excalidraw"===this.file.extension,await this.plugin.loadSettings(),this.compatibilityMode)this.textIsRaw_Element.hide(),this.textIsParsed_Element.hide(),this.linkAction_Element.hide(),this.textMode=TextMode.raw,await this.excalidrawData.loadLegacyData(e,this.file),this.plugin.settings.compatibilityMode||new obsidian_module.Notice(t$d("COMPATIBILITY_MODE"),4e3),this.excalidrawData.disableCompression=!0;else{this.linkAction_Element.show(),this.excalidrawData.disableCompression=!1;const t=getTextMode(e);this.changeTextMode(t,!1);try{if(!await this.excalidrawData.loadData(e,this.file,this.textMode))return}catch(e){if(errorlog({where:"ExcalidrawView.setViewData",error:e}),"iframe conversion canceled"===e.message)return void this.setMarkdownView();const t=this.file,A=this.plugin,i=this.leaf;return(async()=>{let n=!0,a=0;const r=Date.now();for(;!imageCache.isReady()&&n;){const e=`You've been now wating for <b>${Math.round((Date.now()-r)/1e3)}</b> seconds. `;imageCache.initializationNotice=!0;const t=new ConfirmationPrompt(A,`${a>0?a%4==0?e+"The CACHE is still loading.<br><br>":a%4==1?e+"Watch the top rigth corner for the notification.<br><br>":a%4==2?e+"I really, really hope the backup will work for you! <br><br>":e+"I am sorry, it is taking a while, there is not much I can do... <br><br>":""}${t$d("CACHE_NOT_READY")}`);n=await t.waitForClose,a++}const s=await imageCache.getBAKFromCache(t.path);s?new ConfirmationPrompt(A,t$d("BACKUP_AVAILABLE")).waitForClose.then((async e=>{e&&(await app.vault.modify(t,s),A.excalidrawFileModes[i.id||t.path]="excalidraw",A.setExcalidrawView(i))})):new obsidian_module.Notice(`Error loading drawing:\n${e.message}${"Cannot read property 'index' of undefined"===e.message?"\n'# Drawing' section is likely missing":""}\n\nTry manually fixing the file or restoring an earlier version from sync history.`,1e4)})(),void this.setMarkdownView()}}if(await this.loadDrawing(!0),this.plugin.ea.onFileOpenHook)try{await this.plugin.ea.onFileOpenHook({ea:getEA(this),excalidrawFile:this.file,view:this})}catch(e){errorlog({where:"ExcalidrawView.setViewData.onFileOpenHook",error:e})}const t=this.excalidrawData.getOnLoadScript();if(t){const e=this,A=this.file.basename+"-onlaod-script",i=()=>{e.excalidrawAPI?e.plugin.scriptEngine.executeScript(e,t,A,this.file):setTimeout(i,200)};i()}this.isLoaded=!0}))))}getGridColor(e){const t=this.plugin.ea.getCM(e);return t.isDark()?t.lighterBy(5):t.darkerBy(5),t.stringHEX()}async loadSceneFiles(){if(!this.excalidrawAPI)return;const e=new EmbeddedFilesLoader(this.plugin),t=e=>{this.nextLoader=null,this.activeLoader=e,e.loadSceneFiles(this.excalidrawData,((e,A,i=!0)=>{e&&(addFiles(e,this,A),i&&(this.activeLoader=null,this.nextLoader?t(this.nextLoader):this.excalidrawData.getFiles().some((e=>{if(e&&!e.file&&e.attemptCounter<30){const e=this,t=this.file.path;return setTimeout((async()=>{e&&e.excalidrawAPI&&t===e.file.path&&e.loadSceneFiles()}),2e3),!0}return!1}))))}),0)};this.activeLoader?this.nextLoader=e:t(e)}async synchronizeWithData(e){let t=0;for(;this.semaphores.saving&&t++<30;)await sleep(100);if(t>=30)return void errorlog({where:"ExcalidrawView.synchronizeWithData",message:`Aborting sync with received file (${this.file.path}) because semaphores.saving remained true for ower 3 seconds`,fn:this.synchronizeWithData});this.semaphores.saving=!0;let A=!1;try{const t=e.deletedElements.map((e=>e.id)),i=this.excalidrawAPI.getSceneElementsIncludingDeleted().filter((e=>!t.contains(e.id))),n=i.map((e=>e.id)),a=t=>{switch(t.type){case"text":this.excalidrawData.textElements.set(t.id,e.textElements.get(t.id));break;case"image":e.getFile(t.fileId)?(this.excalidrawData.setFile(t.fileId,e.getFile(t.fileId)),A=!0):e.getEquation(t.fileId)&&(this.excalidrawData.setEquation(t.fileId,e.getEquation(t.fileId)),A=!0)}e.elementLinks.has(t.id)&&this.excalidrawData.elementLinks.set(t.id,e.elementLinks.get(t.id))};e.scene.elements.forEach(((t,r,s)=>{const o=i.filter((e=>e.id===t.id))[0];if(o&&(o.version<t.version||o.version===t.version&&JSON.stringify(o)!==JSON.stringify(t))){a(t);const e=n.indexOf(t.id);if(i.splice(e,1),0===r)i.splice(0,0,t),0!==e&&(n.splice(e,1),n.splice(0,0,t.id));else{const A=s[r-1].id,a=n.indexOf(A);i.splice(a+1,0,t),a!==e-1&&(n.splice(e,1),n.splice(a+1,0,t.id))}}else if(o)o&&"image"===t.type&&e.getFile(t.fileId)&&(this.excalidrawData.setFile(t.fileId,e.getFile(t.fileId)),A=!0);else if(a(t),0===r)i.splice(0,0,t),n.splice(0,0,t.id);else{const e=s[r-1].id,A=n.indexOf(e);i.splice(A+1,0,t),n.splice(A+1,0,t.id)}})),this.previousSceneVersion=this.getSceneVersion(i),this.getSceneVersion(e.scene.elements)!==this.previousSceneVersion&&this.setDirty(3),this.updateScene({elements:i}),A&&this.loadSceneFiles()}catch(e){errorlog({where:"ExcalidrawView.synchronizeWithData",message:`Error during sync with received file (${this.file.path})`,fn:this.synchronizeWithData,error:e})}this.semaphores.saving=!1}async loadDrawing(e,t){var A,i;const n=this.excalidrawData.scene;this.semaphores.justLoaded=e,this.initialContainerSizeUpdate=e,this.clearDirty();const a=this.excalidrawData.getOpenMode();this.semaphores.preventReload=!1;const r="always"===this.plugin.settings.defaultPenMode||"mobile"===this.plugin.settings.defaultPenMode&&app.isMobile,s=this.excalidrawAPI;if(s){const o=this.isLoaded?s.getAppState().viewModeEnabled:n.elements.length>0&&a.viewModeEnabled,l=this.isLoaded?s.getAppState().zenModeEnabled:a.zenModeEnabled;s.setLocalFont(this.plugin.settings.experimentalEnableFourthFont),this.updateScene({elements:n.elements.concat(null!=t?t:[]),files:n.files,commitToHistory:!0},e),this.updateScene({appState:Object.assign(Object.assign(Object.assign({},n.appState),this.excalidrawData.selectedElementIds?this.excalidrawData.selectedElementIds:{}),{zenModeEnabled:l,viewModeEnabled:o,linkOpacity:this.excalidrawData.getLinkOpacity(),trayModeEnabled:this.plugin.settings.defaultTrayMode,penMode:r,penDetected:r,allowPinchZoom:this.plugin.settings.allowPinchZoom,allowWheelZoom:this.plugin.settings.allowWheelZoom,pinnedScripts:this.plugin.settings.pinnedScripts,customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens)})}),app.workspace.getActiveViewOfType(ExcalidrawView)===this.leaf.view&&this.excalidrawWrapperRef&&(null===(i=null===(A=this.excalidrawWrapperRef.current)||void 0===A?void 0:A.firstElementChild)||void 0===i||i.focus()),this.onAfterLoadScene()}else this.instantiateExcalidraw({elements:n.elements,appState:Object.assign(Object.assign({},n.appState),{zenModeEnabled:a.zenModeEnabled,viewModeEnabled:n.elements.length>0&&a.viewModeEnabled,linkOpacity:this.excalidrawData.getLinkOpacity(),trayModeEnabled:this.plugin.settings.defaultTrayMode,penMode:r,penDetected:r,allowPinchZoom:this.plugin.settings.allowPinchZoom,allowWheelZoom:this.plugin.settings.allowWheelZoom,pinnedScripts:this.plugin.settings.pinnedScripts,customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens)}),files:n.files,libraryItems:await this.getLibrary()});const o=null!==this.data.match(/```compressed\-json\n/gm);this.compatibilityMode||this.plugin.settings.compress===o||this.isEditedAsMarkdownInOtherView()||this.setDirty(4)}isEditedAsMarkdownInOtherView(){return app.workspace.getLeavesOfType("markdown").filter((e=>e.view.file===this.file)).length>0}onAfterLoadScene(){this.loadSceneFiles(),this.updateContainerSize(null,!0),this.initializeToolsIconPanelAfterLoading()}setDirty(e){var t,A;this.semaphores.dirty=null===(t=this.file)||void 0===t?void 0:t.path,this.diskIcon.querySelector("svg").addClass("excalidraw-dirty"),!this.semaphores.viewunload&&(null===(A=this.toolsPanelRef)||void 0===A?void 0:A.current)&&this.toolsPanelRef.current.setDirty(!0),app.isMobile||obsidian_module.requireApiVersion("0.16.0")&&(this.leaf.tabHeaderInnerTitleEl.style.color="var(--color-accent)")}clearDirty(){var e;if(this.semaphores.viewunload)return;const t=this.excalidrawAPI;if(!t)return;this.semaphores.dirty=null,(null===(e=this.toolsPanelRef)||void 0===e?void 0:e.current)&&this.toolsPanelRef.current.setDirty(!1);const A=t.getSceneElements();A&&(this.previousSceneVersion=this.getSceneVersion(A)),this.diskIcon.querySelector("svg").removeClass("excalidraw-dirty"),app.isMobile||obsidian_module.requireApiVersion("0.16.0")&&(this.leaf.tabHeaderInnerTitleEl.style.color="")}initializeToolsIconPanelAfterLoading(){var e;if(this.semaphores.viewunload)return;const t=this.excalidrawAPI;if(!t)return;const A=t.getAppState(),i=null===(e=this.toolsPanelRef)||void 0===e?void 0:e.current;i&&(i.setTheme(A.theme),i.setExcalidrawViewMode(A.viewModeEnabled),i.setPreviewMode(this.compatibilityMode?null:this.textMode===TextMode.parsed),i.updateScriptIconMap(this.plugin.scriptEngine.scriptIconMap))}canAcceptExtension(e){return"excalidraw"===e}getDisplayText(){return this.file?this.file.basename:t$d("NOFILE")}getViewType(){return"excalidraw"}getIcon(){return ICON_NAME}setMarkdownView(){this.plugin.excalidrawFileModes[this.id||this.file.path]="markdown",this.plugin.setMarkdownView(this.leaf)}async openAsMarkdown(){!0===this.plugin.settings.compress&&(this.excalidrawData.disableCompression=!0,await this.save(!0,!0)),this.setMarkdownView()}async convertExcalidrawToMD(){await this.save(),this.plugin.openDrawing(await this.plugin.convertSingleExcalidrawToMD(this.file),"active-pane",!0)}async addYouTubeThumbnail(e){const t=await getYouTubeThumbnailLink(e),A=getEA(this),i=await A.addImage(0,0,t);A.getElement(i).link=e,A.addElementsToView(!0,!0,!0)}async addImageWithURL(e){const t=getEA(this);await t.addImage(0,0,e),t.addElementsToView(!0,!0,!0)}async addImageSaveToVault(e){const t=getEA(this),A=getMimeType(getURLImageExtension(e)),i=await getDataURLFromURL(e,A,3e3),n=await generateIdFromFile((new TextEncoder).encode(i)),a=await this.excalidrawData.saveDataURLtoVault(i,A,n);a?(await t.addImage(0,0,a),t.addElementsToView(!0,!0,!0)):new obsidian_module.Notice(t$d("ERROR_SAVING_IMAGE"))}async addTextWithIframely(e){var t;const A=await this.addText(e),i=`http://iframely.server.crestify.com/iframely?url=${e}`;try{const n=JSON.parse(await obsidian_module.request({url:i}));if(!n||n.error||!(null===(t=n.meta)||void 0===t?void 0:t.title))return;const a=getEA(this),r=a.getViewElements().filter((e=>e.id===A));1===r.length&&(r[0].text=r[0].originalText=r[0].rawText=`[${n.meta.title}](${e})`,a.copyViewElementsToEAforEditing(r),a.addElementsToView(!1,!1,!1))}catch(e){}}onPaneMenu(e,t){this.excalidrawAPI&&this.getViewSelectedElements().some((e=>"text"===e.type))&&e.addItem((e=>{e.setTitle(t$d("OPEN_LINK")).setIcon("external-link").setSection("pane").onClick((e=>{this.handleLinkClick(e)}))})),this.compatibilityMode?e.addItem((e=>{e.setTitle(t$d("CONVERT_FILE")).onClick((()=>this.convertExcalidrawToMD())).setSection("pane")})):e.addItem((e=>{e.setTitle(t$d("OPEN_AS_MD")).setIcon("document").onClick((()=>{this.openAsMarkdown()})).setSection("pane")})),e.addItem((e=>{e.setTitle(t$d("EXPORT_IMAGE")).setIcon("export-img").setSection("pane").onClick((async e=>{this.getScene&&this.file&&(this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file),this.exportDialog.createForm()),this.exportDialog.open())})).setSection("pane")})).addItem((e=>{e.setTitle(t$d("INSTALL_SCRIPT_BUTTON")).setIcon("ScriptEngine").setSection("pane").onClick((()=>{new ScriptInstallPrompt(this.plugin).open()}))})),super.onPaneMenu(e,t)}async getLibrary(){var e;const t=this.plugin.getStencilLibrary();return(null==t?void 0:t.library)?t.library:null!==(e=null==t?void 0:t.libraryItems)&&void 0!==e?e:[]}async instantiateExcalidraw(e){for(;!this.semaphores.scriptsReady;)await sleep(50);const t=this.plugin.getPackage(this.ownerWindow).react,A=this.plugin.getPackage(this.ownerWindow).reactDOM;this.clearDirty();const i=t.createElement((()=>{const A=t.useRef(null),i=t.useRef(null),n=t.useRef(null),[a,r]=t.useState({width:void 0,height:void 0});let s=null,o=null,l=null,c=Date.now(),d=!1;this.toolsPanelRef=i,this.embeddableMenuRef=n,this.obsidianMenu=new ObsidianMenu(this.plugin,i,this),this.embeddableMenu=new EmbeddableMenu(this,n);const h=()=>{let e,t;const A=new Promise(((A,i)=>{e=A,t=i}));return A.resolve=e,A.reject=t,A},u=t.useMemo((()=>({current:{readyPromise:h()}})),[]);t.useEffect((()=>{u.current.readyPromise.then((e=>{this.excalidrawAPI=e,e.setLocalFont(this.plugin.settings.experimentalEnableFourthFont),setTimeout((()=>{var e,t,A;this.onAfterLoadScene(),this.excalidrawContainer=null===(t=null===(e=this.excalidrawWrapperRef)||void 0===e?void 0:e.current)||void 0===t?void 0:t.firstElementChild,null===(A=this.excalidrawContainer)||void 0===A||A.focus()}))}))}),[u]),this.excalidrawRef=u,this.excalidrawWrapperRef=A,t.useEffect((()=>{r({width:this.contentEl.clientWidth,height:this.contentEl.clientHeight});const e=()=>{try{const e=this.contentEl.clientWidth,t=this.contentEl.clientHeight;if(0===e||0===t)return;r({width:e,height:t}),this.toolsPanelRef&&this.toolsPanelRef.current&&this.toolsPanelRef.current.updatePosition(),this.ownerDocument!==document&&this.refresh()}catch(e){errorlog({where:"Excalidraw React-Wrapper, onResize",error:e})}};return this.ownerWindow.addEventListener("resize",e),()=>{var t;return null===(t=this.ownerWindow)||void 0===t?void 0:t.removeEventListener("resize",e)}}),[A]),this.getSelectedTextElement=()=>{var e;const t=this.excalidrawAPI;if(!(null==u?void 0:u.current)||!t)return{id:null,text:null};if(t.getAppState().viewModeEnabled){if(s){const e=s;return s=null,e}return{id:null,text:null}}const A=t.getSceneElements().filter((e=>e.id===Object.keys(t.getAppState().selectedElementIds)[0]));if(0===A.length)return{id:null,text:null};if("text"===A[0].type)return{id:A[0].id,text:A[0].text};if(["image","arrow"].contains(A[0].type))return{id:null,text:null};const i=null===(e=A[0].boundElements)||void 0===e?void 0:e.filter((e=>"text"===e.type));if((null==i?void 0:i.length)>0){const e=t.getSceneElements().filter((e=>e.id===i[0].id));if(e.length>0)return{id:e[0].id,text:e[0].text}}if(0===A[0].groupIds.length)return{id:null,text:null};const n=A[0].groupIds[0],a=t.getSceneElements().filter((e=>{var t;return null===(t=e.groupIds)||void 0===t?void 0:t.includes(n)})).filter((e=>"text"===e.type));return 0===a.length?{id:null,text:null}:{id:A[0].id,text:A[0].text}},this.getSelectedImageElement=()=>{const e=this.excalidrawAPI;if(!e)return{id:null,fileId:null};if(e.getAppState().viewModeEnabled){if(o){const e=o;return o=null,e}return{id:null,fileId:null}}const t=e.getSceneElements().filter((t=>t.id==Object.keys(e.getAppState().selectedElementIds)[0]));if(0===t.length)return{id:null,fileId:null};if("image"==t[0].type)return{id:t[0].id,fileId:t[0].fileId};if("text"===t[0].type)return{id:null,fileId:null};if(0===t[0].groupIds.length)return{id:null,fileId:null};const A=t[0].groupIds[0],i=e.getSceneElements().filter((e=>{var t;return null===(t=e.groupIds)||void 0===t?void 0:t.includes(A)})).filter((e=>"image"==e.type));return 0===i.length?{id:null,fileId:null}:{id:i[0].id,fileId:i[0].fileId}},this.getSelectedElementWithLink=()=>{const e=this.excalidrawAPI;if(!e)return{id:null,text:null};if(e.getAppState().viewModeEnabled){if(l){const e=l;return l=null,e}return{id:null,text:null}}const t=e.getSceneElements().filter((t=>t.id==Object.keys(e.getAppState().selectedElementIds)[0]));if(0===t.length)return{id:null,text:null};if(t[0].link)return{id:t[0].id,text:t[0].link};if(0===t[0].groupIds.length)return{id:null,text:null};const A=t[0].groupIds[0],i=e.getSceneElements().filter((e=>{var t;return null===(t=e.groupIds)||void 0===t?void 0:t.includes(A)})).filter((e=>e.link));return 0===i.length?{id:null,text:null}:{id:i[0].id,text:i[0].link}},this.addText=async(e,t,A=!0)=>{var i,n,a,r,s;const o=this.excalidrawAPI;if(!(null==u?void 0:u.current)||!o)return;const l=o.getAppState(),c=this.plugin.ea.getAPI(this);c.style.strokeColor=null!==(i=l.currentItemStrokeColor)&&void 0!==i?i:"black",c.style.opacity=null!==(n=l.currentItemOpacity)&&void 0!==n?n:1,c.style.fontFamily=null!==(a=null!=t?t:l.currentItemFontFamily)&&void 0!==a?a:1,c.style.fontSize=null!==(r=l.currentItemFontSize)&&void 0!==r?r:20,c.style.textAlign=null!==(s=l.currentItemTextAlign)&&void 0!==s?s:"left";const{width:d,height:h}=l,g=viewportCoordsToSceneCoords({clientX:0,clientY:0},l),p=viewportCoordsToSceneCoords({clientX:d,clientY:h},l),m=g.x>this.currentPosition.x||p.x<this.currentPosition.x||g.y>this.currentPosition.y||p.y<this.currentPosition.y,w=c.addText(this.currentPosition.x,this.currentPosition.y,e);return await this.addElements(c.getElements(),m,A,void 0,!0),w},this.addElements=async(e,t=!1,A=!1,i,n=!1,a=!1)=>{const r=this.excalidrawAPI;if(!(null==u?void 0:u.current)||!r)return!1;const s=e.filter((e=>"text"==e.type));for(let e=0;e<s.length;e++){const[t,A,i]=await this.excalidrawData.addTextElement(s[e].id,s[e].text,s[e].rawText);i&&(s[e].link=i),this.textMode==TextMode.parsed&&this.excalidrawData.updateTextElement(s[e],t,A)}t&&(e=repositionElementsToCursor(e,this.currentPosition,!0));const o=e.map((e=>e.id)),l=r.getSceneElements(),c=[];for(let t=0;t<l.length;t++){const A=l[t].id;o.includes(A)&&(l[t]=e.filter((e=>e.id===A))[0],c.push(A))}const d=n?l.concat(e.filter((e=>!c.includes(e.id)))):e.filter((e=>!c.includes(e.id))).concat(l);if(this.updateScene({elements:d,commitToHistory:!0},a),i&&Object.keys(i).length>0){const e=[];Object.keys(i).forEach((t=>{if(e.push({mimeType:i[t].mimeType,id:i[t].id,dataURL:i[t].dataURL,created:i[t].created}),i[t].file||i[t].isHyperlink){const e=new EmbeddedFile(this.plugin,this.file.path,i[t].isHyperlink?i[t].hyperlink:i[t].file),A=r.getAppState();e.setImage(i[t].dataURL,i[t].mimeType,i[t].size,"dark"===A.theme,i[t].hasSVGwithBitmap),this.excalidrawData.setFile(i[t].id,e)}i[t].latex&&this.excalidrawData.setEquation(i[t].id,{latex:i[t].latex,isLoaded:!0})})),r.addFiles(e)}return r.updateContainerSize(r.getSceneElements().filter((e=>o.includes(e.id))).filter(isContainer)),A?await this.save(!1):this.setDirty(5),!0},this.getScene=e=>{const t=this.excalidrawAPI;if(!(null==u?void 0:u.current)||!t)return null;const A=e?this.getViewSelectedElements():t.getSceneElements(),i=t.getAppState(),n=Object.assign({},t.getFiles());if(n){const e=A.filter((e=>"image"===e.type)).map((e=>e.fileId)),t=Object.keys(n).filter((t=>!e.contains(t)));t.forEach((e=>delete n[e]))}return{type:"excalidraw",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,elements:A,appState:{theme:i.theme,viewBackgroundColor:i.viewBackgroundColor,currentItemStrokeColor:i.currentItemStrokeColor,currentItemBackgroundColor:i.currentItemBackgroundColor,currentItemFillStyle:i.currentItemFillStyle,currentItemStrokeWidth:i.currentItemStrokeWidth,currentItemStrokeStyle:i.currentItemStrokeStyle,currentItemRoughness:i.currentItemRoughness,currentItemOpacity:i.currentItemOpacity,currentItemFontFamily:i.currentItemFontFamily,currentItemFontSize:i.currentItemFontSize,currentItemTextAlign:i.currentItemTextAlign,currentItemStartArrowhead:i.currentItemStartArrowhead,currentItemEndArrowhead:i.currentItemEndArrowhead,scrollX:i.scrollX,scrollY:i.scrollY,zoom:i.zoom,currentItemRoundness:i.currentItemRoundness,gridSize:i.gridSize,colorPalette:i.colorPalette,currentStrokeOptions:i.currentStrokeOptions,previousGridSize:i.previousGridSize,frameRendering:i.frameRendering},prevTextMode:this.prevTextMode,files:n}},this.refresh=()=>{if(0===this.contentEl.clientWidth||0===this.contentEl.clientHeight)return;const e=this.excalidrawAPI;(null==u?void 0:u.current)&&e&&e.refresh()};let g={x:0,y:0},p=null;this.clearHoverPreview=()=>{if(p){const e=new MouseEvent("click",{view:this.ownerWindow,bubbles:!0,cancelable:!0});p.dispatchEvent(e),p=null}};const m=e=>{var t,A,i,n,a;const r=null===(t=app.dragManager.draggable)||void 0===t?void 0:t.files;return r&&r[0]==this.file&&(r.shift(),app.dragManager.draggable.title=`${r.length} files`),["file","files"].includes(null===(A=app.dragManager.draggable)||void 0===A?void 0:A.type)?"link":(null===(i=e.types)||void 0===i?void 0:i.includes("text/html"))||(null===(n=e.types)||void 0===n?void 0:n.includes("text/plain"))||(null===(a=e.types)||void 0===a?void 0:a.includes("Files"))?"copy":void 0};let w=!1;const f=()=>{if(s=getTextElementAtPointer(this.currentPosition,this),s&&s.id){const e=new MouseEvent("click",{ctrlKey:!(DEVICE.isIOS||DEVICE.isMacOS)||this.modifierKeyDown.ctrlKey,metaKey:DEVICE.isIOS||DEVICE.isMacOS||this.modifierKeyDown.metaKey,shiftKey:this.modifierKeyDown.shiftKey,altKey:this.modifierKeyDown.altKey});return this.handleLinkClick(e),void(s=null)}if(o=getImageElementAtPointer(this.currentPosition,this),o&&o.id){const e=new MouseEvent("click",{ctrlKey:!(DEVICE.isIOS||DEVICE.isMacOS)||this.modifierKeyDown.ctrlKey,metaKey:DEVICE.isIOS||DEVICE.isMacOS||this.modifierKeyDown.metaKey,shiftKey:this.modifierKeyDown.shiftKey,altKey:this.modifierKeyDown.altKey});return this.handleLinkClick(e),void(o=null)}if(l=getElementWithLinkAtPointer(this.currentPosition,this),l&&l.id){const e=new MouseEvent("click",{ctrlKey:!(DEVICE.isIOS||DEVICE.isMacOS)||this.modifierKeyDown.ctrlKey,metaKey:DEVICE.isIOS||DEVICE.isMacOS||this.modifierKeyDown.metaKey,shiftKey:this.modifierKeyDown.shiftKey,altKey:this.modifierKeyDown.altKey});return this.handleLinkClick(e),void(l=null)}};let E=null;const B=(e,t)=>{var A,i;if(!E)return;if(null===(i=null===(A=this.excalidrawAPI)||void 0===A?void 0:A.getAppState())||void 0===i?void 0:i.editingElement)return;if(this.semaphores.wheelTimeout)return;if(!e){if(!this.currentPosition)return;e="";const A=getTextElementAtPointer(this.currentPosition,this);if(A&&A.text){t=this.excalidrawAPI.getSceneElements().filter((e=>e.id===A.id))[0];const i=this.textMode===TextMode.parsed?this.excalidrawData.getRawText(A.id):A.text;if(!i)return;if(i.match(REG_LINKINDEX_HYPERLINK))return;const n=REGEX_LINK.getRes(i).next();if(!n.value)return;if((e=REGEX_LINK.getLink(n)).match(REG_LINKINDEX_HYPERLINK))return}else{const A=getImageElementAtPointer(this.currentPosition,this);if(t=this.excalidrawAPI.getSceneElements().filter((e=>e.id===A.id))[0],!A||!A.fileId)return;if(!this.excalidrawData.hasFile(A.fileId))return;const i=this.excalidrawData.getFile(A.fileId);if(i.isHyperlink)return;if(IMAGE_TYPES.contains(i.file.extension))return;if("pdf"===i.file.extension.toLowerCase())return;if(this.plugin.ea.isExcalidrawFile(i.file))return;const n=i.linkParts.ref?`#${i.linkParts.isBlockRef?"^":""}${i.linkParts.ref}`:"";e=i.file.path+n}}if(this.getHookServer().onLinkHoverHook)try{if(!this.getHookServer().onLinkHoverHook(t,e,this,this.getHookServer()))return}catch(e){errorlog({where:"ExcalidrawView.showHoverPreview",fn:this.getHookServer().onLinkHoverHook,error:e})}if(this.semaphores.hoverSleep)return;const n=app.metadataCache.getFirstLinkpathDest(e.split("#")[0],this.file.path);if(!n)return;if(this.ownerDocument.querySelector(`div.popover-title[data-path="${n.path}"]`))return;this.semaphores.hoverSleep=!0;const a=this;if(setTimeout((()=>a.semaphores.hoverSleep=!1),500),this.plugin.hover.linkText=e,this.plugin.hover.sourcePath=this.file.path,p=this.contentEl,app.workspace.trigger("hover-link",{event:E,source:"excalidraw",hoverParent:p,targetEl:p,linktext:this.plugin.hover.linkText,sourcePath:this.plugin.hover.sourcePath}),g=this.currentPosition,this.isFullscreen()){const e=this;setTimeout((()=>{var t,A,i,a;const r=null!==(a=null===(i=null===(A=null===(t=this.ownerDocument.querySelector(`div.popover-title[data-path="${n.path}"]`))||void 0===t?void 0:t.parentElement)||void 0===A?void 0:A.parentElement)||void 0===i?void 0:i.parentElement)&&void 0!==a?a:this.ownerDocument.body.querySelector("div.popover");r&&e.contentEl.append(r)}),400)}},{Excalidraw:b,MainMenu:v,WelcomeScreen:C}=this.plugin.getPackage(this.ownerWindow).excalidrawLib,y=t.createElement("div",{className:"excalidraw-wrapper",ref:A,key:"abc",tabIndex:0,onKeyDown:e=>{e.target!==y.ref.current&&(this.isFullscreen()&&e.keyCode===KEYCODE.ESC&&this.exitFullscreen(),!isCTRL(e)||isSHIFT(e)||isALT(e)||B())},onPointerDown:e=>{(isCTRL(e)||isMETA(e))&&(!this.plugin.settings.allowCtrlClick&&isMETA(e)||setTimeout((()=>{(this.getSelectedTextElement().id||this.getSelectedImageElement().id||this.getSelectedElementWithLink().id)&&this.handleLinkClick(e)})))},onMouseMove:e=>{E=e.nativeEvent},onMouseOver:()=>{this.clearHoverPreview()},onDragOver:e=>{const t=m(e.dataTransfer);if(t){this.draginfoDiv||(this.draginfoDiv=createDiv({cls:"excalidraw-draginfo"}),this.ownerDocument.body.appendChild(this.draginfoDiv));let A="";if(app.dragManager.draggable)switch(internalDragModifierType(e)){case"image":A="Embed image";break;case"image-fullsize":A="Embed image @100%";break;case"link":A="Insert link\n"+(DEVICE.isMacOS||DEVICE.isIOS?"try SHIFT and CTRL combinations for other drop actions":"try SHIFT, CTRL, ALT combinations for other drop actions");break;case"embeddable":A="Insert in interactive frame"}else if(1===e.dataTransfer.types.length&&e.dataTransfer.types.includes("Files"))A="External file";else switch(externalDragModifierType(e)){case"image-import":A="Import image to Vault";break;case"image-url":A="Insert image/thumbnail with URL\n"+(DEVICE.isMacOS||DEVICE.isIOS?"try SHIFT, OPT, CTRL combinations for other drop actions":"try SHIFT, CTRL, ALT combinations for other drop actions");break;case"insert-link":A="Insert link";break;case"embeddable":A="Insert in interactive frame"}this.draginfoDiv.innerText!==A&&(this.draginfoDiv.innerText=A);const i=e.clientY-8*parseFloat(getComputedStyle(this.draginfoDiv).fontSize)+"px",n=e.clientX-this.draginfoDiv.clientWidth/2+"px";return this.draginfoDiv.style.top!==i&&(this.draginfoDiv.style.top=i),this.draginfoDiv.style.left!==n&&(this.draginfoDiv.style.left=n),e.dataTransfer.dropEffect=t,e.preventDefault(),!1}},onDragLeave:()=>{this.draginfoDiv&&(this.ownerDocument.body.removeChild(this.draginfoDiv),delete this.draginfoDiv)}},t.createElement(b,{ref:u,width:a.width,height:a.height,UIOptions:{canvasActions:{loadScene:!1,saveScene:!1,saveAsScene:!1,export:!1,saveAsImage:!1,saveToActiveFile:!1}},initState:null==e?void 0:e.appState,initialData:e,detectScroll:!0,onPointerUpdate:e=>{if(this.currentPosition=e.pointer,p&&(Math.abs(g.x-e.pointer.x)>50||Math.abs(g.y-e.pointer.y)>50)&&this.clearHoverPreview(),w){if(!d&&"down"===e.button){if(d=!0,isCTRL(this.modifierKeyDown)||isMETA(this.modifierKeyDown))return void f();const e=Date.now();return e-c<600&&e-c>40&&f(),void(c=e)}"up"===e.button&&(d=!1),(isCTRL(this.modifierKeyDown)||this.excalidrawAPI.getAppState().isViewModeEnabled&&this.plugin.settings.hoverPreviewWithoutCTRL)&&B()}},libraryReturnUrl:"app://obsidian.md",autoFocus:!0,onChange:(e,t)=>{var A,i,n,a;const r=()=>{if(setTimeout((()=>this.updateScene({appState:{gridColor:this.getGridColor(t.viewBackgroundColor)}}))),setDynamicStyle(this.plugin.ea,this,t.viewBackgroundColor,this.plugin.settings.dynamicStyling),this.plugin.ea.onCanvasColorChangeHook)try{this.plugin.ea.onCanvasColorChangeHook(this.plugin.ea,this,t.viewBackgroundColor)}catch(e){errorlog({where:r,source:this.plugin.ea.onCanvasColorChangeHook,error:e,message:"ea.onCanvasColorChangeHook exception"})}};if(w=t.viewModeEnabled,this.semaphores.justLoaded){if((null!==(a=null===(n=null===(i=null===(A=this.excalidrawData)||void 0===A?void 0:A.scene)||void 0===i?void 0:i.elements)||void 0===n?void 0:n.length)&&void 0!==a?a:0)>0&&0===e.length)return;return this.semaphores.justLoaded=!1,!this.semaphores.preventAutozoom&&this.plugin.settings.zoomToFitOnOpen&&this.zoomToFit(!1,!0),this.previousSceneVersion=this.getSceneVersion(e),this.previousBackgroundColor=t.viewBackgroundColor,this.previousTheme=t.theme,void r()}if(t.theme!==this.previousTheme&&this.file===this.excalidrawData.file&&(this.previousTheme=t.theme,this.setDirty(5)),t.viewBackgroundColor!==this.previousBackgroundColor&&this.file===this.excalidrawData.file&&(this.previousBackgroundColor=t.viewBackgroundColor,this.setDirty(6),this.colorChangeTimer&&clearTimeout(this.colorChangeTimer),this.colorChangeTimer=setTimeout((()=>{r(),this.colorChangeTimer=null}),50)),!this.semaphores.dirty&&null===t.editingElement&&null===t.editingLinearElement){const t=this.getSceneVersion(e);(t>0||0===t&&e.length>0)&&t!==this.previousSceneVersion&&(this.previousSceneVersion=t,this.setDirty(6))}},onLibraryChange:e=>{(async()=>{const t={type:"excalidrawlib",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,libraryItems:e};this.plugin.setStencilLibrary(t),await this.plugin.saveSettings()})()},renderTopRightUI:(e,t)=>this.obsidianMenu.renderButton(e,t),renderEmbeddableMenu:e=>this.embeddableMenu.renderButtons(e),onPaste:(e,t)=>{const A=this.getHookServer();if(e&&A.onPasteHook){const i=A.onPasteHook({ea:A,payload:e,event:t,excalidrawFile:this.file,view:this,pointerPosition:this.currentPosition});if("boolean"==typeof i&&!1===i)return!1}if(e&&e.text&&hyperlinkIsImage(e.text))return this.addImageWithURL(e.text),!1;if(e.elements){const e=this;setTimeout((()=>e.save(!1)),300)}return!0},onThemeChange:async e=>{var t;this.excalidrawData.scene.appState.theme=e,this.loadSceneFiles(),null===(t=null==i?void 0:i.current)||void 0===t||t.setTheme(e),setDynamicStyle(this.plugin.ea,this,this.previousBackgroundColor,this.plugin.settings.dynamicStyling)},ownerDocument:this.ownerDocument,ownerWindow:this.ownerWindow,onDrop:e=>{this.draginfoDiv&&(this.ownerDocument.body.removeChild(this.draginfoDiv),delete this.draginfoDiv);const t=this.excalidrawAPI;if(!t)return!1;const A=t.getAppState();this.currentPosition=viewportCoordsToSceneCoords({clientX:e.clientX,clientY:e.clientY},A);const i=app.dragManager.draggable,n=internalDragModifierType(e),a=externalDragModifierType(e),r=(t,A,n)=>{if(!this.getHookServer().onDropHook)return!1;try{return this.getHookServer().onDropHook({ea:this.getHookServer(),event:e,draggable:i,type:t,payload:{files:A,text:n},excalidrawFile:this.file,view:this,pointerPosition:this.currentPosition})}catch(e){return new obsidian_module.Notice("on drop hook error. See console log for details"),errorlog({where:"ExcalidrawView.onDrop",error:e}),!1}};switch(null==i?void 0:i.type){case"file":if(!r("file",[i.file],null)){const e=i.file;if(e.path.match(REG_LINKINDEX_INVALIDCHARS))return new obsidian_module.Notice(t$d("FILENAME_INVALID_CHARS"),4e3),!1;if(["image","image-fullsize"].contains(n)&&(IMAGE_TYPES.contains(e.extension)||"md"===e.extension||"pdf"===e.extension.toLowerCase()))return"pdf"===e.extension.toLowerCase()?new InsertPDFModal(this.plugin,this).open(e):(async()=>{const t=getEA(this);t.selectElementsInView([await insertImageToView(t,this.currentPosition,e,!("image-fullsize"===n))])})(),!1;if("embeddable"===n)return(async()=>{const t=getEA(this);t.selectElementsInView([await insertEmbeddableToView(t,this.currentPosition,e)])})(),!1;this.addText(`[[${app.metadataCache.fileToLinktext(i.file,this.file.path,!0)}]]`)}return!1;case"files":return r("file",i.files,null)||(async()=>{if(["image","image-fullsize"].contains(n)){const e=getEA(this);e.canvas.theme=t.getAppState().theme;let A=0;const a=[];for(const t of i.files)(IMAGE_TYPES.contains(t.extension)||"md"===t.extension)&&(a.push(await e.addImage(this.currentPosition.x+50*A,this.currentPosition.y+50*A,t,!("image-fullsize"===n))),A++,await e.addElementsToView(!1,!1,!0),e.selectElementsInView(a)),"pdf"===t.extension.toLowerCase()&&new InsertPDFModal(this.plugin,this).open(t)}else{if("embeddable"===n){const e=getEA(this);let t=0,A=0;const n=[];for(const a of i.files)n.push(await insertEmbeddableToView(e,{x:this.currentPosition.x+500*t,y:this.currentPosition.y+550*A},a)),t=(t+1)%3,0===t&&A++;return!1}for(const e of i.files)await this.addText(`[[${app.metadataCache.fileToLinktext(e,this.file.path,!0)}]]`,void 0,!1),this.currentPosition.y+=2*A.currentItemFontSize;this.save(!1)}})(),!1}if(e.dataTransfer.types.includes("Files")){if(e.dataTransfer.types.includes("text/plain")){const t=e.dataTransfer.getData("text");if(t&&r("text",null,t))return!1;if(t&&"image-url"===a&&hyperlinkIsImage(t))return this.addImageWithURL(t),!1;if(t&&"insert-link"===a)return this.plugin.settings.iframelyAllowed&&t.match(/^https?:\/\/\S*$/)?(this.addTextWithIframely(t),!1):(this.addText(t),!1);if(t&&"embeddable"===a)return insertEmbeddableToView(getEA(this),this.currentPosition,void 0,t),!1}if(e.dataTransfer.types.includes("text/html")){const t=e.dataTransfer.getData("text/html").match(/src=["']([^"']*)["']/);if(t&&"image-url"===a&&hyperlinkIsImage(t[1]))return this.addImageWithURL(t[1]),!1;if(t&&"insert-link"===a)return this.plugin.settings.iframelyAllowed&&t[1].match(/^https?:\/\/\S*$/)?(this.addTextWithIframely(t[1]),!1):(this.addText(t[1]),!1);if(t&&"embeddable"===a)return insertEmbeddableToView(getEA(this),this.currentPosition,void 0,t[1]),!1}return!0}if(e.dataTransfer.types.includes("text/plain")||e.dataTransfer.types.includes("text/uri-list")||e.dataTransfer.types.includes("text/html")){const t=e.dataTransfer.getData("text/html").match(/src=["']([^"']*)["']/),A=t?t[1]:"",i=e.dataTransfer.getData("text"),n=e.dataTransfer.getData("text/uri-list");let s=t?A:i;if(s&&""!==s||(s=n),!s||""===s)return!0;if(!r("text",null,s)){if(s&&"embeddable"===a&&/^(blob:)?(http|https):\/\/[^\s/$.?#].[^\s]*$/.test(s))return!0;if(s&&"image-url"===a&&hyperlinkIsYouTubeLink(s))return this.addYouTubeThumbnail(s),!1;if(n&&"image-url"===a&&hyperlinkIsYouTubeLink(n))return this.addYouTubeThumbnail(n),!1;if(s&&"image-url"===a&&hyperlinkIsImage(s))return this.addImageWithURL(s),!1;if(n&&"image-url"===a&&hyperlinkIsImage(n))return this.addImageWithURL(n),!1;if(s&&"image-import"===a&&hyperlinkIsImage(s))return this.addImageSaveToVault(s),!1;if(n&&"image-import"===a&&hyperlinkIsImage(n))return this.addImageSaveToVault(n),!1;if(this.plugin.settings.iframelyAllowed&&s.match(/^https?:\/\/\S*$/))return this.addTextWithIframely(s),!1;if(s.startsWith("obsidian://open?vault=")){const t=e.dataTransfer.getData("text/html");if(t){const e=t.match(/href="app:\/\/obsidian\.md\/(.*?)"/);if(2===e.length){const t=decodeURIComponent(e[1]).split("#"),A=app.vault.getAbstractFileByPath(t[0]);if(A&&A instanceof obsidian_module.TFile){const e=app.metadataCache.fileToLinktext(A,this.file.path);return void this.addText(`[[${e+(t.length>1?"#"+t[1]+"|"+e:"")}]]`)}return this.addText(`[[${decodeURIComponent(e[1])}]]`),!1}}const A=s.split("file=");if(2===A.length)return this.addText(`[[${decodeURIComponent(A[1])}]]`),!1}this.addText(s.replace(/(!\[\[.*#[^\]]*\]\])/g,"$1{40}"))}return!1}return!r("unknown",null,null)},onBeforeTextEdit:e=>{var t;if(clearTimeout(this.isEditingTextResetTimer),this.isEditingTextResetTimer=null,this.semaphores.isEditingText=!0,this.compatibilityMode)return null!==(t=e.originalText)&&void 0!==t?t:e.text;return this.excalidrawData.getRawText(e.id)||e.rawText},onBeforeTextSubmit:(e,t,A,i)=>{var n,a;const r=this.excalidrawAPI;if(!r)return[null,null,null];if(this.semaphores.isEditingText=!0,this.isEditingTextResetTimer&&clearTimeout(this.isEditingTextResetTimer),this.isEditingTextResetTimer=setTimeout((()=>{this.semaphores.isEditingText=!1,this.isEditingTextResetTimer=null}),1500),i)return this.excalidrawData.deleteTextElement(e.id),this.setDirty(7),[null,null,null];const s=t$d("WARNING_PASTING_ELEMENT_AS_TEXT");if(t.startsWith('{"type":"excalidraw/clipboard","elements":[{"'))return setTimeout((()=>{const t=this.excalidrawAPI.getSceneElements(),A=t.filter((t=>t.id===e.id));if(1===A.length){const e=cloneElement(A[0]);e.rawText=s,t[t.indexOf(A[0])]=e,this.excalidrawData.setTextElement(e.id,s,s,(()=>{})),this.updateScene({elements:t}),r.history.clear()}})),[s,s,null];const o=e.containerId,l=A.trim().matchAll(/^!\[\[([^|\]]*)?.*?]]$|^!\[[^\]]*?]\((.*?)\)$/g).next();if(null===(n=null==l?void 0:l.value)||void 0===n?void 0:n[0]){const t=null!==(a=l.value[1])&&void 0!==a?a:l.value[2],A=app.metadataCache.getFirstLinkpathDest(t,this.file.path);if(A&&A instanceof obsidian_module.TFile){if("md"!==A.extension||this.plugin.isExcalidrawFile(A))return setTimeout((async()=>{const t=this.excalidrawAPI.getSceneElements(),i=t.filter((t=>t.id===e.id));if(1===i.length){const e={x:i[0].x,y:i[0].y},n=cloneElement(i[0]);n.isDeleted=!0,this.excalidrawData.deleteTextElement(n.id),t[t.indexOf(i[0])]=n,this.updateScene({elements:t});const a=getEA(this);IMAGE_TYPES.contains(A.extension)?a.selectElementsInView([await insertImageToView(a,e,A)]):"pdf"!==A.extension?a.selectElementsInView([await insertEmbeddableToView(a,e,A)]):new UniversalInsertFileModal(this.plugin,this).open(A,e),this.setDirty()}})),[null,null,null];new obsidian_module.Notice(t$d("USE_INSERT_FILE_MODAL"),5e3)}}if(t!==e.text||A!==e.originalText||!this.excalidrawData.getRawText(e.id)){this.setDirty(8);const i=async(t,A)=>{var i,n;if(this.textMode===TextMode.raw)return;const a=this.excalidrawAPI.getSceneElements(),s=a.filter((t=>t.id===e.id));if(1===s.length){const e=cloneElement(s[0]),o=s[0].containerId?null===(n=null===(i=r.getSceneElements().filter((e=>e.id===s[0].containerId)))||void 0===i?void 0:i[0])||void 0===n?void 0:n.type:void 0;this.excalidrawData.updateTextElement(e,t,A,!0,o),a[a.indexOf(s[0])]=e,this.updateScene({elements:a}),e.containerId&&this.updateContainerSize(e.containerId),this.setDirty()}r.history.clear()},[n,a,s]=this.excalidrawData.setTextElement(e.id,t,A,i);return n?(o&&this.updateContainerSize(o,!0),this.textMode===TextMode.raw?[t,A,s]:t===n?s?[n,a,s]:[null,null,null]:(r.history.clear(),[n,a,s])):[null,null,null]}return o&&this.updateContainerSize(o,!0),this.textMode===TextMode.parsed?this.excalidrawData.getParsedText(e.id):[null,null,null]},onLinkOpen:async(e,t)=>{var A;if(t.preventDefault(),!e)return;let i=e.link;if(!i||""===i)return;setTimeout((()=>this.removeLinkTooltip()),500);let n=null===(A=null==t?void 0:t.detail)||void 0===A?void 0:A.nativeEvent;if(!this.handleLinkHookCall(e,e.link,n)&&!this.openExternalLink(e.link,isSHIFT(n)||isCTRL(n)||isMETA(n)||isALT(n)?void 0:e)){if("text"===e.type){const t=e.rawText.replaceAll("\n","");REGEX_LINK.getResList(t).filter((e=>Boolean(e.value))).length>1&&(i=t)}n.shiftKey||n.ctrlKey||n.metaKey||n.altKey||(n=emulateKeysForLinkClick("new-tab")),this.linkClick(n,null,null,{id:e.id,text:i},n)}},onLinkHover:(e,t)=>{if(e&&(this.plugin.settings.hoverPreviewWithoutCTRL||isCTRL(t))){E=t,E.ctrlKey=!(DEVICE.isIOS||DEVICE.isMacOS)||E.ctrlKey,E.metaKey=DEVICE.isIOS||DEVICE.isMacOS||E.metaKey;const A=e.link;if(!A||""===A)return;if(A.startsWith("[[")){const t=A.match(/\[\[(?<link>.*?)\]\]/);if(!t)return;let i=t.groups.link;B(i,e)}}},onViewModeChange:e=>{var t,A;if(this.semaphores.viewunload||null===(A=null===(t=this.toolsPanelRef)||void 0===t?void 0:t.current)||void 0===A||A.setExcalidrawViewMode(e),this.getHookServer().onViewModeChangeHook)try{this.getHookServer().onViewModeChangeHook(e,this,this.getHookServer())}catch(e){errorlog({where:"ExcalidrawView.onViewModeChange",fn:this.getHookServer().onViewModeChangeHook,error:e})}},validateEmbeddable:!0,renderWebview:DEVICE.isDesktop,renderEmbeddable:(e,A)=>{try{const i=useDefaultExcalidrawFrame(e);if(!this.file||!e||!e.link||0===e.link.length||i)return null;if(e.link.match(REG_LINKINDEX_HYPERLINK))return i?null:renderWebView(e.link,this,e.id);const n=REGEX_LINK.getRes(e.link).next();if(!n||!n.value&&n.done)return null;let a=REGEX_LINK.getLink(n);return a.match(REG_LINKINDEX_HYPERLINK)?i?null:renderWebView(a,this,e.id):t.createElement(CustomEmbeddable,{element:e,view:this,appState:A,linkText:a})}catch(e){return null}}},t.createElement(v,{},t.createElement(v.DefaultItems.ChangeCanvasBackground),t.createElement(v.DefaultItems.ToggleTheme),t.createElement(v.Separator),DEVICE.isPhone?null:t.createElement(v.Item,{icon:ICONS.trayMode,"aria-label":"Tray-mode offers an alternative, more spacious canvas",onSelect:()=>{this.toggleTrayMode()}},"Toggle tray-mode"),t.createElement(v.Item,{icon:saveIcon(!1),"aria-label":t$d("FORCE_SAVE"),onSelect:()=>{this.forceSave()}},"Save"),t.createElement(v.Item,{icon:ICONS.scriptEngine,"aria-label":"Explore the Excalidraw Script Library",onSelect:()=>{new ScriptInstallPrompt(this.plugin).open()}},"Script Library"),t.createElement(v.Item,{icon:ICONS.ExportImage,"aria-label":"Export image as PNG, SVG, or Excalidraw file",onSelect:()=>{this.exportDialog||(this.exportDialog=new ExportDialog(this.plugin,this,this.file),this.exportDialog.createForm()),this.exportDialog.open()}},"Export Image..."),t.createElement(v.Item,{icon:ICONS.switchToMarkdown,"aria-label":"Switch to markdown view",onSelect:()=>{this.openAsMarkdown()}},"Open as Markdown"),t.createElement(v.Separator),t.createElement(v.DefaultItems.Help),t.createElement(v.DefaultItems.ClearCanvas)),t.createElement(C,{},t.createElement(C.Center,{},t.createElement(C.Center.Logo,{},t.createElement(LogoWrapper,{},ICONS.ExcalidrawSword)),t.createElement(C.Center.Heading,{},'Type "Excalidraw" in the Command Palette',t.createElement("br"),"Explore the Obsidian Menu in the top right",t.createElement("br"),"Visit the Script Library",t.createElement("br"),"Find help in the hamburger-menu"),t.createElement(C.Center.Menu,{},t.createElement(C.Center.MenuItemLink,{icon:ICONS.YouTube,href:"https://www.youtube.com/@VisualPKM",shortcut:null,"aria-label":"Visual PKM YouTube Channel"}," Check out the Visual PKM YouTube channel."),t.createElement(C.Center.MenuItemLink,{icon:ICONS.Discord,href:"https://discord.gg/DyfAXFwUHc",shortcut:null,"aria-label":"Join the Visual Thinking Discord Server"}," Join the Visual Thinking Discord Server"),t.createElement(C.Center.MenuItemLink,{icon:ICONS.twitter,href:"https://twitter.com/zsviczian",shortcut:null,"aria-label":"Follow me on Twitter"}," Follow me on Twitter"),t.createElement(C.Center.MenuItemLink,{icon:ICONS.heart,href:"https://ko-fi.com/zsolt",shortcut:null,"aria-label":"Donate to support Excalidraw-Obsidian"},' Say "Thank You" & support the plugin.'))))),t.createElement(ToolsPanel,{ref:i,visible:!1,view:this,centerPointer:()=>{const e=this.excalidrawAPI;if(!u||!u.current||!e)return;const t=e.getAppState(),{width:A,height:i}=t;this.currentPosition=viewportCoordsToSceneCoords({clientX:A/2,clientY:i/2},t)}})),F=t.useRef(new ResizeObserver((e=>{if(!i||!i.current)return;const{width:t,height:A}=e[0].contentRect;if(0===t||0===A)return;const n=i.current.onRightEdge?i.current.previousWidth-t:0,a=i.current.onBottomEdge?i.current.previousHeight-A:0;i.current.updatePosition(a,n)})));return t.useEffect((()=>((null==i?void 0:i.current)&&F.current.observe(i.current.containerRef.current),()=>{F.current.unobserve(i.current.containerRef.current)})),[i,F]),t.createElement(t.Fragment,null,y)}));A.createRoot(this.contentEl).render(i)}updateContainerSize(e,t=!1){const A=this.excalidrawAPI;if(!A)return;const i=()=>{const t=e?A.getSceneElements().filter((t=>t.id===e&&"arrow"!==t.type)):A.getSceneElements().filter(isContainer);t.length>0&&(this.initialContainerSizeUpdate&&(this.semaphores.justLoaded=!0),A.updateContainerSize(t)),this.initialContainerSizeUpdate=!1};t?setTimeout((()=>i()),50):i()}zoomToFit(e=!0,t=!1){if(document.body.querySelector("div.modal-container"))return;const A=this.excalidrawAPI;if(!A||!this.excalidrawRef||this.semaphores.isEditingText||this.semaphores.preventAutozoom)return;const i=this.plugin.settings.zoomToFitMaxLevel,n=A.getSceneElements().filter((e=>e.width<1e4&&e.height<1e4));app.isMobile&&n.length>1e3||n.length>2500?t&&A.scrollToContent():e?setTimeout((()=>A.zoomToFit(n,i,this.isFullscreen()?0:.05)),100):A.zoomToFit(n,i,this.isFullscreen()?0:.05)}updatePinnedScripts(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{pinnedScripts:this.plugin.settings.pinnedScripts}})}updatePinnedCustomPens(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{customPens:this.plugin.settings.customPens.slice(0,this.plugin.settings.numberOfCustomPens)}})}updatePinchZoom(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{allowPinchZoom:this.plugin.settings.allowPinchZoom}})}updateWheelZoom(){const e=this.excalidrawAPI;if(!e)return!1;e.updateScene({appState:{allowWheelZoom:this.plugin.settings.allowWheelZoom}})}async toggleTrayMode(){const e=this.excalidrawAPI;if(!e)return!1;const t=e.getAppState();e.updateScene({appState:{trayModeEnabled:!t.trayModeEnabled}}),await this.plugin.loadSettings(),this.plugin.settings.defaultTrayMode=!t.trayModeEnabled,this.plugin.saveSettings()}selectElementsMatchingQuery(e,t,A=!0,i=!1,n=!1){let a=getTextElementsMatchingQuery(e.filter((e=>"text"===e.type)),t,i).concat(getFrameElementsMatchingQuery(e.filter((e=>"frame"===e.type)),t,i));if(0!==a.length){if(n){const t=this.plugin.ea.getElementsInTheSameGroupWithElement(a[0],e);t.length>0&&(a=t)}this.zoomToElements(A,a)}else new obsidian_module.Notice("I could not find a matching text element")}zoomToElements(e,t){const A=this.excalidrawAPI;if(!A)return;const i=this.plugin.settings.zoomToFitMaxLevel;e&&A.selectElements(t),A.zoomToFit(t,i,.05)}getViewSelectedElements(){var e;const t=this.excalidrawAPI;if(!t)return[];const A=null===(e=t.getAppState())||void 0===e?void 0:e.selectedElementIds;if(!A)return[];const i=Object.keys(A);if(!i)return[];const n=t.getSceneElements().filter((e=>i.includes(e.id))),a=n.filter((e=>e.boundElements&&e.boundElements.filter((e=>"text"===e.type)).length>0)).map((e=>e.boundElements.filter((e=>"text"===e.type)).map((e=>e.id))[0])),r=n.map((e=>e.id)).concat(a);return t.getSceneElements().filter((e=>r.contains(e.id)))}async copyLinkToSelectedElementToClipboard(e){const t=this.getViewSelectedElements();if(t.length<1)return void new obsidian_module.Notice(t$d("INSERT_LINK_TO_ELEMENT_ERROR"));let A;if(2===t.length){const e=t.filter((e=>"text"===e.type));1===e.length&&e[0].containerId&&1===t.filter((e=>e.boundElements.some((e=>"text"===e.type)))).length&&(A=e[0].id)}A||(A=1===t.length?t[0].id:this.plugin.ea.getLargestElement(t).id);let i=[];if(t.some((e=>e.id===A&&"frame"===e.type)))switch(e){case"area=":case"group=":case"frame=":i=[{caption:"Frame",action:()=>{e="frame="}},{caption:"Link",action:()=>{e=""}}];break;default:i=[{caption:"Link",action:()=>{e=""}},{caption:"Frame",action:()=>{e="frame="}}]}else switch(e){case"area=":i=[{caption:"Area",action:()=>{e="area="}},{caption:"Link",action:()=>{e=""}},{caption:"Group",action:()=>{e="group="}}];break;case"group=":i=[{caption:"Group",action:()=>{e="group="}},{caption:"Link",action:()=>{e=""}},{caption:"Area",action:()=>{e="area="}}];break;default:i=[{caption:"Link",action:()=>{e=""}},{caption:"Area",action:()=>{e="area="}},{caption:"Group",action:()=>{e="group="}}]}const n=await ScriptEngine.inputPrompt(this,this.plugin,app,"Set link alias","Leave empty if you do not want to set an alias","",i);navigator.clipboard.writeText(`${e.length>0?"!":""}[[${this.file.path}#^${e}${A}${n?`|${n}`:""}]]`),new obsidian_module.Notice(t$d("INSERT_LINK_TO_ELEMENT_READY"))}updateScene(e,t=!1){const A=this.excalidrawAPI;if(!A)return;const i=e.elements&&t;i&&(e.elements=restore(e,null,null).elements);try{A.updateScene(e)}catch(t){if(errorlog({where:"ExcalidrawView.updateScene 1st attempt",fn:this.updateScene,error:t,scene:e,willDoSecondAttempt:!i}),i)warningUnknowSeriousError();else try{e.elements=restore(e,null,null).elements,A.updateScene(e)}catch(t){errorlog({where:"ExcalidrawView.updateScene 2nd attempt",fn:this.updateScene,error:t,scene:e}),warningUnknowSeriousError()}}}updateEmbeddableRef(e,t){t&&this.embeddableRefs.set(e,t)}getEmbeddableElementById(e){return this.embeddableRefs.get(e)}}function getTextMode(e){return e.search("excalidraw-plugin: parsed\n")>-1||e.search("excalidraw-plugin: locked\n")>-1?TextMode.parsed:TextMode.raw}const DEFAULT_SETTINGS={folder:"Excalidraw",embedUseExcalidrawFolder:!1,templateFilePath:"Excalidraw/Template.excalidraw",scriptFolderPath:"Excalidraw/Scripts",compress:!1,autosave:!0,autosaveInterval:15e3,autosaveIntervalDesktop:15e3,autosaveIntervalMobile:1e4,drawingFilenamePrefix:"Drawing ",drawingEmbedPrefixWithFilename:!0,drawingFilnameEmbedPostfix:" ",drawingFilenameDateTime:"YYYY-MM-DD HH.mm.ss",useExcalidrawExtension:!0,displaySVGInPreview:!0,allowImageCache:!0,displayExportedImageIfAvailable:!1,previewMatchObsidianTheme:!1,width:"400",dynamicStyling:"colorful",isLeftHanded:!1,iframeMatchExcalidrawTheme:!0,matchTheme:!1,matchThemeAlways:!1,matchThemeTrigger:!1,defaultMode:"normal",defaultPenMode:"never",allowPinchZoom:!1,allowWheelZoom:!1,zoomToFitOnOpen:!0,zoomToFitOnResize:!0,zoomToFitMaxLevel:2,linkPrefix:"📍",urlPrefix:"🌐",parseTODO:!1,todo:"☐",done:"🗹",hoverPreviewWithoutCTRL:!1,linkOpacity:1,openInAdjacentPane:!1,openInMainWorkspace:!0,showLinkBrackets:!0,allowCtrlClick:!0,forceWrap:!1,pageTransclusionCharLimit:200,wordWrappingDefault:0,removeTransclusionQuoteSigns:!0,iframelyAllowed:!0,pngExportScale:1,exportWithTheme:!0,exportWithBackground:!0,exportPaddingSVG:10,keepInSync:!1,autoexportSVG:!1,autoexportPNG:!1,autoExportLightAndDark:!1,autoexportExcalidraw:!1,embedType:"excalidraw",embedWikiLink:!0,syncExcalidraw:!1,experimentalFileType:!1,experimentalFileTag:"✏️",experimentalLivePreview:!0,experimentalEnableFourthFont:!1,experimantalFourthFont:"Virgil",fieldSuggester:!0,compatibilityMode:!1,drawingOpenCount:0,library:"deprecated",library2:{type:"excalidrawlib",version:2,source:GITHUB_RELEASES+PLUGIN_VERSION,libraryItems:[]},imageElementNotice:!0,mdSVGwidth:500,mdSVGmaxHeight:800,mdFont:"Virgil",mdFontColor:"Black",mdBorderColor:"Black",mdCSS:"",scriptEngineSettings:{},defaultTrayMode:!0,previousRelease:"0.0.0",showReleaseNotes:!0,showNewVersionNotification:!0,mathjaxSourceURL:"https://cdn.jsdelivr.net/npm/mathjax@3.2.1/es5/tex-svg.js",latexBoilerplate:"\\color{blue}",taskboneEnabled:!1,taskboneAPIkey:"",pinnedScripts:[],customPens:[Object.assign({},PENS.default),Object.assign({},PENS.highlighter),Object.assign({},PENS.finetip),Object.assign({},PENS.fountain),Object.assign({},PENS.marker),Object.assign({},PENS["thick-thin"]),Object.assign({},PENS["thin-thick-thin"]),Object.assign({},PENS.default),Object.assign({},PENS.default),Object.assign({},PENS.default)],numberOfCustomPens:0,pdfScale:4,pdfBorderBox:!0,pdfGapSize:20,pdfLockAfterImport:!0,pdfNumColumns:1,pdfImportScale:.3};class ExcalidrawSettingTab extends obsidian_module.PluginSettingTab{constructor(e,t){super(e,t),this.requestEmbedUpdate=!1,this.requestReloadDrawings=!1,this.requestUpdatePinnedPens=!1,this.requestUpdateDynamicStyling=!1,this.reloadMathJax=!1,this.plugin=t}applySettingsUpdate(e=!1){e&&(this.requestReloadDrawings=!0)}async hide(){if(this.plugin.settings.scriptFolderPath=obsidian_module.normalizePath(this.plugin.settings.scriptFolderPath),"/"!==this.plugin.settings.scriptFolderPath&&""!==this.plugin.settings.scriptFolderPath||(this.plugin.settings.scriptFolderPath="Excalidraw/Scripts"),this.plugin.saveSettings(),this.requestUpdatePinnedPens&&app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&e.view.updatePinnedCustomPens()})),this.requestUpdateDynamicStyling&&app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&setDynamicStyle(this.plugin.ea,e.view,e.view.previousBackgroundColor,this.plugin.settings.dynamicStyling)})),this.requestReloadDrawings){const e=app.workspace.getLeavesOfType("excalidraw");for(const t of e)t.view instanceof ExcalidrawView&&(await t.view.save(!1),await t.view.reload(!0));this.requestEmbedUpdate=!0}this.requestEmbedUpdate&&this.plugin.triggerEmbedUpdates(),this.plugin.scriptEngine.updateScriptPath(),this.reloadMathJax&&this.plugin.loadMathJax()}async display(){var e;await this.plugin.loadSettings(),this.requestEmbedUpdate=!1,this.requestReloadDrawings=!1;const{containerEl:t}=this;t.addClass("excalidraw-settings"),this.containerEl.empty();const A=t.createDiv("coffee");A.addClass("ex-coffee-div"),A.createEl("a",{href:"https://ko-fi.com/zsolt"}).createEl("img",{attr:{src:"https://cdn.ko-fi.com/cdn/kofi3.png?v=3"}}).height=45,new obsidian_module.Setting(t).setName(t$d("RELEASE_NOTES_NAME")).setDesc(fragWithHTML(t$d("RELEASE_NOTES_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.showReleaseNotes).onChange((async e=>{this.plugin.settings.showReleaseNotes=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("NEWVERSION_NOTIFICATION_NAME")).setDesc(fragWithHTML(t$d("NEWVERSION_NOTIFICATION_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.showNewVersionNotification).onChange((async e=>{this.plugin.settings.showNewVersionNotification=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FOLDER_NAME")).setDesc(fragWithHTML(t$d("FOLDER_DESC"))).addText((e=>e.setPlaceholder("Excalidraw").setValue(this.plugin.settings.folder).onChange((async e=>{this.plugin.settings.folder=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FOLDER_EMBED_NAME")).setDesc(fragWithHTML(t$d("FOLDER_EMBED_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.embedUseExcalidrawFolder).onChange((async e=>{this.plugin.settings.embedUseExcalidrawFolder=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("TEMPLATE_NAME")).setDesc(fragWithHTML(t$d("TEMPLATE_DESC"))).addText((e=>e.setPlaceholder("Excalidraw/Template").setValue(this.plugin.settings.templateFilePath).onChange((async e=>{this.plugin.settings.templateFilePath=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("SCRIPT_FOLDER_NAME")).setDesc(fragWithHTML(t$d("SCRIPT_FOLDER_DESC"))).addText((e=>e.setPlaceholder("Excalidraw/Scripts").setValue(this.plugin.settings.scriptFolderPath).onChange((async e=>{this.plugin.settings.scriptFolderPath=e,this.applySettingsUpdate()})))),this.containerEl.createEl("h1",{text:t$d("SAVING_HEAD")}),new obsidian_module.Setting(t).setName(t$d("COMPRESS_NAME")).setDesc(fragWithHTML(t$d("COMPRESS_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.compress).onChange((async e=>{this.plugin.settings.compress=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("AUTOSAVE_INTERVAL_DESKTOP_NAME")).setDesc(fragWithHTML(t$d("AUTOSAVE_INTERVAL_DESKTOP_DESC"))).addDropdown((e=>e.addOption("15000","Frequent (every 15 seconds)").addOption("60000","Moderate (every 60 seconds)").addOption("300000","Rare (every 5 minutes)").addOption("900000","Practically never (every 15 minutes)").setValue(this.plugin.settings.autosaveIntervalDesktop.toString()).onChange((async e=>{this.plugin.settings.autosaveIntervalDesktop=parseInt(e),this.plugin.settings.autosaveInterval=app.isMobile?this.plugin.settings.autosaveIntervalMobile:this.plugin.settings.autosaveIntervalDesktop,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("AUTOSAVE_INTERVAL_MOBILE_NAME")).setDesc(fragWithHTML(t$d("AUTOSAVE_INTERVAL_MOBILE_DESC"))).addDropdown((e=>e.addOption("10000","Frequent (every 10 seconds)").addOption("30000","Moderate (every 30 seconds)").addOption("60000","Rare (every 1 minute)").addOption("300000","Practically never (every 5 minutes)").setValue(this.plugin.settings.autosaveIntervalMobile.toString()).onChange((async e=>{this.plugin.settings.autosaveIntervalMobile=parseInt(e),this.plugin.settings.autosaveInterval=app.isMobile?this.plugin.settings.autosaveIntervalMobile:this.plugin.settings.autosaveIntervalDesktop,this.applySettingsUpdate()})))),this.containerEl.createEl("h1",{text:t$d("FILENAME_HEAD")}),t.createDiv("",(e=>{e.innerHTML=t$d("FILENAME_DESC")}));const i=()=>`${t$d("FILENAME_SAMPLE")}<a href='https://www.youtube.com/channel/UCC0gns4a9fhVkGkngvSumAQ' target='_blank'>${getDrawingFilename(this.plugin.settings)}</a></b><br>${t$d("FILENAME_EMBED_SAMPLE")}<a href='https://www.youtube.com/channel/UCC0gns4a9fhVkGkngvSumAQ' target='_blank'>${getEmbedFilename("{NOTE_NAME}",this.plugin.settings)}</a></b>`,n=t.createEl("p",{text:""});let a,r,s,o,l,c,d;n.innerHTML=i(),new obsidian_module.Setting(t).setName(t$d("FILENAME_PREFIX_NAME")).setDesc(fragWithHTML(t$d("FILENAME_PREFIX_DESC"))).addText((e=>e.setPlaceholder("Drawing ").setValue(this.plugin.settings.drawingFilenamePrefix).onChange((async t=>{this.plugin.settings.drawingFilenamePrefix=t.replaceAll(/[<>:"/\\|?*]/g,"_"),e.setValue(this.plugin.settings.drawingFilenamePrefix),n.innerHTML=i(),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FILENAME_PREFIX_EMBED_NAME")).setDesc(fragWithHTML(t$d("FILENAME_PREFIX_EMBED_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.drawingEmbedPrefixWithFilename).onChange((async e=>{this.plugin.settings.drawingEmbedPrefixWithFilename=e,n.innerHTML=i(),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FILENAME_POSTFIX_NAME")).setDesc(fragWithHTML(t$d("FILENAME_POSTFIX_DESC"))).addText((e=>e.setPlaceholder("").setValue(this.plugin.settings.drawingFilnameEmbedPostfix).onChange((async t=>{this.plugin.settings.drawingFilnameEmbedPostfix=t.replaceAll(/[<>:"/\\|?*]/g,"_"),e.setValue(this.plugin.settings.drawingFilnameEmbedPostfix),n.innerHTML=i(),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FILENAME_DATE_NAME")).setDesc(fragWithHTML(t$d("FILENAME_DATE_DESC"))).addText((e=>e.setPlaceholder("YYYY-MM-DD HH.mm.ss").setValue(this.plugin.settings.drawingFilenameDateTime).onChange((async t=>{this.plugin.settings.drawingFilenameDateTime=t.replaceAll(/[<>:"/\\|?*]/g,"_"),e.setValue(this.plugin.settings.drawingFilenameDateTime),n.innerHTML=i(),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FILENAME_EXCALIDRAW_EXTENSION_NAME")).setDesc(fragWithHTML(t$d("FILENAME_EXCALIDRAW_EXTENSION_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.useExcalidrawExtension).onChange((async e=>{this.plugin.settings.useExcalidrawExtension=e,n.innerHTML=i(),this.applySettingsUpdate()})))),this.containerEl.createEl("h1",{text:t$d("DISPLAY_HEAD")}),new obsidian_module.Setting(t).setName(t$d("DYNAMICSTYLE_NAME")).setDesc(fragWithHTML(t$d("DYNAMICSTYLE_DESC"))).addDropdown((e=>e.addOption("none","Dynamic Styling OFF").addOption("colorful","Match color").addOption("gray","Gray, match tone").setValue(this.plugin.settings.dynamicStyling).onChange((async e=>{this.requestUpdateDynamicStyling=!0,this.plugin.settings.dynamicStyling=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("LEFTHANDED_MODE_NAME")).setDesc(fragWithHTML(t$d("LEFTHANDED_MODE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.isLeftHanded).onChange((async e=>{this.plugin.settings.isLeftHanded=e,setLeftHandedMode(e),setTimeout((()=>setLeftHandedMode(e))),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("IFRAME_MATCH_THEME_NAME")).setDesc(fragWithHTML(t$d("IFRAME_MATCH_THEME_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.iframeMatchExcalidrawTheme).onChange((async e=>{this.plugin.settings.iframeMatchExcalidrawTheme=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("MATCH_THEME_NAME")).setDesc(fragWithHTML(t$d("MATCH_THEME_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.matchTheme).onChange((async e=>{this.plugin.settings.matchTheme=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("MATCH_THEME_ALWAYS_NAME")).setDesc(fragWithHTML(t$d("MATCH_THEME_ALWAYS_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.matchThemeAlways).onChange((async e=>{this.plugin.settings.matchThemeAlways=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("MATCH_THEME_TRIGGER_NAME")).setDesc(fragWithHTML(t$d("MATCH_THEME_TRIGGER_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.matchThemeTrigger).onChange((async e=>{this.plugin.settings.matchThemeTrigger=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("DEFAULT_OPEN_MODE_NAME")).setDesc(fragWithHTML(t$d("DEFAULT_OPEN_MODE_DESC"))).addDropdown((e=>e.addOption("normal","Always in normal-mode").addOption("zen","Always in zen-mode").addOption("view","Always in view-mode").addOption("view-mobile","Usually normal, but view-mode on Phone").setValue(this.plugin.settings.defaultMode).onChange((async e=>{this.plugin.settings.defaultMode=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("DEFAULT_PEN_MODE_NAME")).setDesc(fragWithHTML(t$d("DEFAULT_PEN_MODE_DESC"))).addDropdown((e=>e.addOption("never","Never").addOption("mobile","On Obsidian Mobile").addOption("always","Always").setValue(this.plugin.settings.defaultPenMode).onChange((async e=>{this.plugin.settings.defaultPenMode=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("DEFAULT_PINCHZOOM_NAME")).setDesc(fragWithHTML(t$d("DEFAULT_PINCHZOOM_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.allowPinchZoom).onChange((async e=>{this.plugin.settings.allowPinchZoom=e,app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&e.view.updatePinchZoom()})),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("DEFAULT_WHEELZOOM_NAME")).setDesc(fragWithHTML(t$d("DEFAULT_WHEELZOOM_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.allowWheelZoom).onChange((async e=>{this.plugin.settings.allowWheelZoom=e,app.workspace.getLeavesOfType("excalidraw").forEach((e=>{e.view instanceof ExcalidrawView&&e.view.updateWheelZoom()})),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("ZOOM_TO_FIT_ONOPEN_NAME")).setDesc(fragWithHTML(t$d("ZOOM_TO_FIT_ONOPEN_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.zoomToFitOnOpen).onChange((async e=>{this.plugin.settings.zoomToFitOnOpen=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("ZOOM_TO_FIT_NAME")).setDesc(fragWithHTML(t$d("ZOOM_TO_FIT_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.zoomToFitOnResize).onChange((async e=>{this.plugin.settings.zoomToFitOnResize=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("ZOOM_TO_FIT_MAX_LEVEL_NAME")).setDesc(fragWithHTML(t$d("ZOOM_TO_FIT_MAX_LEVEL_DESC"))).addSlider((e=>e.setLimits(.5,10,.5).setValue(this.plugin.settings.zoomToFitMaxLevel).onChange((async e=>{a.innerText=` ${e.toString()}`,this.plugin.settings.zoomToFitMaxLevel=e,this.applySettingsUpdate()})))).settingEl.createDiv("",(e=>{a=e,e.style.minWidth="2.3em",e.style.textAlign="right",e.innerText=` ${this.plugin.settings.zoomToFitMaxLevel.toString()}`})),this.containerEl.createEl("h1",{text:t$d("LINKS_HEAD")}),this.containerEl.createEl("span",void 0,(e=>e.innerHTML=t$d("LINKS_DESC"))),new obsidian_module.Setting(t).setName(t$d("ADJACENT_PANE_NAME")).setDesc(fragWithHTML(t$d("ADJACENT_PANE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.openInAdjacentPane).onChange((async e=>{this.plugin.settings.openInAdjacentPane=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("MAINWORKSPACE_PANE_NAME")).setDesc(fragWithHTML(t$d("MAINWORKSPACE_PANE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.openInMainWorkspace).onChange((async e=>{this.plugin.settings.openInMainWorkspace=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(fragWithHTML(t$d("LINK_BRACKETS_NAME"))).setDesc(fragWithHTML(t$d("LINK_BRACKETS_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.showLinkBrackets).onChange((e=>{this.plugin.settings.showLinkBrackets=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("LINK_PREFIX_NAME")).setDesc(fragWithHTML(t$d("LINK_PREFIX_DESC"))).addText((e=>e.setPlaceholder(t$d("INSERT_EMOJI")).setValue(this.plugin.settings.linkPrefix).onChange((e=>{this.plugin.settings.linkPrefix=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("URL_PREFIX_NAME")).setDesc(fragWithHTML(t$d("URL_PREFIX_DESC"))).addText((e=>e.setPlaceholder(t$d("INSERT_EMOJI")).setValue(this.plugin.settings.urlPrefix).onChange((e=>{this.plugin.settings.urlPrefix=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("PARSE_TODO_NAME")).setDesc(fragWithHTML(t$d("PARSE_TODO_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.parseTODO).onChange((e=>{this.plugin.settings.parseTODO=e,r.setDisabled(!e),s.setDisabled(!e),this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("TODO_NAME")).setDesc(fragWithHTML(t$d("TODO_DESC"))).addText((e=>{r=e,e.setPlaceholder(t$d("INSERT_EMOJI")).setValue(this.plugin.settings.todo).onChange((e=>{this.plugin.settings.todo=e,this.applySettingsUpdate(!0)}))})),r.setDisabled(!this.plugin.settings.parseTODO),new obsidian_module.Setting(t).setName(t$d("DONE_NAME")).setDesc(fragWithHTML(t$d("DONE_DESC"))).setDisabled(!this.plugin.settings.parseTODO).addText((e=>{s=e,e.setPlaceholder(t$d("INSERT_EMOJI")).setValue(this.plugin.settings.done).onChange((e=>{this.plugin.settings.done=e,this.applySettingsUpdate(!0)}))})),s.setDisabled(!this.plugin.settings.parseTODO),new obsidian_module.Setting(t).setName(t$d("LINKOPACITY_NAME")).setDesc(fragWithHTML(t$d("LINKOPACITY_DESC"))).addSlider((e=>e.setLimits(0,1,.05).setValue(this.plugin.settings.linkOpacity).onChange((async e=>{o.innerText=` ${e.toString()}`,this.plugin.settings.linkOpacity=e,this.applySettingsUpdate(!0)})))).settingEl.createDiv("",(e=>{o=e,e.style.minWidth="2.3em",e.style.textAlign="right",e.innerText=` ${this.plugin.settings.linkOpacity.toString()}`})),new obsidian_module.Setting(t).setName(t$d("HOVERPREVIEW_NAME")).setDesc(fragWithHTML(t$d("HOVERPREVIEW_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.hoverPreviewWithoutCTRL).onChange((async e=>{this.plugin.settings.hoverPreviewWithoutCTRL=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("LINK_CTRL_CLICK_NAME")).setDesc(fragWithHTML(t$d("LINK_CTRL_CLICK_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.allowCtrlClick).onChange((async e=>{this.plugin.settings.allowCtrlClick=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("TRANSCLUSION_WRAP_NAME")).setDesc(fragWithHTML(t$d("TRANSCLUSION_WRAP_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.forceWrap).onChange((async e=>{this.plugin.settings.forceWrap=e,this.applySettingsUpdate(!0)})))).descEl.innerHTML=`<code>![[doc#^ref]]{number}</code> ${t$d("TRANSCLUSION_WRAP_DESC")}`,new obsidian_module.Setting(t).setName(t$d("PAGE_TRANSCLUSION_CHARCOUNT_NAME")).setDesc(fragWithHTML(t$d("PAGE_TRANSCLUSION_CHARCOUNT_DESC"))).addText((e=>e.setPlaceholder("Enter a number").setValue(this.plugin.settings.pageTransclusionCharLimit.toString()).onChange((async t=>{const A=parseInt(t);if(isNaN(A)&&""!==t)e.setValue(this.plugin.settings.pageTransclusionCharLimit.toString());else{if(this.requestEmbedUpdate=!0,""===t)return this.plugin.settings.pageTransclusionCharLimit=10,void this.applySettingsUpdate(!0);this.plugin.settings.pageTransclusionCharLimit=A,e.setValue(this.plugin.settings.pageTransclusionCharLimit.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(t).setName(t$d("TRANSCLUSION_DEFAULT_WRAP_NAME")).setDesc(fragWithHTML(t$d("TRANSCLUSION_DEFAULT_WRAP_DESC"))).addText((e=>e.setPlaceholder("Enter a number").setValue(this.plugin.settings.wordWrappingDefault.toString()).onChange((async t=>{const A=parseInt(t);if(isNaN(A)&&""!==t)e.setValue(this.plugin.settings.wordWrappingDefault.toString());else{if(this.requestEmbedUpdate=!0,""===t)return this.plugin.settings.wordWrappingDefault=0,void this.applySettingsUpdate(!0);this.plugin.settings.wordWrappingDefault=A,e.setValue(this.plugin.settings.wordWrappingDefault.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(t).setName(t$d("QUOTE_TRANSCLUSION_REMOVE_NAME")).setDesc(fragWithHTML(t$d("QUOTE_TRANSCLUSION_REMOVE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.removeTransclusionQuoteSigns).onChange((e=>{this.plugin.settings.removeTransclusionQuoteSigns=e,this.requestEmbedUpdate=!0,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("GET_URL_TITLE_NAME")).setDesc(fragWithHTML(t$d("GET_URL_TITLE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.iframelyAllowed).onChange((async e=>{this.plugin.settings.iframelyAllowed=e,this.applySettingsUpdate()})))),this.containerEl.createEl("h1",{text:t$d("MD_HEAD")}),this.containerEl.createEl("p",{text:t$d("MD_HEAD_DESC")}),new obsidian_module.Setting(t).setName(t$d("MD_TRANSCLUDE_WIDTH_NAME")).setDesc(fragWithHTML(t$d("MD_TRANSCLUDE_WIDTH_DESC"))).addText((e=>e.setPlaceholder("Enter a number e.g. 500").setValue(this.plugin.settings.mdSVGwidth.toString()).onChange((async t=>{const A=parseInt(t);if(isNaN(A)&&""!==t)e.setValue(this.plugin.settings.mdSVGwidth.toString());else{if(this.requestEmbedUpdate=!0,""===t)return this.plugin.settings.mdSVGwidth=500,void this.applySettingsUpdate(!0);this.plugin.settings.mdSVGwidth=A,this.requestReloadDrawings=!0,e.setValue(this.plugin.settings.mdSVGwidth.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(t).setName(t$d("MD_TRANSCLUDE_HEIGHT_NAME")).setDesc(fragWithHTML(t$d("MD_TRANSCLUDE_HEIGHT_DESC"))).addText((e=>e.setPlaceholder("Enter a number e.g. 800").setValue(this.plugin.settings.mdSVGmaxHeight.toString()).onChange((async t=>{const A=parseInt(t);if(isNaN(A)&&""!==t)e.setValue(this.plugin.settings.mdSVGmaxHeight.toString());else{if(this.requestEmbedUpdate=!0,""===t)return this.plugin.settings.mdSVGmaxHeight=800,void this.applySettingsUpdate(!0);this.plugin.settings.mdSVGmaxHeight=A,this.requestReloadDrawings=!0,e.setValue(this.plugin.settings.mdSVGmaxHeight.toString()),this.applySettingsUpdate(!0)}})))),new obsidian_module.Setting(t).setName(t$d("MD_DEFAULT_FONT_NAME")).setDesc(fragWithHTML(t$d("MD_DEFAULT_FONT_DESC"))).addDropdown((async e=>{e.addOption("Virgil","Virgil"),e.addOption("Cascadia","Cascadia"),this.app.vault.getFiles().filter((e=>["ttf","woff","woff2"].contains(e.extension))).forEach((t=>{e.addOption(t.path,t.name)})),e.setValue(this.plugin.settings.mdFont).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdFont=e,this.applySettingsUpdate(!0)}))})),new obsidian_module.Setting(t).setName(t$d("MD_DEFAULT_COLOR_NAME")).setDesc(fragWithHTML(t$d("MD_DEFAULT_COLOR_DESC"))).addText((e=>e.setPlaceholder("CSS Color-name|RGB-HEX").setValue(this.plugin.settings.mdFontColor).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdFontColor=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("MD_DEFAULT_BORDER_COLOR_NAME")).setDesc(fragWithHTML(t$d("MD_DEFAULT_BORDER_COLOR_DESC"))).addText((e=>e.setPlaceholder("CSS Color-name|RGB-HEX").setValue(this.plugin.settings.mdBorderColor).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdBorderColor=e,this.applySettingsUpdate(!0)})))),new obsidian_module.Setting(t).setName(t$d("MD_CSS_NAME")).setDesc(fragWithHTML(t$d("MD_CSS_DESC"))).addText((e=>e.setPlaceholder("filename of css file in vault").setValue(this.plugin.settings.mdCSS).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.mdCSS=e,this.applySettingsUpdate(!0)})))),this.containerEl.createEl("h1",{text:t$d("EMBED_HEAD")}),new obsidian_module.Setting(t).setName(t$d("EMBED_IMAGE_CACHE_NAME")).setDesc(fragWithHTML(t$d("EMBED_IMAGE_CACHE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.allowImageCache).onChange((e=>{this.plugin.settings.allowImageCache=e,this.applySettingsUpdate()})))).addButton((e=>e.setButtonText(t$d("EMBED_IMAGE_CACHE_CLEAR")).onClick((()=>{imageCache.clearImageCache()})))).addButton((e=>e.setButtonText(t$d("BACKUP_CACHE_CLEAR")).onClick((()=>{new ConfirmationPrompt(this.plugin,t$d("BACKUP_CACHE_CLEAR_CONFIRMATION")).waitForClose.then((e=>{e&&imageCache.clearBackupCache()}))})))),new obsidian_module.Setting(t).setName(t$d("EMBED_PREVIEW_SVG_NAME")).setDesc(fragWithHTML(t$d("EMBED_PREVIEW_SVG_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.displaySVGInPreview).onChange((async e=>{this.plugin.settings.displaySVGInPreview=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("EMBED_REUSE_EXPORTED_IMAGE_NAME")).setDesc(fragWithHTML(t$d("EMBED_REUSE_EXPORTED_IMAGE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.displayExportedImageIfAvailable).onChange((async e=>{this.plugin.settings.displayExportedImageIfAvailable=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("PREVIEW_MATCH_OBSIDIAN_NAME")).setDesc(fragWithHTML(t$d("PREVIEW_MATCH_OBSIDIAN_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.previewMatchObsidianTheme).onChange((async e=>{this.plugin.settings.previewMatchObsidianTheme=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("EMBED_WIDTH_NAME")).setDesc(fragWithHTML(t$d("EMBED_WIDTH_DESC"))).addText((e=>e.setPlaceholder("400").setValue(this.plugin.settings.width).onChange((async e=>{this.plugin.settings.width=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),new obsidian_module.Setting(t).setName(t$d("EMBED_TYPE_NAME")).setDesc(fragWithHTML(t$d("EMBED_TYPE_DESC"))).addDropdown((async e=>{l=e,l.addOption("excalidraw","excalidraw"),this.plugin.settings.autoexportPNG?l.addOption("PNG","PNG"):"PNG"===this.plugin.settings.embedType&&(this.plugin.settings.embedType="excalidraw",this.applySettingsUpdate()),this.plugin.settings.autoexportSVG?l.addOption("SVG","SVG"):"SVG"===this.plugin.settings.embedType&&(this.plugin.settings.embedType="excalidraw",this.applySettingsUpdate()),l.setValue(this.plugin.settings.embedType).onChange((async e=>{this.plugin.settings.embedType=e,this.applySettingsUpdate()}))})),new obsidian_module.Setting(t).setName(t$d("EMBED_WIKILINK_NAME")).setDesc(fragWithHTML(t$d("EMBED_WIKILINK_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.embedWikiLink).onChange((async e=>{this.plugin.settings.embedWikiLink=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("EXPORT_PNG_SCALE_NAME")).setDesc(fragWithHTML(t$d("EXPORT_PNG_SCALE_DESC"))).addSlider((e=>e.setLimits(1,5,.5).setValue(this.plugin.settings.pngExportScale).onChange((async e=>{c.innerText=` ${e.toString()}`,this.plugin.settings.pngExportScale=e,this.applySettingsUpdate()})))).settingEl.createDiv("",(e=>{c=e,e.style.minWidth="2.3em",e.style.textAlign="right",e.innerText=` ${this.plugin.settings.pngExportScale.toString()}`})),new obsidian_module.Setting(t).setName(t$d("EXPORT_BACKGROUND_NAME")).setDesc(fragWithHTML(t$d("EXPORT_BACKGROUND_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.exportWithBackground).onChange((async e=>{this.plugin.settings.exportWithBackground=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),new obsidian_module.Setting(t).setName(t$d("EXPORT_PADDING_NAME")).setDesc(fragWithHTML(t$d("EXPORT_PADDING_DESC"))).addSlider((e=>e.setLimits(0,50,5).setValue(this.plugin.settings.exportPaddingSVG).onChange((async e=>{d.innerText=` ${e.toString()}`,this.plugin.settings.exportPaddingSVG=e,this.applySettingsUpdate()})))).settingEl.createDiv("",(e=>{d=e,e.style.minWidth="2.3em",e.style.textAlign="right",e.innerText=` ${this.plugin.settings.exportPaddingSVG.toString()}`})),new obsidian_module.Setting(t).setName(t$d("EXPORT_THEME_NAME")).setDesc(fragWithHTML(t$d("EXPORT_THEME_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.exportWithTheme).onChange((async e=>{this.plugin.settings.exportWithTheme=e,this.applySettingsUpdate(),this.requestEmbedUpdate=!0})))),this.containerEl.createEl("h1",{text:t$d("EXPORT_HEAD")}),new obsidian_module.Setting(t).setName(t$d("EXPORT_SYNC_NAME")).setDesc(fragWithHTML(t$d("EXPORT_SYNC_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.keepInSync).onChange((async e=>{this.plugin.settings.keepInSync=e,this.applySettingsUpdate()}))));const h=e=>{let t=0;for(t=0;t<l.selectEl.options.length;t++)l.selectEl.item(t).label===e&&l.selectEl.item(t).remove()};let u;new obsidian_module.Setting(t).setName(t$d("EXPORT_SVG_NAME")).setDesc(fragWithHTML(t$d("EXPORT_SVG_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.autoexportSVG).onChange((async e=>{e?l.addOption("SVG","SVG"):("SVG"===this.plugin.settings.embedType&&(l.setValue("excalidraw"),this.plugin.settings.embedType="excalidraw"),h("SVG")),this.plugin.settings.autoexportSVG=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("EXPORT_PNG_NAME")).setDesc(fragWithHTML(t$d("EXPORT_PNG_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.autoexportPNG).onChange((async e=>{e?l.addOption("PNG","PNG"):("PNG"===this.plugin.settings.embedType&&(l.setValue("excalidraw"),this.plugin.settings.embedType="excalidraw"),h("PNG")),this.plugin.settings.autoexportPNG=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("EXPORT_BOTH_DARK_AND_LIGHT_NAME")).setDesc(fragWithHTML(t$d("EXPORT_BOTH_DARK_AND_LIGHT_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.autoExportLightAndDark).onChange((async e=>{this.plugin.settings.autoExportLightAndDark=e,this.applySettingsUpdate()})))),this.containerEl.createEl("h1",{text:t$d("COMPATIBILITY_HEAD")}),new obsidian_module.Setting(t).setName(t$d("COMPATIBILITY_MODE_NAME")).setDesc(fragWithHTML(t$d("COMPATIBILITY_MODE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.compatibilityMode).onChange((async e=>{this.plugin.settings.compatibilityMode=e,n.innerHTML=i(),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("EXPORT_EXCALIDRAW_NAME")).setDesc(fragWithHTML(t$d("EXPORT_EXCALIDRAW_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.autoexportExcalidraw).onChange((async e=>{this.plugin.settings.autoexportExcalidraw=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("SYNC_EXCALIDRAW_NAME")).setDesc(fragWithHTML(t$d("SYNC_EXCALIDRAW_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.syncExcalidraw).onChange((async e=>{this.plugin.settings.syncExcalidraw=e,this.applySettingsUpdate()})))),this.containerEl.createEl("h1",{text:t$d("NONSTANDARD_HEAD")}),this.containerEl.createEl("p",{text:t$d("NONSTANDARD_DESC")}),new obsidian_module.Setting(t).setName(t$d("CUSTOM_PEN_NAME")).setDesc(t$d("CUSTOM_PEN_DESC")).addDropdown((e=>e.addOption("0","0").addOption("1","1").addOption("2","2").addOption("3","3").addOption("4","4").addOption("5","5").addOption("6","6").addOption("7","7").addOption("8","8").addOption("9","9").addOption("10","10").setValue(this.plugin.settings.numberOfCustomPens.toString()).onChange((e=>{this.plugin.settings.numberOfCustomPens=parseInt(e),this.requestUpdatePinnedPens=!0,this.applySettingsUpdate(!1)})))),new obsidian_module.Setting(t).setName(t$d("ENABLE_FOURTH_FONT_NAME")).setDesc(fragWithHTML(t$d("ENABLE_FOURTH_FONT_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.experimentalEnableFourthFont).onChange((async e=>{this.requestReloadDrawings=!0,this.plugin.settings.experimentalEnableFourthFont=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FOURTH_FONT_NAME")).setDesc(fragWithHTML(t$d("FOURTH_FONT_DESC"))).addDropdown((async e=>{e.addOption("Virgil","Virgil"),this.app.vault.getFiles().filter((e=>["ttf","woff","woff2"].contains(e.extension))).forEach((t=>{e.addOption(t.path,t.name)})),e.setValue(this.plugin.settings.experimantalFourthFont).onChange((e=>{this.requestReloadDrawings=!0,this.plugin.settings.experimantalFourthFont=e,this.applySettingsUpdate(!0),this.plugin.initializeFourthFont()}))})),this.containerEl.createEl("h1",{text:t$d("EXPERIMENTAL_HEAD")}),this.containerEl.createEl("p",{text:t$d("EXPERIMENTAL_DESC")}),new obsidian_module.Setting(t).setName(t$d("MATHJAX_NAME")).setDesc(t$d("MATHJAX_DESC")).addDropdown((e=>{e.addOption("https://cdn.jsdelivr.net/npm/mathjax@3.2.1/es5/tex-svg.js","jsdelivr").addOption("https://unpkg.com/mathjax@3.2.1/es5/tex-svg.js","unpkg").addOption("https://cdnjs.cloudflare.com/ajax/libs/mathjax/3.2.1/es5/tex-svg-full.min.js","cdnjs").setValue(this.plugin.settings.mathjaxSourceURL).onChange((e=>{this.plugin.settings.mathjaxSourceURL=e,this.reloadMathJax=!0,this.applySettingsUpdate()}))})),new obsidian_module.Setting(t).setName(t$d("LATEX_DEFAULT_NAME")).setDesc(fragWithHTML(t$d("LATEX_DEFAULT_DESC"))).addText((e=>e.setValue(this.plugin.settings.latexBoilerplate).onChange((e=>{this.plugin.settings.latexBoilerplate=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FIELD_SUGGESTER_NAME")).setDesc(fragWithHTML(t$d("FIELD_SUGGESTER_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.fieldSuggester).onChange((async e=>{this.plugin.settings.fieldSuggester=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FILETYPE_NAME")).setDesc(fragWithHTML(t$d("FILETYPE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.experimentalFileType).onChange((async e=>{this.plugin.settings.experimentalFileType=e,this.plugin.experimentalFileTypeDisplayToggle(e),this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("FILETAG_NAME")).setDesc(fragWithHTML(t$d("FILETAG_DESC"))).addText((e=>e.setPlaceholder(t$d("INSERT_EMOJI")).setValue(this.plugin.settings.experimentalFileTag).onChange((async e=>{this.plugin.settings.experimentalFileTag=e,this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("LIVEPREVIEW_NAME")).setDesc(fragWithHTML(t$d("LIVEPREVIEW_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.experimentalLivePreview).onChange((async e=>{this.plugin.settings.experimentalLivePreview=e,this.applySettingsUpdate()})))),this.containerEl.createEl("h2",{text:t$d("TASKBONE_HEAD")}),this.containerEl.createEl("p",{text:t$d("TASKBONE_DESC")}),new obsidian_module.Setting(t).setName(t$d("TASKBONE_ENABLE_NAME")).setDesc(fragWithHTML(t$d("TASKBONE_ENABLE_DESC"))).addToggle((e=>e.setValue(this.plugin.settings.taskboneEnabled).onChange((async e=>{if(u.setDisabled(!e),this.plugin.settings.taskboneEnabled=e,""===this.plugin.settings.taskboneAPIkey){const e=await this.plugin.taskbone.initialize(!1);e&&u.setValue(e)}this.applySettingsUpdate()})))),new obsidian_module.Setting(t).setName(t$d("TASKBONE_APIKEY_NAME")).setDesc(fragWithHTML(t$d("TASKBONE_APIKEY_DESC"))).addText((e=>{u=e,u.setValue(this.plugin.settings.taskboneAPIkey).onChange((async e=>{this.plugin.settings.taskboneAPIkey=e,this.applySettingsUpdate()})).setDisabled(!this.plugin.settings.taskboneEnabled)}));const g=null===(e=this.plugin.scriptEngine.getListofScripts())||void 0===e?void 0:e.map((e=>this.plugin.scriptEngine.getScriptName(e)));if(Object.keys(this.plugin.settings.scriptEngineSettings).length>0&&g){const e=(e,t)=>{const A=this.plugin.settings.scriptEngineSettings[e][t];return"object"==typeof A?A.height:null},A=(e,t)=>{const A=this.plugin.settings.scriptEngineSettings[e][t];return"object"==typeof A?A.value:A},i=(e,t,A)=>{"object"==typeof this.plugin.settings.scriptEngineSettings[e][t]?this.plugin.settings.scriptEngineSettings[e][t].value=A:this.plugin.settings.scriptEngineSettings[e][t]=A},n=(e,n,a)=>{new obsidian_module.Setting(t).setName(n).setDesc(fragWithHTML(null!=a?a:"")).addToggle((t=>t.setValue(A(e,n)).onChange((async t=>{i(e,n,t),this.applySettingsUpdate()}))))},a=(n,a,r,s)=>{s&&"[object Array]"===Object.prototype.toString.call(s)&&s.length>0?new obsidian_module.Setting(t).setName(a).setDesc(fragWithHTML(null!=r?r:"")).addDropdown((e=>{s.forEach((t=>e.addOption(t.toString(),t.toString()))),e.setValue(A(n,a)).onChange((async e=>{i(n,a,e),this.applySettingsUpdate()}))})):e(n,a)?new obsidian_module.Setting(t).setName(a).setDesc(fragWithHTML(null!=r?r:"")).addTextArea((t=>{t.inputEl.style.minHeight=e(n,a),t.inputEl.style.minWidth="400px",t.setValue(A(n,a)).onChange((async e=>{i(n,a,e),this.applySettingsUpdate()}))})):new obsidian_module.Setting(t).setName(a).setDesc(fragWithHTML(null!=r?r:"")).addText((e=>e.setValue(A(n,a)).onChange((async e=>{i(n,a,e),this.applySettingsUpdate()}))))},r=(e,n,a)=>{new obsidian_module.Setting(t).setName(n).setDesc(fragWithHTML(null!=a?a:"")).addText((t=>t.setPlaceholder("Enter a number").setValue(A(e,n).toString()).onChange((async a=>{const r=parseFloat(a);isNaN(r)&&""!==a?t.setValue(A(e,n).toString()):(i(e,n,isNaN(r)?0:r),this.applySettingsUpdate())}))))};this.containerEl.createEl("h1",{text:t$d("SCRIPT_SETTINGS_HEAD")}),Object.keys(this.plugin.settings.scriptEngineSettings).filter((e=>g.contains(e))).forEach((e=>{const t=this.plugin.settings.scriptEngineSettings[e],A=Object.values(t);0===A.length||A.length>0&&0===A.map((e=>e.hidden?0:1)).reduce(((e,t)=>e+t))||(this.containerEl.createEl("h3",{text:e}),Object.keys(t).forEach((A=>{var i;const s=t[A];switch(typeof(null!==(i=s.value)&&void 0!==i?i:s)){case"boolean":s.hidden||n(e,A,s.description);break;case"string":s.hidden||a(e,A,s.description,s.valueset);break;case"number":s.hidden||r(e,A,s.description)}})))}))}}}var openDialogAction;!function(e){e[e.openFile=0]="openFile",e[e.insertLinkToDrawing=1]="insertLinkToDrawing"}(openDialogAction||(openDialogAction={}));class OpenFileDialog extends obsidian_module.FuzzySuggestModal{constructor(e,t){super(e),this.app=e,this.action=openDialogAction.openFile,this.plugin=t,this.onNewPane=!1,this.limit=20,this.setInstructions([{command:t$d("TYPE_FILENAME"),purpose:""}]),this.inputEl.onkeyup=e=>{"Enter"==e.key&&this.action==openDialogAction.openFile&&this.containerEl.innerText.includes(EMPTY_MESSAGE)&&(this.plugin.createAndOpenDrawing(`${this.plugin.settings.folder}/${this.inputEl.value}.excalidraw.md`,this.onNewPane?"new-pane":"active-pane"),this.close())}}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>this.plugin.isExcalidrawFile(e)))}getItemText(e){return e.path}onChooseItem(e){switch(this.action){case openDialogAction.openFile:this.plugin.openDrawing(e,this.onNewPane?"new-pane":"active-pane",!0);break;case openDialogAction.insertLinkToDrawing:this.plugin.embedDrawing(e)}}start(e,t){switch(this.action=e,this.onNewPane=t,e){case openDialogAction.openFile:this.emptyStateText=EMPTY_MESSAGE,this.setPlaceholder(t$d("SELECT_FILE_OR_TYPE_NEW"));break;case openDialogAction.insertLinkToDrawing:this.emptyStateText=t$d("NO_MATCH"),this.setPlaceholder(t$d("SELECT_TO_EMBED"))}this.open()}}class InsertLinkDialog extends obsidian_module.FuzzySuggestModal{constructor(e){super(e),this.app=e,this.limit=20,this.setInstructions([{command:t$d("SELECT_FILE"),purpose:""}]),this.setPlaceholder(t$d("SELECT_FILE_TO_LINK")),this.emptyStateText=t$d("NO_MATCH")}getItems(){return this.app.metadataCache.getLinkSuggestions().filter((e=>!e.path.match(REG_LINKINDEX_INVALIDCHARS)))}getItemText(e){return e.path+(e.alias?`|${e.alias}`:"")}onChooseItem(e){let t=e.path;e.file&&(t=this.app.metadataCache.fileToLinktext(e.file,this.drawingPath,!0)),this.addText(`[[${t+(e.alias?`|${e.alias}`:"")}]]`)}start(e,t){this.addText=t,this.drawingPath=e,this.open()}}class InsertImageDialog extends obsidian_module.FuzzySuggestModal{constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d("SELECT_FILE_WITH_OPTION_TO_SCALE"),purpose:""}]),this.setPlaceholder(t$d("SELECT_DRAWING")),this.emptyStateText=t$d("NO_MATCH"),this.inputEl.onkeyup=e=>{"Enter"===e.key&&scaleToFullsizeModifier(e)&&this.chooser.values&&(this.onChooseItem(this.chooser.values[this.chooser.selectedItem].item,new KeyboardEvent("keypress",{shiftKey:!0,metaKey:!(DEVICE.isIOS||DEVICE.isMacOS),ctrlKey:DEVICE.isIOS||DEVICE.isMacOS})),this.close())}}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>(IMAGE_TYPES.contains(e.extension)||this.plugin.isExcalidrawFile(e))&&!e.path.match(REG_LINKINDEX_INVALIDCHARS)))}getItemText(e){return e.path}onChooseItem(e,t){const A=this.plugin.ea.getAPI(this.view);A.canvas.theme=this.view.excalidrawAPI.getAppState().theme;const i=scaleToFullsizeModifier(t);(async()=>{await A.addImage(0,0,e,!i),A.addElementsToView(!0,!0,!0)})()}start(e){this.view=e,this.open()}}class ImportSVGDialog extends obsidian_module.FuzzySuggestModal{constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d("SELECT_FILE"),purpose:""}]),this.setPlaceholder(t$d("SELECT_DRAWING")),this.emptyStateText=t$d("NO_MATCH")}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>"svg"===e.extension&&!e.path.match(REG_LINKINDEX_INVALIDCHARS)))}getItemText(e){return e.path}async onChooseItem(e,t){if(!e)return;const A=this.plugin.ea;A.reset(),A.setView(this.view);const i=await app.vault.read(e);i&&""!==i&&(A.importSVG(i),A.addElementsToView(!0,!0,!0,!0))}start(e){this.view=e,this.open()}}class InsertMDDialog extends obsidian_module.FuzzySuggestModal{constructor(e){super(e.app),this.plugin=e,this.app=e.app,this.limit=20,this.setInstructions([{command:t$d("SELECT_FILE"),purpose:""}]),this.setPlaceholder(t$d("SELECT_MD")),this.emptyStateText=t$d("NO_MATCH")}getItems(){return(this.app.vault.getFiles()||[]).filter((e=>"md"===e.extension&&!this.plugin.isExcalidrawFile(e)))}getItemText(e){return e.path}onChooseItem(e){const t=this.plugin.ea;t.reset(),t.setView(this.view),(async()=>{await t.addImage(0,0,e),t.addElementsToView(!0,!1,!0)})()}start(e){this.view=e,this.open()}}function around(e,t){const A=Object.keys(t).map((A=>around1(e,A,t[A])));return 1===A.length?A[0]:function(){A.forEach((e=>e()))}}function around1(e,t,A){const i=e[t],n=e.hasOwnProperty(t);let a=A(i);return i&&Object.setPrototypeOf(a,i),Object.setPrototypeOf(r,a),e[t]=r,s;function r(...A){return a===i&&e[t]===r&&s(),a.apply(this,A)}function s(){e[t]===r&&(n?e[t]=i:delete e[t]),a!==i&&(a=i,Object.setPrototypeOf(r,i||Function))}}let plugin,vault,metadataCache;const getDefaultWidth=e=>{const t=parseInt(e.settings.width);return isNaN(t)||0===t||null===t?"400":e.settings.width},initializeMarkdownPostProcessor=e=>{plugin=e,vault=e.app.vault,metadataCache=e.app.metadataCache},getIMG=async(e,t=!1)=>{var A;let i=e.file;if(!e.file){const t=vault.getAbstractFileByPath(null===(A=e.fname)||void 0===A?void 0:A.split("#")[0]);if(!(t&&t instanceof obsidian_module.TFile))return null;i=t}const n=getEmbeddedFilenameParts(e.fname);e.style=e.style.replaceAll(" ","-");const a=hasExportTheme(plugin,i)?getExportTheme(plugin,i,"light"):void 0,r={withBackground:getWithBackground(plugin,i),withTheme:!!a||plugin.settings.exportWithTheme},s=createEl("img");let o=`max-width:${e.fwidth}${e.fwidth.match(/\d$/)?"px":""}; `;e.fheight&&(o+=`height:${e.fheight}px;`),t||s.setAttribute("style",o),s.addClass(e.style),s.addClass("excalidraw-embedded-img");const l=null!=a?a:plugin.settings.previewMatchObsidianTheme?isObsidianThemeDark()?"dark":"light":plugin.settings.exportWithTheme?void 0:"light";l&&(r.withTheme=!0);const c=new EmbeddedFilesLoader(plugin,l?"dark"===l:void 0),d=imageCache.isReady();if(!plugin.settings.displaySVGInPreview){const t=parseInt(e.fwidth),A=t>=2400?5:t>=1800?4:t>=1200?3:t>=600?2:1,a=Object.assign(Object.assign({},n),{isDark:"dark"===l,isSVG:!1,scale:A});if(d){const e=await imageCache.getImageFromCache(a);if(e)return s.src=e,s}const o=n.hasGroupref||n.hasFrameref?void 0:await getQuickImagePreview(plugin,i.path,"png"),h=null!=o?o:await createPNG(n.hasGroupref||n.hasFrameref?n.filepath+n.linkpartReference:i.path,A,r,c,l,null,null,[],plugin,0);return h?(s.src=URL.createObjectURL(h),d&&imageCache.addImageToCache(a,s.src,h),s):null}const h=Object.assign(Object.assign({},n),{isDark:"dark"===l,isSVG:!0,scale:1});if(d){const e=await imageCache.getImageFromCache(h);if(e)return s.setAttribute("src",e),s}let u=null;const g=document.createElement("div");if(!n.hasBlockref&&!n.hasSectionref){const e=await getQuickImagePreview(plugin,i.path,"svg");if(e){g.innerHTML=e;const t=g.firstChild;if(t instanceof SVGSVGElement&&(u=t),u)return addSVGToImgSrc(s,u,d,h)}}const p=(await createSVG(n.hasGroupref||n.hasBlockref||n.hasSectionref||n.hasFrameref?n.filepath+n.linkpartReference:i.path,!0,r,c,l,null,null,[],plugin,0,getExportPadding(plugin,i))).outerHTML;g.innerHTML=p;const m=g.firstChild;return m instanceof SVGSVGElement&&(u=m),u?(u=embedFontsInSVG(u,plugin),u.removeAttribute("width"),u.removeAttribute("height"),addSVGToImgSrc(s,u,d,h)):null},addSVGToImgSrc=(e,t,A,i)=>{const n=(new XMLSerializer).serializeToString(t),a=new Blob([n],{type:"image/svg+xml"}),r=URL.createObjectURL(a);return e.setAttribute("src",r),A&&imageCache.addImageToCache(i,r,a),e},createImgElement=async(e,t=!1)=>{const A=await getIMG(e,t);let i;A.setAttribute("fileSource",e.fname),e.fwidth&&A.setAttribute("w",e.fwidth),e.fheight&&A.setAttribute("h",e.fheight),A.setAttribute("draggable","false"),A.setAttribute("onCanvas",t?"true":"false");const n=e=>{if(e.target instanceof Element&&"img"!=e.target.tagName.toLowerCase())return;const t=A.getAttribute("fileSource");if(t){const A=t.match(/([^#]*)(.*)/);if(!A)return;plugin.openDrawing(vault.getAbstractFileByPath(A[1]),linkClickModifierType(e),!0,A[2])}};let a;return A.addEventListener("pointermove",(e=>{i&&(Math.abs(e.screenX-a.screenX)>10||Math.abs(e.screenY-a.screenY)>10)&&(clearTimeout(i),i=null)})),A.addEventListener("pointerdown",(e=>{var t;(null===(t=null==A?void 0:A.parentElement)||void 0===t?void 0:t.hasClass("canvas-node-content"))||(i=setTimeout((()=>n(e)),500),a=e)})),A.addEventListener("pointerup",(()=>{i&&clearTimeout(i),i=null})),A.addEventListener("dblclick",n),A.addEventListener(RERENDER_EVENT,(async e=>{e.stopPropagation();const t=A.parentElement,i=A.style.maxWidth,n=A.style.maxHeight,a=A.getAttribute("fileSource"),r="true"===A.getAttribute("onCanvas"),s=await createImgElement({fname:a,fwidth:A.getAttribute("w"),fheight:A.getAttribute("h"),style:A.getAttribute("class")},r);t.empty(),r||(s.style.maxHeight=n,s.style.maxWidth=i),s.setAttribute("fileSource",a),t.append(s)})),A},createImageDiv=async(e,t=!1)=>{const A=await createImgElement(e,t);return createDiv(e.style,(e=>e.append(A)))},processReadingMode=async(e,t)=>{var A;for(const i of e){const e=null===(A=i.getAttribute("src"))||void 0===A?void 0:A.split("#")[0];if(!e)continue;const n=metadataCache.getFirstLinkpathDest(e,t.sourcePath);if(n&&n instanceof obsidian_module.TFile&&plugin.isExcalidrawFile(n)){if(isTextOnlyEmbed(i))continue;i.parentElement.replaceChild(await processInternalEmbed(i,n),i)}}},processInternalEmbed=async(e,t)=>{const A={fname:"",fheight:"",fwidth:"",style:""},i=e.getAttribute("src");if(!i)return;e.removeClass("markdown-embed"),e.removeClass("inline-embed"),e.addClass("media-embed"),e.addClass("image-embed"),A.fwidth=e.getAttribute("width")?e.getAttribute("width"):getDefaultWidth(plugin),A.fheight=e.getAttribute("height");let n=e.getAttribute("alt");A.style="excalidraw-svg",processAltText(i.split("#")[0],n,A);const a=getEmbeddedFilenameParts(i);return A.fname=(null==t?void 0:t.path)+(a.hasBlockref||a.hasSectionref?a.linkpartReference:""),A.file=t,await createImageDiv(A)},processAltText=(e,t,A)=>{var i,n;if(t&&!t.startsWith(e)){const a=t.match(/[^\|\d]*\|?((\d*%?)x?(\d*%?))?\|?(.*)/);A.fwidth=null!==(i=a[2])&&void 0!==i?i:A.fwidth,A.fheight=null!==(n=a[3])&&void 0!==n?n:A.fheight,a[4]&&!a[4].startsWith(e)&&(A.style=`excalidraw-svg-${a[4]}`),a[4]&&""!==a[4]||a[2]&&""!==a[2]||!a[0]||""===a[0]||(A.style=`excalidraw-svg-${a[0]}`)}},isTextOnlyEmbed=e=>{const t=e.getAttribute("src");if(!t)return!0;const A=getEmbeddedFilenameParts(t);return!(A.hasArearef||A.hasGroupref||A.hasFrameref)&&(A.hasBlockref||A.hasSectionref)},tmpObsidianWYSIWYG=async(e,t)=>{const A=app.vault.getAbstractFileByPath(t.sourcePath);if(!(A instanceof obsidian_module.TFile))return;if(!plugin.isExcalidrawFile(A))return;if(t.remainingNestLevel<4)return;const i=t.containerEl;let n=i;for(;!n.hasClass("dataview")&&!n.hasClass("cm-preview-code-block")&&!n.hasClass("cm-embed-block")&&!n.hasClass("internal-embed")&&!n.hasClass("markdown-reading-view")&&!n.hasClass("markdown-embed")&&n.parentElement;)n=n.parentElement;if(n.hasClass("dataview")||n.hasClass("cm-preview-code-block")||n.hasClass("cm-embed-block"))return;const a={fname:t.sourcePath,fheight:"",fwidth:getDefaultWidth(plugin),style:"excalidraw-svg"};a.file=A;const r=n.hasClass("markdown-embed"),s=n.hasClass("markdown-reading-view");if(!n.hasClass("internal-embed")&&(r||s)){const t=Boolean(e.querySelector(".frontmatter"));if(e.empty(),!t)return void(e.parentElement===i&&i.removeChild(e));n.empty();const A=n.hasClass("canvas-node-content"),s=await createImageDiv(a,A);return r?(n.removeClass("markdown-embed"),n.removeClass("inline-embed"),n.addClass("media-embed"),n.addClass("image-embed"),!A&&s.firstChild instanceof HTMLElement&&(s.firstChild.style.maxHeight="100%",s.firstChild.style.maxWidth=null),void n.appendChild(s.firstChild)):void n.appendChild(s)}if(isTextOnlyEmbed(n))return;if(e.empty(),n.hasAttribute("ready"))return;n.setAttribute("ready",""),n.empty();const o=await processInternalEmbed(n,A);n.appendChild(o);let l=null;const c=new MutationObserver((e=>{var t;["alt","width","height"].contains(null===(t=e[0])||void 0===t?void 0:t.attributeName)&&(l&&clearTimeout(l),l=setTimeout((async()=>{l=null,n.empty();const e=await processInternalEmbed(n,A);n.appendChild(e)}),500))}));c.observe(n,{attributes:!0})},markdownPostProcessor=async(e,t)=>{var A;const i=e.querySelectorAll(".internal-embed");0!==i.length?Boolean(null===(A=t.frontmatter)||void 0===A?void 0:A.hasOwnProperty("excalidraw-plugin"))?e.style.display="none":await processReadingMode(i,t):tmpObsidianWYSIWYG(e,t)},hoverEvent=e=>{e.linktext?(plugin.hover.linkText=e.linktext,plugin.hover.sourcePath=e.sourcePath):plugin.hover.linkText=null},observer=new MutationObserver((async e=>{if(0==e.length)return;if(!plugin.hover.linkText)return;const t=metadataCache.getFirstLinkpathDest(plugin.hover.linkText,plugin.hover.sourcePath?plugin.hover.sourcePath:"");if(!t)return;if(!(t instanceof obsidian_module.TFile))return;if("excalidraw"!==t.extension)return;const A=getIMGFilename(t.path,"svg"),i=vault.getAbstractFileByPath(A);if(i&&i instanceof obsidian_module.TFile)return;const n=getIMGFilename(t.path,"png"),a=vault.getAbstractFileByPath(n);if(a&&a instanceof obsidian_module.TFile)return;if(!plugin.hover.linkText)return;if(1!=e.length)return;if(1!=e[0].addedNodes.length)return;if("popover hover-popover file-embed is-loaded"!=!e[0].addedNodes[0].classNames)return;const r=e[0].addedNodes[0];r.empty();const s=await getIMG({file:t,fname:t.path,fwidth:"300",fheight:null,style:"excalidraw-svg"}),o=createDiv("",(async e=>{e.appendChild(s),e.setAttribute("src",t.path),e.onClickEvent((t=>{t.stopImmediatePropagation();const A=e.getAttribute("src");A&&plugin.openDrawing(vault.getAbstractFileByPath(A),linkClickModifierType(t))}))}));r.appendChild(o)})),EXCALIDRAW_AUTOMATE_INFO=[{field:"plugin",code:null,desc:"The ExcalidrawPlugin object",after:""},{field:"elementsDict",code:null,desc:"The {} dictionary object, contains the ExcalidrawElements currently edited in Automate indexed by el.id",after:'[""]'},{field:"imagesDict",code:null,desc:"the images files including DataURL, indexed by fileId",after:'[""]'},{field:"style.strokeColor",code:"[string]",desc:"A valid css color. See <a onclick='window.open(\"https://www.w3schools.com/colors/default.asp\")'>W3 School Colors</a> for more.",after:""},{field:"style.backgroundColor",code:"[string]",desc:"A valid css color. See <a onclick='window.open(\"https://www.w3schools.com/colors/default.asp\")'>W3 School Colors</a> for more.",after:""},{field:"style.angle",code:"[number]",desc:"Rotation of the object in radian",after:""},{field:"style.fillStyle",code:"[string]",desc:"'hachure' | 'cross-hatch' | 'solid'",after:""},{field:"style.strokeWidth",code:"[number]",desc:null,after:""},{field:"style.strokeStyle",code:"[string]",desc:"'solid' | 'dashed' | 'dotted'",after:""},{field:"style.roughness",code:"[number]",desc:"0:Architect\n1:Artist\n2:Cartoonist",after:""},{field:"style.opacity",code:"[number]",desc:"100: Fully opaque\n0: Fully transparent",after:""},{field:"style.roundness",code:"[null | { type: RoundnessType; value?: number };]",desc:"set to null for 'sharp', else the stroke will be 'round'<br>type: 1==LEGACY,<br>2==PROPORTIONAL RADIUS,<br>3==ADAPTIVE RADIUS, value: adaptive factor defaults to 32",after:""},{field:"style.fontFamily",code:"[number]",desc:"1: Virgil, 2:Helvetica, 3:Cascadia, 4:LocalFont",after:""},{field:"style.fontSize",code:"[number]",desc:null,after:""},{field:"style.textAlign",code:"[string]",desc:"'left' | 'right' | 'center'",after:""},{field:"style.verticalAlign",code:"[string]",desc:"For future use, has no effect currently; 'top' | 'bottom' | 'middle'",after:""},{field:"style.startArrowHead",code:"[string]",desc:"'triangle' | 'dot' | 'arrow' | 'bar' | null",after:""},{field:"style.endArrowHead",code:"[string]",desc:"'triangle' | 'dot' | 'arrow' | 'bar' | null",after:""},{field:"canvas.theme",code:"[string]",desc:"'dark' | 'light'",after:""},{field:"canvas.viewBackgroundColor",code:"[string]",desc:"A valid css color.\nSee <a onclick='window.open(\"https://www.w3schools.com/colors/default.asp\")'>W3 School Colors</a> for more.",after:""},{field:"canvas.gridSize",code:"[number]",desc:null,after:""},{field:"setStrokeSharpness",code:"setStrokeSharpness(sharpness: number): void;",desc:"Set ea.style.roundness. 0: is the legacy value, 3: is the current default value, null is sharp",after:""},{field:"addToGroup",code:"addToGroup(objectIds: []): string;",desc:null,after:""},{field:"toClipboard",code:"toClipboard(templatePath?: string): void;",desc:"Copies current elements using template to clipboard, ready to be pasted into an excalidraw canvas",after:""},{field:"getSceneFromFile",code:"async getSceneFromFile(file: TFile): Promise<{elements: ExcalidrawElement[]; appState: AppState;}>;",desc:"returns the elements and appState from a file, if the file is not an excalidraw file, it will return null",after:""},{field:"getElements",code:"getElements(): ExcalidrawElement[];",desc:"Get all elements from ExcalidrawAutomate elementsDict",after:""},{field:"getElement",code:"getElement(id: string): ExcalidrawElement;",desc:"Get single element from ExcalidrawAutomate elementsDict",after:""},{field:"create",code:'create(params?: {filename?: string, foldername?: string, templatePath?: string, onNewPane?: boolean, frontmatterKeys?: { "excalidraw-plugin"?: "raw" | "parsed", "excalidraw-link-prefix"?: string, "excalidraw-link-brackets"?: boolean, "excalidraw-url-prefix"?: string,},}): Promise<string>;',desc:"Create a drawing and save it to filename.\nIf filename is null: default filename as defined in Excalidraw settings.\nIf folder is null: default folder as defined in Excalidraw settings\n",after:""},{field:"createSVG",code:"createSVG(templatePath?: string, embedFont?: boolean, exportSettings?: ExportSettings, loader?: EmbeddedFilesLoader, theme?: string,): Promise<SVGSVGElement>;",desc:"Use ExcalidrawAutomate.getExportSettings(boolean,boolean) to create an ExportSettings object.\nUse ExcalidrawAutomate.getEmbeddedFilesLoader(boolean?) to create an EmbeddedFilesLoader object.",after:""},{field:"createPNG",code:"createPNG(templatePath?: string, scale?: number, exportSettings?: ExportSettings, loader?: EmbeddedFilesLoader, theme?: string,): Promise<any>;",desc:"Use ExcalidrawAutomate.getExportSettings(boolean,boolean) to create an ExportSettings object.\nUse ExcalidrawAutomate.getEmbeddedFilesLoader(boolean?) to create an EmbeddedFilesLoader object.",after:""},{field:"wrapText",code:"wrapText(text: string, lineLen: number): string;",desc:null,after:""},{field:"addRect",code:"addRect(topX: number, topY: number, width: number, height: number): string;",desc:null,after:""},{field:"addDiamond",code:"addDiamond(topX: number, topY: number, width: number, height: number): string;",desc:null,after:""},{field:"addEllipse",code:"addEllipse(topX: number, topY: number, width: number, height: number): string;",desc:null,after:""},{field:"addBlob",code:"addBlob(topX: number, topY: number, width: number, height: number): string;",desc:null,after:""},{field:"refreshTextElementSize",code:"refreshTextElementSize(id: string);",desc:"Refreshes the size of the text element. Intended to be used when you copyViewElementsToEAforEditing() and then change the text in a text element and want to update the size of the text element to fit the modifid contents.",after:""},{field:"addText",code:'addText(topX: number, topY: number, text: string, formatting?: {wrapAt?: number; width?: number; height?: number; textAlign?: "left" | "center" | "right"; textVerticalAlign: "top" | "middle" | "bottom"; box?: boolean | "box" | "blob" | "ellipse" | "diamond"; boxPadding?: number; boxStrokeColor?: string;}, id?: string,): string;',desc:"If box is !null, then text will be boxed\nThe function returns the id of the TextElement. If the text element is boxed i.e. it is a sticky note, then the id of the container object",after:""},{field:"addLine",code:"addLine(points: [[x: number, y: number]]): string;",desc:null,after:""},{field:"addArrow",code:"addArrow(points: [[x: number, y: number]], formatting?: { startArrowHead?: string; endArrowHead?: string; startObjectId?: string; endObjectId?: string;},): string;",desc:null,after:""},{field:"addImage",code:"addImage(topX: number, topY: number, imageFile: TFile, scale?: boolean, anchor?: boolean): Promise<string>;",desc:"set scale to false if you want to embed the image at 100% of its original size. Default is true which will insert a scaled image. anchor will only be evaluated if scale is false. anchor true will add |100% to the end of the filename, resulting in an image that will always pop back to 100% when the source file is updated or when the Excalidraw file is reopened. ",after:""},{field:"addEmbeddable",code:"addEmbeddable(topX: number, topY: number, width: number, height: number, url?: string, file?: TFile): string;",desc:"Adds an iframe to the drawing. If url is not null then the iframe will be loaded from the url. The url maybe a markdown link to an note in the Vault or a weblink. If url is null then the iframe will be loaded from the file. Both the url and the file may not be null.",after:""},{field:"addLaTex",code:"addLaTex(topX: number, topY: number, tex: string): Promise<string>;",desc:null,after:""},{field:"connectObjects",code:"connectObjects(objectA: string, connectionA: ConnectionPoint, objectB: string, connectionB: ConnectionPoint, formatting?: {numberOfPoints?: number; startArrowHead?: string; endArrowHead?: string; padding?: number;},): string;",desc:'type ConnectionPoint = "top" | "bottom" | "left" | "right" | null\nWhen null is passed as ConnectionPoint then Excalidraw will automatically decide\nnumberOfPoints is the number of points on the line. Default is 0 i.e. line will only have a start and end point.\nArrowHead: "triangle"|"dot"|"arrow"|"bar"|null',after:""},{field:"addLabelToLine",code:"addLabelToLine(lineId: string, label: string): string;",desc:"Adds a text label to a line or arrow. Currently only works with a simple straight 2-point (start & end) line",after:""},{field:"clear",code:"clear(): void;",desc:"Clears elementsDict and imagesDict only",after:""},{field:"reset",code:"reset(): void;",desc:"clear() + reset all style values to default",after:""},{field:"isExcalidrawFile",code:"isExcalidrawFile(f: TFile): boolean;",desc:"Returns true if MD file is an Excalidraw file",after:""},{field:"targetView",code:"targetView: ExcalidrawView;",desc:"The Obsidian view currently edited",after:""},{field:"setView",code:'setView(view: ExcalidrawView | "first" | "active"): ExcalidrawView;',desc:null,after:""},{field:"getExcalidrawAPI",code:"getExcalidrawAPI(): any;",desc:"<a onclick='window.open(\"https://github.com/excalidraw/excalidraw/tree/master/src/packages/excalidraw#ref\")'>Excalidraw API</a>",after:""},{field:"getViewElements",code:"getViewElements(): ExcalidrawElement[];",desc:"Get elements in View",after:""},{field:"deleteViewElements",code:"deleteViewElements(el: ExcalidrawElement[]): boolean;",desc:null,after:""},{field:"getViewSelectedElement",code:"getViewSelectedElement(): ExcalidrawElement;",desc:"Get the selected element in the view, if more are selected, get the first",after:""},{field:"getViewSelectedElements",code:"getViewSelectedElements(): ExcalidrawElement[];",desc:null,after:""},{field:"getViewFileForImageElement",code:"getViewFileForImageElement(el: ExcalidrawElement): TFile | null;",desc:"Returns the TFile file handle for the image element",after:""},{field:"copyViewElementsToEAforEditing",code:"copyViewElementsToEAforEditing(elements: ExcalidrawElement[]): void;",desc:"Copies elements from view to elementsDict for editing",after:""},{field:"viewToggleFullScreen",code:"viewToggleFullScreen(forceViewMode?: boolean): void;",desc:null,after:""},{field:"connectObjectWithViewSelectedElement",code:"connectObjectWithViewSelectedElement(objectA: string, connectionA: ConnectionPoint, connectionB: ConnectionPoint, formatting?: {numberOfPoints?: number; startArrowHead?: string; endArrowHead?: string; padding?: number;},): boolean;",desc:"Connect an object to the selected element in the view\nSee tooltip for connectObjects for details",after:""},{field:"addElementsToView",code:"addElementsToView(repositionToCursor?: boolean, save?: boolean, newElementsOnTop?: boolean,shouldRestoreElements?: boolean,): Promise<boolean>;",desc:"Adds elements from elementsDict to the current view\nrepositionToCursor: default is false\nsave: default is true\nnewElementsOnTop: default is false, i.e. the new elements get to the bottom of the stack\nnewElementsOnTop controls whether elements created with ExcalidrawAutomate are added at the bottom of the stack or the top of the stack of elements already in the view\nNote that elements copied to the view with copyViewElementsToEAforEditing retain their position in the stack of elements in the view even if modified using EA",after:""},{field:"onDropHook",code:'onDropHook(data: {ea: ExcalidrawAutomate, event: React.DragEvent<HTMLDivElement>, draggable: any, type: "file" | "text" | "unknown", payload: {files: TFile[], text: string,}, excalidrawFile: TFile, view: ExcalidrawView, pointerPosition: { x: number, y: number},}): boolean;',desc:"If set Excalidraw will call this function onDrop events.\nA return of true will stop the default onDrop processing in Excalidraw.\n\ndraggable is the Obsidian draggable object\nfiles is the array of dropped files\nexcalidrawFile is the file receiving the drop event\nview is the excalidraw view receiving the drop.\npointerPosition is the pointer position on canvas at the time of drop.",after:""},{field:"mostRecentMarkdownSVG",code:"mostRecentMarkdownSVG: SVGSVGElement;",desc:"Markdown renderer will drop a copy of the most recent SVG here for debugging purposes",after:""},{field:"getEmbeddedFilesLoader",code:"getEmbeddedFilesLoader(isDark?: boolean): EmbeddedFilesLoader;",desc:"Utility function to generate EmbeddedFilesLoader object",after:""},{field:"getExportSettings",code:"getExportSettings(withBackground: boolean, withTheme: boolean,): ExportSettings;",desc:"Utility function to generate ExportSettings object",after:""},{field:"getBoundingBox",code:"getBoundingBox(elements: ExcalidrawElement[]): {topX: number, topY: number, width: number, height: number,};",desc:"Gets the bounding box of elements. The bounding box is the box encapsulating all of the elements completely.",after:""},{field:"getMaximumGroups",code:"getMaximumGroups(elements: ExcalidrawElement[]): ExcalidrawElement[][];",desc:"Elements grouped by the highest level groups",after:""},{field:"getLargestElement",code:"getLargestElement(elements: ExcalidrawElement[]): ExcalidrawElement;",desc:"Gets the largest element from a group. useful when a text element is grouped with a box, and you want to connect an arrow to the box",after:""},{field:"intersectElementWithLine",code:"intersectElementWithLine(element: ExcalidrawBindableElement, a: readonly [number, number], b: readonly [number, number], gap?: number,): Point[];",desc:"If gap is given, the element is inflated by this value.\nReturns 2 or 0 intersection points between line going through `a` and `b` and the `element`, in ascending order of distance from `a`.",after:""},{field:"getCommonGroupForElements",code:"getCommonGroupForElements(elements: ExcalidrawElement[]): string;",desc:"Gets the groupId for the group that contains all the elements, or null if such a group does not exist",after:""},{field:"getElementsInTheSameGroupWithElement",code:"getElementsInTheSameGroupWithElement(element: ExcalidrawElement, elements: ExcalidrawElement[]): ExcalidrawElement[];",desc:"Gets all the elements from elements[] that share one or more groupIds with element.",after:""},{field:"activeScript",code:"activeScript: string;",desc:"Mandatory to set before calling the get and set ScriptSettings functions. Set automatically by the ScriptEngine\nSee for more details: <a onclick='window.open(\"https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html\")'>Script Engine Help</a>",after:""},{field:"getScriptSettings",code:"getScriptSettings(): {};",desc:"Returns script settings. Saves settings in plugin settings, under the activeScript key. See for more details: <a onclick='window.open(\"https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html\")'>Script Engine Help</a>",after:""},{field:"setScriptSettings",code:"setScriptSettings(settings: any): Promise<void>;",desc:"Sets script settings.\nSee for more details: <a onclick='window.open(\"https://zsviczian.github.io/obsidian-excalidraw-plugin/ExcalidrawScriptsEngine.html\")'>Script Engine Help</a>",after:""},{field:"openFileInNewOrAdjacentLeaf",code:"openFileInNewOrAdjacentLeaf(file: TFile): WorkspaceLeaf;",desc:"Open a file in a new workspaceleaf or reuse an existing adjacent leaf depending on Excalidraw Plugin Settings",after:""},{field:"measureText",code:"measureText(text: string): { width: number; height: number };",desc:"Measures text size based on current style settings",after:""},{field:"verifyMinimumPluginVersion",code:"verifyMinimumPluginVersion(requiredVersion: string): boolean;",desc:'Returns true if plugin version is >= than required\nrecommended use:\n<code>if(!ea.verifyMinimumPluginVersion || !ea.verifyMinimumPluginVersion("1.5.20")) {new Notice("message");return;}<code>',after:""},{field:"selectElementsInView",code:"selectElementsInView(elements: ExcalidrawElement[] | string[]):void;",desc:"You can supply a list of Excalidraw Elements or the string IDs of those elements. The elements provided will be set as selected in the targetView.",after:""},{field:"generateElementId",code:"generateElementId(): string;",desc:"Returns an 8 character long random id",after:""},{field:"cloneElement",code:"cloneElement(element: ExcalidrawElement): ExcalidrawElement;",desc:"Returns a clone of the element with a new element id",after:""},{field:"moveViewElementToZIndex",code:"moveViewElementToZIndex(elementId:number, newZIndex:number): void;",desc:"Moves the element to a specific position in the z-index",after:""},{field:"hexStringToRgb",code:"hexStringToRgb(color: string):number[];",desc:"Converts a HEX color to an RGB number array. #FF0000 to [255,0,0]",after:""},{field:"rgbToHexString",code:"rgbToHexString(color: number[]):string;",desc:"Converts an RGB number array to a HEX string. [255,0,0] to #FF0000",after:""},{field:"hslToRgb",code:"hslToRgb(color: number[]):number[];",desc:"Converts an HSL number array to an RGB number array. [0,100,50] to [255,0,0]",after:""},{field:"rgbToHsl",code:"rgbToHsl(color:number[]):number[];",desc:"Converts an RGB number array to an HSL number array. [255,0,0] to [0,100,50]",after:""},{field:"colorNameToHex",code:"colorNameToHex(color:string):string;",desc:"Converts a CSS color name to its HEX color equivalent. 'White' to #FFFFFF",after:""},{field:"obsidian",code:"obsidian",desc:"Access functions and objects available on the <a onclick='window.open(\"https://github.com/obsidianmd/obsidian-api/blob/master/obsidian.d.ts\")'>Obsidian Module</a>",after:""},{field:"getAttachmentFilepath",code:"async getAttachmentFilepath(filename: string): Promise<string>",desc:"This asynchronous function should be awaited. It retrieves the filepath to a new file, taking into account the attachments preference settings in Obsidian. If the attachment folder doesn't exist, it creates it. The function returns the complete path to the file. If the provided filename already exists, the function will append '_[number]' before the extension to generate a unique filename.",after:""},{field:"setViewModeEnabled",code:"setViewModeEnabled(enabled: boolean): void;",desc:"Sets Excalidraw in the targetView to view-mode",after:""},{field:"viewUpdateScene",code:"viewUpdateScene(scene:{elements?:ExcalidrawElement[],appState?: AppState,files?: BinaryFileData,commitToHistory?: boolean,},restore:boolean=false):void",desc:"Calls the ExcalidrawAPI updateScene function for the targetView. When restore=true, excalidraw will try to correct errors in the scene such as setting default values to missing element properties.",after:""},{field:"viewZoomToElements",code:"viewZoomToElements(selectElements: boolean,elements: ExcalidrawElement[]):void",desc:"Zoom tarteView to fit elements provided as input. elements === [] will zoom to fit the entire scene. SelectElements toggles whether the elements should be in a selected state at the end of the operation.",after:""}],EXCALIDRAW_SCRIPTENGINE_INFO=[{field:"inputPrompt",code:"inputPrompt: (header: string, placeholder?: string, value?: string, buttons?: {caption:string, tooltip?:string, action:Function}[], lines?: number, displayEditorButtons?: boolean, customComponents?: (container: HTMLElement) => void, blockPointerInputOutsideModal?: boolean);",desc:"Opens a prompt that asks for an input.\nReturns a string with the input.\nYou need to await the result of inputPrompt.\nEditor buttons are text editing buttons like delete, enter, allcaps - these are only displayed if lines is greater than 1 \nCustom components are components that you can add to the prompt. These will be displayed between the text input area and the buttons.\nblockPointerInputOutsideModal will block pointer input outside the modal. This is useful if you want to prevent the user accidently closing the modal or interacting with the excalidraw canvas while the prompt is open.\nbuttons.action(input: string) => string\nThe button action function will receive the actual input string. If action returns null, input will be unchanged. If action returns a string, input will receive that value when the promise is resolved. example:\n<code>let fileType = '';\nconst filename = await utils.inputPrompt (\n 'Filename',\n '',\n '',\n, [\n {\n caption: 'Markdown',\n action: ()=>{fileType='md';return;}\n },\n {\n caption: 'Excalidraw',\n action: ()=>{fileType='ex';return;}\n }\n ]\n);</code>",after:""},{field:"suggester",code:"suggester: (displayItems: string[], items: any[], hint?: string, instructions?:Instruction[]);",desc:"Opens a suggester. Displays the displayItems and returns the corresponding item from items[]\nYou need to await the result of suggester.\nIf the user cancels (ESC), suggester will return undefined\nHint and instructions are optional\n\n<code>interface Instruction {command: string;purpose: string;}</code>",after:""},{field:"scriptFile",code:"scriptFile: TFile",desc:"The TFile of the currently running script",after:""}],FRONTMATTER_KEYS_INFO=[{field:"plugin",code:null,desc:"Denotes an excalidraw file. If key is not present, the file will not be recognized as an Excalidarw file. Valid values are 'parsed' and 'raw'",after:": parsed"},{field:"link-prefix",code:null,desc:"Set custom prefix to denote text element containing a valid internal link. Set to empty string if you do not want to show a prefix",after:': "📍"'},{field:"url-prefix",code:null,desc:"Set custom prefix to denote text element containing a valid external link. Set to empty string if you do not want to show a prefix",after:': "🌐"'},{field:"link-brackets",code:null,desc:"Set to true, if you want to display [[square brackets]] around the links in Text Elements",after:": true"},{field:"default-mode",code:null,desc:"Specifies how Excalidraw should open by default. Valid values are: view|zen",after:": view"},{field:"linkbutton-opacity",code:null,desc:"The opacity of the blue link button in the top right of the element overriding the respective setting in plugin settings. Valid values are between 0 and 1, where 0 means the button is transparent.",after:": 0.5"},{field:"onload-script",code:null,desc:"The value of this field will be executed as javascript code using the Script Engine environment. Use this to initiate custom actions or logic when loading your drawing.",after:': "new Notice(`Hello World!\\n\\nFile: ${ea.targetView.file.basename}`);"'},{field:"font",code:null,desc:"This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this frontmatter key to your markdown document. Valid values are: Virgil|Cascadia|font_file_name.extension",after:": Virgil"},{field:"font-color",code:null,desc:"This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this frontmatter key to your markdown document. Valid values are: css-color-name|#HEXcolor|any-other-html-standard-format",after:": SteelBlue"},{field:"border-color",code:null,desc:"This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this frontmatter key to your markdown document. Valid values are: css-color-name|#HEXcolor|any-other-html-standard-format",after:": SteelBlue"},{field:"css",code:null,desc:'This key applies to Markdown Embeds. You can control the appearance of the embedded markdown file on a file by file bases by adding the this front matter keys to your markdown document. Valid values are: "css-filename|css snippet"',after:': ""'},{field:"export-transparent",code:null,desc:"If this key is present it will override the default excalidraw embed and export setting. true == Transparent / false == with background",after:": true"},{field:"export-dark",code:null,desc:"If this key is present it will override the default excalidraw embed and export setting. true == Dark mode / false == light mode",after:": true"},{field:"export-padding",code:null,desc:"If this key is present it will override the default excalidraw embed and export setting. This only affects both SVG and PNG export. Specify the export padding for the image.",after:": 5"},{field:"export-pngscale",code:null,desc:"If this key is present it will override the default excalidraw embed and export setting. This only affects export to PNG. Specify the export scale for the image. The typical range is between 0.5 and 5, but you can experiment with other values as well.",after:": 1"},{field:"autoexport",code:null,desc:"Override autoexport settings for this file. Valid values are\nnone\nboth\npng\nsvg",after:": png"},{field:"iframe-theme",code:null,desc:"Override iFrame theme plugin-settings for this file. 'match' will match the Excalidraw theme, 'default' will match the obsidian theme. Valid values are\ndark\nlight\nauto\ndefault",after:": auto"}];class FieldSuggester extends obsidian_module.EditorSuggest{constructor(e){super(e.app),this.getSuggestions=e=>{const t=e.query.toLowerCase();return("ea"===this.suggestType?EXCALIDRAW_AUTOMATE_INFO:"utils"===this.suggestType?EXCALIDRAW_SCRIPTENGINE_INFO:FRONTMATTER_KEYS_INFO).map((e=>e.field)).filter((e=>e.toLowerCase().includes(t)))},this.plugin=e}onTrigger(e,t,A){var i,n,a,r,s;if(this.plugin.settings.fieldSuggester){const A=t.getLine(e.line).substring(0,e.ch),o=null!==(r=null!==(n=null===(i=A.match(/^excalidraw-(.*)$/))||void 0===i?void 0:i[1])&&void 0!==n?n:null===(a=A.match(/(^ea|\Wea)\.([\w\.]*)$/))||void 0===a?void 0:a[2])&&void 0!==r?r:null===(s=A.match(/(^utils|\Wutils)\.([\w\.]*)$/))||void 0===s?void 0:s[2];if(void 0!==o)return this.suggestType=A.match(/^excalidraw-(.*)$/)?"excalidraw":A.match(/(^ea|\Wea)\.([\w\.]*)$/)?"ea":"utils",this.latestTriggerInfo={end:e,start:{ch:e.ch-o.length,line:e.line},query:o},this.latestTriggerInfo}return null}renderSuggestion(e,t){const A=e.replace("ea"===this.suggestType?"ea.":"utils"===this.suggestType?"utils.":"excalidraw-",""),i=("ea"===this.suggestType?EXCALIDRAW_AUTOMATE_INFO:"utils"===this.suggestType?EXCALIDRAW_SCRIPTENGINE_INFO:FRONTMATTER_KEYS_INFO).find((t=>t.field===e));t.createEl("b",{text:A}),t.createEl("br"),i.code&&t.createEl("code",{text:i.code}),i.desc&&t.createDiv("div",(e=>e.innerHTML=i.desc))}selectSuggestion(e){var t;const{context:A}=this;if(A){const i="ea"===this.suggestType?EXCALIDRAW_AUTOMATE_INFO:"utils"===this.suggestType?EXCALIDRAW_SCRIPTENGINE_INFO:FRONTMATTER_KEYS_INFO,n=`${e}${null===(t=i.find((t=>t.field===e)))||void 0===t?void 0:t.after}`;if(A.editor.replaceRange(n,this.latestTriggerInfo.start,this.latestTriggerInfo.end),this.latestTriggerInfo.start.ch===this.latestTriggerInfo.end.ch){const e=this.latestTriggerInfo.end;e.ch+=n.length,A.editor.setCursor(e)}}}}class FrontmatterEditor{constructor(e){this.initialized=!1,this.dataWOfrontmatter=e;const t=(e=e.replaceAll("\r\n","\n").replaceAll("\r","\n")).split(/^---(?:.|\n)*(?:^---\n)/gm);2===t.length&&(this.dataWOfrontmatter=t[1],this.frontmatterStr=e.match(/^---((?:.|\n)*)(?:^---\n)/gm)[0].replaceAll(/(^---\n|^\n)/gm,"").trim()+"\n",this.initialized=!0)}hasKey(e){if(!this.initialized)return!1;const t=new RegExp(`^${e}:`,"gm");return Boolean(this.frontmatterStr.match(t))}setKey(e,t){if(this.initialized)if(t=t.replaceAll("\r\n","\n").replaceAll("\r","\n").replaceAll(":",";").trim().split("\n").join(" "),this.hasKey(e)){const A=new RegExp(`^${e}:.*\\n(?:\\s\\s.*\\n)*`,"gm");this.frontmatterStr=this.frontmatterStr.split(A).join("\n").trim()+`\n${e}: ${t}`}else this.frontmatterStr=this.frontmatterStr.trim()+`\n${e}: ${t}`}get data(){return this.initialized?["---",this.frontmatterStr,"---",this.dataWOfrontmatter].join("\n"):this.dataWOfrontmatter}}const TASKBONE_URL="https://api.taskbone.com/",TASKBONE_OCR_FN="execute?id=60f394af-85f6-40bc-9613-5d26dc283cbb";class Taskbone{get apiKey(){return this.plugin.settings.taskboneAPIkey}constructor(e){this.plugin=e}async initialize(e=!0){var t;if(""!==this.plugin.settings.taskboneAPIkey)return;const A=await obsidian_module.requestUrl({url:`${TASKBONE_URL}users/excalidraw-obsidian/identities`,method:"post",contentType:"application/json",throw:!1});if(!A)return;const i=null===(t=A.json)||void 0===t?void 0:t.apiKey;return i&&"string"==typeof i&&(e&&await this.plugin.loadSettings(),this.plugin.settings.taskboneAPIkey=i,e&&await this.plugin.saveSettings()),i}async getTextForView(e,t){await e.forceSave(!0);const A=e.excalidrawAPI.getSceneElements().filter((t=>{var A;return"freedraw"===t.type||"image"===t.type&&!this.plugin.isExcalidrawFile(null===(A=e.excalidrawData.getFile(t.fileId))||void 0===A?void 0:A.file)}));if(0===A.length)return void new obsidian_module.Notice("Aborting OCR because there are no image or freedraw elements on the canvas.",4e3);const i=new FrontmatterEditor(e.data);if(i.hasKey("taskbone-ocr")&&!t)return void new obsidian_module.Notice("The drawing has already been processed, you will find the result in the frontmatter in markdown view mode. If you ran the command from the Obsidian Panel in Excalidraw then you can CTRL(CMD)+click the command to force the rescaning.",4e3);const n=this.plugin.ea.getBoundingBox(A),a=n.width*n.height,r=Math.sqrt(36e4/a),s=Math.sqrt(a/16e6),o=r>1?r:s>1?1/s:1,l=new EmbeddedFilesLoader(this.plugin,!1),c=await createPNG(e.file.path+"#^taskbone",o,{withBackground:!0,withTheme:!0},l,"light",null,null,[],this.plugin,0),d=await this.getTextForImage(c);d&&(i.setKey("taskbone-ocr",d),e.data=i.data,e.save(!1),window.navigator.clipboard.writeText(d),new obsidian_module.Notice("I placed the recognized in the drawing's frontmatter and onto the system clipboard."))}async getTextForImage(e){""===this.apiKey&&await this.initialize();const t={records:[{image:await blobToBase64(e)}]},A=await obsidian_module.requestUrl({url:"https://api.taskbone.com/execute?id=60f394af-85f6-40bc-9613-5d26dc283cbb",method:"post",contentType:"application/json",body:JSON.stringify(t),headers:{authorization:`Bearer ${this.apiKey}`},throw:!1}),i=null==A?void 0:A.json;return i&&200===A.status?i.records[0].text:(new obsidian_module.Notice("Something went wrong while processing your request. Please check developer console for more information"),void log(A))}}class ExcalidrawPlugin extends obsidian_module.Plugin{constructor(e,t){super(e,t),this.excalidrawFiles=new Set,this.excalidrawFileModes={},this._loaded=!1,this.activeExcalidrawView=null,this.lastActiveExcalidrawFilePath=null,this.hover={linkText:null,sourcePath:null},this.opencount=0,this.filesMaster=null,this.equationsMaster=null,this.mathjax=null,this.mathjaxDiv=null,this.mathjaxLoaderFinished=!1,this.fourthFontDef=VIRGIL_FONT,this.packageMap=new WeakMap,this.leafChangeTimeout=null,this.popScope=null,this.filesMaster=new Map,this.equationsMaster=new Map}getPackage(e){if(e===window)return{react:react,reactDOM:reactDOM,excalidrawLib:excalidrawLib};if(this.packageMap.has(e))return this.packageMap.get(e);const{react:t,reactDOM:A,excalidrawLib:i}=e.eval.call(e,`(function() {\n ${lzStringExports.decompressFromBase64(EXCALIDRAW_PACKAGES)};\n return {react:React,reactDOM:ReactDOM,excalidrawLib:ExcalidrawLib};\n })()`);return this.packageMap.set(e,{react:t,reactDOM:A,excalidrawLib:i}),{react:t,reactDOM:A,excalidrawLib:i}}async onload(){if(obsidian_module.addIcon(ICON_NAME,EXCALIDRAW_ICON),obsidian_module.addIcon("ScriptEngine",SCRIPTENGINE_ICON),obsidian_module.addIcon("export-img",EXPORT_IMG_ICON),await this.loadSettings({reEnableAutosave:!0}),imageCache.plugin=this,this.addSettingTab(new ExcalidrawSettingTab(this.app,this)),this.ea=await initExcalidrawAutomate(this),this.registerView("excalidraw",(e=>new ExcalidrawView(e,this))),this.registerExtensions(["excalidraw"],"excalidraw"),this.addMarkdownPostProcessor(),this.registerInstallCodeblockProcessor(),this.addThemeObserver(),this.experimentalFileTypeDisplayToggle(this.settings.experimentalFileType),this.registerCommands(),this.registerEventListeners(),this.initializeFourthFont(),this.registerEditorSuggest(new FieldSuggester(this)),this.registerMonkeyPatches(),this.settings.showReleaseNotes){const e="0.0.0"===this.settings.previousRelease;isVersionNewerThanOther(PLUGIN_VERSION,this.settings.previousRelease)&&new ReleaseNotes(this.app,this,e?null:PLUGIN_VERSION).open()}this.switchToExcalidarwAfterLoad(),this.loadMathJax();const e=this;this.app.workspace.onLayoutReady((()=>{this.scriptEngine=new ScriptEngine(e)})),this.taskbone=new Taskbone(this)}initializeFourthFont(){this.app.workspace.onLayoutReady((async()=>{const e=await getFontDataURL(this.app,this.settings.experimantalFourthFont,"","LocalFont"),t=""===e.dataURL?VIRGIL_DATAURL:e.dataURL;this.fourthFontDef=e.fontDef;const A=new Set;app.workspace.iterateAllLeaves((e=>{const i=app.isMobile?document:e.view.containerEl.ownerDocument;if(!i)return;if(A.has(i))return;A.add(i);const n=i.createElement("style");n.id="local-font-stylesheet",n.textContent=`\n @font-face {\n font-family: 'LocalFont';\n src: url("${t}");\n font-display: swap;\n }\n `;const a=i.getElementById(n.id);i.head.appendChild(n),a&&i.head.removeChild(a),i.fonts.load("20px LocalFont")}))}))}loadMathJax(){const e=this;this.app.workspace.onLayoutReady((async()=>{await obsidian_module.loadMathJax();try{e.mathjaxDiv&&(document.body.removeChild(e.mathjaxDiv),e.mathjax=null,e.mathjaxLoaderFinished=!1),e.mathjaxDiv=document.body.createDiv(),e.mathjaxDiv.title="Excalidraw MathJax Support",e.mathjaxDiv.style.display="none";const t=e.mathjaxDiv.createEl("iframe");t.title="Excalidraw MathJax Support";const A=t.contentWindow.document,i=A.createElement("script");i.type="text/javascript",i.onload=()=>{const A=t.contentWindow;A.MathJax.startup.pagePromise.then((async()=>{const t=app.vault.getAbstractFileByPath("preamble.sty"),i=t&&t instanceof obsidian_module.TFile?await app.vault.read(t):null;try{i&&await A.MathJax.tex2svg(i)}catch(t){errorlog({where:e.loadMathJax,description:"Unexpected error while loading preamble.sty",error:t})}e.mathjax=A.MathJax,e.mathjaxLoaderFinished=!0}))},i.src=e.settings.mathjaxSourceURL,A.head.appendChild(i)}catch(t){new obsidian_module.Notice("Excalidraw: Error initializing LaTeX support"),e.mathjaxLoaderFinished=!0}}))}switchToExcalidarwAfterLoad(){const e=this;this.app.workspace.onLayoutReady((()=>{let t;for(t of app.workspace.getLeavesOfType("markdown"))t.view instanceof obsidian_module.MarkdownView&&e.isExcalidrawFile(t.view.file)&&(e.excalidrawFileModes[t.id||t.view.file.path]="excalidraw",e.setExcalidrawView(t))}))}forceSaveActiveView(e){if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.forceSave(),!0)}registerInstallCodeblockProcessor(){const e=async(e,t)=>{let A=null;try{const e=t.parentElement.querySelector(`a[href="#${t.previousElementSibling.getAttribute("data-heading")}"]`);e.style.paddingRight="10px",A=e.parentElement.createEl("button",null,(e=>{e.setText(t$d("UPDATE_SCRIPT")),e.addClass("mod-muted"),e.style.backgroundColor="var(--interactive-success)",e.style.display="none"}))}catch(t){errorlog({where:"this.registerInstallCodeblockProcessor",source:e,error:t})}e=e.trim(),t.createEl("button",null,(async t=>{var i;const n=e=>{switch(A&&(A.style.display="none"),e){case"CHECKING":t.setText(t$d("CHECKING_SCRIPT")),t.style.backgroundColor="var(--interactive-normal)";break;case"INSTALL":t.setText(t$d("INSTALL_SCRIPT")),t.style.backgroundColor="var(--interactive-accent)";break;case"UPTODATE":t.setText(t$d("UPTODATE_SCRIPT")),t.style.backgroundColor="var(--interactive-normal)";break;case"UPDATE":t.setText(t$d("UPDATE_SCRIPT")),t.style.backgroundColor="var(--interactive-success)",A&&(A.style.display=null);break;case"ERROR":t.setText(t$d("UNABLETOCHECK_SCRIPT")),t.style.backgroundColor="var(--interactive-normal)"}};t.addClass("mod-muted");let a=e;try{a=decodeURI(e)}catch(t){errorlog({where:"ExcalidrawPlugin.registerInstallCodeblockProcessor.codeblockProcessor.onClick",source:e,error:t})}const r=a.substring(a.lastIndexOf("/")+1),s=`${this.settings.scriptFolderPath}/Downloaded`,o=app.vault.getFiles().filter((e=>e.path.startsWith(s)&&e.name===r)).sort(((e,t)=>e.path>t.path?1:-1));let l=o[0];const c=null!==(i=null==l?void 0:l.path)&&void 0!==i?i:`${s}/${r}`,d=getIMGFilename(c,"svg");let h=this.app.vault.getAbstractFileByPath(d);if(n(l?"CHECKING":"INSTALL"),t.onclick=async()=>{const t=async(e,t,A)=>{const i=await obsidian_module.request({url:e});return!i||i.startsWith("404: Not Found")?null:(t?await this.app.vault.modify(t,i):(await checkAndCreateFolder(s),t=await this.app.vault.create(A,i)),t)};try{if(l=await t(e,l,c),!l)throw n("ERROR"),"File not found";h=await t(getIMGFilename(e,"svg"),h,d),n("UPTODATE"),0===Object.keys(this.scriptEngine.scriptIconMap).length&&this.scriptEngine.loadScripts(),new obsidian_module.Notice(`Installed: ${l.basename}`)}catch(e){new obsidian_module.Notice(`Error installing script: ${r}`),errorlog({where:"ExcalidrawPlugin.registerInstallCodeblockProcessor.codeblockProcessor.onClick",error:e})}},A&&(A.onclick=t.onclick),!(l&&l instanceof obsidian_module.TFile))return;const u=new Map;JSON.parse(await obsidian_module.request({url:"https://raw.githubusercontent.com/zsviczian/obsidian-excalidraw-plugin/master/ea-scripts/directory-info.json"})).forEach((e=>u.set(e.fname,e.mtime)));const g=(e,t)=>{if(0===u.size||!u.has(e))return"ERROR";const A=u.get(e);return!t||A>t.stat.mtime?"UPDATE":"UPTODATE"},p=g(r,l),m=g(getIMGFilename(r,"svg"),h&&h instanceof obsidian_module.TFile?h:null);n("UPTODATE"===p&&"UPTODATE"===m||"UPTODATE"===p&&"ERROR"===m?"UPTODATE":"ERROR"===p?"ERROR":"UPDATE"===p||"UPDATE"===m?"UPDATE":"UPTODATE")}))};this.registerMarkdownCodeBlockProcessor(SCRIPT_INSTALL_CODEBLOCK,(async(t,A)=>{A.addEventListener(RERENDER_EVENT,(async i=>{i.stopPropagation(),A.empty(),e(t,A)})),e(t,A)}))}addMarkdownPostProcessor(){initializeMarkdownPostProcessor(this),this.registerMarkdownPostProcessor(markdownPostProcessor),this.registerEvent(this.app.workspace.on("hover-link",hoverEvent)),this.observer=observer,this.observer.observe(document,{childList:!0,subtree:!0})}addThemeObserver(){this.themeObserver=new MutationObserver((async e=>{var t,A,i,n,a,r,s,o;if(!this.settings.matchThemeTrigger)return;if((null===(t=e[0])||void 0===t?void 0:t.oldValue)===(null===(i=null===(A=e[0])||void 0===A?void 0:A.target)||void 0===i?void 0:i.getAttribute("class")))return;if((null===(a=null===(n=e[0])||void 0===n?void 0:n.oldValue)||void 0===a?void 0:a.includes("theme-dark"))===(null===(o=null===(s=null===(r=e[0])||void 0===r?void 0:r.target)||void 0===s?void 0:s.classList)||void 0===o?void 0:o.contains("theme-dark")))return;const l=isObsidianThemeDark()?"dark":"light";this.app.workspace.getLeavesOfType("excalidraw").forEach((e=>{const t=e.view;t.file&&t.excalidrawRef&&t.setTheme(l)}))})),this.themeObserver.observe(document.body,{attributeOldValue:!0,attributeFilter:["class"]})}experimentalFileTypeDisplayToggle(e){e?this.experimentalFileTypeDisplay():(this.fileExplorerObserver&&this.fileExplorerObserver.disconnect(),this.fileExplorerObserver=null)}experimentalFileTypeDisplay(){const e=e=>{if(1!=e.childElementCount)return;const t=e.getAttribute("data-path");if(!t)return;const A=this.app.vault.getAbstractFileByPath(t);A&&A instanceof obsidian_module.TFile&&this.isExcalidrawFile(A)&&e.insertBefore(createDiv({cls:"nav-file-tag",text:this.settings.experimentalFileTag}),e.firstChild)};this.fileExplorerObserver=new MutationObserver((t=>{const A=t.filter((e=>e.addedNodes.length>0));A.forEach((t=>{t.addedNodes.forEach((t=>{t instanceof Element&&t.querySelectorAll(".nav-file-title").forEach(e)}))}))}));const t=this;this.app.workspace.onLayoutReady((()=>{document.querySelectorAll(".nav-file-title").forEach(e),t.fileExplorerObserver.observe(document.querySelector(".workspace"),{childList:!0,subtree:!0})}))}registerCommands(){this.openDialog=new OpenFileDialog(this.app,this),this.insertLinkDialog=new InsertLinkDialog(this.app),this.insertImageDialog=new InsertImageDialog(this),this.importSVGDialog=new ImportSVGDialog(this),this.insertMDDialog=new InsertMDDialog(this),this.addRibbonIcon(ICON_NAME,t$d("CREATE_NEW"),(async e=>{this.createAndOpenDrawing(getDrawingFilename(this.settings),linkClickModifierType(emulateCTRLClickForLinks(e)))})),this.registerEvent(this.app.workspace.on("file-menu",((e,t)=>{e.addItem((e=>{e.setTitle(t$d("CREATE_NEW")).setIcon(ICON_NAME).onClick((e=>{let A=t.path;t instanceof obsidian_module.TFile&&(A=obsidian_module.normalizePath(t.path.substr(0,t.path.lastIndexOf(t.name)))),this.createAndOpenDrawing(getDrawingFilename(this.settings),linkClickModifierType(emulateCTRLClickForLinks(e)),A)}))}))}))),this.registerEvent(this.app.workspace.on("file-menu",((e,t)=>{t instanceof obsidian_module.TFile&&"excalidraw"==t.extension&&e.addItem((e=>{e.setTitle(t$d("CONVERT_FILE_KEEP_EXT")).onClick((()=>{this.convertSingleExcalidrawToMD(t,!1,!1)}))}))}))),this.registerEvent(this.app.workspace.on("file-menu",((e,t)=>{t instanceof obsidian_module.TFile&&"excalidraw"==t.extension&&e.addItem((e=>{e.setTitle(t$d("CONVERT_FILE_REPLACE_EXT")).onClick((()=>{this.convertSingleExcalidrawToMD(t,!0,!0)}))}))}))),this.addCommand({id:"excalidraw-disable-autosave",name:t$d("TEMPORARY_DISABLE_AUTOSAVE"),checkCallback:e=>!!this.settings.autosave&&(e||(this.settings.autosave=!1),!0)}),this.addCommand({id:"excalidraw-enable-autosave",name:t$d("TEMPORARY_ENABLE_AUTOSAVE"),checkCallback:e=>!this.settings.autosave&&(e||(this.settings.autosave=!0),!0)}),this.addCommand({id:"excalidraw-download-lib",name:t$d("DOWNLOAD_LIBRARY"),callback:this.exportLibrary}),this.addCommand({id:"excalidraw-open",name:t$d("OPEN_EXISTING_NEW_PANE"),callback:()=>{this.openDialog.start(openDialogAction.openFile,!0)}}),this.addCommand({id:"excalidraw-open-on-current",name:t$d("OPEN_EXISTING_ACTIVE_PANE"),callback:()=>{this.openDialog.start(openDialogAction.openFile,!1)}}),this.addCommand({id:"excalidraw-insert-transclusion",name:t$d("TRANSCLUDE"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(this.openDialog.start(openDialogAction.insertLinkToDrawing,!1),!0)}),this.addCommand({id:"excalidraw-insert-last-active-transclusion",name:t$d("TRANSCLUDE_MOST_RECENT"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView))&&null!=this.lastActiveExcalidrawFilePath;const t=this.app.vault.getAbstractFileByPath(this.lastActiveExcalidrawFilePath);return t instanceof obsidian_module.TFile&&(this.embedDrawing(t),!0)}}),this.addCommand({id:"excalidraw-autocreate",name:t$d("NEW_IN_NEW_PANE"),callback:()=>{this.createAndOpenDrawing(getDrawingFilename(this.settings),"new-pane")}}),this.addCommand({id:"excalidraw-autocreate-newtab",name:t$d("NEW_IN_NEW_TAB"),callback:()=>{this.createAndOpenDrawing(getDrawingFilename(this.settings),"new-tab")}}),this.addCommand({id:"excalidraw-autocreate-on-current",name:t$d("NEW_IN_ACTIVE_PANE"),callback:()=>{this.createAndOpenDrawing(getDrawingFilename(this.settings),"active-pane")}}),this.addCommand({id:"excalidraw-autocreate-popout",name:t$d("NEW_IN_POPOUT_WINDOW"),checkCallback:e=>{if(e)return!app.isMobile;this.createAndOpenDrawing(getDrawingFilename(this.settings),"popout-window")}});const e=async e=>{const t=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);if(!t)return;const A=getEmbedFilename(t.file.basename,this.settings),i=this.settings.embedUseExcalidrawFolder?null:(await getAttachmentsFolderAndFilePath(this.app,t.file.path,A)).folder,n=await this.createDrawing(A,i);await this.embedDrawing(n),this.openDrawing(n,e,!0,void 0,!0)};this.addCommand({id:"excalidraw-autocreate-and-embed",name:t$d("NEW_IN_NEW_PANE_EMBED"),checkCallback:t=>t?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(e("new-pane"),!0)}),this.addCommand({id:"excalidraw-autocreate-and-embed-new-tab",name:t$d("NEW_IN_NEW_TAB_EMBED"),checkCallback:t=>t?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(e("new-tab"),!0)}),this.addCommand({id:"excalidraw-autocreate-and-embed-on-current",name:t$d("NEW_IN_ACTIVE_PANE_EMBED"),checkCallback:t=>t?Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(e("active-pane"),!0)}),this.addCommand({id:"excalidraw-autocreate-and-embed-popout",name:t$d("NEW_IN_POPOUT_WINDOW_EMBED"),checkCallback:t=>t?!app.isMobile&&Boolean(this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView)):(e("popout-window"),!0)}),this.addCommand({id:"run-ocr",name:t$d("RUN_OCR"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return e?Boolean(t):!!t&&(this.settings.taskboneEnabled?(this.taskbone.getTextForView(t,!1),!0):(new obsidian_module.Notice("Taskbone OCR is not enabled. Please go to plugins settings to enable it.",4e3),!0))}}),this.addCommand({id:"search-text",name:t$d("SEARCH"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(search(t),!0)}}),this.addCommand({id:"fullscreen",name:t$d("TOGGLE_FULLSCREEN"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.isFullscreen()?t.exitFullscreen():t.gotoFullscreen(),!0)}}),this.addCommand({id:"disable-binding",name:t$d("TOGGLE_DISABLEBINDING"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.toggleDisableBinding(),!0)}}),this.addCommand({id:"disable-framerendering",name:t$d("TOGGLE_FRAME_RENDERING"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.toggleFrameRendering(),!0)}}),this.addCommand({id:"disable-frameclipping",name:t$d("TOGGLE_FRAME_CLIPPING"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.toggleFrameClipping(),!0)}}),this.addCommand({id:"export-image",name:t$d("EXPORT_IMAGE"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.exportDialog||(t.exportDialog=new ExportDialog(this,t,t.file),t.exportDialog.createForm()),t.exportDialog.open(),!0)}}),this.forceSaveCommand=this.addCommand({id:"save",hotkeys:[{modifiers:["Ctrl"],key:"s"}],name:t$d("FORCE_SAVE"),checkCallback:e=>this.forceSaveActiveView(e)}),this.addCommand({id:"toggle-lock",hotkeys:[{modifiers:["Ctrl","Shift"],key:"e"}],name:t$d("TOGGLE_LOCK"),checkCallback:e=>{if(e)return!!Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView))&&!this.app.workspace.getActiveViewOfType(ExcalidrawView).compatibilityMode;const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!(!t||t.compatibilityMode||(t.changeTextMode(t.textMode===TextMode.parsed?TextMode.raw:TextMode.parsed),0))}}),this.addCommand({id:"scriptengine-store",name:t$d("INSTALL_SCRIPT_BUTTON"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView)):(new ScriptInstallPrompt(this).open(),!0)}),this.addCommand({id:"delete-file",name:t$d("DELETE_FILE"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(t){this.ea.reset(),this.ea.setView(t);const e=this.ea.getViewSelectedElement();if("image"!==e.type)return new obsidian_module.Notice("Please select an image or embedded markdown document",4e3),!0;const A=this.ea.getViewFileForImageElement(e);return A?(this.app.vault.delete(A),this.ea.deleteViewElements([e]),!0):(new obsidian_module.Notice("Please select an image or embedded markdown document",4e3),!0)}return!1}}),this.addCommand({id:"insert-link",hotkeys:[{modifiers:["Ctrl","Shift"],key:"k"}],name:t$d("INSERT_LINK"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertLinkDialog.start(t.file.path,t.addText),!0)}}),this.addCommand({id:"insert-link-to-element",hotkeys:[{modifiers:["Ctrl","Shift"],key:"k"}],name:t$d("INSERT_LINK_TO_ELEMENT_NORMAL"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard(""),!0)}}),this.addCommand({id:"insert-link-to-element-group",name:t$d("INSERT_LINK_TO_ELEMENT_GROUP"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard("group="),!0)}}),this.addCommand({id:"insert-link-to-element-frame",name:t$d("INSERT_LINK_TO_ELEMENT_FRAME"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard("frame="),!0)}}),this.addCommand({id:"insert-link-to-element-area",name:t$d("INSERT_LINK_TO_ELEMENT_AREA"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(t.copyLinkToSelectedElementToClipboard("area="),!0)}}),this.addCommand({id:"toggle-lefthanded-mode",name:t$d("TOGGLE_LEFTHANDED_MODE"),checkCallback:e=>{if(e){if(this.app.workspace.getActiveViewOfType(ExcalidrawView)){const e=this.app.workspace.getActiveViewOfType(ExcalidrawView),t=null==e?void 0:e.excalidrawAPI;return!!t&&!!t.getAppState().trayModeEnabled}return!1}return this.app.workspace.getActiveViewOfType(ExcalidrawView),(async()=>{const e=this.settings.isLeftHanded;await this.loadSettings({applyLefthandedMode:!1}),this.settings.isLeftHanded=!e,this.saveSettings(),setLeftHandedMode(!e),setTimeout((()=>setLeftHandedMode(!e)))})(),!0}}),this.addCommand({id:"reset-image-to-100",name:t$d("RESET_IMG_TO_100"),checkCallback:e=>{const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!t)return!1;if(!t.excalidrawAPI)return!1;const A=t.getViewSelectedElements().filter((e=>"image"===e.type));if(1!==A.length)return e||new obsidian_module.Notice("Select a single image element and try again"),!1;const i=A[0];return t.excalidrawData.getFile(i.fileId)?!!e||void(async()=>{const e=new ExcalidrawAutomate(this,t),n=await e.getOriginalImageSize(i);if(n){e.copyViewElementsToEAforEditing(A);const t=e.getElement(i.id);t.width=n.width,t.height=n.height,e.addElementsToView(!1,!1,!1)}})():(e||new obsidian_module.Notice("Select a single image element and try again"),!1)}}),this.addCommand({id:"insert-image",name:t$d("INSERT_IMAGE"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertImageDialog.start(t),!0)}}),this.addCommand({id:"import-svg",name:t$d("IMPORT_SVG"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.importSVGDialog.start(t),!0)}}),this.addCommand({id:"release-notes",name:t$d("READ_RELEASE_NOTES"),checkCallback:e=>e?Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView)):(new ReleaseNotes(this.app,this,PLUGIN_VERSION).open(),!0)}),this.addCommand({id:"tray-mode",name:t$d("TRAY_MODE"),checkCallback:e=>{if(e){const e=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(!e||!e.excalidrawRef)return!1;const t=e.excalidrawAPI.getAppState();return!t.zenModeEnabled&&!t.viewModeEnabled}const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!(!t||!t.excalidrawAPI||(t.toggleTrayMode(),0))}}),this.addCommand({id:"insert-md",name:t$d("INSERT_MD"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(this.insertMDDialog.start(t),!0)}}),this.addCommand({id:"insert-pdf",name:t$d("INSERT_PDF"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(new InsertPDFModal(this,t).open(),!0)}}),this.addCommand({id:"universal-add-file",name:t$d("UNIVERSAL_ADD_FILE"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(new UniversalInsertFileModal(this,t).open(),!0)}}),this.addCommand({id:"insert-LaTeX-symbol",name:t$d("INSERT_LATEX"),checkCallback:e=>{if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView));const t=this.app.workspace.getActiveViewOfType(ExcalidrawView);return!!t&&(insertLaTeXToView(t),!0)}}),this.addCommand({id:"toggle-excalidraw-view",name:t$d("TOGGLE_MODE"),checkCallback:e=>{const t=this.app.workspace.getActiveFile();if(!t)return!1;const A=this.isExcalidrawFile(t);if(e)return Boolean(this.app.workspace.getActiveViewOfType(ExcalidrawView))?!this.app.workspace.getActiveViewOfType(ExcalidrawView).compatibilityMode:A;const i=this.app.workspace.getActiveViewOfType(ExcalidrawView);if(i){const e=i.leaf;return this.excalidrawFileModes[e.id||t.path]="markdown",void this.setMarkdownView(e)}const n=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);if(n&&A){const e=n.leaf;return this.excalidrawFileModes[e.id||t.path]="excalidraw",void this.setExcalidrawView(e)}}}),this.addCommand({id:"convert-to-excalidraw",name:t$d("CONVERT_NOTE_TO_EXCALIDRAW"),checkCallback:e=>{const t=this.app.workspace.getActiveFile(),A=this.app.workspace.getActiveViewOfType(obsidian_module.MarkdownView);if(!t||!A)return!1;const i=0===t.stat.size;if(e)return i;i&&(async()=>{await this.app.vault.modify(t,await this.getBlankDrawing()),this.setExcalidrawView(A.leaf)})()}}),this.addCommand({id:"convert-excalidraw",name:t$d("CONVERT_EXCALIDRAW"),checkCallback:e=>{if(e){const e=this.app.vault.getFiles().filter((e=>"excalidraw"==e.extension));return e.length>0}return this.convertExcalidrawToMD(),!0}})}async convertSingleExcalidrawToMD(e,t=!1,A=!1){const i=await this.app.vault.read(e),n=e.name.substring(0,e.name.lastIndexOf(".excalidraw"))+(t?".md":".excalidraw.md"),a=getNewUniqueFilepath(this.app.vault,n,obsidian_module.normalizePath(e.path.substring(0,e.path.lastIndexOf(e.name))));log(a);const r=await this.app.vault.create(a,FRONTMATTER+await this.exportSceneToMD(i));return this.settings.keepInSync&&EXPORT_TYPES.forEach((t=>{const A=e.path.substring(0,e.path.lastIndexOf(".excalidraw"))+t,i=this.app.vault.getAbstractFileByPath(obsidian_module.normalizePath(A));if(i&&i instanceof obsidian_module.TFile){const e=a.substring(0,a.lastIndexOf(".md"))+t;this.app.fileManager.renameFile(i,e)}})),A||this.app.vault.delete(e),r}async convertExcalidrawToMD(e=!1,t=!1){const A=this.app.vault.getFiles().filter((e=>"excalidraw"==e.extension));for(const i of A)this.convertSingleExcalidrawToMD(i,e,t);new obsidian_module.Notice(`Converted ${A.length} files.`)}registerMonkeyPatches(){var e,t;(null===(t=null===(e=app.plugins)||void 0===e?void 0:e.plugins)||void 0===t?void 0:t["obsidian-hover-editor"])||this.register(around(obsidian_module.WorkspaceLeaf.prototype,{getRoot:e=>function(){const t=e.call(this);return t.getRoot===this.getRoot?t:t.getRoot()}})),this.registerEvent(app.workspace.on("editor-menu",((e,t,A)=>{if(!(A&&A instanceof obsidian_module.MarkdownView))return;const i=A.file,n=A.leaf;if(!A.file)return;const a=this.app.metadataCache.getFileCache(i);(null==a?void 0:a.frontmatter)&&a.frontmatter[FRONTMATTER_KEY]&&e.addItem((e=>e.setTitle(t$d("OPEN_AS_EXCALIDRAW")).setIcon(ICON_NAME).setSection("excalidraw").onClick((()=>{this.excalidrawFileModes[n.id||i.path]="excalidraw",this.setExcalidrawView(n)}))))}))),this.registerEvent(app.workspace.on("file-menu",((e,t,A,i)=>{if(!(i&&i.view instanceof obsidian_module.MarkdownView))return;if(!(t instanceof obsidian_module.TFile))return;const n=this.app.metadataCache.getFileCache(t);(null==n?void 0:n.frontmatter)&&n.frontmatter[FRONTMATTER_KEY]&&(e.addItem((e=>{e.setTitle(t$d("OPEN_AS_EXCALIDRAW")).setIcon(ICON_NAME).setSection("pane").onClick((()=>{this.excalidrawFileModes[i.id||t.path]="excalidraw",this.setExcalidrawView(i)}))})),e.items.unshift(e.items.pop()))})));const A=this;this.register(around(obsidian_module.WorkspaceLeaf.prototype,{detach:e=>function(){var t;const i=null===(t=this.view)||void 0===t?void 0:t.getState();return(null==i?void 0:i.file)&&A.excalidrawFileModes[this.id||i.file]&&delete A.excalidrawFileModes[this.id||i.file],e.apply(this)},setViewState:e=>function(t,...i){var n;if(A._loaded&&"markdown"===t.type&&(null===(n=t.state)||void 0===n?void 0:n.file)&&"markdown"!==A.excalidrawFileModes[this.id||t.state.file]){const n=app.metadataCache.getCache(t.state.file);if((null==n?void 0:n.frontmatter)&&n.frontmatter[FRONTMATTER_KEY]){const n=Object.assign(Object.assign({},t),{type:"excalidraw"});return A.excalidrawFileModes[t.state.file]="excalidraw",e.apply(this,[n,...i])}}return e.apply(this,[t,...i])}}))}registerEventListeners(){const e=this;this.app.workspace.onLayoutReady((async()=>{e.registerEvent(app.vault.on("rename",(async(t,A)=>{t instanceof obsidian_module.TFile&&e.isExcalidrawFile(t)&&e.settings.keepInSync&&[EXPORT_TYPES,"excalidraw"].flat().forEach((async e=>{const i=getIMGFilename(A,e),n=app.vault.getAbstractFileByPath(obsidian_module.normalizePath(i));if(n&&n instanceof obsidian_module.TFile){const A=getIMGFilename(t.path,e);await app.fileManager.renameFile(n,A)}}))}))),e.registerEvent(app.vault.on("modify",(async t=>{app.workspace.getLeavesOfType("excalidraw").forEach((async A=>{const i=A.view;if(i.file&&(i.file.path===t.path||"excalidraw"===t.extension&&`${t.path.substring(0,t.path.lastIndexOf(".excalidraw"))}.md`===i.file.path)){if(i.semaphores.preventReload)return void(i.semaphores.preventReload=!1);if(i.lastSaveTimestamp+3e5<Date.now())return void i.reload(!0,i.file);if("md"===t.extension){const A=new ExcalidrawData(e),n=await app.vault.read(t);await A.loadData(n,t,getTextMode(n)),i.synchronizeWithData(A),i.semaphores.dirty&&(i.autosaveTimer&&i.autosaveFunction&&clearTimeout(i.autosaveTimer),i.autosaveFunction&&i.autosaveFunction())}else i.reload(!0,i.file)}}))}))),e.registerEvent(app.vault.on("delete",(async t=>{if(!(t instanceof obsidian_module.TFile))return;const A=this.excalidrawFiles.has(t);if(this.updateFileCache(t,void 0,!0),!A)return;const i=app.workspace.getLeavesOfType("excalidraw");for(let e=0;e<i.length;e++)i[e].view.file.path==t.path&&await i[e].setViewState({type:"excalidraw",state:{file:null}});e.settings.keepInSync&&setTimeout((()=>{[EXPORT_TYPES,"excalidraw"].flat().forEach((async e=>{const A=getIMGFilename(t.path,e),i=app.vault.getAbstractFileByPath(obsidian_module.normalizePath(A));i&&i instanceof obsidian_module.TFile&&await app.vault.delete(i)}))}),500)}))),e.registerEvent(app.workspace.on("active-leaf-change",(async t=>{var A;e.leafChangeTimeout&&clearTimeout(e.leafChangeTimeout),e.leafChangeTimeout=setTimeout((()=>{e.leafChangeTimeout=null}),1e3);const i=e.activeExcalidrawView,n=t.view instanceof ExcalidrawView?t.view:null;
|