You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 4-6.RSVP
Socket
Book a DemoInstallSign in
Socket

inline-style-editor

Package Overview
Dependencies
Maintainers
1
Versions
37
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

inline-style-editor - npm Package Compare versions

Comparing version

to
1.3.2

4

dist/inline-style-editor.js

@@ -1,2 +0,2 @@

!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).InlineStyleEditor=e()}(this,(function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function l(t,e){t.appendChild(e)}function s(t,e,n){t.insertBefore(e,n||null)}function a(t){t.parentNode.removeChild(t)}function c(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function u(t){return document.createElement(t)}function f(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function d(t){return document.createTextNode(t)}function h(){return d(" ")}function p(){return d("")}function g(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function y(t,e,n){t.classList[n?"add":"remove"](e)}let b;function w(t){b=t}function _(){if(!b)throw new Error("Function called outside component initialization");return b}function k(t){_().$$.on_mount.push(t)}function $(t){_().$$.on_destroy.push(t)}const x=[],S=[],C=[],M=[],E=Promise.resolve();let L=!1;function T(){L||(L=!0,E.then(O))}function A(){return T(),E}function N(t){C.push(t)}const D=new Set;let H=0;function O(){const t=b;do{for(;H<x.length;){const t=x[H];H++,w(t),P(t.$$)}for(w(null),x.length=0,H=0;S.length;)S.pop()();for(let t=0;t<C.length;t+=1){const e=C[t];D.has(e)||(D.add(e),e())}C.length=0}while(x.length);for(;M.length;)M.pop()();L=!1,D.clear(),w(t)}function P(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(N)}}const R=new Set;let B;function I(){B={r:0,c:[],p:B}}function F(){B.r||r(B.c),B=B.p}function j(t,e){t&&t.i&&(R.delete(t),t.i(e))}function G(t,e,n,r){if(t&&t.o){if(R.has(t))return;R.add(t),B.c.push((()=>{R.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function q(t,n,i,l){const{fragment:s,on_mount:a,on_destroy:c,after_update:u}=t.$$;s&&s.m(n,i),l||N((()=>{const n=a.map(e).filter(o);c?c.push(...n):r(n),t.$$.on_mount=[]})),u.forEach(N)}function U(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function z(e,o,i,l,s,c,u,f=[-1]){const d=b;w(e);const h=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:s,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(d?d.$$.context:[])),callbacks:n(),dirty:f,skip_bound:!1,root:o.target||d.$$.root};u&&u(h.root);let p=!1;if(h.ctx=i?i(e,o.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return h.ctx&&s(h.ctx[t],h.ctx[t]=o)&&(!h.skip_bound&&h.bound[t]&&h.bound[t](o),p&&function(t,e){-1===t.$$.dirty[0]&&(x.push(t),T(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),n})):[],h.update(),p=!0,r(h.before_update),h.fragment=!!l&&l(h.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);h.fragment&&h.fragment.l(t),t.forEach(a)}else h.fragment&&h.fragment.c();o.intro&&j(e.$$.fragment),q(e,o.target,o.anchor,o.customElement),O()}w(d)}class W{$destroy(){U(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Y(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function X(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function V(t){let e,n,r;function o(t,r,o=0,i=t.length){if(o<i){if(0!==e(r,r))return i;do{const e=o+i>>>1;n(t[e],r)<0?o=e+1:i=e}while(o<i)}return o}return 2!==t.length?(e=Y,n=(e,n)=>Y(t(e),n),r=(e,n)=>t(e)-n):(e=t===Y||t===X?t:J,n=t,r=t),{left:o,center:function(t,e,n=0,i=t.length){const l=o(t,e,n,i-1);return l>n&&r(t[l-1],e)>-r(t[l],e)?l-1:l},right:function(t,r,o=0,i=t.length){if(o<i){if(0!==e(r,r))return i;do{const e=o+i>>>1;n(t[e],r)<=0?o=e+1:i=e}while(o<i)}return o}}}function J(){return 0}V(Y),V((function(t){return null===t?NaN:+t})).center;var Z=Math.sqrt(50),K=Math.sqrt(10),Q=Math.sqrt(2);function tt(t,e,n){var r,o,i,l,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(o=t,t=e,e=o),0===(l=function(t,e,n){var r=(e-t)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Z?10:i>=K?5:i>=Q?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Z?10:i>=K?5:i>=Q?2:1)}(t,e,n))||!isFinite(l))return[];if(l>0){let n=Math.round(t/l),r=Math.round(e/l);for(n*l<t&&++n,r*l>e&&--r,i=new Array(o=r-n+1);++s<o;)i[s]=(n+s)*l}else{l=-l;let n=Math.round(t*l),r=Math.round(e*l);for(n/l<t&&++n,r/l>e&&--r,i=new Array(o=r-n+1);++s<o;)i[s]=(n+s)/l}return r&&i.reverse(),i}function et(t){return Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(o=+o)>=o&&++n}return n}(t))/Math.LN2)+1}var nt=Array.prototype.slice;function rt(t,e){return t-e}var ot=t=>()=>t;function it(t,e){for(var n,r=-1,o=e.length;++r<o;)if(n=lt(t,e[r]))return n;return 0}function lt(t,e){for(var n=e[0],r=e[1],o=-1,i=0,l=t.length,s=l-1;i<l;s=i++){var a=t[i],c=a[0],u=a[1],f=t[s],d=f[0],h=f[1];if(st(a,f,e))return 0;u>r!=h>r&&n<(d-c)*(r-u)/(h-u)+c&&(o=-o)}return o}function st(t,e,n){var r,o,i,l;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(o=t[r=+(t[0]===e[0])],i=n[r],l=e[r],o<=i&&i<=l||l<=i&&i<=o)}function at(){}var ct=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ut(){var t=1,e=1,n=et,r=s;function o(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(rt);else{const n=function(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}(t),r=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Z?o*=10:i>=K?o*=5:i>=Q&&(o*=2),e<t?-o:o}(n[0],n[1],e);e=tt(Math.floor(n[0]/r)*r,Math.floor(n[1]/r-1)*r,e)}return e.map((e=>i(t,e)))}function i(n,o){var i=[],s=[];return function(n,r,o){var i,s,a,c,u,f,d=new Array,h=new Array;i=s=-1,c=n[0]>=r,ct[c<<1].forEach(p);for(;++i<t-1;)a=c,c=n[i+1]>=r,ct[a|c<<1].forEach(p);ct[c<<0].forEach(p);for(;++s<e-1;){for(i=-1,c=n[s*t+t]>=r,u=n[s*t]>=r,ct[c<<1|u<<2].forEach(p);++i<t-1;)a=c,c=n[s*t+t+i+1]>=r,f=u,u=n[s*t+i+1]>=r,ct[a|c<<1|u<<2|f<<3].forEach(p);ct[c|u<<3].forEach(p)}i=-1,u=n[s*t]>=r,ct[u<<2].forEach(p);for(;++i<t-1;)f=u,u=n[s*t+i+1]>=r,ct[u<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+i,t[0][1]+s],a=[t[1][0]+i,t[1][1]+s],c=l(r),u=l(a);(e=h[c])?(n=d[u])?(delete h[e.end],delete d[n.start],e===n?(e.ring.push(a),o(e.ring)):d[e.start]=h[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete h[e.end],e.ring.push(a),h[e.end=u]=e):(e=d[u])?(n=h[c])?(delete d[e.start],delete h[n.end],e===n?(e.ring.push(a),o(e.ring)):d[n.start]=h[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(r),d[e.start=c]=e):d[c]=h[u]={start:c,end:u,ring:[r,a]}}ct[u<<3].forEach(p)}(n,o,(function(t){r(t,n,o),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==it((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:o,coordinates:i}}function l(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,o){n.forEach((function(n){var i,l=n[0],s=n[1],a=0|l,c=0|s,u=r[c*t+a];l>0&&l<t&&a===l&&(i=r[c*t+a-1],n[0]=l+(o-i)/(u-i)-.5),s>0&&s<e&&c===s&&(i=r[(c-1)*t+a],n[1]=s+(o-i)/(u-i)-.5)}))}return o.contour=i,o.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,o},o.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ot(nt.call(t)):ot(t),o):n},o.smooth=function(t){return arguments.length?(r=t?s:at,o):r===s},o}function ft(t,e){return!(t.x<e.left||t.x>e.right||t.y>e.bottom||t.y<e.top)}function dt(t,e){for(const n of e)if(ft(t,n))return!0;return!1}function ht({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} h${t} v${e} h-${t}z`}
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).InlineStyleEditor=e()}(this,(function(){"use strict";function t(){}function e(t){return t()}function n(){return Object.create(null)}function r(t){t.forEach(e)}function o(t){return"function"==typeof t}function i(t,e){return t!=t?e==e:t!==e||t&&"object"==typeof t||"function"==typeof t}function s(t,e){t.appendChild(e)}function l(t,e,n){t.insertBefore(e,n||null)}function a(t){t.parentNode.removeChild(t)}function c(t,e){for(let n=0;n<t.length;n+=1)t[n]&&t[n].d(e)}function u(t){return document.createElement(t)}function f(t){return document.createElementNS("http://www.w3.org/2000/svg",t)}function h(t){return document.createTextNode(t)}function d(){return h(" ")}function p(){return h("")}function g(t,e,n,r){return t.addEventListener(e,n,r),()=>t.removeEventListener(e,n,r)}function m(t,e,n){null==n?t.removeAttribute(e):t.getAttribute(e)!==n&&t.setAttribute(e,n)}function v(t,e){e=""+e,t.wholeText!==e&&(t.data=e)}function y(t,e,n){t.classList[n?"add":"remove"](e)}let b;function w(t){b=t}function _(){if(!b)throw new Error("Function called outside component initialization");return b}function k(t){_().$$.on_mount.push(t)}function $(t){_().$$.on_destroy.push(t)}const C=[],S=[],x=[],M=[],E=Promise.resolve();let T=!1;function L(){T||(T=!0,E.then(O))}function A(){return L(),E}function H(t){x.push(t)}const N=new Set;let D=0;function O(){const t=b;do{for(;D<C.length;){const t=C[D];D++,w(t),R(t.$$)}for(w(null),C.length=0,D=0;S.length;)S.pop()();for(let t=0;t<x.length;t+=1){const e=x[t];N.has(e)||(N.add(e),e())}x.length=0}while(C.length);for(;M.length;)M.pop()();T=!1,N.clear(),w(t)}function R(t){if(null!==t.fragment){t.update(),r(t.before_update);const e=t.dirty;t.dirty=[-1],t.fragment&&t.fragment.p(t.ctx,e),t.after_update.forEach(H)}}const P=new Set;let B;function F(){B={r:0,c:[],p:B}}function I(){B.r||r(B.c),B=B.p}function j(t,e){t&&t.i&&(P.delete(t),t.i(e))}function G(t,e,n,r){if(t&&t.o){if(P.has(t))return;P.add(t),B.c.push((()=>{P.delete(t),r&&(n&&t.d(1),r())})),t.o(e)}else r&&r()}function W(t,n,i,s){const{fragment:l,on_mount:a,on_destroy:c,after_update:u}=t.$$;l&&l.m(n,i),s||H((()=>{const n=a.map(e).filter(o);c?c.push(...n):r(n),t.$$.on_mount=[]})),u.forEach(H)}function q(t,e){const n=t.$$;null!==n.fragment&&(r(n.on_destroy),n.fragment&&n.fragment.d(e),n.on_destroy=n.fragment=null,n.ctx=[])}function U(e,o,i,s,l,c,u,f=[-1]){const h=b;w(e);const d=e.$$={fragment:null,ctx:null,props:c,update:t,not_equal:l,bound:n(),on_mount:[],on_destroy:[],on_disconnect:[],before_update:[],after_update:[],context:new Map(o.context||(h?h.$$.context:[])),callbacks:n(),dirty:f,skip_bound:!1,root:o.target||h.$$.root};u&&u(d.root);let p=!1;if(d.ctx=i?i(e,o.props||{},((t,n,...r)=>{const o=r.length?r[0]:n;return d.ctx&&l(d.ctx[t],d.ctx[t]=o)&&(!d.skip_bound&&d.bound[t]&&d.bound[t](o),p&&function(t,e){-1===t.$$.dirty[0]&&(C.push(t),L(),t.$$.dirty.fill(0)),t.$$.dirty[e/31|0]|=1<<e%31}(e,t)),n})):[],d.update(),p=!0,r(d.before_update),d.fragment=!!s&&s(d.ctx),o.target){if(o.hydrate){const t=function(t){return Array.from(t.childNodes)}(o.target);d.fragment&&d.fragment.l(t),t.forEach(a)}else d.fragment&&d.fragment.c();o.intro&&j(e.$$.fragment),W(e,o.target,o.anchor,o.customElement),O()}w(h)}class z{$destroy(){q(this,1),this.$destroy=t}$on(t,e){const n=this.$$.callbacks[t]||(this.$$.callbacks[t]=[]);return n.push(e),()=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1)}}$set(t){var e;this.$$set&&(e=t,0!==Object.keys(e).length)&&(this.$$.skip_bound=!0,this.$$set(t),this.$$.skip_bound=!1)}}function Y(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function X(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function V(t){let e,n,r;function o(t,r,o=0,i=t.length){if(o<i){if(0!==e(r,r))return i;do{const e=o+i>>>1;n(t[e],r)<0?o=e+1:i=e}while(o<i)}return o}return 2!==t.length?(e=Y,n=(e,n)=>Y(t(e),n),r=(e,n)=>t(e)-n):(e=t===Y||t===X?t:J,n=t,r=t),{left:o,center:function(t,e,n=0,i=t.length){const s=o(t,e,n,i-1);return s>n&&r(t[s-1],e)>-r(t[s],e)?s-1:s},right:function(t,r,o=0,i=t.length){if(o<i){if(0!==e(r,r))return i;do{const e=o+i>>>1;n(t[e],r)<=0?o=e+1:i=e}while(o<i)}return o}}}function J(){return 0}V(Y),V((function(t){return null===t?NaN:+t})).center;var Z=Math.sqrt(50),K=Math.sqrt(10),Q=Math.sqrt(2);function tt(t,e,n){var r,o,i,s,l=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(o=t,t=e,e=o),0===(s=function(t,e,n){var r=(e-t)/Math.max(0,n),o=Math.floor(Math.log(r)/Math.LN10),i=r/Math.pow(10,o);return o>=0?(i>=Z?10:i>=K?5:i>=Q?2:1)*Math.pow(10,o):-Math.pow(10,-o)/(i>=Z?10:i>=K?5:i>=Q?2:1)}(t,e,n))||!isFinite(s))return[];if(s>0){let n=Math.round(t/s),r=Math.round(e/s);for(n*s<t&&++n,r*s>e&&--r,i=new Array(o=r-n+1);++l<o;)i[l]=(n+l)*s}else{s=-s;let n=Math.round(t*s),r=Math.round(e*s);for(n/s<t&&++n,r/s>e&&--r,i=new Array(o=r-n+1);++l<o;)i[l]=(n+l)/s}return r&&i.reverse(),i}function et(t){return Math.ceil(Math.log(function(t,e){let n=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++n;else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(o=+o)>=o&&++n}return n}(t))/Math.LN2)+1}var nt=Array.prototype.slice;function rt(t,e){return t-e}var ot=t=>()=>t;function it(t,e){for(var n,r=-1,o=e.length;++r<o;)if(n=st(t,e[r]))return n;return 0}function st(t,e){for(var n=e[0],r=e[1],o=-1,i=0,s=t.length,l=s-1;i<s;l=i++){var a=t[i],c=a[0],u=a[1],f=t[l],h=f[0],d=f[1];if(lt(a,f,e))return 0;u>r!=d>r&&n<(h-c)*(r-u)/(d-u)+c&&(o=-o)}return o}function lt(t,e,n){var r,o,i,s;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(o=t[r=+(t[0]===e[0])],i=n[r],s=e[r],o<=i&&i<=s||s<=i&&i<=o)}function at(){}var ct=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ut(){var t=1,e=1,n=et,r=l;function o(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(rt);else{const n=function(t,e){let n,r;if(void 0===e)for(const e of t)null!=e&&(void 0===n?e>=e&&(n=r=e):(n>e&&(n=e),r<e&&(r=e)));else{let o=-1;for(let i of t)null!=(i=e(i,++o,t))&&(void 0===n?i>=i&&(n=r=i):(n>i&&(n=i),r<i&&(r=i)))}return[n,r]}(t),r=function(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),o=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),i=r/o;return i>=Z?o*=10:i>=K?o*=5:i>=Q&&(o*=2),e<t?-o:o}(n[0],n[1],e);e=tt(Math.floor(n[0]/r)*r,Math.floor(n[1]/r-1)*r,e)}return e.map((e=>i(t,e)))}function i(n,o){var i=[],l=[];return function(n,r,o){var i,l,a,c,u,f,h=new Array,d=new Array;i=l=-1,c=n[0]>=r,ct[c<<1].forEach(p);for(;++i<t-1;)a=c,c=n[i+1]>=r,ct[a|c<<1].forEach(p);ct[c<<0].forEach(p);for(;++l<e-1;){for(i=-1,c=n[l*t+t]>=r,u=n[l*t]>=r,ct[c<<1|u<<2].forEach(p);++i<t-1;)a=c,c=n[l*t+t+i+1]>=r,f=u,u=n[l*t+i+1]>=r,ct[a|c<<1|u<<2|f<<3].forEach(p);ct[c|u<<3].forEach(p)}i=-1,u=n[l*t]>=r,ct[u<<2].forEach(p);for(;++i<t-1;)f=u,u=n[l*t+i+1]>=r,ct[u<<2|f<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+i,t[0][1]+l],a=[t[1][0]+i,t[1][1]+l],c=s(r),u=s(a);(e=d[c])?(n=h[u])?(delete d[e.end],delete h[n.start],e===n?(e.ring.push(a),o(e.ring)):h[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(a),d[e.end=u]=e):(e=h[u])?(n=d[c])?(delete h[e.start],delete d[n.end],e===n?(e.ring.push(a),o(e.ring)):h[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete h[e.start],e.ring.unshift(r),h[e.start=c]=e):h[c]=d[u]={start:c,end:u,ring:[r,a]}}ct[u<<3].forEach(p)}(n,o,(function(t){r(t,n,o),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?i.push([t]):l.push(t)})),l.forEach((function(t){for(var e,n=0,r=i.length;n<r;++n)if(-1!==it((e=i[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:o,coordinates:i}}function s(e){return 2*e[0]+e[1]*(t+1)*4}function l(n,r,o){n.forEach((function(n){var i,s=n[0],l=n[1],a=0|s,c=0|l,u=r[c*t+a];s>0&&s<t&&a===s&&(i=r[c*t+a-1],n[0]=s+(o-i)/(u-i)-.5),l>0&&l<e&&c===l&&(i=r[(c-1)*t+a],n[1]=l+(o-i)/(u-i)-.5)}))}return o.contour=i,o.size=function(n){if(!arguments.length)return[t,e];var r=Math.floor(n[0]),i=Math.floor(n[1]);if(!(r>=0&&i>=0))throw new Error("invalid size");return t=r,e=i,o},o.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?ot(nt.call(t)):ot(t),o):n},o.smooth=function(t){return arguments.length?(r=t?l:at,o):r===l},o}function ft(t,e){return!(t.x<e.left||t.x>e.right||t.y>e.bottom||t.y<e.top)}function ht(t,e){for(const n of e)if(ft(t,n))return!0;return!1}function dt({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} h${t} v${e} h-${t}z`}
/*!

@@ -9,2 +9,2 @@ * vanilla-picker v2.12.1

*/
var pt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},gt=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),mt=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var l,s=t[Symbol.iterator]();!(r=(l=s.next()).done)&&(n.push(l.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&s.return&&s.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var vt={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function yt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var bt=function(){function t(e,n,r,o){pt(this,t);var i=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var l=e&&""+e;l&&function(e){if(e.startsWith("hsl")){var n=e.match(/([\-\d\.e]+)/g).map(Number),r=mt(n,4),o=r[0],l=r[1],s=r[2],a=r[3];void 0===a&&(a=1),o/=360,l/=100,s/=100,i.hsla=[o,l,s,a]}else if(e.startsWith("rgb")){var c=e.match(/([\-\d\.e]+)/g).map(Number),u=mt(c,4),f=u[0],d=u[1],h=u[2],p=u[3];void 0===p&&(p=1),i.rgba=[f,d,h,p]}else e.startsWith("#")?i.rgba=t.hexToRgb(e):i.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(l.toLowerCase())}else this.rgba=[e,n,r,void 0===o?1:o]}return gt(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return yt(t,3===e?3:0)}));return t?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(t){var e=[360,100,100,1],n=["","%","%",""],r=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,r){return yt(t*e[r],3===r?3:1)+n[r]}));return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(t){var e=this.hex;return t?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(t){3===t.length&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,e){return e<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(e){this.rgba=t.hexToRgb(e)}}],[{key:"hexToRgb",value:function(t){var e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var n=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(e){var n=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=vt[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=mt(t,4),n=e[0],r=e[1],o=e[2],i=e[3];n/=255,r/=255,o/=255;var l=Math.max(n,r,o),s=Math.min(n,r,o),a=void 0,c=void 0,u=(l+s)/2;if(l===s)a=c=0;else{var f=l-s;switch(c=u>.5?f/(2-l-s):f/(l+s),l){case n:a=(r-o)/f+(r<o?6:0);break;case r:a=(o-n)/f+2;break;case o:a=(n-r)/f+4}a/=6}return[a,c,u,i]}},{key:"hslToRgb",value:function(t){var e=mt(t,4),n=e[0],r=e[1],o=e[2],i=e[3],l=void 0,s=void 0,a=void 0;if(0===r)l=s=a=o;else{var c=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},u=o<.5?o*(1+r):o+r-o*r,f=2*o-u;l=c(f,u,n+1/3),s=c(f,u,n),a=c(f,u,n-1/3)}var d=[255*l,255*s,255*a].map(Math.round);return d[3]=i,d}}]),t}(),wt=function(){function t(){pt(this,t),this._events=[]}return gt(t,[{key:"add",value:function(t,e,n){t.addEventListener(e,n,!1),this._events.push({target:t,type:e,handler:n})}},{key:"remove",value:function(e,n,r){this._events=this._events.filter((function(o){var i=!0;return e&&e!==o.target&&(i=!1),n&&n!==o.type&&(i=!1),r&&r!==o.handler&&(i=!1),i&&t._doRemove(o.target,o.type,o.handler),!i}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return t._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,e,n){t.removeEventListener(e,n,!1)}}]),t}();function _t(t,e,n){var r=!1;function o(t,e,n){return Math.max(e,Math.min(t,n))}function i(t,i,l){if(l&&(r=!0),r){t.preventDefault();var s=e.getBoundingClientRect(),a=s.width,c=s.height,u=i.clientX,f=i.clientY,d=o(u-s.left,0,a),h=o(f-s.top,0,c);n(d/a,h/c)}}function l(t,e){1===(void 0===t.buttons?t.which:t.buttons)?i(t,t,e):r=!1}function s(t,e){1===t.touches.length?i(t,t.touches[0],e):r=!1}t.add(e,"mousedown",(function(t){l(t,!0)})),t.add(e,"touchstart",(function(t){s(t,!0)})),t.add(window,"mousemove",l),t.add(e,"touchmove",s),t.add(window,"mouseup",(function(t){r=!1})),t.add(e,"touchend",(function(t){r=!1})),t.add(e,"touchcancel",(function(t){r=!1}))}var kt="keydown",$t="mousedown",xt="focusin";function St(t,e){return(e||document).querySelector(t)}function Ct(t){t.preventDefault(),t.stopPropagation()}function Mt(t,e,n,r,o){t.add(e,kt,(function(t){n.indexOf(t.key)>=0&&(o&&Ct(t),r(t))}))}var Et=function(){function t(e){pt(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new wt,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return gt(t,[{key:"setOptions",value:function(t){var e=this;if(t){var n=this.settings;if(t instanceof HTMLElement)n.parent=t;else{n.parent&&t.parent&&n.parent!==t.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(t,e,n){for(var r in t)n&&n.indexOf(r)>=0||(e[r]=t[r])}(t,n),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var r=t.color||t.colour;r&&this._setColor(r)}var o=n.parent;if(o&&n.popup&&!this._popupInited){var i=function(t){return e.openHandler(t)};this._events.add(o,"click",i),Mt(this._events,o,[" ","Spacebar","Enter"],i),this._popupInited=!0}else t.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&t.type===kt?this._domEdit:this.domElement;setTimeout((function(){return e.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var e=t&&t.type,n=!1;if(t)if(e===$t||e===xt){var r=(this.__containedEvent||0)+100;t.timeStamp>r&&(n=!0)}else Ct(t),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==$t&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}},{key:"setColor",value:function(t,e){this._setColor(t,{silent:e})}},{key:"_setColor",value:function(t,e){if("string"==typeof t&&(t=t.trim()),t){e=e||{};var n=void 0;try{n=new bt(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,e){this.setColor(t,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var e,n,r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=o,this._domH=St(".picker_hue",o),this._domSL=St(".picker_sl",o),this._domA=St(".picker_alpha",o),this._domEdit=St(".picker_editor input",o),this._domSample=St(".picker_sample",o),this._domOkay=St(".picker_done button",o),this._domCancel=St(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup((function(){return o.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,e=this,n=this.domElement,r=this._events;function o(t,e,n){r.add(t,e,n)}o(n,"click",(function(t){return t.preventDefault()})),_t(r,this._domH,(function(t,n){return e._setHSLA(t)})),_t(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&_t(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var i=this._domEdit;o(i,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),o(i,"focus",(function(t){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};o(window,$t,e),o(window,xt,e),Mt(r,n,["Esc","Escape"],e);var i=function(e){t.__containedEvent=e.timeStamp};o(n,$t,i),o(n,xt,i),o(t._domCancel,"click",e)}));var l=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",l),Mt(r,n,["Enter"],l)}},{key:"_setPosition",value:function(){var t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup((function(n){"static"===getComputedStyle(t).position&&(t.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===r?e.classList.add(t):e.classList.remove(t)})),e.classList.add(r)}))}},{key:"_setHSLA",value:function(t,e,n,r,o){o=o||{};var i=this.colour,l=i.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(l[e]=t)})),i.hsla=l,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(i)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",o=e.hslString,i=e.hslaString,l=this._domH,s=this._domSL,a=this._domA,c=St(".picker_selector",l),u=St(".picker_selector",s),f=St(".picker_selector",a);y(0,c,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,y(0,u,n[1]),b(0,u,1-n[2]),s.style.color=o,b(0,f,1-n[3]);var d=o,h=d.replace("hsl","hsla").replace(")",", 0)"),p="linear-gradient("+[d,h]+")";if(this._domA.style.background=p+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!t.fromEditor){var g=this.settings.editorFormat,m=this.settings.alpha,v=void 0;switch(g){case"rgb":v=e.printRGB(m);break;case"hsl":v=e.printHSL(m);break;default:v=e.printHex(m)}this._domEdit.value=v}this._domSample.style.color=i}function y(t,e,n){e.style.left=100*n+"%"}function b(t,e,n){e.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(t){var e=this.domElement;if(!e)return!1;var n=t?"":"none",r=e.style.display!==n;return r&&(e.style.display=n),r}}]),t}();function Lt(e){let n;return{c(){n=u("div")},m(t,r){s(t,n,r),e[6](n)},p:t,i:t,o:t,d(t){t&&a(n),e[6](null)}}}function Tt(t,e,n){let r,o,{value:i="#AAAAAAFF"}=e,{options:l={}}=e,{onChange:s=(()=>{})}=e;function a(t){var e;(e=t.hex)!==i&&(s(e,i),n(1,i=e))}return k((()=>{!function(t){if(!r)return;o&&o.destroy();t.onChange=a,n(5,o=new Et({parent:r,color:i,popup:!1,...t})),o.show(),o.openHandler()}(l)})),$((()=>{o.destroy()})),t.$$set=t=>{"value"in t&&n(1,i=t.value),"options"in t&&n(2,l=t.options),"onChange"in t&&n(3,s=t.onChange)},t.$$.update=()=>{34&t.$$.dirty&&o&&o.setColor(i)},[r,i,l,s,function(t){o.setColor(t)},o,function(t){S[t?"unshift":"push"]((()=>{r=t,n(0,r)}))}]}var At=class extends W{constructor(t){super(),z(this,t,Tt,Lt,i,{value:1,options:2,onChange:3,setColor:4})}get setColor(){return this.$$.ctx[4]}};const Nt=new Set(["Arial","Arial Black","Bahnschrift","Calibri","Cambria","Cambria Math","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic Medium","Gabriola","Gadugi","Georgia","HoloLens MDL2 Assets","Impact","Ink Free","Javanese Text","Leelawadee UI","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU-ExtB","Mongolian Baiti","MS Gothic","MV Boli","Myanmar Text","Nirmala UI","Palatino Linotype","Segoe MDL2 Assets","Segoe Print","Segoe Script","Segoe UI","Segoe UI Historic","Segoe UI Emoji","Segoe UI Symbol","SimSun","Sitka","Sylfaen","Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","Yu Gothic","American Typewriter","Andale Mono","Arial","Arial Black","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Avenir","Avenir Next","Avenir Next Condensed","Baskerville","Big Caslon","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bradley Hand","Brush Script MT","Chalkboard","Chalkboard SE","Chalkduster","Charter","Cochin","Comic Sans MS","Copperplate","Courier","Courier New","Didot","DIN Alternate","DIN Condensed","Futura","Geneva","Georgia","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Impact","Lucida Grande","Luminari","Marker Felt","Menlo","Microsoft Sans Serif","Monaco","Noteworthy","Optima","Palatino","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Tahoma","Times","Times New Roman","Trattatello","Trebuchet MS","Verdana","Zapfino"].sort());function Dt(){let{fonts:t}=document;const e=t.entries();let n=[],r=!1;for(;!r;){const t=e.next();t.done?r=t.done:n.push(t.value[0].family)}return[...new Set(n)]}function Ht(t,e,n){const r=t.slice();r[65]=e[n],r[67]=e,r[68]=n;const o=r[65].props[r[65].selected];return r[66]=o,r}function Ot(t,e,n){const r=t.slice();return r[69]=e[n],r}function Pt(t,e,n){const r=t.slice();return r[72]=e[n],r[74]=n,r}function Rt(t,e,n){const r=t.slice();return r[75]=e[n],r[77]=n,r}function Bt(t,e,n){const r=t.slice();return r[78]=e[n],r[80]=n,r}function It(t,e,n){const r=t.slice();return r[81]=e[n][0],r[82]=e[n][1],r[84]=n,r}function Ft(t){let e,n,r,o=t[2],i=[];for(let e=0;e<o.length;e+=1)i[e]=jt(It(t,o,e));return{c(){e=u("div"),n=u("b"),n.textContent="Elem",r=h();for(let t=0;t<i.length;t+=1)i[t].c();m(e,"class","select-tab")},m(t,o){s(t,e,o),l(e,n),l(e,r);for(let t=0;t<i.length;t+=1)i[t].m(e,null)},p(t,n){if(100&n[0]){let r;for(o=t[2],r=0;r<o.length;r+=1){const l=It(t,o,r);i[r]?i[r].p(l,n):(i[r]=jt(l),i[r].c(),i[r].m(e,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}},d(t){t&&a(e),c(i,t)}}}function jt(t){let e,n,r,o,i,c=t[82]+"";function f(){return t[36](t[84])}return{c(){e=u("span"),n=d(c),r=h(),y(e,"selected",t[5]===t[84])},m(t,a){s(t,e,a),l(e,n),l(e,r),o||(i=g(e,"click",f),o=!0)},p(r,o){t=r,4&o[0]&&c!==(c=t[82]+"")&&v(n,c),32&o[0]&&y(e,"selected",t[5]===t[84])},d(t){t&&a(e),o=!1,i()}}}function Gt(t){let e,n,r,o,i,c=t[78]+"";function f(){return t[37](t[80])}return{c(){e=u("span"),n=d(c),m(e,"title",r=t[78]),y(e,"selected",t[6]===t[80])},m(t,r){s(t,e,r),l(e,n),o||(i=g(e,"click",f),o=!0)},p(o,i){t=o,40&i[0]&&c!==(c=t[78]+"")&&v(n,c),40&i[0]&&r!==(r=t[78])&&m(e,"title",r),64&i[0]&&y(e,"selected",t[6]===t[80])},d(t){t&&a(e),o=!1,i()}}}function qt(t){let e,n,r,o,i,c=t[75]+"";function f(){return t[38](t[77])}return{c(){e=u("span"),n=d(c),r=h(),y(e,"selected",t[7]===t[77])},m(t,a){s(t,e,a),l(e,n),l(e,r),o||(i=g(e,"click",f),o=!0)},p(r,o){t=r,48&o[0]&&c!==(c=t[75]+"")&&v(n,c),128&o[0]&&y(e,"selected",t[7]===t[77])},d(t){t&&a(e),o=!1,i()}}}function Ut(t){let e,n=("custom"!==t[75]||"inline"===t[17]&&"custom"===t[75]&&t[16])&&qt(t);return{c(){n&&n.c(),e=p()},m(t,r){n&&n.m(t,r),s(t,e,r)},p(t,r){"custom"!==t[75]||"inline"===t[17]&&"custom"===t[75]&&t[16]?n?n.p(t,r):(n=qt(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&a(e)}}}function zt(t){let e,n,r,o,i="inline"===t[17]&&t[0](t[18]),f=t[13],d=[];for(let e=0;e<f.length;e+=1)d[e]=te(Ht(t,f,e));const p=t=>G(d[t],1,1,(()=>{d[t]=null}));let g="inline"===t[17]&&null!==t[15][t[5]]&&ee(t),v=i&&ne(t);return{c(){e=u("div");for(let t=0;t<d.length;t+=1)d[t].c();n=h(),g&&g.c(),r=h(),v&&v.c(),m(e,"class","editor")},m(t,i){s(t,e,i);for(let t=0;t<d.length;t+=1)d[t].m(e,null);l(e,n),g&&g.m(e,null),l(e,r),v&&v.m(e,null),o=!0},p(t,o){if(9461760&o[0]){let r;for(f=t[13],r=0;r<f.length;r+=1){const i=Ht(t,f,r);d[r]?(d[r].p(i,o),j(d[r],1)):(d[r]=te(i),d[r].c(),j(d[r],1),d[r].m(e,n))}for(I(),r=f.length;r<d.length;r+=1)p(r);F()}"inline"===t[17]&&null!==t[15][t[5]]?g?g.p(t,o):(g=ee(t),g.c(),g.m(e,r)):g&&(g.d(1),g=null),393217&o[0]&&(i="inline"===t[17]&&t[0](t[18])),i?v?v.p(t,o):(v=ne(t),v.c(),v.m(e,null)):v&&(v.d(1),v=null)},i(t){if(!o){for(let t=0;t<f.length;t+=1)j(d[t]);o=!0}},o(t){d=d.filter(Boolean);for(let t=0;t<d.length;t+=1)G(d[t]);o=!1},d(t){t&&a(e),c(d,t),g&&g.d(),v&&v.d()}}}function Wt(t){let e,n,r=t[66]+"";return{c(){e=u("span"),n=d(r)},m(t,r){s(t,e,r),l(e,n)},p(t,e){8192&e[0]&&r!==(r=t[66]+"")&&v(n,r)},d(t){t&&a(e)}}}function Yt(t){let e,n,r,o,i=t[65].props,f=[];for(let e=0;e<i.length;e+=1)f[e]=Xt(Pt(t,i,e));function d(...e){return t[39](t[65],t[67],t[68],...e)}return{c(){e=u("div"),n=u("select");for(let t=0;t<f.length;t+=1)f[t].c()},m(t,i){s(t,e,i),l(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);r||(o=g(n,"change",d),r=!0)},p(e,r){if(t=e,8192&r[0]){let e;for(i=t[65].props,e=0;e<i.length;e+=1){const o=Pt(t,i,e);f[e]?f[e].p(o,r):(f[e]=Xt(o),f[e].c(),f[e].m(n,null))}for(;e<f.length;e+=1)f[e].d(1);f.length=i.length}},d(t){t&&a(e),c(f,t),r=!1,o()}}}function Xt(t){let e,n,r,o,i=t[72]+"";return{c(){e=u("option"),n=d(i),r=h(),e.selected=o=t[74]===t[65].selected,e.__value=t[74],e.value=e.__value},m(t,o){s(t,e,o),l(e,n),l(e,r)},p(t,r){8192&r[0]&&i!==(i=t[72]+"")&&v(n,i),8192&r[0]&&o!==(o=t[74]===t[65].selected)&&(e.selected=o)},d(t){t&&a(e)}}}function Vt(t){let e,n;function r(...e){return t[43](t[66],...e)}return e=new At({props:{value:t[14][t[66]].value,onChange:r}}),{c(){var t;(t=e.$$.fragment)&&t.c()},m(t,r){q(e,t,r),n=!0},p(n,o){t=n;const i={};24576&o[0]&&(i.value=t[14][t[66]].value),8192&o[0]&&(i.onChange=r),e.$set(i)},i(t){n||(j(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){U(e,t)}}}function Jt(e){let n,r,o,i,f=!e[65].includes(e[14][e[66]].value),d=f&&Kt(),h=e[65],m=[];for(let t=0;t<h.length;t+=1)m[t]=Qt(Ot(e,h,t));function v(...t){return e[42](e[66],...t)}return{c(){n=u("select"),d&&d.c(),r=p();for(let t=0;t<m.length;t+=1)m[t].c()},m(t,e){s(t,n,e),d&&d.m(n,null),l(n,r);for(let t=0;t<m.length;t+=1)m[t].m(n,null);o||(i=g(n,"change",v),o=!0)},p(t,o){if(e=t,24576&o[0]&&(f=!e[65].includes(e[14][e[66]].value)),f?d||(d=Kt(),d.c(),d.m(n,r)):d&&(d.d(1),d=null),24576&o[0]){let t;for(h=e[65],t=0;t<h.length;t+=1){const r=Ot(e,h,t);m[t]?m[t].p(r,o):(m[t]=Qt(r),m[t].c(),m[t].m(n,null))}for(;t<m.length;t+=1)m[t].d(1);m.length=h.length}},i:t,o:t,d(t){t&&a(n),d&&d.d(),c(m,t),o=!1,i()}}}function Zt(e){let n,r,o,i,c,f,p,y,b,w,_=e[14][e[66]].displayed+"";function k(...t){return e[41](e[66],...t)}return{c(){n=u("input"),f=h(),p=u("span"),y=d(_),m(n,"type","range"),m(n,"min",r=e[14][e[66]].min),m(n,"max",o=e[14][e[66]].max),m(n,"step",i=e[14][e[66]].step||1),n.value=c=e[14][e[66]].value,m(p,"class","current-value")},m(t,e){s(t,n,e),s(t,f,e),s(t,p,e),l(p,y),b||(w=g(n,"change",k),b=!0)},p(t,l){e=t,24576&l[0]&&r!==(r=e[14][e[66]].min)&&m(n,"min",r),24576&l[0]&&o!==(o=e[14][e[66]].max)&&m(n,"max",o),24576&l[0]&&i!==(i=e[14][e[66]].step||1)&&m(n,"step",i),24576&l[0]&&c!==(c=e[14][e[66]].value)&&(n.value=c),24576&l[0]&&_!==(_=e[14][e[66]].displayed+"")&&v(y,_)},i:t,o:t,d(t){t&&a(n),t&&a(f),t&&a(p),b=!1,w()}}}function Kt(t){let e;return{c(){e=u("option"),e.textContent="--- ",e.selected="true",e.__value=" --- ",e.value=e.__value},m(t,n){s(t,e,n)},d(t){t&&a(e)}}}function Qt(t){let e,n,r,o,i=t[69]+"";return{c(){e=u("option"),n=d(i),e.selected=r=t[69]==t[14][t[66]].value||null,e.__value=o=" "+t[69]+" ",e.value=e.__value},m(t,r){s(t,e,r),l(e,n)},p(t,l){24576&l[0]&&i!==(i=t[69]+"")&&v(n,i),24576&l[0]&&r!==(r=t[69]==t[14][t[66]].value||null)&&(e.selected=r),24576&l[0]&&o!==(o=" "+t[69]+" ")&&(e.__value=o,e.value=e.__value)},d(t){t&&a(e)}}}function te(t){let e,n,r,o,i,c,f,d,p;function v(t,e){return t[65].props.length>1?Yt:Wt}let y=v(t),b=y(t);function w(){return t[40](t[66])}const _=[Zt,Jt,Vt],k=[];function $(t,e){return"slider"===t[65].type?0:"select"==t[65].type?1:"color"==t[65].type?2:-1}function x(t,e){return 1===e?function(t){const e=t.slice(),n=e[14][e[66]].choices();return e[65]=n,e}(t):t}return~(i=$(t))&&(c=k[i]=_[i](x(t,i))),{c(){e=u("div"),b.c(),n=h(),r=u("span"),r.textContent="✕",o=h(),c&&c.c(),m(r,"class","delete"),m(e,"class","prop-section")},m(t,a){s(t,e,a),b.m(e,null),l(e,n),l(e,r),l(e,o),~i&&k[i].m(e,null),f=!0,d||(p=g(r,"click",w),d=!0)},p(r,o){y===(y=v(t=r))&&b?b.p(t,o):(b.d(1),b=y(t),b&&(b.c(),b.m(e,n)));let l=i;i=$(t),i===l?~i&&k[i].p(x(t,i),o):(c&&(I(),G(k[l],1,1,(()=>{k[l]=null})),F()),~i?(c=k[i],c?c.p(x(t,i),o):(c=k[i]=_[i](x(t,i)),c.c()),j(c,1),c.m(e,null)):c=null)},i(t){f||(j(c),f=!0)},o(t){G(c),f=!1},d(t){t&&a(e),b.d(),~i&&k[i].d(),d=!1,p()}}}function ee(t){let e,n,r;return{c(){e=u("div"),e.textContent="Bring to front",m(e,"class","btn"),y(e,"active",!0===t[15][t[5]])},m(o,i){s(o,e,i),n||(r=g(e,"click",t[21]),n=!0)},p(t,n){32800&n[0]&&y(e,"active",!0===t[15][t[5]])},d(t){t&&a(e),n=!1,r()}}}function ne(e){let n,r,o;return{c(){n=u("div"),n.textContent="Delete element",m(n,"class","btn delete-elem")},m(t,i){s(t,n,i),r||(o=g(n,"click",e[22]),r=!0)},p:t,d(t){t&&a(n),r=!1,o()}}}function re(t){let e,n,o,i,d,p,v,y,b,w,_,k,$,x,S,C,M,E,L,T,A,N,D,H,O=t[2].length>1&&Ft(t),P=ce(t[3][t[5]]),R=[];for(let e=0;e<P.length;e+=1)R[e]=Gt(Bt(t,P,e));let B=t[4][t[5]]||[],q=[];for(let e=0;e<B.length;e+=1)q[e]=Ut(Rt(t,B,e));let U=t[4][t[5]]&&zt(t);return{c(){e=u("div"),n=h(),o=f("svg"),i=f("clipPath"),d=f("path"),p=f("rect"),b=h(),w=u("div"),_=u("div"),_.textContent="x",k=h(),O&&O.c(),$=h(),x=u("div"),S=u("b"),S.textContent="Rule:",C=h();for(let t=0;t<R.length;t+=1)R[t].c();M=h(),E=u("div"),L=u("b"),L.textContent="Property type:",T=h();for(let t=0;t<q.length;t+=1)q[t].c();var r,l,s,a;A=h(),U&&U.c(),r=e,l="position",null===(s="absolute")?r.style.removeProperty(l):r.style.setProperty(l,s,a?"important":""),m(d,"d",t[11]),m(i,"id","overlay-clip"),m(i,"clip-rule","evenodd"),m(p,"y","0"),m(p,"x","0"),m(p,"height","100%"),m(p,"width","100%"),m(p,"class","overlay-over"),m(o,"class","ise-helper-wrapper"),m(o,"version","1.1"),m(o,"xmlns","http://www.w3.org/2000/svg"),m(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),m(o,"width",v=t[12].width),m(o,"height",y=t[12].height),m(_,"class","close-button"),m(x,"class","select-tab"),m(E,"class","select-tab"),m(w,"class","ise")},m(r,a){s(r,e,a),t[34](e),s(r,n,a),s(r,o,a),l(o,i),l(i,d),l(o,p),t[35](o),s(r,b,a),s(r,w,a),l(w,_),l(w,k),O&&O.m(w,null),l(w,$),l(w,x),l(x,S),l(x,C);for(let t=0;t<R.length;t+=1)R[t].m(x,null);l(w,M),l(w,E),l(E,L),l(E,T);for(let t=0;t<q.length;t+=1)q[t].m(E,null);l(w,A),U&&U.m(w,null),t[44](w),N=!0,D||(H=[g(o,"click",t[19]),g(_,"click",t[1])],D=!0)},p(t,e){if((!N||2048&e[0])&&m(d,"d",t[11]),(!N||4096&e[0]&&v!==(v=t[12].width))&&m(o,"width",v),(!N||4096&e[0]&&y!==(y=t[12].height))&&m(o,"height",y),t[2].length>1?O?O.p(t,e):(O=Ft(t),O.c(),O.m(w,$)):O&&(O.d(1),O=null),16777320&e[0]){let n;for(P=ce(t[3][t[5]]),n=0;n<P.length;n+=1){const r=Bt(t,P,n);R[n]?R[n].p(r,e):(R[n]=Gt(r),R[n].c(),R[n].m(x,null))}for(;n<R.length;n+=1)R[n].d(1);R.length=P.length}if(196784&e[0]){let n;for(B=t[4][t[5]]||[],n=0;n<B.length;n+=1){const r=Rt(t,B,n);q[n]?q[n].p(r,e):(q[n]=Ut(r),q[n].c(),q[n].m(E,null))}for(;n<q.length;n+=1)q[n].d(1);q.length=B.length}t[4][t[5]]?U?(U.p(t,e),48&e[0]&&j(U,1)):(U=zt(t),U.c(),j(U,1),U.m(w,null)):U&&(I(),G(U,1,1,(()=>{U=null})),F())},i(t){N||(j(U),N=!0)},o(t){G(U),N=!1},d(i){i&&a(e),t[34](null),i&&a(n),i&&a(o),t[35](null),i&&a(b),i&&a(w),O&&O.d(),c(R,i),c(q,i),U&&U.d(),t[44](null),D=!1,r(H)}}}const oe="text",ie="border",le="stroke",se="background",ae="custom";function ce(t){return t?t.map(((t,e)=>{if("inline"===t)return"inline";const n=t.selectorText;return`${t.parentStyleSheet.title||`${e}`}: ${n}`})):[]}function ue(t,e=0){const n=t.getBoundingClientRect();return{left:n.left+window.scrollX-e,top:n.top+window.scrollY-e,width:n.width+2*e,height:n.height+2*e,right:n.left+window.scrollX+n.width+e,bottom:n.top+window.scrollY+n.height+e}}function fe(t,e="number"){if("raw"==e)return t;if("number"==e&&/[0-9]+(px)|(em)|(rem)/.test(t))return parseInt(t);if("rgb"==e){if("none"===t)return"#00000000";if(t.includes("rgb")||"#"==t[0])return function(t){const e=t.match(/[0-9\.]+/g).map((t=>parseFloat(t)));return 3===e.length&&e.push(1),e.reduce(((t,e,n)=>t+(3===n?Math.round(255*e).toString(16).padStart(2,"0"):e.toString(16).padStart(2,"0"))),"#")}(t)}return t}function de(t,e,n){let r,o;const i=["altGlyph","circle","ellipse","line","path","polygon","polyline","rect","text","textPath","tref","tspan"],l={"border-radius":{type:"slider",min:0,max:30,suffix:"px"},"border-width":{type:"slider",min:0,max:30,suffix:"px"},"border-style":{type:"select",choices:()=>["none","dotted","dashed","solid","double","groove","ridge","inset","outset"]},"border-color":{type:"color"},"font-family":{type:"select",choices:function(){return function(){const t=new Set;for(const e of Nt.values())document.fonts.check(`12px "${e}"`)&&t.add(e);return[...Dt(),...t.values()]}()}},"font-size":{type:"slider",min:0,max:40,suffix:"px"},"font-weight":{type:"slider",min:0,max:800},color:{type:"color"},"stroke-width":{type:"slider",min:0,max:20,step:.5,suffix:"px"},stroke:{type:"color"},"stroke-linejoin":{type:"select",choices:()=>["bevel","miter","round"]},fill:{type:"color"},"stroke-dasharray":{type:"slider",min:0,max:30,suffix:"px"},"background-color":{type:"color"}};let{getAdditionalElems:s=(()=>[])}=e,{listenOnClick:a=!1}=e,{onStyleChanged:c=(()=>{})}=e,{customProps:u={}}=e,{inlineDeletable:f=(()=>!0)}=e,{cssRuleFilter:d=null}=e;const h={[oe]:["font-family","font-size","font-weight","color"],[ie]:["border-radius","border-width","border-color","border-style"],[le]:["stroke-width","stroke","stroke-dasharray","stroke-linejoin","fill"],[se]:["background-color"],[ae]:Object.keys(u)},p={slider:0,select:1,color:2};let g,m,v,y,b,w=null,_="",x={width:0,height:0},C=[[]],M=[],E=[],L=0,T=0,N=0,D={},H=[],O=!1;function P(){const t={...l,...u},e=(o=t,h[b].reduce(((t,e)=>(t[e]=o[e],t)),{}));var o;Object.keys(e).forEach((t=>{const n=e[t].type;let o="number";if("color"===n?o="rgb":"select"===n&&(o="raw"),e[t].getter){const n=e[t].getter(r);if(null===n)return void delete e[t];e[t].value=n,e[t].displayed=n}else e[t].displayed=W(r,t,"raw"),e[t].value=W(r,t,o)})),n(13,y=Object.entries(e).reduce(((t,[e,n])=>{const r=n.type,o=t.find((t=>t.type===r));return o?o.props.push(e):t.push({selected:0,props:[e],type:r}),t}),[]).sort(((t,e)=>p[t.type]<p[e.type]?-1:p[t.type]>p[e.type]?1:0))),n(14,D=e),q()}k((()=>{F(),n(32,w=m.parentNode),document.body.appendChild(m),document.body.appendChild(v),document.body.appendChild(g),z(),setTimeout((()=>{z()}),1e3),window.addEventListener("resize",z)})),$((()=>{window.removeEventListener("resize",z),a&&w.removeEventListener("click",getTargetsAndRules)}));let R=new Set;function B(t){I(t.target,t.pageX,t.pageY)}async function I(t,e,r){if(z(),t.classList.contains("overlay-over"))return j();if(!m.contains(t)){n(5,L=0),n(6,T=0),n(7,N=0),n(15,H=[]),n(4,E=[]),n(3,M=[]),n(2,C=[[t,"Clicked"],...s(t)]),n(4,E=C.reduce(((t,e)=>{const n=e[0],r=[];!n.firstChild||3!==n.firstChild.nodeType&&"tspan"!==n.firstChild.tagName||r.push(oe);const o=n.tagName.toLowerCase();let l=!1;return i.includes(o)?(r.push(le),"g"===n.parentElement.tagName.toLowerCase()&&n.previousElementSibling&&n.previousElementSibling.tagName.toLowerCase()==o&&(l=!0)):(r.push(ie),r.push(se)),console.log(r),l?H.push(!0):H.push(null),t.push(r),t}),[])),n(16,O=!1),n(3,M=function(t){const e=document.styleSheets;return t.reduce(((t,n)=>{const r=n[0],o=["inline"];for(let t in e)try{const n=e[t].cssRules;for(let t in n){let e=n[t].selectorText;if(e&&!(n[t].selectorText.length>50)&&!e.split(",").some((t=>"*"===t))&&(e.endsWith(":hover")&&(e=e.substring(0,e.length-":hover".length)),r.matches(e))){if(null!==d&&!d(r,n[t].selectorText))continue;o.push(n[t])}}}catch(n){R.has(t)||(console.log("Style editor: Not able to access",e[t].ownerNode,"sheet. Try CORS loading the sheet if you want to edit it."),R.add(t))}return t.push(o),t}),[])}(C));for(let e of Object.values(u))if(null!==e.getter(t)){n(16,O=!0);break}if(Object.keys(u).length&&E[0].push(ae),await A(),P(),e&&r)G(e,r);else{const e=ue(t,15);G(e.left,e.top)}}}function F(){n(9,m.style.display="none",m),n(10,v.style.display="none",v),n(11,_="")}function j(){F()}function G(t,e){n(9,m.style.display="block",m),n(9,m.style.opacity=0,m);const r=m.getBoundingClientRect();t=t+r.width+20>x.width?t-r.width-20:t+20,e=e+r.height+20>x.height?e-r.height-20:e+20,e=Math.max(e,0),n(9,m.style.left=t+"px",m),n(9,m.style.top=e+"px",m),n(10,v.style.display="block",v),n(9,m.style.opacity=1,m),q()}async function q(){if(await A(),!o)return;let t;if("inline"===o)t=[r];else{const e=o.selectorText.replace(/(:hover)|:focus/g,"");t=Array.from(document.querySelectorAll(e))}const e=t.map((t=>ue(t,10)));n(11,_=function(t,e){let n=function({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} v${e} h${t} v-${e}z`}({width:e.width,height:e.height});if(t.length<10&&!function(t){for(let r=0;r<t.length-1;++r){const o=t[r];for(let i=r+1;i<t.length;++i)if(e=o,n=t[i],e.right>=n.left&&n.right>=e.left&&e.bottom>=n.top&&n.bottom>=e.top)return!0}var e,n;return!1}(t)){for(const e of t)n=`${n} ${ht(e)}`;return n}const r=Math.min(...t.map((t=>t.left))),o=Math.min(...t.map((t=>t.top))),i=t.map((t=>(t.left=t.left-r,t.right=t.right-r,t.top=t.top-o,t.bottom=t.bottom-o,t)));i.sort(((t,e)=>t.left>e.left?1:t.left<e.left?-1:0));const l=Math.ceil(Math.max(...i.map((t=>t.right)))),s=Math.ceil(Math.max(...i.map((t=>t.bottom)))),a=l*s/2e4,c=Math.ceil(l/a),u=Math.ceil(s/a),f=l/c,d=s/u,h=new Array(c*u);for(let t=0,e=0;t<u;++t)for(let n=0;n<c;++n,++e)h[e]=dt({x:n*a,y:t*a},i)?1:0;const p=ut().size([c,u]).thresholds([1])(h)[0];let g="";for(let t of p.coordinates)for(let e of t){for(let t=0;t<e.length;++t){const n=e[t],i=n[0]*f+r,l=n[1]*d+o;g+=t?`L ${i} ${l}`:`M${i} ${l}`}g+="Z"}return`${n} ${g}`}(e,x))}const U=function(t,e,n=!1){let r;return function(){const o=this,i=arguments,l=function(){r=null,n||t.apply(o,i)},s=n&&!r;clearTimeout(r),r=setTimeout(l,e),s&&t.apply(o,i)}}((function(t,e,i){const l=i?e+i:e;if("inline"===o)if(D[t].setter)D[t].setter(r,e);else{r.style[t]=l}else o.style.setProperty(t,l);n(14,D[t].value=e,D),n(14,D[t].displayed=l,D),c(r,o,t,l),q()}),100);function z(){const t=getComputedStyle(document.body),e=parseInt(t.marginLeft),r=parseInt(t.marginRight),o=parseInt(t.marginTop),i=parseInt(t.marginBottom);n(12,x={width:document.body.offsetWidth+e+r,height:document.body.offsetHeight+o+i})}function W(t,e,n="number"){let r=o?.style?.[e];if(!r){r=getComputedStyle(t)[e]}return fe(r,n)}function Y(t){"inline"===o?r.style.removeProperty(t):o.style.removeProperty(t),c(r,o,t,null),P()}function X(t){const e=M[L]?.[t];"inline"!==e&&N===E[L].length-1&&n(7,N=0),n(6,T=t)}return t.$$set=t=>{"getAdditionalElems"in t&&n(25,s=t.getAdditionalElems),"listenOnClick"in t&&n(26,a=t.listenOnClick),"onStyleChanged"in t&&n(27,c=t.onStyleChanged),"customProps"in t&&n(28,u=t.customProps),"inlineDeletable"in t&&n(0,f=t.inlineDeletable),"cssRuleFilter"in t&&n(29,d=t.cssRuleFilter)},t.$$.update=()=>{2&t.$$.dirty[1]&&null!==w&&a&&w.addEventListener("click",B),36&t.$$.dirty[0]&&n(18,r=C[L][0]),104&t.$$.dirty[0]&&n(17,o=M[L]?.[T]),176&t.$$.dirty[0]|4&t.$$.dirty[1]&&E[L]?.[N]!==b&&n(33,b=E[L]?.[N]),96&t.$$.dirty[0]|4&t.$$.dirty[1]&&(b||T||L)&&P()},[f,F,C,M,E,L,T,N,g,m,v,_,x,y,D,H,O,o,r,j,U,function(){n(15,H[L]=!1,H),r.parentNode.appendChild(r),c(r,o,"bringtofront",null)},function(){r.remove(),F()},Y,X,s,a,c,u,d,I,function(){return"block"===m.style.display},w,b,function(t){S[t?"unshift":"push"]((()=>{g=t,n(8,g)}))},function(t){S[t?"unshift":"push"]((()=>{v=t,n(10,v)}))},t=>{n(5,L=t),n(6,T=0)},t=>{X(t)},t=>{n(7,N=t)},async(t,e,r,o)=>{n(13,e[r].selected=o.target.value,y),await A()},t=>Y(t),(t,e)=>U(t,e.target.value,D[t].suffix,e.target),(t,e)=>U(t,e.target.value),(t,e)=>U(t,e),function(t){S[t?"unshift":"push"]((()=>{m=t,n(9,m)}))}]}var he=class extends W{constructor(t){super(),z(this,t,de,re,i,{getAdditionalElems:25,listenOnClick:26,onStyleChanged:27,customProps:28,inlineDeletable:0,cssRuleFilter:29,open:30,close:1,isOpened:31},null,[-1,-1,-1])}get open(){return this.$$.ctx[30]}get close(){return this.$$.ctx[1]}get isOpened(){return this.$$.ctx[31]}};return class{constructor(t){return new he({target:document.body,props:t})}}}));
var pt=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},gt=function(){function t(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}(),mt=function(t,e){if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return function(t,e){var n=[],r=!0,o=!1,i=void 0;try{for(var s,l=t[Symbol.iterator]();!(r=(s=l.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,i=t}finally{try{!r&&l.return&&l.return()}finally{if(o)throw i}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")};String.prototype.startsWith=String.prototype.startsWith||function(t){return 0===this.indexOf(t)},String.prototype.padStart=String.prototype.padStart||function(t,e){for(var n=this;n.length<t;)n=e+n;return n};var vt={cb:"0f8ff",tqw:"aebd7",q:"-ffff",qmrn:"7fffd4",zr:"0ffff",bg:"5f5dc",bsq:"e4c4",bck:"---",nch:"ebcd",b:"--ff",bvt:"8a2be2",brwn:"a52a2a",brw:"deb887",ctb:"5f9ea0",hrt:"7fff-",chcT:"d2691e",cr:"7f50",rnw:"6495ed",crns:"8dc",crms:"dc143c",cn:"-ffff",Db:"--8b",Dcn:"-8b8b",Dgnr:"b8860b",Dgr:"a9a9a9",Dgrn:"-64-",Dkhk:"bdb76b",Dmgn:"8b-8b",Dvgr:"556b2f",Drng:"8c-",Drch:"9932cc",Dr:"8b--",Dsmn:"e9967a",Dsgr:"8fbc8f",DsTb:"483d8b",DsTg:"2f4f4f",Dtrq:"-ced1",Dvt:"94-d3",ppnk:"1493",pskb:"-bfff",mgr:"696969",grb:"1e90ff",rbrc:"b22222",rwht:"af0",stg:"228b22",chs:"-ff",gnsb:"dcdcdc",st:"8f8ff",g:"d7-",gnr:"daa520",gr:"808080",grn:"-8-0",grnw:"adff2f",hnw:"0fff0",htpn:"69b4",nnr:"cd5c5c",ng:"4b-82",vr:"0",khk:"0e68c",vnr:"e6e6fa",nrb:"0f5",wngr:"7cfc-",mnch:"acd",Lb:"add8e6",Lcr:"08080",Lcn:"e0ffff",Lgnr:"afad2",Lgr:"d3d3d3",Lgrn:"90ee90",Lpnk:"b6c1",Lsmn:"a07a",Lsgr:"20b2aa",Lskb:"87cefa",LsTg:"778899",Lstb:"b0c4de",Lw:"e0",m:"-ff-",mgrn:"32cd32",nn:"af0e6",mgnt:"-ff",mrn:"8--0",mqm:"66cdaa",mmb:"--cd",mmrc:"ba55d3",mmpr:"9370db",msg:"3cb371",mmsT:"7b68ee","":"-fa9a",mtr:"48d1cc",mmvt:"c71585",mnLb:"191970",ntc:"5fffa",mstr:"e4e1",mccs:"e4b5",vjw:"dead",nv:"--80",c:"df5e6",v:"808-0",vrb:"6b8e23",rng:"a5-",rngr:"45-",rch:"da70d6",pgnr:"eee8aa",pgrn:"98fb98",ptrq:"afeeee",pvtr:"db7093",ppwh:"efd5",pchp:"dab9",pr:"cd853f",pnk:"c0cb",pm:"dda0dd",pwrb:"b0e0e6",prp:"8-080",cc:"663399",r:"--",sbr:"bc8f8f",rb:"4169e1",sbrw:"8b4513",smn:"a8072",nbr:"4a460",sgrn:"2e8b57",ssh:"5ee",snn:"a0522d",svr:"c0c0c0",skb:"87ceeb",sTb:"6a5acd",sTgr:"708090",snw:"afa",n:"-ff7f",stb:"4682b4",tn:"d2b48c",t:"-8080",thst:"d8bfd8",tmT:"6347",trqs:"40e0d0",vt:"ee82ee",whT:"5deb3",wht:"",hts:"5f5f5",w:"-",wgrn:"9acd32"};function yt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:1,n=e>0?t.toFixed(e).replace(/0+$/,"").replace(/\.$/,""):t.toString();return n||"0"}var bt=function(){function t(e,n,r,o){pt(this,t);var i=this;if(void 0===e);else if(Array.isArray(e))this.rgba=e;else if(void 0===r){var s=e&&""+e;s&&function(e){if(e.startsWith("hsl")){var n=e.match(/([\-\d\.e]+)/g).map(Number),r=mt(n,4),o=r[0],s=r[1],l=r[2],a=r[3];void 0===a&&(a=1),o/=360,s/=100,l/=100,i.hsla=[o,s,l,a]}else if(e.startsWith("rgb")){var c=e.match(/([\-\d\.e]+)/g).map(Number),u=mt(c,4),f=u[0],h=u[1],d=u[2],p=u[3];void 0===p&&(p=1),i.rgba=[f,h,d,p]}else e.startsWith("#")?i.rgba=t.hexToRgb(e):i.rgba=t.nameToRgb(e)||t.hexToRgb(e)}(s.toLowerCase())}else this.rgba=[e,n,r,void 0===o?1:o]}return gt(t,[{key:"printRGB",value:function(t){var e=(t?this.rgba:this.rgba.slice(0,3)).map((function(t,e){return yt(t,3===e?3:0)}));return t?"rgba("+e+")":"rgb("+e+")"}},{key:"printHSL",value:function(t){var e=[360,100,100,1],n=["","%","%",""],r=(t?this.hsla:this.hsla.slice(0,3)).map((function(t,r){return yt(t*e[r],3===r?3:1)+n[r]}));return t?"hsla("+r+")":"hsl("+r+")"}},{key:"printHex",value:function(t){var e=this.hex;return t?e:e.substring(0,7)}},{key:"rgba",get:function(){if(this._rgba)return this._rgba;if(!this._hsla)throw new Error("No color is set");return this._rgba=t.hslToRgb(this._hsla)},set:function(t){3===t.length&&(t[3]=1),this._rgba=t,this._hsla=null}},{key:"rgbString",get:function(){return this.printRGB()}},{key:"rgbaString",get:function(){return this.printRGB(!0)}},{key:"hsla",get:function(){if(this._hsla)return this._hsla;if(!this._rgba)throw new Error("No color is set");return this._hsla=t.rgbToHsl(this._rgba)},set:function(t){3===t.length&&(t[3]=1),this._hsla=t,this._rgba=null}},{key:"hslString",get:function(){return this.printHSL()}},{key:"hslaString",get:function(){return this.printHSL(!0)}},{key:"hex",get:function(){return"#"+this.rgba.map((function(t,e){return e<3?t.toString(16):Math.round(255*t).toString(16)})).map((function(t){return t.padStart(2,"0")})).join("")},set:function(e){this.rgba=t.hexToRgb(e)}}],[{key:"hexToRgb",value:function(t){var e=(t.startsWith("#")?t.slice(1):t).replace(/^(\w{3})$/,"$1F").replace(/^(\w)(\w)(\w)(\w)$/,"$1$1$2$2$3$3$4$4").replace(/^(\w{6})$/,"$1FF");if(!e.match(/^([0-9a-fA-F]{8})$/))throw new Error("Unknown hex color; "+t);var n=e.match(/^(\w\w)(\w\w)(\w\w)(\w\w)$/).slice(1).map((function(t){return parseInt(t,16)}));return n[3]=n[3]/255,n}},{key:"nameToRgb",value:function(e){var n=e.toLowerCase().replace("at","T").replace(/[aeiouyldf]/g,"").replace("ght","L").replace("rk","D").slice(-5,4),r=vt[n];return void 0===r?r:t.hexToRgb(r.replace(/\-/g,"00").padStart(6,"f"))}},{key:"rgbToHsl",value:function(t){var e=mt(t,4),n=e[0],r=e[1],o=e[2],i=e[3];n/=255,r/=255,o/=255;var s=Math.max(n,r,o),l=Math.min(n,r,o),a=void 0,c=void 0,u=(s+l)/2;if(s===l)a=c=0;else{var f=s-l;switch(c=u>.5?f/(2-s-l):f/(s+l),s){case n:a=(r-o)/f+(r<o?6:0);break;case r:a=(o-n)/f+2;break;case o:a=(n-r)/f+4}a/=6}return[a,c,u,i]}},{key:"hslToRgb",value:function(t){var e=mt(t,4),n=e[0],r=e[1],o=e[2],i=e[3],s=void 0,l=void 0,a=void 0;if(0===r)s=l=a=o;else{var c=function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},u=o<.5?o*(1+r):o+r-o*r,f=2*o-u;s=c(f,u,n+1/3),l=c(f,u,n),a=c(f,u,n-1/3)}var h=[255*s,255*l,255*a].map(Math.round);return h[3]=i,h}}]),t}(),wt=function(){function t(){pt(this,t),this._events=[]}return gt(t,[{key:"add",value:function(t,e,n){t.addEventListener(e,n,!1),this._events.push({target:t,type:e,handler:n})}},{key:"remove",value:function(e,n,r){this._events=this._events.filter((function(o){var i=!0;return e&&e!==o.target&&(i=!1),n&&n!==o.type&&(i=!1),r&&r!==o.handler&&(i=!1),i&&t._doRemove(o.target,o.type,o.handler),!i}))}},{key:"destroy",value:function(){this._events.forEach((function(e){return t._doRemove(e.target,e.type,e.handler)})),this._events=[]}}],[{key:"_doRemove",value:function(t,e,n){t.removeEventListener(e,n,!1)}}]),t}();function _t(t,e,n){var r=!1;function o(t,e,n){return Math.max(e,Math.min(t,n))}function i(t,i,s){if(s&&(r=!0),r){t.preventDefault();var l=e.getBoundingClientRect(),a=l.width,c=l.height,u=i.clientX,f=i.clientY,h=o(u-l.left,0,a),d=o(f-l.top,0,c);n(h/a,d/c)}}function s(t,e){1===(void 0===t.buttons?t.which:t.buttons)?i(t,t,e):r=!1}function l(t,e){1===t.touches.length?i(t,t.touches[0],e):r=!1}t.add(e,"mousedown",(function(t){s(t,!0)})),t.add(e,"touchstart",(function(t){l(t,!0)})),t.add(window,"mousemove",s),t.add(e,"touchmove",l),t.add(window,"mouseup",(function(t){r=!1})),t.add(e,"touchend",(function(t){r=!1})),t.add(e,"touchcancel",(function(t){r=!1}))}var kt="keydown",$t="mousedown",Ct="focusin";function St(t,e){return(e||document).querySelector(t)}function xt(t){t.preventDefault(),t.stopPropagation()}function Mt(t,e,n,r,o){t.add(e,kt,(function(t){n.indexOf(t.key)>=0&&(o&&xt(t),r(t))}))}var Et=function(){function t(e){pt(this,t),this.settings={popup:"right",layout:"default",alpha:!0,editor:!0,editorFormat:"hex",cancelButton:!1,defaultColor:"#0cf"},this._events=new wt,this.onChange=null,this.onDone=null,this.onOpen=null,this.onClose=null,this.setOptions(e)}return gt(t,[{key:"setOptions",value:function(t){var e=this;if(t){var n=this.settings;if(t instanceof HTMLElement)n.parent=t;else{n.parent&&t.parent&&n.parent!==t.parent&&(this._events.remove(n.parent),this._popupInited=!1),function(t,e,n){for(var r in t)n&&n.indexOf(r)>=0||(e[r]=t[r])}(t,n),t.onChange&&(this.onChange=t.onChange),t.onDone&&(this.onDone=t.onDone),t.onOpen&&(this.onOpen=t.onOpen),t.onClose&&(this.onClose=t.onClose);var r=t.color||t.colour;r&&this._setColor(r)}var o=n.parent;if(o&&n.popup&&!this._popupInited){var i=function(t){return e.openHandler(t)};this._events.add(o,"click",i),Mt(this._events,o,[" ","Spacebar","Enter"],i),this._popupInited=!0}else t.parent&&!n.popup&&this.show()}}},{key:"openHandler",value:function(t){if(this.show()){t&&t.preventDefault(),this.settings.parent.style.pointerEvents="none";var e=t&&t.type===kt?this._domEdit:this.domElement;setTimeout((function(){return e.focus()}),100),this.onOpen&&this.onOpen(this.colour)}}},{key:"closeHandler",value:function(t){var e=t&&t.type,n=!1;if(t)if(e===$t||e===Ct){var r=(this.__containedEvent||0)+100;t.timeStamp>r&&(n=!0)}else xt(t),n=!0;else n=!0;n&&this.hide()&&(this.settings.parent.style.pointerEvents="",e!==$t&&this.settings.parent.focus(),this.onClose&&this.onClose(this.colour))}},{key:"movePopup",value:function(t,e){this.closeHandler(),this.setOptions(t),e&&this.openHandler()}},{key:"setColor",value:function(t,e){this._setColor(t,{silent:e})}},{key:"_setColor",value:function(t,e){if("string"==typeof t&&(t=t.trim()),t){e=e||{};var n=void 0;try{n=new bt(t)}catch(t){if(e.failSilently)return;throw t}if(!this.settings.alpha){var r=n.hsla;r[3]=1,n.hsla=r}this.colour=this.color=n,this._setHSLA(null,null,null,null,e)}}},{key:"setColour",value:function(t,e){this.setColor(t,e)}},{key:"show",value:function(){if(!this.settings.parent)return!1;if(this.domElement){var t=this._toggleDOM(!0);return this._setPosition(),t}var e,n,r=this.settings.template||'<div class="picker_wrapper" tabindex="-1"><div class="picker_arrow"></div><div class="picker_hue picker_slider"><div class="picker_selector"></div></div><div class="picker_sl"><div class="picker_selector"></div></div><div class="picker_alpha picker_slider"><div class="picker_selector"></div></div><div class="picker_editor"><input aria-label="Type a color name or hex value"/></div><div class="picker_sample"></div><div class="picker_done"><button>Ok</button></div><div class="picker_cancel"><button>Cancel</button></div></div>',o=(e=r,(n=document.createElement("div")).innerHTML=e,n.firstElementChild);return this.domElement=o,this._domH=St(".picker_hue",o),this._domSL=St(".picker_sl",o),this._domA=St(".picker_alpha",o),this._domEdit=St(".picker_editor input",o),this._domSample=St(".picker_sample",o),this._domOkay=St(".picker_done button",o),this._domCancel=St(".picker_cancel button",o),o.classList.add("layout_"+this.settings.layout),this.settings.alpha||o.classList.add("no_alpha"),this.settings.editor||o.classList.add("no_editor"),this.settings.cancelButton||o.classList.add("no_cancel"),this._ifPopup((function(){return o.classList.add("popup")})),this._setPosition(),this.colour?this._updateUI():this._setColor(this.settings.defaultColor),this._bindEvents(),!0}},{key:"hide",value:function(){return this._toggleDOM(!1)}},{key:"destroy",value:function(){this._events.destroy(),this.domElement&&this.settings.parent.removeChild(this.domElement)}},{key:"_bindEvents",value:function(){var t=this,e=this,n=this.domElement,r=this._events;function o(t,e,n){r.add(t,e,n)}o(n,"click",(function(t){return t.preventDefault()})),_t(r,this._domH,(function(t,n){return e._setHSLA(t)})),_t(r,this._domSL,(function(t,n){return e._setHSLA(null,t,1-n)})),this.settings.alpha&&_t(r,this._domA,(function(t,n){return e._setHSLA(null,null,null,1-n)}));var i=this._domEdit;o(i,"input",(function(t){e._setColor(this.value,{fromEditor:!0,failSilently:!0})})),o(i,"focus",(function(t){var e=this;e.selectionStart===e.selectionEnd&&e.select()})),this._ifPopup((function(){var e=function(e){return t.closeHandler(e)};o(window,$t,e),o(window,Ct,e),Mt(r,n,["Esc","Escape"],e);var i=function(e){t.__containedEvent=e.timeStamp};o(n,$t,i),o(n,Ct,i),o(t._domCancel,"click",e)}));var s=function(e){t._ifPopup((function(){return t.closeHandler(e)})),t.onDone&&t.onDone(t.colour)};o(this._domOkay,"click",s),Mt(r,n,["Enter"],s)}},{key:"_setPosition",value:function(){var t=this.settings.parent,e=this.domElement;t!==e.parentNode&&t.appendChild(e),this._ifPopup((function(n){"static"===getComputedStyle(t).position&&(t.style.position="relative");var r=!0===n?"popup_right":"popup_"+n;["popup_top","popup_bottom","popup_left","popup_right"].forEach((function(t){t===r?e.classList.add(t):e.classList.remove(t)})),e.classList.add(r)}))}},{key:"_setHSLA",value:function(t,e,n,r,o){o=o||{};var i=this.colour,s=i.hsla;[t,e,n,r].forEach((function(t,e){(t||0===t)&&(s[e]=t)})),i.hsla=s,this._updateUI(o),this.onChange&&!o.silent&&this.onChange(i)}},{key:"_updateUI",value:function(t){if(this.domElement){t=t||{};var e=this.colour,n=e.hsla,r="hsl("+360*n[0]+", 100%, 50%)",o=e.hslString,i=e.hslaString,s=this._domH,l=this._domSL,a=this._domA,c=St(".picker_selector",s),u=St(".picker_selector",l),f=St(".picker_selector",a);y(0,c,n[0]),this._domSL.style.backgroundColor=this._domH.style.color=r,y(0,u,n[1]),b(0,u,1-n[2]),l.style.color=o,b(0,f,1-n[3]);var h=o,d=h.replace("hsl","hsla").replace(")",", 0)"),p="linear-gradient("+[h,d]+")";if(this._domA.style.background=p+", linear-gradient(45deg, lightgrey 25%, transparent 25%, transparent 75%, lightgrey 75%) 0 0 / 2em 2em,\n linear-gradient(45deg, lightgrey 25%, white 25%, white 75%, lightgrey 75%) 1em 1em / 2em 2em",!t.fromEditor){var g=this.settings.editorFormat,m=this.settings.alpha,v=void 0;switch(g){case"rgb":v=e.printRGB(m);break;case"hsl":v=e.printHSL(m);break;default:v=e.printHex(m)}this._domEdit.value=v}this._domSample.style.color=i}function y(t,e,n){e.style.left=100*n+"%"}function b(t,e,n){e.style.top=100*n+"%"}}},{key:"_ifPopup",value:function(t,e){this.settings.parent&&this.settings.popup?t&&t(this.settings.popup):e&&e()}},{key:"_toggleDOM",value:function(t){var e=this.domElement;if(!e)return!1;var n=t?"":"none",r=e.style.display!==n;return r&&(e.style.display=n),r}}]),t}();function Tt(e){let n;return{c(){n=u("div")},m(t,r){l(t,n,r),e[6](n)},p:t,i:t,o:t,d(t){t&&a(n),e[6](null)}}}function Lt(t,e,n){let r,o,{value:i="#AAAAAAFF"}=e,{options:s={}}=e,{onChange:l=(()=>{})}=e;function a(t){var e;(e=t.hex)!==i&&(l(e,i),n(1,i=e))}return k((()=>{!function(t){if(!r)return;o&&o.destroy();t.onChange=a,n(5,o=new Et({parent:r,color:i,popup:!1,...t})),o.show(),o.openHandler()}(s)})),$((()=>{o.destroy()})),t.$$set=t=>{"value"in t&&n(1,i=t.value),"options"in t&&n(2,s=t.options),"onChange"in t&&n(3,l=t.onChange)},t.$$.update=()=>{34&t.$$.dirty&&o&&o.setColor(i)},[r,i,s,l,function(t){o.setColor(t)},o,function(t){S[t?"unshift":"push"]((()=>{r=t,n(0,r)}))}]}var At=class extends z{constructor(t){super(),U(this,t,Lt,Tt,i,{value:1,options:2,onChange:3,setColor:4})}get setColor(){return this.$$.ctx[4]}};const Ht=new class{constructor(){this.fontsToCheck=new Set(["Arial","Arial Black","Bahnschrift","Calibri","Cambria","Cambria Math","Candara","Comic Sans MS","Consolas","Constantia","Corbel","Courier New","Ebrima","Franklin Gothic Medium","Gabriola","Gadugi","Georgia","HoloLens MDL2 Assets","Impact","Ink Free","Javanese Text","Leelawadee UI","Lucida Console","Lucida Sans Unicode","Malgun Gothic","Marlett","Microsoft Himalaya","Microsoft JhengHei","Microsoft New Tai Lue","Microsoft PhagsPa","Microsoft Sans Serif","Microsoft Tai Le","Microsoft YaHei","Microsoft Yi Baiti","MingLiU-ExtB","Mongolian Baiti","MS Gothic","MV Boli","Myanmar Text","Nirmala UI","Palatino Linotype","Segoe MDL2 Assets","Segoe Print","Segoe Script","Segoe UI","Segoe UI Historic","Segoe UI Emoji","Segoe UI Symbol","SimSun","Sitka","Sylfaen","Symbol","Tahoma","Times New Roman","Trebuchet MS","Verdana","Webdings","Wingdings","Yu Gothic","American Typewriter","Andale Mono","Arial","Arial Black","Arial Narrow","Arial Rounded MT Bold","Arial Unicode MS","Avenir","Avenir Next","Avenir Next Condensed","Baskerville","Big Caslon","Bodoni 72","Bodoni 72 Oldstyle","Bodoni 72 Smallcaps","Bradley Hand","Brush Script MT","Chalkboard","Chalkboard SE","Chalkduster","Charter","Cochin","Comic Sans MS","Copperplate","Courier","Courier New","Didot","DIN Alternate","DIN Condensed","Futura","Geneva","Georgia","Gill Sans","Helvetica","Helvetica Neue","Herculanum","Hoefler Text","Impact","Lucida Grande","Luminari","Marker Felt","Menlo","Microsoft Sans Serif","Monaco","Noteworthy","Optima","Palatino","Papyrus","Phosphate","Rockwell","Savoye LET","SignPainter","Skia","Snell Roundhand","Tahoma","Times","Times New Roman","Trattatello","Trebuchet MS","Verdana","Zapfino","Comic Sans MS","Comic Sans","Apple Chancery","Bradley Hand","Brush Script MT","Brush Script Std","Snell Roundhand","URW Chancery L"].sort()),this.init()}init(){this.defaultWidth={},this.defaultHeight={},this.baseFonts=["monospace","sans-serif","serif","cursive"];this.container=document.getElementsByTagName("body")[0],this.spanTester=document.createElement("span"),this.spanTester.style.fontSize="72px",this.spanTester.innerHTML="mmmmmmmmmmlli",this.baseFonts.forEach((t=>{this.spanTester.style.fontFamily=t,this.container.appendChild(this.spanTester),this.defaultWidth[t]=this.spanTester.offsetWidth,this.defaultHeight[t]=this.spanTester.offsetHeight,this.container.removeChild(this.spanTester)})),this.detectFonts()}fontExists(t){let e=!1;for(const n of this.baseFonts){this.spanTester.style.fontFamily=t+","+n,this.container.appendChild(this.spanTester);const r=this.spanTester.offsetWidth!=this.defaultWidth[n]||this.spanTester.offsetHeight!=this.defaultHeight[n];this.container.removeChild(this.spanTester),e=e||r}return e}detectFonts(){this.availableFonts=[];for(const t of this.fontsToCheck.values())this.fontExists(t)&&this.availableFonts.push(t);this.availableFonts.sort()}};function Nt(){let{fonts:t}=document;const e=t.entries();let n=[],r=!1;for(;!r;){const t=e.next();t.done?r=t.done:n.push(t.value[0].family)}return[...new Set(n)]}function Dt(t,e,n){const r=t.slice();r[65]=e[n],r[67]=e,r[68]=n;const o=r[65].props[r[65].selected];return r[66]=o,r}function Ot(t,e,n){const r=t.slice();return r[69]=e[n],r}function Rt(t,e,n){const r=t.slice();return r[72]=e[n],r[74]=n,r}function Pt(t,e,n){const r=t.slice();return r[75]=e[n],r[77]=n,r}function Bt(t,e,n){const r=t.slice();return r[78]=e[n],r[80]=n,r}function Ft(t,e,n){const r=t.slice();return r[81]=e[n][0],r[82]=e[n][1],r[84]=n,r}function It(t){let e,n,r,o=t[2],i=[];for(let e=0;e<o.length;e+=1)i[e]=jt(Ft(t,o,e));return{c(){e=u("div"),n=u("b"),n.textContent="Elem",r=d();for(let t=0;t<i.length;t+=1)i[t].c();m(e,"class","select-tab")},m(t,o){l(t,e,o),s(e,n),s(e,r);for(let t=0;t<i.length;t+=1)i[t].m(e,null)},p(t,n){if(100&n[0]){let r;for(o=t[2],r=0;r<o.length;r+=1){const s=Ft(t,o,r);i[r]?i[r].p(s,n):(i[r]=jt(s),i[r].c(),i[r].m(e,null))}for(;r<i.length;r+=1)i[r].d(1);i.length=o.length}},d(t){t&&a(e),c(i,t)}}}function jt(t){let e,n,r,o,i,c=t[82]+"";function f(){return t[36](t[84])}return{c(){e=u("span"),n=h(c),r=d(),y(e,"selected",t[5]===t[84])},m(t,a){l(t,e,a),s(e,n),s(e,r),o||(i=g(e,"click",f),o=!0)},p(r,o){t=r,4&o[0]&&c!==(c=t[82]+"")&&v(n,c),32&o[0]&&y(e,"selected",t[5]===t[84])},d(t){t&&a(e),o=!1,i()}}}function Gt(t){let e,n,r,o,i,c=t[78]+"";function f(){return t[37](t[80])}return{c(){e=u("span"),n=h(c),m(e,"title",r=t[78]),y(e,"selected",t[6]===t[80])},m(t,r){l(t,e,r),s(e,n),o||(i=g(e,"click",f),o=!0)},p(o,i){t=o,40&i[0]&&c!==(c=t[78]+"")&&v(n,c),40&i[0]&&r!==(r=t[78])&&m(e,"title",r),64&i[0]&&y(e,"selected",t[6]===t[80])},d(t){t&&a(e),o=!1,i()}}}function Wt(t){let e,n,r,o,i,c=t[75]+"";function f(){return t[38](t[77])}return{c(){e=u("span"),n=h(c),r=d(),y(e,"selected",t[7]===t[77])},m(t,a){l(t,e,a),s(e,n),s(e,r),o||(i=g(e,"click",f),o=!0)},p(r,o){t=r,48&o[0]&&c!==(c=t[75]+"")&&v(n,c),128&o[0]&&y(e,"selected",t[7]===t[77])},d(t){t&&a(e),o=!1,i()}}}function qt(t){let e,n=("custom"!==t[75]||"inline"===t[17]&&"custom"===t[75]&&t[16])&&Wt(t);return{c(){n&&n.c(),e=p()},m(t,r){n&&n.m(t,r),l(t,e,r)},p(t,r){"custom"!==t[75]||"inline"===t[17]&&"custom"===t[75]&&t[16]?n?n.p(t,r):(n=Wt(t),n.c(),n.m(e.parentNode,e)):n&&(n.d(1),n=null)},d(t){n&&n.d(t),t&&a(e)}}}function Ut(t){let e,n,r,o,i="inline"===t[17]&&t[0](t[18]),f=t[13],h=[];for(let e=0;e<f.length;e+=1)h[e]=te(Dt(t,f,e));const p=t=>G(h[t],1,1,(()=>{h[t]=null}));let g="inline"===t[17]&&null!==t[15][t[5]]&&ee(t),v=i&&ne(t);return{c(){e=u("div");for(let t=0;t<h.length;t+=1)h[t].c();n=d(),g&&g.c(),r=d(),v&&v.c(),m(e,"class","editor")},m(t,i){l(t,e,i);for(let t=0;t<h.length;t+=1)h[t].m(e,null);s(e,n),g&&g.m(e,null),s(e,r),v&&v.m(e,null),o=!0},p(t,o){if(9461760&o[0]){let r;for(f=t[13],r=0;r<f.length;r+=1){const i=Dt(t,f,r);h[r]?(h[r].p(i,o),j(h[r],1)):(h[r]=te(i),h[r].c(),j(h[r],1),h[r].m(e,n))}for(F(),r=f.length;r<h.length;r+=1)p(r);I()}"inline"===t[17]&&null!==t[15][t[5]]?g?g.p(t,o):(g=ee(t),g.c(),g.m(e,r)):g&&(g.d(1),g=null),393217&o[0]&&(i="inline"===t[17]&&t[0](t[18])),i?v?v.p(t,o):(v=ne(t),v.c(),v.m(e,null)):v&&(v.d(1),v=null)},i(t){if(!o){for(let t=0;t<f.length;t+=1)j(h[t]);o=!0}},o(t){h=h.filter(Boolean);for(let t=0;t<h.length;t+=1)G(h[t]);o=!1},d(t){t&&a(e),c(h,t),g&&g.d(),v&&v.d()}}}function zt(t){let e,n,r=t[66]+"";return{c(){e=u("span"),n=h(r)},m(t,r){l(t,e,r),s(e,n)},p(t,e){8192&e[0]&&r!==(r=t[66]+"")&&v(n,r)},d(t){t&&a(e)}}}function Yt(t){let e,n,r,o,i=t[65].props,f=[];for(let e=0;e<i.length;e+=1)f[e]=Xt(Rt(t,i,e));function h(...e){return t[39](t[65],t[67],t[68],...e)}return{c(){e=u("div"),n=u("select");for(let t=0;t<f.length;t+=1)f[t].c()},m(t,i){l(t,e,i),s(e,n);for(let t=0;t<f.length;t+=1)f[t].m(n,null);r||(o=g(n,"change",h),r=!0)},p(e,r){if(t=e,8192&r[0]){let e;for(i=t[65].props,e=0;e<i.length;e+=1){const o=Rt(t,i,e);f[e]?f[e].p(o,r):(f[e]=Xt(o),f[e].c(),f[e].m(n,null))}for(;e<f.length;e+=1)f[e].d(1);f.length=i.length}},d(t){t&&a(e),c(f,t),r=!1,o()}}}function Xt(t){let e,n,r,o,i=t[72]+"";return{c(){e=u("option"),n=h(i),r=d(),e.selected=o=t[74]===t[65].selected,e.__value=t[74],e.value=e.__value},m(t,o){l(t,e,o),s(e,n),s(e,r)},p(t,r){8192&r[0]&&i!==(i=t[72]+"")&&v(n,i),8192&r[0]&&o!==(o=t[74]===t[65].selected)&&(e.selected=o)},d(t){t&&a(e)}}}function Vt(t){let e,n;function r(...e){return t[43](t[66],...e)}return e=new At({props:{value:t[14][t[66]].value,onChange:r}}),{c(){var t;(t=e.$$.fragment)&&t.c()},m(t,r){W(e,t,r),n=!0},p(n,o){t=n;const i={};24576&o[0]&&(i.value=t[14][t[66]].value),8192&o[0]&&(i.onChange=r),e.$set(i)},i(t){n||(j(e.$$.fragment,t),n=!0)},o(t){G(e.$$.fragment,t),n=!1},d(t){q(e,t)}}}function Jt(e){let n,r,o,i,f=!e[65].includes(e[14][e[66]].value),h=f&&Kt(),d=e[65],m=[];for(let t=0;t<d.length;t+=1)m[t]=Qt(Ot(e,d,t));function v(...t){return e[42](e[66],...t)}return{c(){n=u("select"),h&&h.c(),r=p();for(let t=0;t<m.length;t+=1)m[t].c()},m(t,e){l(t,n,e),h&&h.m(n,null),s(n,r);for(let t=0;t<m.length;t+=1)m[t].m(n,null);o||(i=g(n,"change",v),o=!0)},p(t,o){if(e=t,24576&o[0]&&(f=!e[65].includes(e[14][e[66]].value)),f?h||(h=Kt(),h.c(),h.m(n,r)):h&&(h.d(1),h=null),24576&o[0]){let t;for(d=e[65],t=0;t<d.length;t+=1){const r=Ot(e,d,t);m[t]?m[t].p(r,o):(m[t]=Qt(r),m[t].c(),m[t].m(n,null))}for(;t<m.length;t+=1)m[t].d(1);m.length=d.length}},i:t,o:t,d(t){t&&a(n),h&&h.d(),c(m,t),o=!1,i()}}}function Zt(e){let n,r,o,i,c,f,p,y,b,w,_=e[14][e[66]].displayed+"";function k(...t){return e[41](e[66],...t)}return{c(){n=u("input"),f=d(),p=u("span"),y=h(_),m(n,"type","range"),m(n,"min",r=e[14][e[66]].min),m(n,"max",o=e[14][e[66]].max),m(n,"step",i=e[14][e[66]].step||1),n.value=c=e[14][e[66]].value,m(p,"class","current-value")},m(t,e){l(t,n,e),l(t,f,e),l(t,p,e),s(p,y),b||(w=g(n,"change",k),b=!0)},p(t,s){e=t,24576&s[0]&&r!==(r=e[14][e[66]].min)&&m(n,"min",r),24576&s[0]&&o!==(o=e[14][e[66]].max)&&m(n,"max",o),24576&s[0]&&i!==(i=e[14][e[66]].step||1)&&m(n,"step",i),24576&s[0]&&c!==(c=e[14][e[66]].value)&&(n.value=c),24576&s[0]&&_!==(_=e[14][e[66]].displayed+"")&&v(y,_)},i:t,o:t,d(t){t&&a(n),t&&a(f),t&&a(p),b=!1,w()}}}function Kt(t){let e;return{c(){e=u("option"),e.textContent="--- ",e.selected="true",e.__value=" --- ",e.value=e.__value},m(t,n){l(t,e,n)},d(t){t&&a(e)}}}function Qt(t){let e,n,r,o,i=t[69]+"";return{c(){e=u("option"),n=h(i),e.selected=r=t[69]==t[14][t[66]].value||null,e.__value=o=" "+t[69]+" ",e.value=e.__value},m(t,r){l(t,e,r),s(e,n)},p(t,s){24576&s[0]&&i!==(i=t[69]+"")&&v(n,i),24576&s[0]&&r!==(r=t[69]==t[14][t[66]].value||null)&&(e.selected=r),24576&s[0]&&o!==(o=" "+t[69]+" ")&&(e.__value=o,e.value=e.__value)},d(t){t&&a(e)}}}function te(t){let e,n,r,o,i,c,f,h,p;function v(t,e){return t[65].props.length>1?Yt:zt}let y=v(t),b=y(t);function w(){return t[40](t[66])}const _=[Zt,Jt,Vt],k=[];function $(t,e){return"slider"===t[65].type?0:"select"==t[65].type?1:"color"==t[65].type?2:-1}function C(t,e){return 1===e?function(t){const e=t.slice(),n=e[14][e[66]].choices();return e[65]=n,e}(t):t}return~(i=$(t))&&(c=k[i]=_[i](C(t,i))),{c(){e=u("div"),b.c(),n=d(),r=u("span"),r.textContent="✕",o=d(),c&&c.c(),m(r,"class","delete"),m(e,"class","prop-section")},m(t,a){l(t,e,a),b.m(e,null),s(e,n),s(e,r),s(e,o),~i&&k[i].m(e,null),f=!0,h||(p=g(r,"click",w),h=!0)},p(r,o){y===(y=v(t=r))&&b?b.p(t,o):(b.d(1),b=y(t),b&&(b.c(),b.m(e,n)));let s=i;i=$(t),i===s?~i&&k[i].p(C(t,i),o):(c&&(F(),G(k[s],1,1,(()=>{k[s]=null})),I()),~i?(c=k[i],c?c.p(C(t,i),o):(c=k[i]=_[i](C(t,i)),c.c()),j(c,1),c.m(e,null)):c=null)},i(t){f||(j(c),f=!0)},o(t){G(c),f=!1},d(t){t&&a(e),b.d(),~i&&k[i].d(),h=!1,p()}}}function ee(t){let e,n,r;return{c(){e=u("div"),e.textContent="Bring to front",m(e,"class","btn"),y(e,"active",!0===t[15][t[5]])},m(o,i){l(o,e,i),n||(r=g(e,"click",t[21]),n=!0)},p(t,n){32800&n[0]&&y(e,"active",!0===t[15][t[5]])},d(t){t&&a(e),n=!1,r()}}}function ne(e){let n,r,o;return{c(){n=u("div"),n.textContent="Delete element",m(n,"class","btn delete-elem")},m(t,i){l(t,n,i),r||(o=g(n,"click",e[22]),r=!0)},p:t,d(t){t&&a(n),r=!1,o()}}}function re(t){let e,n,o,i,h,p,v,y,b,w,_,k,$,C,S,x,M,E,T,L,A,H,N,D,O=t[2].length>1&&It(t),R=ce(t[3][t[5]]),P=[];for(let e=0;e<R.length;e+=1)P[e]=Gt(Bt(t,R,e));let B=t[4][t[5]]||[],W=[];for(let e=0;e<B.length;e+=1)W[e]=qt(Pt(t,B,e));let q=t[4][t[5]]&&Ut(t);return{c(){e=u("div"),n=d(),o=f("svg"),i=f("clipPath"),h=f("path"),p=f("rect"),b=d(),w=u("div"),_=u("div"),_.textContent="x",k=d(),O&&O.c(),$=d(),C=u("div"),S=u("b"),S.textContent="Rule:",x=d();for(let t=0;t<P.length;t+=1)P[t].c();M=d(),E=u("div"),T=u("b"),T.textContent="Property type:",L=d();for(let t=0;t<W.length;t+=1)W[t].c();var r,s,l,a;A=d(),q&&q.c(),r=e,s="position",null===(l="absolute")?r.style.removeProperty(s):r.style.setProperty(s,l,a?"important":""),m(h,"d",t[11]),m(i,"id","overlay-clip"),m(i,"clip-rule","evenodd"),m(p,"y","0"),m(p,"x","0"),m(p,"height","100%"),m(p,"width","100%"),m(p,"class","overlay-over"),m(o,"class","ise-helper-wrapper"),m(o,"version","1.1"),m(o,"xmlns","http://www.w3.org/2000/svg"),m(o,"xmlns:xlink","http://www.w3.org/1999/xlink"),m(o,"width",v=t[12].width),m(o,"height",y=t[12].height),m(_,"class","close-button"),m(C,"class","select-tab"),m(E,"class","select-tab"),m(w,"class","ise")},m(r,a){l(r,e,a),t[34](e),l(r,n,a),l(r,o,a),s(o,i),s(i,h),s(o,p),t[35](o),l(r,b,a),l(r,w,a),s(w,_),s(w,k),O&&O.m(w,null),s(w,$),s(w,C),s(C,S),s(C,x);for(let t=0;t<P.length;t+=1)P[t].m(C,null);s(w,M),s(w,E),s(E,T),s(E,L);for(let t=0;t<W.length;t+=1)W[t].m(E,null);s(w,A),q&&q.m(w,null),t[44](w),H=!0,N||(D=[g(o,"click",t[19]),g(_,"click",t[1])],N=!0)},p(t,e){if((!H||2048&e[0])&&m(h,"d",t[11]),(!H||4096&e[0]&&v!==(v=t[12].width))&&m(o,"width",v),(!H||4096&e[0]&&y!==(y=t[12].height))&&m(o,"height",y),t[2].length>1?O?O.p(t,e):(O=It(t),O.c(),O.m(w,$)):O&&(O.d(1),O=null),16777320&e[0]){let n;for(R=ce(t[3][t[5]]),n=0;n<R.length;n+=1){const r=Bt(t,R,n);P[n]?P[n].p(r,e):(P[n]=Gt(r),P[n].c(),P[n].m(C,null))}for(;n<P.length;n+=1)P[n].d(1);P.length=R.length}if(196784&e[0]){let n;for(B=t[4][t[5]]||[],n=0;n<B.length;n+=1){const r=Pt(t,B,n);W[n]?W[n].p(r,e):(W[n]=qt(r),W[n].c(),W[n].m(E,null))}for(;n<W.length;n+=1)W[n].d(1);W.length=B.length}t[4][t[5]]?q?(q.p(t,e),48&e[0]&&j(q,1)):(q=Ut(t),q.c(),j(q,1),q.m(w,null)):q&&(F(),G(q,1,1,(()=>{q=null})),I())},i(t){H||(j(q),H=!0)},o(t){G(q),H=!1},d(i){i&&a(e),t[34](null),i&&a(n),i&&a(o),t[35](null),i&&a(b),i&&a(w),O&&O.d(),c(P,i),c(W,i),q&&q.d(),t[44](null),N=!1,r(D)}}}const oe="text",ie="border",se="stroke",le="background",ae="custom";function ce(t){return t?t.map(((t,e)=>{if("inline"===t)return"inline";const n=t.selectorText;return`${t.parentStyleSheet.title||`${e}`}: ${n}`})):[]}function ue(t,e=0){const n=t.getBoundingClientRect();return{left:n.left+window.scrollX-e,top:n.top+window.scrollY-e,width:n.width+2*e,height:n.height+2*e,right:n.left+window.scrollX+n.width+e,bottom:n.top+window.scrollY+n.height+e}}function fe(t,e="number"){if("raw"==e)return t;if("number"==e&&/[0-9]+(px)|(em)|(rem)/.test(t))return parseInt(t);if("rgb"==e){if("none"===t)return"#00000000";if(t.includes("rgb")||"#"==t[0])return function(t){const e=t.match(/[0-9\.]+/g).map((t=>parseFloat(t)));return 3===e.length&&e.push(1),e.reduce(((t,e,n)=>t+(3===n?Math.round(255*e).toString(16).padStart(2,"0"):e.toString(16).padStart(2,"0"))),"#")}(t)}return t}function he(t,e,n){let r,o;const i=["altGlyph","circle","ellipse","line","path","polygon","polyline","rect","text","textPath","tref","tspan"],s={"border-radius":{type:"slider",min:0,max:30,suffix:"px"},"border-width":{type:"slider",min:0,max:30,suffix:"px"},"border-style":{type:"select",choices:()=>["none","dotted","dashed","solid","double","groove","ridge","inset","outset"]},"border-color":{type:"color"},"font-family":{type:"select",choices:function(){return[...Nt(),...Ht.availableFonts]}},"font-size":{type:"slider",min:0,max:40,suffix:"px"},"font-weight":{type:"slider",min:0,max:800},color:{type:"color"},"stroke-width":{type:"slider",min:0,max:20,step:.5,suffix:"px"},stroke:{type:"color"},"stroke-linejoin":{type:"select",choices:()=>["bevel","miter","round"]},fill:{type:"color"},"stroke-dasharray":{type:"slider",min:0,max:30,suffix:"px"},"background-color":{type:"color"}};let{getAdditionalElems:l=(()=>[])}=e,{listenOnClick:a=!1}=e,{onStyleChanged:c=(()=>{})}=e,{customProps:u={}}=e,{inlineDeletable:f=(()=>!0)}=e,{cssRuleFilter:h=null}=e;const d={[oe]:["font-family","font-size","font-weight","color"],[ie]:["border-radius","border-width","border-color","border-style"],[se]:["stroke-width","stroke","stroke-dasharray","stroke-linejoin","fill"],[le]:["background-color"],[ae]:Object.keys(u)},p={slider:0,select:1,color:2};let g,m,v,y,b,w=null,_="",C={width:0,height:0},x=[[]],M=[],E=[],T=0,L=0,H=0,N={},D=[],O=!1;function R(){const t={...s,...u},e=(o=t,d[b].reduce(((t,e)=>(t[e]=o[e],t)),{}));var o;Object.keys(e).forEach((t=>{const n=e[t].type;let o="number";if("color"===n?o="rgb":"select"===n&&(o="raw"),e[t].getter){const n=e[t].getter(r);if(null===n)return void delete e[t];e[t].value=n,e[t].displayed=n}else e[t].displayed=z(r,t,"raw"),e[t].value=z(r,t,o)})),n(13,y=Object.entries(e).reduce(((t,[e,n])=>{const r=n.type,o=t.find((t=>t.type===r));return o?o.props.push(e):t.push({selected:0,props:[e],type:r}),t}),[]).sort(((t,e)=>p[t.type]<p[e.type]?-1:p[t.type]>p[e.type]?1:0))),n(14,N=e),W()}k((()=>{I(),n(32,w=m.parentNode),document.body.appendChild(m),document.body.appendChild(v),document.body.appendChild(g),U(),setTimeout((()=>{U()}),1e3),window.addEventListener("resize",U)})),$((()=>{window.removeEventListener("resize",U),a&&w.removeEventListener("click",getTargetsAndRules)}));let P=new Set;function B(t){F(t.target,t.pageX,t.pageY)}async function F(t,e,r){if(U(),t.classList.contains("overlay-over"))return j();if(!m.contains(t)){n(5,T=0),n(6,L=0),n(7,H=0),n(15,D=[]),n(4,E=[]),n(3,M=[]),n(2,x=[[t,"Clicked"],...l(t)]),n(4,E=x.reduce(((t,e)=>{const n=e[0],r=[];!n.firstChild||3!==n.firstChild.nodeType&&"tspan"!==n.firstChild.tagName||r.push(oe);const o=n.tagName.toLowerCase();let s=!1;return i.includes(o)?(r.push(se),"g"===n.parentElement.tagName.toLowerCase()&&n.previousElementSibling&&n.previousElementSibling.tagName.toLowerCase()==o&&(s=!0)):(r.push(ie),r.push(le)),s?D.push(!0):D.push(null),t.push(r),t}),[])),n(16,O=!1),n(3,M=function(t){const e=document.styleSheets;return t.reduce(((t,n)=>{const r=n[0],o=["inline"];for(let t in e)try{const n=e[t].cssRules;for(let t in n){let e=n[t].selectorText;if(e&&!(n[t].selectorText.length>50)&&!e.split(",").some((t=>"*"===t))&&(e.endsWith(":hover")&&(e=e.substring(0,e.length-":hover".length)),r.matches(e))){if(null!==h&&!h(r,n[t].selectorText))continue;o.push(n[t])}}}catch(n){P.has(t)||(console.warn("Style editor: Not able to access",e[t].ownerNode,"sheet. Try CORS loading the sheet if you want to edit it."),P.add(t))}return t.push(o),t}),[])}(x));for(let e of Object.values(u))if(null!==e.getter(t)){n(16,O=!0);break}if(Object.keys(u).length&&E[0].push(ae),await A(),R(),e&&r)G(e,r);else{const e=ue(t,15);G(e.left,e.top)}}}function I(){n(9,m.style.display="none",m),n(10,v.style.display="none",v),n(11,_="")}function j(){I()}function G(t,e){n(9,m.style.display="block",m),n(9,m.style.opacity=0,m);const r=m.getBoundingClientRect();t=t+r.width+20>C.width?t-r.width-20:t+20,e=e+r.height+20>C.height?e-r.height-20:e+20,e=Math.max(e,0),n(9,m.style.left=t+"px",m),n(9,m.style.top=e+"px",m),n(10,v.style.display="block",v),n(9,m.style.opacity=1,m),W()}async function W(){if(await A(),!o)return;let t;if("inline"===o)t=[r];else{const e=o.selectorText.replace(/(:hover)|:focus/g,"");t=Array.from(document.querySelectorAll(e))}const e=t.map((t=>ue(t,10)));n(11,_=function(t,e){let n=function({width:t,height:e,top:n=0,left:r=0}){return`M${r} ${n} v${e} h${t} v-${e}z`}({width:e.width,height:e.height});if(t.length<10&&!function(t){for(let r=0;r<t.length-1;++r){const o=t[r];for(let i=r+1;i<t.length;++i)if(e=o,n=t[i],e.right>=n.left&&n.right>=e.left&&e.bottom>=n.top&&n.bottom>=e.top)return!0}var e,n;return!1}(t)){for(const e of t)n=`${n} ${dt(e)}`;return n}const r=Math.min(...t.map((t=>t.left))),o=Math.min(...t.map((t=>t.top))),i=t.map((t=>(t.left=t.left-r,t.right=t.right-r,t.top=t.top-o,t.bottom=t.bottom-o,t)));i.sort(((t,e)=>t.left>e.left?1:t.left<e.left?-1:0));const s=Math.ceil(Math.max(...i.map((t=>t.right)))),l=Math.ceil(Math.max(...i.map((t=>t.bottom)))),a=s*l/2e4,c=Math.ceil(s/a),u=Math.ceil(l/a),f=s/c,h=l/u,d=new Array(c*u);for(let t=0,e=0;t<u;++t)for(let n=0;n<c;++n,++e)d[e]=ht({x:n*a,y:t*a},i)?1:0;const p=ut().size([c,u]).thresholds([1])(d)[0];let g="";for(let t of p.coordinates)for(let e of t){for(let t=0;t<e.length;++t){const n=e[t],i=n[0]*f+r,s=n[1]*h+o;g+=t?`L ${i} ${s}`:`M${i} ${s}`}g+="Z"}return`${n} ${g}`}(e,C))}const q=function(t,e,n=!1){let r;return function(){const o=this,i=arguments,s=function(){r=null,n||t.apply(o,i)},l=n&&!r;clearTimeout(r),r=setTimeout(s,e),l&&t.apply(o,i)}}((function(t,e,i){const s=i?e+i:e;if("inline"===o)if(N[t].setter)N[t].setter(r,e);else{r.style[t]=s}else o.style.setProperty(t,s);n(14,N[t].value=e,N),n(14,N[t].displayed=s,N),c(r,o,t,s),W()}),100);function U(){const t=getComputedStyle(document.body),e=parseInt(t.marginLeft),r=parseInt(t.marginRight),o=parseInt(t.marginTop),i=parseInt(t.marginBottom);n(12,C={width:document.body.offsetWidth+e+r,height:document.body.offsetHeight+o+i})}function z(t,e,n="number"){let r=o?.style?.[e];if(!r){r=getComputedStyle(t)[e]}return fe(r,n)}function Y(t){"inline"===o?r.style.removeProperty(t):o.style.removeProperty(t),c(r,o,t,null),R()}function X(t){const e=M[T]?.[t];"inline"!==e&&H===E[T].length-1&&n(7,H=0),n(6,L=t)}return t.$$set=t=>{"getAdditionalElems"in t&&n(25,l=t.getAdditionalElems),"listenOnClick"in t&&n(26,a=t.listenOnClick),"onStyleChanged"in t&&n(27,c=t.onStyleChanged),"customProps"in t&&n(28,u=t.customProps),"inlineDeletable"in t&&n(0,f=t.inlineDeletable),"cssRuleFilter"in t&&n(29,h=t.cssRuleFilter)},t.$$.update=()=>{2&t.$$.dirty[1]&&null!==w&&a&&w.addEventListener("click",B),36&t.$$.dirty[0]&&n(18,r=x[T][0]),104&t.$$.dirty[0]&&n(17,o=M[T]?.[L]),176&t.$$.dirty[0]|4&t.$$.dirty[1]&&E[T]?.[H]!==b&&n(33,b=E[T]?.[H]),96&t.$$.dirty[0]|4&t.$$.dirty[1]&&(b||L||T)&&R()},[f,I,x,M,E,T,L,H,g,m,v,_,C,y,N,D,O,o,r,j,q,function(){n(15,D[T]=!1,D),r.parentNode.appendChild(r),c(r,o,"bringtofront",null)},function(){r.remove(),I()},Y,X,l,a,c,u,h,F,function(){return"block"===m.style.display},w,b,function(t){S[t?"unshift":"push"]((()=>{g=t,n(8,g)}))},function(t){S[t?"unshift":"push"]((()=>{v=t,n(10,v)}))},t=>{n(5,T=t),n(6,L=0)},t=>{X(t)},t=>{n(7,H=t)},async(t,e,r,o)=>{n(13,e[r].selected=o.target.value,y),await A()},t=>Y(t),(t,e)=>q(t,e.target.value,N[t].suffix,e.target),(t,e)=>q(t,e.target.value),(t,e)=>q(t,e),function(t){S[t?"unshift":"push"]((()=>{m=t,n(9,m)}))}]}var de=class extends z{constructor(t){super(),U(this,t,he,re,i,{getAdditionalElems:25,listenOnClick:26,onStyleChanged:27,customProps:28,inlineDeletable:0,cssRuleFilter:29,open:30,close:1,isOpened:31},null,[-1,-1,-1])}get open(){return this.$$.ctx[30]}get close(){return this.$$.ctx[1]}get isOpened(){return this.$$.ctx[31]}};return class{constructor(t){return new de({target:document.body,props:t})}}}));
{
"name": "inline-style-editor",
"version": "1.3.1",
"version": "1.3.2",
"description": "Update CSS rules or add inline style to elements visualy",

@@ -5,0 +5,0 @@ "scripts": {

@@ -1,18 +0,13 @@

const fontCheck = new Set([
// Windows 10
'Arial', 'Arial Black', 'Bahnschrift', 'Calibri', 'Cambria', 'Cambria Math', 'Candara', 'Comic Sans MS', 'Consolas', 'Constantia', 'Corbel', 'Courier New', 'Ebrima', 'Franklin Gothic Medium', 'Gabriola', 'Gadugi', 'Georgia', 'HoloLens MDL2 Assets', 'Impact', 'Ink Free', 'Javanese Text', 'Leelawadee UI', 'Lucida Console', 'Lucida Sans Unicode', 'Malgun Gothic', 'Marlett', 'Microsoft Himalaya', 'Microsoft JhengHei', 'Microsoft New Tai Lue', 'Microsoft PhagsPa', 'Microsoft Sans Serif', 'Microsoft Tai Le', 'Microsoft YaHei', 'Microsoft Yi Baiti', 'MingLiU-ExtB', 'Mongolian Baiti', 'MS Gothic', 'MV Boli', 'Myanmar Text', 'Nirmala UI', 'Palatino Linotype', 'Segoe MDL2 Assets', 'Segoe Print', 'Segoe Script', 'Segoe UI', 'Segoe UI Historic', 'Segoe UI Emoji', 'Segoe UI Symbol', 'SimSun', 'Sitka', 'Sylfaen', 'Symbol', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana', 'Webdings', 'Wingdings', 'Yu Gothic',
// macOS
'American Typewriter', 'Andale Mono', 'Arial', 'Arial Black', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS', 'Avenir', 'Avenir Next', 'Avenir Next Condensed', 'Baskerville', 'Big Caslon', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps', 'Bradley Hand', 'Brush Script MT', 'Chalkboard', 'Chalkboard SE', 'Chalkduster', 'Charter', 'Cochin', 'Comic Sans MS', 'Copperplate', 'Courier', 'Courier New', 'Didot', 'DIN Alternate', 'DIN Condensed', 'Futura', 'Geneva', 'Georgia', 'Gill Sans', 'Helvetica', 'Helvetica Neue', 'Herculanum', 'Hoefler Text', 'Impact', 'Lucida Grande', 'Luminari', 'Marker Felt', 'Menlo', 'Microsoft Sans Serif', 'Monaco', 'Noteworthy', 'Optima', 'Palatino', 'Papyrus', 'Phosphate', 'Rockwell', 'Savoye LET', 'SignPainter', 'Skia', 'Snell Roundhand', 'Tahoma', 'Times', 'Times New Roman', 'Trattatello', 'Trebuchet MS', 'Verdana', 'Zapfino',
].sort());
const detector = new FontDetector();
function getFonts() {
const availableFonts = new Set();
// const availableFonts = new Set();
for (const font of fontCheck.values()) {
if (document.fonts.check(`12px "${font}"`)) {
availableFonts.add(font);
}
}
// for (const font of fontCheck.values()) {
// if (document.fonts.check(`12px "${font}"`)) {
// availableFonts.add(font);
// }
// }
return [...listFonts(), ...availableFonts.values()]
return [...listFonts(), ...detector.availableFonts]
}

@@ -40,2 +35,69 @@

// https://stackoverflow.com/a/3368855
class FontDetector {
constructor() {
this.fontsToCheck = new Set([
'Arial', 'Arial Black', 'Bahnschrift', 'Calibri', 'Cambria', 'Cambria Math', 'Candara', 'Comic Sans MS', 'Consolas', 'Constantia', 'Corbel', 'Courier New', 'Ebrima', 'Franklin Gothic Medium', 'Gabriola', 'Gadugi', 'Georgia', 'HoloLens MDL2 Assets', 'Impact', 'Ink Free', 'Javanese Text', 'Leelawadee UI', 'Lucida Console', 'Lucida Sans Unicode', 'Malgun Gothic', 'Marlett', 'Microsoft Himalaya', 'Microsoft JhengHei', 'Microsoft New Tai Lue', 'Microsoft PhagsPa', 'Microsoft Sans Serif', 'Microsoft Tai Le', 'Microsoft YaHei', 'Microsoft Yi Baiti', 'MingLiU-ExtB', 'Mongolian Baiti', 'MS Gothic', 'MV Boli', 'Myanmar Text', 'Nirmala UI', 'Palatino Linotype', 'Segoe MDL2 Assets', 'Segoe Print', 'Segoe Script', 'Segoe UI', 'Segoe UI Historic', 'Segoe UI Emoji', 'Segoe UI Symbol', 'SimSun', 'Sitka', 'Sylfaen', 'Symbol', 'Tahoma', 'Times New Roman', 'Trebuchet MS', 'Verdana', 'Webdings', 'Wingdings', 'Yu Gothic',
'American Typewriter', 'Andale Mono', 'Arial', 'Arial Black', 'Arial Narrow', 'Arial Rounded MT Bold', 'Arial Unicode MS', 'Avenir', 'Avenir Next', 'Avenir Next Condensed', 'Baskerville', 'Big Caslon', 'Bodoni 72', 'Bodoni 72 Oldstyle', 'Bodoni 72 Smallcaps', 'Bradley Hand', 'Brush Script MT', 'Chalkboard', 'Chalkboard SE', 'Chalkduster', 'Charter', 'Cochin', 'Comic Sans MS', 'Copperplate', 'Courier', 'Courier New', 'Didot', 'DIN Alternate', 'DIN Condensed', 'Futura', 'Geneva', 'Georgia', 'Gill Sans', 'Helvetica', 'Helvetica Neue', 'Herculanum', 'Hoefler Text', 'Impact', 'Lucida Grande', 'Luminari', 'Marker Felt', 'Menlo', 'Microsoft Sans Serif', 'Monaco', 'Noteworthy', 'Optima', 'Palatino', 'Papyrus', 'Phosphate', 'Rockwell', 'Savoye LET', 'SignPainter', 'Skia', 'Snell Roundhand', 'Tahoma', 'Times', 'Times New Roman', 'Trattatello', 'Trebuchet MS', 'Verdana', 'Zapfino',
'Comic Sans MS', 'Comic Sans', 'Apple Chancery', 'Bradley Hand', 'Brush Script MT', 'Brush Script Std', 'Snell Roundhand', 'URW Chancery L'
].sort());
this.init();
}
init() {
this.defaultWidth = {};
this.defaultHeight = {};
// a font will be compared against all the three default fonts.
// and if it doesn't match all 3 then that font is not available.
this.baseFonts = ['monospace', 'sans-serif', 'serif', 'cursive'];
// we use m or w because these two characters take up the maximum width.
// And we use a LLi so that the same matching fonts can get separated
const testString = "mmmmmmmmmmlli";
// we test using 72px font size, we may use any size. I guess larger the better.
const testSize = '72px';
this.container = document.getElementsByTagName("body")[0];
// create a SPAN in the document to get the width of the text we use to test
this.spanTester = document.createElement("span");
this.spanTester.style.fontSize = testSize;
this.spanTester.innerHTML = testString;
this.baseFonts.forEach(font => {
//get the default width for the three base fonts
this.spanTester.style.fontFamily = font;
this.container.appendChild(this.spanTester);
this.defaultWidth[font] = this.spanTester.offsetWidth; // width for the default font
this.defaultHeight[font] = this.spanTester.offsetHeight; // height for the default font
this.container.removeChild(this.spanTester);
});
this.detectFonts();
}
fontExists(fontName) {
let detected = false;
for (const font of this.baseFonts) {
this.spanTester.style.fontFamily = fontName + ',' + font; // name of the font along with the base font for fallback.
this.container.appendChild(this.spanTester);
const matched = (this.spanTester.offsetWidth != this.defaultWidth[font] || this.spanTester.offsetHeight != this.defaultHeight[font]);
this.container.removeChild(this.spanTester);
detected = detected || matched;
}
return detected;
}
detectFonts() {
this.availableFonts = [];
for (const font of this.fontsToCheck.values()) {
if (this.fontExists(font)) {
this.availableFonts.push(font);
}
}
this.availableFonts.sort();
}
};
export { getFonts };

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet