From ef1b02aca258d4b9811d257e0a294faa63587da4 Mon Sep 17 00:00:00 2001 From: semantic-release-bot Date: Thu, 5 Oct 2023 16:14:58 +0000 Subject: [PATCH] chore(release): 1.10.0 [skip ci] # [1.10.0](https://github.com/seleb/sketch-to-lineart/compare/v1.9.1...v1.10.0) (2023-10-05) ### Features * sticky controls ([590f473](https://github.com/seleb/sketch-to-lineart/commit/590f47369da64f487ebda6fc11ad25f277d9599e)) --- CHANGELOG.md | 7 +++++++ docs/{app.89c72d03.js => app.fb100a98.js} | 20 ++++++++++---------- docs/index.html | 2 +- docs/service-worker.js | 2 +- docs/src.3ca4a54d.css | 1 + docs/{src.5059c28e.js => src.53c24e70.js} | 2 +- docs/src.7a1d8642.css | 1 - package-lock.json | 4 ++-- package.json | 2 +- 9 files changed, 24 insertions(+), 17 deletions(-) rename docs/{app.89c72d03.js => app.fb100a98.js} (58%) create mode 100644 docs/src.3ca4a54d.css rename docs/{src.5059c28e.js => src.53c24e70.js} (99%) delete mode 100644 docs/src.7a1d8642.css diff --git a/CHANGELOG.md b/CHANGELOG.md index b05ef22..e877c1f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +# [1.10.0](https://github.com/seleb/sketch-to-lineart/compare/v1.9.1...v1.10.0) (2023-10-05) + + +### Features + +* sticky controls ([590f473](https://github.com/seleb/sketch-to-lineart/commit/590f47369da64f487ebda6fc11ad25f277d9599e)) + ## [1.9.1](https://github.com/seleb/sketch-to-lineart/compare/v1.9.0...v1.9.1) (2023-02-28) diff --git a/docs/app.89c72d03.js b/docs/app.fb100a98.js similarity index 58% rename from docs/app.89c72d03.js rename to docs/app.fb100a98.js index eb44463..2735685 100644 --- a/docs/app.89c72d03.js +++ b/docs/app.fb100a98.js @@ -1,5 +1,5 @@ parcelRequire=function(e,r,t,n){var i,o="function"==typeof parcelRequire&&parcelRequire,u="function"==typeof require&&require;function f(t,n){if(!r[t]){if(!e[t]){var i="function"==typeof parcelRequire&&parcelRequire;if(!n&&i)return i(t,!0);if(o)return o(t,!0);if(u&&"string"==typeof t)return u(t);var c=new Error("Cannot find module '"+t+"'");throw c.code="MODULE_NOT_FOUND",c}p.resolve=function(r){return e[t][1][r]||r},p.cache={};var l=r[t]=new f.Module(t);e[t][0].call(l.exports,p,l,l.exports,this)}return r[t].exports;function p(e){return f(p.resolve(e))}}f.isParcelRequire=!0,f.Module=function(e){this.id=e,this.bundle=f,this.exports={}},f.modules=e,f.cache=r,f.parent=o,f.register=function(r,t){e[r]=[function(e,r){r.exports=t},{}]};for(var c=0;c2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof n&&null!=n.defaultProps)for(r in n.defaultProps)void 0===i[r]&&(i[r]=n.defaultProps[r]);return d(n,i,o,l,null)}function d(e,_,o,l,r){var i={type:e,props:_,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++t:r};return null==r&&null!=n.vnode&&n.vnode(i),i}function h(){return{current:null}}function v(e){return e.children}function y(e,n){this.props=e,this.context=n}function m(e,n){if(null==n)return e.__?m(e.__,e.__.__k.indexOf(e)+1):null;for(var t;nn&&o.sort(function(e,n){return e.__v.__b-n.__v.__b}));b.__r=0}function x(e,n,t,_,o,l,r,i,c,p){var f,a,h,y,g,k,b,x=_&&_.__k||s,P=x.length;for(t.__k=[],f=0;f0?d(y.type,y.props,y.key,y.ref?y.ref:null,y.__v):y)){if(y.__=t,y.__b=t.__b+1,null===(h=x[f])||h&&y.key==h.key&&y.type===h.type)x[f]=void 0;else for(a=0;a=0;n--)if((t=e.__k[n])&&(_=E(t)))return _;return null}function w(e,n,t,_,o){var l;for(l in t)"children"===l||"key"===l||l in n||A(e,l,null,t[l],_);for(l in n)o&&"function"!=typeof n[l]||"children"===l||"key"===l||"value"===l||"checked"===l||t[l]===n[l]||A(e,l,n[l],t[l],_)}function U(e,n,t){"-"===n[0]?e.setProperty(n,null==t?"":t):e[n]=null==t?"":"number"!=typeof t||c.test(n)?t:t+"px"}function A(e,n,t,_,o){var l;e:if("style"===n)if("string"==typeof t)e.style.cssText=t;else{if("string"==typeof _&&(e.style.cssText=_=""),_)for(n in _)t&&n in t||U(e.style,n,"");if(t)for(n in t)_&&t[n]===_[n]||U(e.style,n,t[n])}else if("o"===n[0]&&"n"===n[1])l=n!==(n=n.replace(/Capture$/,"")),n=n.toLowerCase()in e?n.toLowerCase().slice(2):n.slice(2),e.l||(e.l={}),e.l[n+l]=t,t?_||e.addEventListener(n,l?T:D,l):e.removeEventListener(n,l?T:D,l);else if("dangerouslySetInnerHTML"!==n){if(o)n=n.replace(/xlink(H|:h)/,"h").replace(/sName$/,"s");else if("width"!==n&&"height"!==n&&"href"!==n&&"list"!==n&&"form"!==n&&"tabIndex"!==n&&"download"!==n&&n in e)try{e[n]=null==t?"":t;break e}catch(e){}"function"==typeof t||(null==t||!1===t&&-1==n.indexOf("-")?e.removeAttribute(n):e.setAttribute(n,t))}}function D(e){return this.l[e.type+!1](n.event?n.event(e):e)}function T(e){return this.l[e.type+!0](n.event?n.event(e):e)}function M(e,t,_,o,l,r,i,u,s){var c,f,a,d,h,m,g,k,b,C,P,S,E,w,U,A=t.type;if(void 0!==t.constructor)return null;null!=_.__h&&(s=_.__h,u=t.__e=_.__e,t.__h=null,r=[u]),(c=n.__b)&&c(t);try{e:if("function"==typeof A){if(k=t.props,b=(c=A.contextType)&&o[c.__c],C=c?b?b.props.value:c.__:o,_.__c?g=(f=t.__c=_.__c).__=f.__E:("prototype"in A&&A.prototype.render?t.__c=f=new A(k,C):(t.__c=f=new y(k,C),f.constructor=A,f.render=H),b&&b.sub(f),f.props=k,f.state||(f.state={}),f.context=C,f.__n=o,a=f.__d=!0,f.__h=[],f._sb=[]),null==f.__s&&(f.__s=f.state),null!=A.getDerivedStateFromProps&&(f.__s==f.state&&(f.__s=p({},f.__s)),p(f.__s,A.getDerivedStateFromProps(k,f.__s))),d=f.props,h=f.state,f.__v=t,a)null==A.getDerivedStateFromProps&&null!=f.componentWillMount&&f.componentWillMount(),null!=f.componentDidMount&&f.__h.push(f.componentDidMount);else{if(null==A.getDerivedStateFromProps&&k!==d&&null!=f.componentWillReceiveProps&&f.componentWillReceiveProps(k,C),!f.__e&&null!=f.shouldComponentUpdate&&!1===f.shouldComponentUpdate(k,f.__s,C)||t.__v===_.__v){for(t.__v!==_.__v&&(f.props=k,f.state=f.__s,f.__d=!1),f.__e=!1,t.__e=_.__e,t.__k=_.__k,t.__k.forEach(function(e){e&&(e.__=t)}),P=0;P2&&(i.children=arguments.length>3?e.call(arguments,2):_),d(n.type,i,o||n.key,l||n.ref,null)}function I(e,n){var t={__c:n="__cC"+i++,__:e,Consumer:function(e,n){return e.children(n)},Provider:function(e){var t,_;return this.getChildContext||(t=[],(_={})[n]=this,this.getChildContext=function(){return _},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&t.some(function(e){e.__e=!0,k(e)})},this.sub=function(e){t.push(e);var n=e.componentWillUnmount;e.componentWillUnmount=function(){t.splice(t.indexOf(e),1),n&&n.call(e)}}),e.children}};return t.Provider.__=t.Consumer.contextType=t}exports.isValidElement=_,exports.options=n,e=s.slice,exports.options=n={__e:function(e,n,t,_){for(var o,l,r;n=n.__;)if((o=n.__c)&&!o.__)try{if((l=o.constructor)&&null!=l.getDerivedStateFromError&&(o.setState(l.getDerivedStateFromError(e)),r=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,_||{}),r=o.__d),r)return o.__E=o}catch(n){e=n}throw e}},t=0,exports.isValidElement=_=function(e){return null!=e&&void 0===e.constructor},y.prototype.setState=function(e,n){var t;t=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=p({},this.state),"function"==typeof e&&(e=e(p({},t),this.props)),e&&p(t,e),null!=e&&this.__v&&(n&&this._sb.push(n),k(this))},y.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),k(this))},y.prototype.render=v,o=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,b.__r=0,i=0; +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Component=g,exports.Fragment=m,exports.cloneElement=B,exports.createContext=I,exports.h=exports.createElement=h,exports.createRef=y,exports.hydrate=$,exports.render=V,exports.toChildArray=w,exports.options=exports.isValidElement=void 0;var e,t,n,_,o,l,r,i,u,s={},c=[],p=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i,f=Array.isArray;function a(e,t){for(var n in t)e[n]=t[n];return e}function d(e){var t=e.parentNode;t&&t.removeChild(e)}function h(t,n,_){var o,l,r,i={};for(r in n)"key"==r?o=n[r]:"ref"==r?l=n[r]:i[r]=n[r];if(arguments.length>2&&(i.children=arguments.length>3?e.call(arguments,2):_),"function"==typeof t&&null!=t.defaultProps)for(r in t.defaultProps)void 0===i[r]&&(i[r]=t.defaultProps[r]);return v(t,i,o,l,null)}function v(e,_,o,l,r){var i={type:e,props:_,key:o,ref:l,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==r?++n:r};return null==r&&null!=t.vnode&&t.vnode(i),i}function y(){return{current:null}}function m(e){return e.children}function g(e,t){this.props=e,this.context=t}function k(e,t){if(null==t)return e.__?k(e.__,e.__.__k.indexOf(e)+1):null;for(var n;tt&&o.sort(i));C.__r=0}function P(e,t,n,_,o,l,r,i,u,p,a){var d,h,y,g,b,x,C,P,w,U=0,T=_&&_.__k||c,M=T.length,W=M,L=t.length;for(n.__k=[],d=0;d0?v(g.type,g.props,g.key,g.ref?g.ref:null,g.__v):g)?(g.__=n,g.__b=n.__b+1,-1===(P=D(g,T,C=d+U,W))?y=s:(y=T[P]||s,T[P]=void 0,W--),N(e,g,y,o,l,r,i,u,p,a),b=g.__e,(h=g.ref)&&y.ref!=h&&(y.ref&&H(y.ref,null,g),a.push(h,g.__c||b,g)),null!=b&&(null==x&&(x=b),(w=y===s||null===y.__v)?-1==P&&U--:P!==C&&(P===C+1?U++:P>C?W>L-C?U+=P-C:U--:U=P(null!=u?1:0))for(;r>=0||i=0){if((u=t[r])&&o==u.key&&l===u.type)return r;r--}if(i2&&(u.children=arguments.length>3?e.call(arguments,2):_),v(t.type,u,o||t.key,l||t.ref,null)}function I(e,t){var n={__c:t="__cC"+u++,__:e,Consumer:function(e,t){return e.children(t)},Provider:function(e){var n,_;return this.getChildContext||(n=[],(_={})[t]=this,this.getChildContext=function(){return _},this.shouldComponentUpdate=function(e){this.props.value!==e.value&&n.some(function(e){e.__e=!0,x(e)})},this.sub=function(e){n.push(e);var t=e.componentWillUnmount;e.componentWillUnmount=function(){n.splice(n.indexOf(e),1),t&&t.call(e)}}),e.children}};return n.Provider.__=n.Consumer.contextType=n}exports.isValidElement=_,exports.options=t,e=c.slice,exports.options=t={__e:function(e,t,n,_){for(var o,l,r;t=t.__;)if((o=t.__c)&&!o.__)try{if((l=o.constructor)&&null!=l.getDerivedStateFromError&&(o.setState(l.getDerivedStateFromError(e)),r=o.__d),null!=o.componentDidCatch&&(o.componentDidCatch(e,_||{}),r=o.__d),r)return o.__E=o}catch(t){e=t}throw e}},n=0,exports.isValidElement=_=function(e){return null!=e&&void 0===e.constructor},g.prototype.setState=function(e,t){var n;n=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=a({},this.state),"function"==typeof e&&(e=e(a({},n),this.props)),e&&a(n,e),null!=e&&this.__v&&(t&&this._sb.push(t),x(this))},g.prototype.forceUpdate=function(e){this.__v&&(this.__e=!0,e&&this.__h.push(e),x(this))},g.prototype.render=m,o=[],r="function"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,i=function(e,t){return e.__v.__b-t.__v.__b},C.__r=0,u=0; },{}],"I8Gw":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.jsxs=exports.jsxDEV=exports.jsx=o,Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return e.Fragment}});var e=require("preact"),r=0;function o(o,t,n,_,s,u){var i,l,p={};for(l in t)"ref"==l?i=t[l]:p[l]=t[l];var f={type:o,props:p,key:n,ref:i,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:--r,__source:s,__self:u};if("function"==typeof o&&(i=o.defaultProps))for(l in i)void 0===p[l]&&(p[l]=i[l]);return e.options.vnode&&e.options.vnode(f),f} },{"preact":"u8ui"}],"EQlm":[function(require,module,exports) { @@ -9,13 +9,13 @@ var define; var global = arguments[3]; var e,t=arguments[3];!function(t,n){"function"==typeof e&&e.amd?e([],n):"undefined"!=typeof exports?n():(n(),t.FileSaver={})}(this,function(){"use strict";function e(e,t,n){var o=new XMLHttpRequest;o.open("GET",e),o.responseType="blob",o.onload=function(){r(o.response,t,n)},o.onerror=function(){console.error("could not download file")},o.send()}function n(e){var t=new XMLHttpRequest;t.open("HEAD",e,!1);try{t.send()}catch(e){}return 200<=t.status&&299>=t.status}function o(t){try{t.dispatchEvent(new MouseEvent("click"))}catch(e){var n=document.createEvent("MouseEvents");n.initMouseEvent("click",!0,!0,window,0,0,0,80,20,!1,!1,!1,!1,0,null),t.dispatchEvent(n)}}var a="object"==typeof window&&window.window===window?window:"object"==typeof self&&self.self===self?self:"object"==typeof t&&t.global===t?t:void 0,i=a.navigator&&/Macintosh/.test(navigator.userAgent)&&/AppleWebKit/.test(navigator.userAgent)&&!/Safari/.test(navigator.userAgent),r=a.saveAs||("object"!=typeof window||window!==a?function(){}:"download"in HTMLAnchorElement.prototype&&!i?function(t,i,r){var s=a.URL||a.webkitURL,c=document.createElement("a");i=i||t.name||"download",c.download=i,c.rel="noopener","string"==typeof t?(c.href=t,c.origin===location.origin?o(c):n(c.href)?e(t,i,r):o(c,c.target="_blank")):(c.href=s.createObjectURL(t),setTimeout(function(){s.revokeObjectURL(c.href)},4e4),setTimeout(function(){o(c)},0))}:"msSaveOrOpenBlob"in navigator?function(t,a,i){if(a=a||t.name||"download","string"!=typeof t)navigator.msSaveOrOpenBlob(function(e,t){return void 0===t?t={autoBom:!1}:"object"!=typeof t&&(console.warn("Deprecated: Expected third argument to be a object"),t={autoBom:!t}),t.autoBom&&/^\s*(?:text\/\S*|application\/xml|\S*\/\S*\+xml)\s*;.*charset\s*=\s*utf-8/i.test(e.type)?new Blob(["\ufeff",e],{type:e.type}):e}(t,i),a);else if(n(t))e(t,a,i);else{var r=document.createElement("a");r.href=t,r.target="_blank",setTimeout(function(){o(r)})}}:function(t,n,o,r){if((r=r||open("","_blank"))&&(r.document.title=r.document.body.innerText="downloading..."),"string"==typeof t)return e(t,n,o);var s="application/octet-stream"===t.type,c=/constructor/i.test(a.HTMLElement)||a.safari,l=/CriOS\/[\d]+/.test(navigator.userAgent);if((l||s&&c||i)&&"undefined"!=typeof FileReader){var u=new FileReader;u.onloadend=function(){var e=u.result;e=l?e:e.replace(/^data:[^;]*;/,"data:attachment/file;"),r?r.location.href=e:location=e,r=null},u.readAsDataURL(t)}else{var f=a.URL||a.webkitURL,d=f.createObjectURL(t);r?r.location=d:location.href=d,r=null,setTimeout(function(){f.revokeObjectURL(d)},4e4)}});a.saveAs=r.saveAs=r,"undefined"!=typeof module&&(module.exports=r)}); },{}],"qsmZ":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useCallback=y,exports.useContext=N,exports.useDebugValue=V,exports.useEffect=m,exports.useErrorBoundary=b,exports.useId=g,exports.useImperativeHandle=x,exports.useLayoutEffect=d,exports.useMemo=E,exports.useReducer=l,exports.useRef=H,exports.useState=v;var _,n,t,o,r=require("preact"),e=0,u=[],i=[],c=r.options.__b,f=r.options.__r,s=r.options.diffed,a=r.options.__c,p=r.options.unmount;function h(_,t){r.options.__h&&r.options.__h(n,_,e||t),e=0;var o=n.__H||(n.__H={__:[],__h:[]});return _>=o.__.length&&o.__.push({__V:i}),o.__[_]}function v(_){return e=1,l(T,_)}function l(t,o,r){var e=h(_++,2);if(e.t=t,!e.__c&&(e.__=[r?r(o):T(void 0,o),function(_){var n=e.__N?e.__N[0]:e.__[0],t=e.t(n,_);n!==t&&(e.__N=[t,e.__[1]],e.__c.setState({}))}],e.__c=n,!n.u)){n.u=!0;var u=n.shouldComponentUpdate;n.shouldComponentUpdate=function(_,n,t){if(!e.__c.__H)return!0;var o=e.__c.__H.__.filter(function(_){return _.__c});if(o.every(function(_){return!_.__N}))return!u||u.call(this,_,n,t);var r=!1;return o.forEach(function(_){if(_.__N){var n=_.__[0];_.__=_.__N,_.__N=void 0,n!==_.__[0]&&(r=!0)}}),!(!r&&e.__c.props===_)&&(!u||u.call(this,_,n,t))}}return e.__N||e.__}function m(t,o){var e=h(_++,3);!r.options.__s&&P(e.__H,o)&&(e.__=t,e.i=o,n.__H.__h.push(e))}function d(t,o){var e=h(_++,4);!r.options.__s&&P(e.__H,o)&&(e.__=t,e.i=o,n.__h.push(e))}function H(_){return e=5,E(function(){return{current:_}},[])}function x(_,n,t){e=6,d(function(){return"function"==typeof _?(_(n()),function(){return _(null)}):_?(_.current=n(),function(){return _.current=null}):void 0},null==t?t:t.concat(_))}function E(n,t){var o=h(_++,7);return P(o.__H,t)?(o.__V=n(),o.i=t,o.__h=n,o.__V):o.__}function y(_,n){return e=8,E(function(){return _},n)}function N(t){var o=n.context[t.__c],r=h(_++,9);return r.c=t,o?(null==r.__&&(r.__=!0,o.sub(n)),o.props.value):t.__}function V(_,n){r.options.useDebugValue&&r.options.useDebugValue(n?n(_):_)}function b(t){var o=h(_++,10),r=v();return o.__=t,n.componentDidCatch||(n.componentDidCatch=function(_,n){o.__&&o.__(_,n),r[1](_)}),[r[0],function(){r[1](void 0)}]}function g(){var t=h(_++,11);if(!t.__){for(var o=n.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;var r=o.__m||(o.__m=[0,0]);t.__="P"+r[0]+"-"+r[1]++}return t.__}function C(){for(var _;_=u.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(D),_.__H.__h.forEach(F),_.__H.__h=[]}catch(n){_.__H.__h=[],r.options.__e(n,_.__v)}}r.options.__b=function(_){n=null,c&&c(_)},r.options.__r=function(o){f&&f(o),_=0;var r=(n=o.__c).__H;r&&(t===n?(r.__h=[],n.__h=[],r.__.forEach(function(_){_.__N&&(_.__=_.__N),_.__V=i,_.__N=_.i=void 0})):(r.__h.forEach(D),r.__h.forEach(F),r.__h=[])),t=n},r.options.diffed=function(_){s&&s(_);var e=_.__c;e&&e.__H&&(e.__H.__h.length&&(1!==u.push(e)&&o===r.options.requestAnimationFrame||((o=r.options.requestAnimationFrame)||A)(C)),e.__H.__.forEach(function(_){_.i&&(_.__H=_.i),_.__V!==i&&(_.__=_.__V),_.i=void 0,_.__V=i})),t=n=null},r.options.__c=function(_,n){n.some(function(_){try{_.__h.forEach(D),_.__h=_.__h.filter(function(_){return!_.__||F(_)})}catch(t){n.some(function(_){_.__h&&(_.__h=[])}),n=[],r.options.__e(t,_.__v)}}),a&&a(_,n)},r.options.unmount=function(_){p&&p(_);var n,t=_.__c;t&&t.__H&&(t.__H.__.forEach(function(_){try{D(_)}catch(_){n=_}}),t.__H=void 0,n&&r.options.__e(n,t.__v))};var q="function"==typeof requestAnimationFrame;function A(_){var n,t=function(){clearTimeout(o),q&&cancelAnimationFrame(n),setTimeout(_)},o=setTimeout(t,100);q&&(n=requestAnimationFrame(t))}function D(_){var t=n,o=_.__c;"function"==typeof o&&(_.__c=void 0,o()),n=t}function F(_){var t=n;_.__c=_.__(),n=t}function P(_,n){return!_||_.length!==n.length||n.some(function(n,t){return n!==_[t]})}function T(_,n){return"function"==typeof n?n(_):n} +"use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.useCallback=y,exports.useContext=N,exports.useDebugValue=V,exports.useEffect=m,exports.useErrorBoundary=b,exports.useId=g,exports.useImperativeHandle=x,exports.useLayoutEffect=d,exports.useMemo=E,exports.useReducer=v,exports.useRef=H,exports.useState=l;var _,n,t,o,e=require("preact"),r=0,u=[],i=[],c=e.options.__b,f=e.options.__r,s=e.options.diffed,a=e.options.__c,p=e.options.unmount;function h(_,t){e.options.__h&&e.options.__h(n,_,r||t),r=0;var o=n.__H||(n.__H={__:[],__h:[]});return _>=o.__.length&&o.__.push({__V:i}),o.__[_]}function l(_){return r=1,v(P,_)}function v(t,o,e){var r=h(_++,2);if(r.t=t,!r.__c&&(r.__=[e?e(o):P(void 0,o),function(_){var n=r.__N?r.__N[0]:r.__[0],t=r.t(n,_);n!==t&&(r.__N=[t,r.__[1]],r.__c.setState({}))}],r.__c=n,!n.u)){var u=function(_,n,t){if(!r.__c.__H)return!0;var o=r.__c.__H.__.filter(function(_){return _.__c});if(o.every(function(_){return!_.__N}))return!i||i.call(this,_,n,t);var e=!1;return o.forEach(function(_){if(_.__N){var n=_.__[0];_.__=_.__N,_.__N=void 0,n!==_.__[0]&&(e=!0)}}),!(!e&&r.__c.props===_)&&(!i||i.call(this,_,n,t))};n.u=!0;var i=n.shouldComponentUpdate,c=n.componentWillUpdate;n.componentWillUpdate=function(_,n,t){if(this.__e){var o=i;i=void 0,u(_,n,t),i=o}c&&c.call(this,_,n,t)},n.shouldComponentUpdate=u}return r.__N||r.__}function m(t,o){var r=h(_++,3);!e.options.__s&&U(r.__H,o)&&(r.__=t,r.i=o,n.__H.__h.push(r))}function d(t,o){var r=h(_++,4);!e.options.__s&&U(r.__H,o)&&(r.__=t,r.i=o,n.__h.push(r))}function H(_){return r=5,E(function(){return{current:_}},[])}function x(_,n,t){r=6,d(function(){return"function"==typeof _?(_(n()),function(){return _(null)}):_?(_.current=n(),function(){return _.current=null}):void 0},null==t?t:t.concat(_))}function E(n,t){var o=h(_++,7);return U(o.__H,t)?(o.__V=n(),o.i=t,o.__h=n,o.__V):o.__}function y(_,n){return r=8,E(function(){return _},n)}function N(t){var o=n.context[t.__c],e=h(_++,9);return e.c=t,o?(null==e.__&&(e.__=!0,o.sub(n)),o.props.value):t.__}function V(_,n){e.options.useDebugValue&&e.options.useDebugValue(n?n(_):_)}function b(t){var o=h(_++,10),e=l();return o.__=t,n.componentDidCatch||(n.componentDidCatch=function(_,n){o.__&&o.__(_,n),e[1](_)}),[e[0],function(){e[1](void 0)}]}function g(){var t=h(_++,11);if(!t.__){for(var o=n.__v;null!==o&&!o.__m&&null!==o.__;)o=o.__;var e=o.__m||(o.__m=[0,0]);t.__="P"+e[0]+"-"+e[1]++}return t.__}function C(){for(var _;_=u.shift();)if(_.__P&&_.__H)try{_.__H.__h.forEach(D),_.__H.__h.forEach(F),_.__H.__h=[]}catch(n){_.__H.__h=[],e.options.__e(n,_.__v)}}e.options.__b=function(_){n=null,c&&c(_)},e.options.__r=function(o){f&&f(o),_=0;var e=(n=o.__c).__H;e&&(t===n?(e.__h=[],n.__h=[],e.__.forEach(function(_){_.__N&&(_.__=_.__N),_.__V=i,_.__N=_.i=void 0})):(e.__h.forEach(D),e.__h.forEach(F),e.__h=[],_=0)),t=n},e.options.diffed=function(_){s&&s(_);var r=_.__c;r&&r.__H&&(r.__H.__h.length&&(1!==u.push(r)&&o===e.options.requestAnimationFrame||((o=e.options.requestAnimationFrame)||A)(C)),r.__H.__.forEach(function(_){_.i&&(_.__H=_.i),_.__V!==i&&(_.__=_.__V),_.i=void 0,_.__V=i})),t=n=null},e.options.__c=function(_,n){n.some(function(_){try{_.__h.forEach(D),_.__h=_.__h.filter(function(_){return!_.__||F(_)})}catch(t){n.some(function(_){_.__h&&(_.__h=[])}),n=[],e.options.__e(t,_.__v)}}),a&&a(_,n)},e.options.unmount=function(_){p&&p(_);var n,t=_.__c;t&&t.__H&&(t.__H.__.forEach(function(_){try{D(_)}catch(_){n=_}}),t.__H=void 0,n&&e.options.__e(n,t.__v))};var q="function"==typeof requestAnimationFrame;function A(_){var n,t=function(){clearTimeout(o),q&&cancelAnimationFrame(n),setTimeout(_)},o=setTimeout(t,100);q&&(n=requestAnimationFrame(t))}function D(_){var t=n,o=_.__c;"function"==typeof o&&(_.__c=void 0,o()),n=t}function F(_){var t=n;_.__c=_.__(),n=t}function U(_,n){return!_||_.length!==n.length||n.some(function(n,t){return n!==_[t]})}function P(_,n){return"function"==typeof n?n(_):n} },{"preact":"u8ui"}],"ucH8":[function(require,module,exports) { -module.exports={name:"sketch-to-lineart",version:"1.9.1",description:"tool for converting sketches to transparent lineart",main:"index.js",scripts:{start:"parcel index.html",build:"npm run build:cleanup && npm run build:parcel && npm run build:sw","build:cleanup":"rm -rf .cache && rm -rf docs","build:parcel":"parcel build index.html -d docs --no-source-maps --public-url ./","build:sw":"workbox generateSW",postversion:"npm run build"},author:"Sean S. LeBlanc ",license:"MIT",repository:{type:"git",url:"git://github.com/seleb/sketch-to-lineart.git"},devDependencies:{"@types/file-saver":"^2.0.5",parcel:"^1.12.4","parcel-bundler":"^1.12.5",typescript:"^4.9.5","workbox-cli":"^6.5.4"},dependencies:{"babel-polyfill":"^6.26.0","canvas-toBlob":"^1.0.0","dialog-polyfill":"^0.5.6","file-saver":"^2.0.5",preact:"^10.13.0","reset-css":"^5.0.1"},release:{branches:["+([0-9])?(.{+([0-9]),x}).x","main"],plugins:["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@semantic-release/npm",{npmPublish:!1}],"@semantic-release/github",["@semantic-release/git",{assets:["docs/*","README.md","CHANGELOG.md","package.json","package-lock.json"]}]]}}; +module.exports={name:"sketch-to-lineart",version:"1.10.0",description:"tool for converting sketches to transparent lineart",main:"index.js",scripts:{start:"parcel index.html",build:"npm run build:cleanup && npm run build:parcel && npm run build:sw","build:cleanup":"rm -rf .cache && rm -rf docs","build:parcel":"parcel build index.html -d docs --no-source-maps --public-url ./","build:sw":"workbox generateSW",postversion:"npm run build"},author:"Sean S. LeBlanc ",license:"MIT",repository:{type:"git",url:"git://github.com/seleb/sketch-to-lineart.git"},devDependencies:{"@types/file-saver":"^2.0.5",parcel:"^1.12.4","parcel-bundler":"^1.12.5",typescript:"^5.2.2","workbox-cli":"^7.0.0"},dependencies:{"babel-polyfill":"^6.26.0","canvas-toBlob":"^1.0.0","dialog-polyfill":"^0.5.6","file-saver":"^2.0.5",preact:"^10.18.1","reset-css":"^5.0.2"},release:{branches:["+([0-9])?(.{+([0-9]),x}).x","main"],plugins:["@semantic-release/commit-analyzer","@semantic-release/release-notes-generator","@semantic-release/changelog",["@semantic-release/npm",{npmPublish:!1}],"@semantic-release/github",["@semantic-release/git",{assets:["docs/*","README.md","CHANGELOG.md","package.json","package-lock.json"]}]]}}; },{}],"gT7M":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.default=void 0;var e=window.CustomEvent;function t(e,t){var o="on"+t.type.toLowerCase();return"function"==typeof e[o]&&e[o](t),e.dispatchEvent(t)}function o(e){for(;e&&e!==document.body;){var t=window.getComputedStyle(e),o=function(e,o){return!(void 0===t[e]||t[e]===o)};if(t.opacity<1||o("zIndex","auto")||o("transform","none")||o("mixBlendMode","normal")||o("filter","none")||o("perspective","none")||"isolate"===t.isolation||"fixed"===t.position||"touch"===t.webkitOverflowScrolling)return!0;e=e.parentElement}return!1}function i(e){for(;e;){if("dialog"===e.localName)return e;e=e.parentElement?e.parentElement:e.parentNode?e.parentNode.host:null}return null}function n(e){for(;e&&e.shadowRoot&&e.shadowRoot.activeElement;)e=e.shadowRoot.activeElement;e&&e.blur&&e!==document.body&&e.blur()}function a(e,t){for(var o=0;o=0&&(e=this.dialog_),e||(e=s(this.dialog_)),n(document.activeElement),e&&e.focus()},updateZIndex:function(e,t){if(e, the polyfill may not work correctly",e),"dialog"!==e.localName)throw new Error("Failed to register dialog: The element is not a dialog.");new c(e)},registerDialog:function(e){e.showModal||h.forceRegisterDialog(e)},DialogManager:function(){this.pendingDialogStack=[];var e=this.checkDOM_.bind(this);this.overlay=document.createElement("div"),this.overlay.className="_dialog_overlay",this.overlay.addEventListener("click",function(t){this.forwardTab_=void 0,t.stopPropagation(),e([])}.bind(this)),this.handleKey_=this.handleKey_.bind(this),this.handleFocus_=this.handleFocus_.bind(this),this.zIndexLow_=1e5,this.zIndexHigh_=100150,this.forwardTab_=void 0,"MutationObserver"in window&&(this.mo_=new MutationObserver(function(t){var o=[];t.forEach(function(e){for(var t,i=0;t=e.removedNodes[i];++i)t instanceof Element&&("dialog"===t.localName&&o.push(t),o=o.concat(t.querySelectorAll("dialog")))}),o.length&&e(o)}))}};if(h.DialogManager.prototype.blockDocument=function(){document.documentElement.addEventListener("focus",this.handleFocus_,!0),document.addEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.observe(document,{childList:!0,subtree:!0})},h.DialogManager.prototype.unblockDocument=function(){document.documentElement.removeEventListener("focus",this.handleFocus_,!0),document.removeEventListener("keydown",this.handleKey_),this.mo_&&this.mo_.disconnect()},h.DialogManager.prototype.updateStacking=function(){for(var e,t=this.zIndexHigh_,o=0;e=this.pendingDialogStack[o];++o)e.updateZIndex(--t,--t),0===o&&(this.overlay.style.zIndex=--t);var i=this.pendingDialogStack[0];i?(i.dialog.parentNode||document.body).appendChild(this.overlay):this.overlay.parentNode&&this.overlay.parentNode.removeChild(this.overlay)},h.DialogManager.prototype.containedByTopDialog_=function(e){for(;e=i(e);){for(var t,o=0;t=this.pendingDialogStack[o];++o)if(t.dialog===e)return 0===o;e=e.parentElement}return!1},h.DialogManager.prototype.handleFocus_=function(e){var t=e.composedPath?e.composedPath()[0]:e.target;if(!this.containedByTopDialog_(t)&&document.activeElement!==document.documentElement&&(e.preventDefault(),e.stopPropagation(),n(t),void 0!==this.forwardTab_)){var o=this.pendingDialogStack[0];return o.dialog.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_PRECEDING&&(this.forwardTab_?o.focus_():t!==document.documentElement&&document.documentElement.focus()),!1}},h.DialogManager.prototype.handleKey_=function(o){if(this.forwardTab_=void 0,27===o.keyCode){o.preventDefault(),o.stopPropagation();var i=new e("cancel",{bubbles:!1,cancelable:!0}),n=this.pendingDialogStack[0];n&&t(n.dialog,i)&&n.dialog.close()}else 9===o.keyCode&&(this.forwardTab_=!o.shiftKey)},h.DialogManager.prototype.checkDOM_=function(e){this.pendingDialogStack.slice().forEach(function(t){-1!==e.indexOf(t.dialog)?t.downgradeModal():t.maybeHideModal()})},h.DialogManager.prototype.pushDialog=function(e){var t=(this.zIndexHigh_-this.zIndexLow_)/2-1;return!(this.pendingDialogStack.length>=t)&&(1===this.pendingDialogStack.unshift(e)&&this.blockDocument(),this.updateStacking(),!0)},h.DialogManager.prototype.removeDialog=function(e){var t=this.pendingDialogStack.indexOf(e);-1!==t&&(this.pendingDialogStack.splice(t,1),0===this.pendingDialogStack.length&&this.unblockDocument(),this.updateStacking())},h.dm=new h.DialogManager,h.formSubmitter=null,h.imagemapUseValue=null,void 0===window.HTMLDialogElement){var p=document.createElement("form");if(p.setAttribute("method","dialog"),"dialog"!==p.method){var g=Object.getOwnPropertyDescriptor(HTMLFormElement.prototype,"method");if(g){var m=g.get;g.get=function(){return r(this)?"dialog":m.call(this)};var f=g.set;g.set=function(e){return"string"==typeof e&&"dialog"===e.toLowerCase()?this.setAttribute("method",e):f.call(this,e)},Object.defineProperty(HTMLFormElement.prototype,"method",g)}}document.addEventListener("click",function(e){if(h.formSubmitter=null,h.imagemapUseValue=null,!e.defaultPrevented){var t=e.target;if("composedPath"in e)t=e.composedPath().shift()||t;if(t&&r(t.form)){if(!("submit"===t.type&&["button","input"].indexOf(t.localName)>-1)){if("input"!==t.localName||"image"!==t.type)return;h.imagemapUseValue=e.offsetX+","+e.offsetY}i(t)&&(h.formSubmitter=t)}}},!1),document.addEventListener("submit",function(e){var t=e.target;if(!i(t)){var o=d(e);"dialog"===(o&&o.getAttribute("formmethod")||t.getAttribute("method"))&&e.preventDefault()}});var b=HTMLFormElement.prototype.submit,v=function(){if(!r(this))return b.call(this);var e=i(this);e&&e.close()};HTMLFormElement.prototype.submit=v}var y=h;exports.default=y; },{}],"oSOp":[function(require,module,exports) { -"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Children:!0,PureComponent:!0,StrictMode:!0,Suspense:!0,SuspenseList:!0,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:!0,cloneElement:!0,createFactory:!0,createPortal:!0,findDOMNode:!0,flushSync:!0,forwardRef:!0,hydrate:!0,isValidElement:!0,lazy:!0,memo:!0,render:!0,startTransition:!0,unmountComponentAtNode:!0,unstable_batchedUpdates:!0,useDeferredValue:!0,useInsertionEffect:!0,useSyncExternalStore:!0,useTransition:!0,version:!0,Component:!0,Fragment:!0,createContext:!0,createElement:!0,createRef:!0};exports.PureComponent=i,exports.Suspense=v,exports.SuspenseList=E,exports.cloneElement=z,exports.createFactory=$,exports.createPortal=O,exports.findDOMNode=Y,exports.forwardRef=_,exports.hydrate=L,exports.isValidElement=B,exports.lazy=x,exports.memo=a,exports.render=k,exports.startTransition=J,exports.unmountComponentAtNode=H,exports.useDeferredValue=K,exports.useSyncExternalStore=ee,exports.useTransition=Q,Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return t.Component}}),Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return t.Fragment}}),Object.defineProperty(exports,"createContext",{enumerable:!0,get:function(){return t.createContext}}),Object.defineProperty(exports,"createElement",{enumerable:!0,get:function(){return t.createElement}}),Object.defineProperty(exports,"createRef",{enumerable:!0,get:function(){return t.createRef}}),exports.version=exports.useInsertionEffect=exports.unstable_batchedUpdates=exports.flushSync=exports.default=exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=exports.StrictMode=exports.Children=void 0;var t=require("preact"),n=require("preact/hooks");function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function u(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function i(e){this.props=e}function a(e,n){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:o(this.props,e)}function u(n){return this.shouldComponentUpdate=r,(0,t.createElement)(e,n)}return u.displayName="Memo("+(e.displayName||e.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||t in exports&&exports[t]===n[t]||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return n[t]}}))}),(i.prototype=new t.Component).isPureReactComponent=!0,i.prototype.shouldComponentUpdate=function(e,t){return o(this.props,e)||o(this.state,t)};var l=t.options.__b;t.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l&&l(e)};var s="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function _(e){function t(t){var n=r({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=s,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var c=function(e,n){return null==e?null:(0,t.toChildArray)((0,t.toChildArray)(e).map(n))},p={map:c,forEach:c,count:function(e){return e?(0,t.toChildArray)(e).length:0},only:function(e){var n=(0,t.toChildArray)(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:t.toChildArray},f=t.options.__e;exports.Children=p,t.options.__e=function(e,t,n,r){if(e.then)for(var o,u=t;u=u.__;)if((o=u.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);f(e,t,n,r)};var d=t.options.unmount;function h(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=r({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return h(e,t,n)})),e}function m(e,t,n){return e&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return m(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function v(){this.__u=0,this.t=null,this.__b=null}function y(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function x(e){var n,r,o;function u(u){if(n||(n=e()).then(function(e){r=e.default||e},function(e){o=e}),o)throw o;if(!r)throw n;return(0,t.createElement)(r,u)}return u.displayName="Lazy",u.__f=!0,u}function E(){this.u=null,this.o=null}t.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),d&&d(e)},(v.prototype=new t.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=y(r.__v),u=!1,i=function(){u||(u=!0,n.__R=null,o?o(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=m(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},v.prototype.componentWillUnmount=function(){this.t=[]},v.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=h(this.__b,r,o.__O=o.__P)}this.__b=null}var u=n.__a&&(0,t.createElement)(t.Fragment,null,e.fallback);return u&&(u.__h=null),[(0,t.createElement)(t.Fragment,null,n.__a?null:e.children),u]};var b=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),n.i.removeChild(e)}}),(0,t.render)((0,t.createElement)(C,{context:n.context},e.__v),n.l)):n.l&&n.componentWillUnmount()}function O(e,n){var r=(0,t.createElement)(S,{__v:e,i:n});return r.containerInfo=n,r}(E.prototype=new t.Component).__a=function(e){var t=this,n=y(t.__v),r=t.o.get(e);return r[0]++,function(o){var u=function(){t.props.revealOrder?(r.push(o),b(t,e,r)):o()};n?n(u):u()}},E.prototype.render=function(e){this.u=null,this.o=new Map;var n=(0,t.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var r=n.length;r--;)this.o.set(n[r],this.u=[1,0,this.u]);return e.children},E.prototype.componentDidUpdate=E.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){b(e,n,t)})};var R="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,g=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,N="undefined"!=typeof document,P=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/i:/fil|che|ra/i).test(e)};function k(e,n,r){return null==n.__k&&(n.textContent=""),(0,t.render)(e,n),"function"==typeof r&&r(),e?e.__c:null}function L(e,n,r){return(0,t.hydrate)(e,n),"function"==typeof r&&r(),e?e.__c:null}t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(t.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var U=t.options.event;function A(){}function I(){return this.cancelBubble}function T(){return this.defaultPrevented}t.options.event=function(e){return U&&(e=U(e)),e.persist=A,e.isPropagationStopped=I,e.isDefaultPrevented=T,e.nativeEvent=e};var w,D={configurable:!0,get:function(){return this.class}},F=t.options.vnode;t.options.vnode=function(e){var n=e.type,r=e.props,o=r;if("string"==typeof n){var u=-1===n.indexOf("-");for(var i in o={},r){var a=r[i];N&&"children"===i&&"noscript"===n||"value"===i&&"defaultValue"in r&&null==a||("defaultValue"===i&&"value"in r&&null==r.value?i="value":"download"===i&&!0===a?a="":/ondoubleclick/i.test(i)?i="ondblclick":/^onchange(textarea|input)/i.test(i+n)&&!P(r.type)?i="oninput":/^onfocus$/i.test(i)?i="onfocusin":/^onblur$/i.test(i)?i="onfocusout":/^on(Ani|Tra|Tou|BeforeInp|Compo)/.test(i)?i=i.toLowerCase():u&&g.test(i)?i=i.replace(/[A-Z0-9]/g,"-$&").toLowerCase():null===a&&(a=void 0),/^oninput$/i.test(i)&&(i=i.toLowerCase(),o[i]&&(i="oninputCapture")),o[i]=a)}"select"==n&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,t.toChildArray)(r.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==n&&null!=o.defaultValue&&(o.value=(0,t.toChildArray)(r.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),e.props=o,r.class!=r.className&&(D.enumerable="className"in r,null!=r.className&&(o.class=r.className),Object.defineProperty(o,"className",D))}e.$$typeof=R,F&&F(e)};var M=t.options.__r;t.options.__r=function(e){M&&M(e),w=e.__c};var V=t.options.diffed;t.options.diffed=function(e){V&&V(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),w=null};var j={ReactCurrentDispatcher:{current:{readContext:function(e){return w.__n[e.__c].props.value}}}},W="17.0.2";function $(e){return t.createElement.bind(null,e)}function B(e){return!!e&&e.$$typeof===R}function z(e){return B(e)?t.cloneElement.apply(null,arguments):e}function H(e){return!!e.__k&&((0,t.render)(null,e),!0)}function Y(e){return e&&(e.base||1===e.nodeType&&e)||null}exports.version=W,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=j;var q=function(e,t){return e(t)},Z=function(e,t){return e(t)},G=t.Fragment;function J(e){e()}function K(e){return e}function Q(){return[!1,J]}exports.StrictMode=G,exports.flushSync=Z,exports.unstable_batchedUpdates=q;var X=n.useLayoutEffect;function ee(e,t){var r=t(),o=(0,n.useState)({h:{__:r,v:t}}),i=o[0].h,a=o[1];return(0,n.useLayoutEffect)(function(){i.__=r,i.v=t,u(i.__,t())||a({h:i})},[e,r,t]),(0,n.useEffect)(function(){return u(i.__,i.v())||a({h:i}),e(function(){u(i.__,i.v())||a({h:i})})},[e]),r}exports.useInsertionEffect=X;var te={useState:n.useState,useId:n.useId,useReducer:n.useReducer,useEffect:n.useEffect,useLayoutEffect:n.useLayoutEffect,useInsertionEffect:X,useTransition:Q,useDeferredValue:K,useSyncExternalStore:ee,startTransition:J,useRef:n.useRef,useImperativeHandle:n.useImperativeHandle,useMemo:n.useMemo,useCallback:n.useCallback,useContext:n.useContext,useDebugValue:n.useDebugValue,version:"17.0.2",Children:p,render:k,hydrate:L,unmountComponentAtNode:H,createPortal:O,createElement:t.createElement,createContext:t.createContext,createFactory:$,cloneElement:z,createRef:t.createRef,Fragment:t.Fragment,isValidElement:B,findDOMNode:Y,Component:t.Component,PureComponent:i,memo:a,forwardRef:_,flushSync:Z,unstable_batchedUpdates:q,StrictMode:G,Suspense:v,SuspenseList:E,lazy:x,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:j};exports.default=te; +"use strict";Object.defineProperty(exports,"__esModule",{value:!0});var e={Children:!0,PureComponent:!0,StrictMode:!0,Suspense:!0,SuspenseList:!0,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:!0,cloneElement:!0,createFactory:!0,createPortal:!0,findDOMNode:!0,flushSync:!0,forwardRef:!0,hydrate:!0,isElement:!0,isFragment:!0,isValidElement:!0,lazy:!0,memo:!0,render:!0,startTransition:!0,unmountComponentAtNode:!0,unstable_batchedUpdates:!0,useDeferredValue:!0,useInsertionEffect:!0,useSyncExternalStore:!0,useTransition:!0,version:!0,Component:!0,Fragment:!0,createContext:!0,createElement:!0,createRef:!0};exports.PureComponent=i,exports.Suspense=v,exports.SuspenseList=x,exports.cloneElement=q,exports.createFactory=z,exports.createPortal=O,exports.findDOMNode=G,exports.forwardRef=c,exports.hydrate=A,exports.isFragment=Y,exports.isValidElement=H,exports.lazy=E,exports.memo=a,exports.render=U,exports.startTransition=X,exports.unmountComponentAtNode=Z,exports.useDeferredValue=ee,exports.useSyncExternalStore=oe,exports.useTransition=te,Object.defineProperty(exports,"Component",{enumerable:!0,get:function(){return t.Component}}),Object.defineProperty(exports,"Fragment",{enumerable:!0,get:function(){return t.Fragment}}),Object.defineProperty(exports,"createContext",{enumerable:!0,get:function(){return t.createContext}}),Object.defineProperty(exports,"createElement",{enumerable:!0,get:function(){return t.createElement}}),Object.defineProperty(exports,"createRef",{enumerable:!0,get:function(){return t.createRef}}),exports.version=exports.useInsertionEffect=exports.unstable_batchedUpdates=exports.isElement=exports.flushSync=exports.default=exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=exports.StrictMode=exports.Children=void 0;var t=require("preact"),n=require("preact/hooks");function r(e,t){for(var n in t)e[n]=t[n];return e}function o(e,t){for(var n in e)if("__source"!==n&&!(n in t))return!0;for(var r in t)if("__source"!==r&&e[r]!==t[r])return!0;return!1}function u(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t}function i(e){this.props=e}function a(e,n){function r(e){var t=this.props.ref,r=t==e.ref;return!r&&t&&(t.call?t(null):t.current=null),n?!n(this.props,e)||!r:o(this.props,e)}function u(n){return this.shouldComponentUpdate=r,(0,t.createElement)(e,n)}return u.displayName="Memo("+(e.displayName||e.name)+")",u.prototype.isReactComponent=!0,u.__f=!0,u}Object.keys(n).forEach(function(t){"default"!==t&&"__esModule"!==t&&(Object.prototype.hasOwnProperty.call(e,t)||t in exports&&exports[t]===n[t]||Object.defineProperty(exports,t,{enumerable:!0,get:function(){return n[t]}}))}),(i.prototype=new t.Component).isPureReactComponent=!0,i.prototype.shouldComponentUpdate=function(e,t){return o(this.props,e)||o(this.state,t)};var l=t.options.__b;t.options.__b=function(e){e.type&&e.type.__f&&e.ref&&(e.props.ref=e.ref,e.ref=null),l&&l(e)};var s="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.forward_ref")||3911;function c(e){function t(t){var n=r({},t);return delete n.ref,e(n,t.ref||null)}return t.$$typeof=s,t.render=t,t.prototype.isReactComponent=t.__f=!0,t.displayName="ForwardRef("+(e.displayName||e.name)+")",t}var _=function(e,n){return null==e?null:(0,t.toChildArray)((0,t.toChildArray)(e).map(n))},p={map:_,forEach:_,count:function(e){return e?(0,t.toChildArray)(e).length:0},only:function(e){var n=(0,t.toChildArray)(e);if(1!==n.length)throw"Children.only";return n[0]},toArray:t.toChildArray},f=t.options.__e;exports.Children=p,t.options.__e=function(e,t,n,r){if(e.then)for(var o,u=t;u=u.__;)if((o=u.__c)&&o.__c)return null==t.__e&&(t.__e=n.__e,t.__k=n.__k),o.__c(e,t);f(e,t,n,r)};var d=t.options.unmount;function m(e,t,n){return e&&(e.__c&&e.__c.__H&&(e.__c.__H.__.forEach(function(e){"function"==typeof e.__c&&e.__c()}),e.__c.__H=null),null!=(e=r({},e)).__c&&(e.__c.__P===n&&(e.__c.__P=t),e.__c=null),e.__k=e.__k&&e.__k.map(function(e){return m(e,t,n)})),e}function h(e,t,n){return e&&n&&(e.__v=null,e.__k=e.__k&&e.__k.map(function(e){return h(e,t,n)}),e.__c&&e.__c.__P===t&&(e.__e&&n.insertBefore(e.__e,e.__d),e.__c.__e=!0,e.__c.__P=n)),e}function v(){this.__u=0,this.t=null,this.__b=null}function y(e){var t=e.__.__c;return t&&t.__a&&t.__a(e)}function E(e){var n,r,o;function u(u){if(n||(n=e()).then(function(e){r=e.default||e},function(e){o=e}),o)throw o;if(!r)throw n;return(0,t.createElement)(r,u)}return u.displayName="Lazy",u.__f=!0,u}function x(){this.u=null,this.o=null}t.options.unmount=function(e){var t=e.__c;t&&t.__R&&t.__R(),t&&!0===e.__h&&(e.type=null),d&&d(e)},(v.prototype=new t.Component).__c=function(e,t){var n=t.__c,r=this;null==r.t&&(r.t=[]),r.t.push(n);var o=y(r.__v),u=!1,i=function(){u||(u=!0,n.__R=null,o?o(a):a())};n.__R=i;var a=function(){if(!--r.__u){if(r.state.__a){var e=r.state.__a;r.__v.__k[0]=h(e,e.__c.__P,e.__c.__O)}var t;for(r.setState({__a:r.__b=null});t=r.t.pop();)t.forceUpdate()}},l=!0===t.__h;r.__u++||l||r.setState({__a:r.__b=r.__v.__k[0]}),e.then(i,i)},v.prototype.componentWillUnmount=function(){this.t=[]},v.prototype.render=function(e,n){if(this.__b){if(this.__v.__k){var r=document.createElement("div"),o=this.__v.__k[0].__c;this.__v.__k[0]=m(this.__b,r,o.__O=o.__P)}this.__b=null}var u=n.__a&&(0,t.createElement)(t.Fragment,null,e.fallback);return u&&(u.__h=null),[(0,t.createElement)(t.Fragment,null,n.__a?null:e.children),u]};var b=function(e,t,n){if(++n[1]===n[0]&&e.o.delete(t),e.props.revealOrder&&("t"!==e.props.revealOrder[0]||!e.o.size))for(n=e.u;n;){for(;n.length>3;)n.pop()();if(n[1]>>1,1),n.i.removeChild(e)}}),(0,t.render)((0,t.createElement)(C,{context:n.context},e.__v),n.l)}function O(e,n){var r=(0,t.createElement)(S,{__v:e,i:n});return r.containerInfo=n,r}(x.prototype=new t.Component).__a=function(e){var t=this,n=y(t.__v),r=t.o.get(e);return r[0]++,function(o){var u=function(){t.props.revealOrder?(r.push(o),b(t,e,r)):o()};n?n(u):u()}},x.prototype.render=function(e){this.u=null,this.o=new Map;var n=(0,t.toChildArray)(e.children);e.revealOrder&&"b"===e.revealOrder[0]&&n.reverse();for(var r=n.length;r--;)this.o.set(n[r],this.u=[1,0,this.u]);return e.children},x.prototype.componentDidUpdate=x.prototype.componentDidMount=function(){var e=this;this.o.forEach(function(t,n){b(e,n,t)})};var g="undefined"!=typeof Symbol&&Symbol.for&&Symbol.for("react.element")||60103,R=/^(?:accent|alignment|arabic|baseline|cap|clip(?!PathU)|color|dominant|fill|flood|font|glyph(?!R)|horiz|image(!S)|letter|lighting|marker(?!H|W|U)|overline|paint|pointer|shape|stop|strikethrough|stroke|text(?!L)|transform|underline|unicode|units|v|vector|vert|word|writing|x(?!C))[A-Z]/,N=/^on(Ani|Tra|Tou|BeforeInp|Compo)/,P=/[A-Z0-9]/g,k="undefined"!=typeof document,L=function(e){return("undefined"!=typeof Symbol&&"symbol"==typeof Symbol()?/fil|che|rad/:/fil|che|ra/).test(e)};function U(e,n,r){return null==n.__k&&(n.textContent=""),(0,t.render)(e,n),"function"==typeof r&&r(),e?e.__c:null}function A(e,n,r){return(0,t.hydrate)(e,n),"function"==typeof r&&r(),e?e.__c:null}t.Component.prototype.isReactComponent={},["componentWillMount","componentWillReceiveProps","componentWillUpdate"].forEach(function(e){Object.defineProperty(t.Component.prototype,e,{configurable:!0,get:function(){return this["UNSAFE_"+e]},set:function(t){Object.defineProperty(this,e,{configurable:!0,writable:!0,value:t})}})});var I=t.options.event;function T(){}function F(){return this.cancelBubble}function D(){return this.defaultPrevented}t.options.event=function(e){return I&&(e=I(e)),e.persist=T,e.isPropagationStopped=F,e.isDefaultPrevented=D,e.nativeEvent=e};var w,M={enumerable:!1,configurable:!0,get:function(){return this.class}},V=t.options.vnode;t.options.vnode=function(e){"string"==typeof e.type&&function(e){var n=e.props,r=e.type,o={};for(var u in n){var i=n[u];if(!("value"===u&&"defaultValue"in n&&null==i||k&&"children"===u&&"noscript"===r||"class"===u||"className"===u)){var a=u.toLowerCase();"defaultValue"===u&&"value"in n&&null==n.value?u="value":"download"===u&&!0===i?i="":"ondoubleclick"===a?u="ondblclick":"onchange"!==a||"input"!==r&&"textarea"!==r||L(n.type)?"onfocus"===a?u="onfocusin":"onblur"===a?u="onfocusout":N.test(u)?u=a:-1===r.indexOf("-")&&R.test(u)?u=u.replace(P,"-$&").toLowerCase():null===i&&(i=void 0):a=u="oninput","oninput"===a&&o[u=a]&&(u="oninputCapture"),o[u]=i}}"select"==r&&o.multiple&&Array.isArray(o.value)&&(o.value=(0,t.toChildArray)(n.children).forEach(function(e){e.props.selected=-1!=o.value.indexOf(e.props.value)})),"select"==r&&null!=o.defaultValue&&(o.value=(0,t.toChildArray)(n.children).forEach(function(e){e.props.selected=o.multiple?-1!=o.defaultValue.indexOf(e.props.value):o.defaultValue==e.props.value})),n.class&&!n.className?(o.class=n.class,Object.defineProperty(o,"className",M)):(n.className&&!n.class||n.class&&n.className)&&(o.class=o.className=n.className),e.props=o}(e),e.$$typeof=g,V&&V(e)};var j=t.options.__r;t.options.__r=function(e){j&&j(e),w=e.__c};var W=t.options.diffed;t.options.diffed=function(e){W&&W(e);var t=e.props,n=e.__e;null!=n&&"textarea"===e.type&&"value"in t&&t.value!==n.value&&(n.value=null==t.value?"":t.value),w=null};var B={ReactCurrentDispatcher:{current:{readContext:function(e){return w.__n[e.__c].props.value}}}},$="17.0.2";function z(e){return t.createElement.bind(null,e)}function H(e){return!!e&&e.$$typeof===g}function Y(e){return H(e)&&e.type===t.Fragment}function q(e){return H(e)?t.cloneElement.apply(null,arguments):e}function Z(e){return!!e.__k&&((0,t.render)(null,e),!0)}function G(e){return e&&(e.base||1===e.nodeType&&e)||null}exports.version=$,exports.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=B;var J=function(e,t){return e(t)},K=function(e,t){return e(t)},Q=t.Fragment;function X(e){e()}function ee(e){return e}function te(){return[!1,X]}exports.StrictMode=Q,exports.flushSync=K,exports.unstable_batchedUpdates=J;var ne=n.useLayoutEffect,re=H;function oe(e,t){var r=t(),o=(0,n.useState)({h:{__:r,v:t}}),i=o[0].h,a=o[1];return(0,n.useLayoutEffect)(function(){i.__=r,i.v=t,u(i.__,t())||a({h:i})},[e,r,t]),(0,n.useEffect)(function(){return u(i.__,i.v())||a({h:i}),e(function(){u(i.__,i.v())||a({h:i})})},[e]),r}exports.isElement=re,exports.useInsertionEffect=ne;var ue={useState:n.useState,useId:n.useId,useReducer:n.useReducer,useEffect:n.useEffect,useLayoutEffect:n.useLayoutEffect,useInsertionEffect:ne,useTransition:te,useDeferredValue:ee,useSyncExternalStore:oe,startTransition:X,useRef:n.useRef,useImperativeHandle:n.useImperativeHandle,useMemo:n.useMemo,useCallback:n.useCallback,useContext:n.useContext,useDebugValue:n.useDebugValue,version:"17.0.2",Children:p,render:U,hydrate:A,unmountComponentAtNode:Z,createPortal:O,createElement:t.createElement,createContext:t.createContext,createFactory:z,cloneElement:q,createRef:t.createRef,Fragment:t.Fragment,isValidElement:H,isElement:re,isFragment:Y,findDOMNode:G,Component:t.Component,PureComponent:i,memo:a,forwardRef:c,flushSync:K,unstable_batchedUpdates:J,StrictMode:Q,Suspense:v,SuspenseList:x,lazy:E,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED:B};exports.default=ue; },{"preact":"u8ui","preact/hooks":"qsmZ"}],"PxFf":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Modal=f;var e=require("preact/jsx-runtime"),r=o(require("dialog-polyfill")),t=require("preact/compat"),n=require("preact/hooks");function o(e){return e&&e.__esModule?e:{default:e}}function c(e,r){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);r&&(n=n.filter(function(r){return Object.getOwnPropertyDescriptor(e,r).enumerable})),t.push.apply(t,n)}return t}function i(e){for(var r=1;r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function a(e,r){if(null==e)return{};var t,n,o={},c=Object.keys(e);for(n=0;n=0||(o[t]=e[t]);return o}function f(o){var c=o.children,l=o.close,a=u(o,["children","close"]),f=(0,n.useRef)(null);return(0,n.useEffect)(function(){var e=f.current;e&&(r.default.registerDialog(e),e.showModal(),e.addEventListener("close",l))},[l]),(0,t.createPortal)((0,e.jsx)("dialog",i(i({ref:f,"aria-modal":!0},a),{},{children:c})),document.body)} },{"preact/jsx-runtime":"I8Gw","dialog-polyfill":"gT7M","preact/compat":"oSOp","preact/hooks":"qsmZ"}],"ZN2e":[function(require,module,exports) { @@ -26,10 +26,10 @@ module.exports={name:"sketch-to-lineart",version:"1.9.1",description:"tool for c "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.sortNumeric=r,exports.hexToRgb=t,exports.rgbToLuma=u,exports.useCheckbox=n,exports.useRange=o;var e=require("preact/hooks");function r(e,r){return e-r}function t(e){var r=parseInt(e.replace("#","0x"));return[(r>>16&255)/255,(r>>8&255)/255,(255&r)/255]}function u(e,r,t){return.2126*e+.7152*r+.0722*t}function n(r){return(0,e.useCallback)(function(e){r(e.currentTarget.checked)},[r])}function o(r){return(0,e.useCallback)(function(e){""!==e.currentTarget.value&&r(parseFloat(e.currentTarget.value))},[r])} },{"preact/hooks":"qsmZ"}],"hN9c":[function(require,module,exports) { "use strict";Object.defineProperty(exports,"__esModule",{value:!0}),exports.Cutout=s;var e=require("preact/jsx-runtime"),t=require("preact/hooks"),r=require("./Modal"),n=require("./utils");function u(e,t){return l(e)||c(e,t)||o(e,t)||i()}function i(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(e,t){if(e){if("string"==typeof e)return a(e,t);var r=Object.prototype.toString.call(e).slice(8,-1);return"Object"===r&&e.constructor&&(r=e.constructor.name),"Map"===r||"Set"===r?Array.from(e):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?a(e,t):void 0}}function a(e,t){(null==t||t>e.length)&&(t=e.length);for(var r=0,n=new Array(t);r=0||Object.prototype.propertyIsEnumerable.call(e,t)&&(o[t]=e[t])}return o}function i(e,r){if(null==e)return{};var t,n,o={},u=Object.keys(e);for(n=0;n=0||(o[t]=e[t]);return o}function c(t){var o=t.id,i=t.setValue,c=u(t,["id","setValue"]),p=(0,r.useRange)(i);return(0,e.jsxs)("div",{className:"range",children:[(0,e.jsx)("input",n(n({},c),{},{id:"".concat(o,"-range"),type:"range",onInput:p})),(0,e.jsx)("input",n(n({},c),{},{id:o,type:"number",onInput:p}))]})} -},{"preact/jsx-runtime":"I8Gw","./utils":"wp4r"}],"mo85":[function(require,module,exports) { -"use strict";var t=require("preact/jsx-runtime");require("canvas-toBlob");var e=require("file-saver"),r=require("preact"),n=require("preact/hooks"),o=f(require("../../package.json")),i=require("./Capture"),a=require("./Cutout"),l=h(require("./gl")),u=require("./Range"),s=require("./utils");function c(){if("function"!=typeof WeakMap)return null;var t=new WeakMap;return c=function(){return t},t}function h(t){if(t&&t.__esModule)return t;if(null===t||"object"!=typeof t&&"function"!=typeof t)return{default:t};var e=c();if(e&&e.has(t))return e.get(t);var r={},n=Object.defineProperty&&Object.getOwnPropertyDescriptor;for(var o in t)if(Object.prototype.hasOwnProperty.call(t,o)){var i=n?Object.getOwnPropertyDescriptor(t,o):null;i&&(i.get||i.set)?Object.defineProperty(r,o,i):r[o]=t[o]}return r.default=t,e&&e.set(t,r),r}function f(t){return t&&t.__esModule?t:{default:t}}function d(t,e){return b(t)||v(t,e)||m(t,e)||g()}function g(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function m(t,e){if(t){if("string"==typeof t)return p(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?p(t,e):void 0}}function p(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r 0.0) {\n\t\tv = mix(0.0, contrast, v);\n\t} else {\n\t\tv = 0.0;\n\t}\n\tv = clamp(v, 0.0, 1.0);\n\tif (threshold <= 1.0) {\n\t\tv = step(threshold, v);\n\t}\n\tgl_FragColor = vec4(fill, v);\n}\n"),k=new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),A=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,A),w.bufferData(w.ARRAY_BUFFER,k,w.STATIC_DRAW);var S={position:w.getAttribLocation(C.program,"position"),tex0:w.getUniformLocation(C.program,"tex0"),resolution:w.getUniformLocation(C.program,"resolution"),brightness:w.getUniformLocation(C.program,"brightness"),contrast:w.getUniformLocation(C.program,"contrast"),threshold:w.getUniformLocation(C.program,"threshold"),fill:w.getUniformLocation(C.program,"fill")};w.enableVertexAttribArray(S.position),C.useProgram(),w.vertexAttribPointer(S.position,2,w.FLOAT,!1,0,0),w.clearColor(0,0,0,0),w.uniform1i(S.tex0,0);var F=new l.Texture(new Image,0,!1);function R(){w.drawArrays(w.TRIANGLES,0,k.length/2)}function q(){try{R(),j.toBlob(function(t){try{if(!t)throw new Error("No canvas output found");(0,e.saveAs)(t)}catch(r){console.error(r),window.alert("Something went wrong!\n"+r)}})}catch(t){console.error(t),window.alert("Something went wrong!\n"+t)}}function E(){var e=d((0,n.useState)(1),2),r=e[0],l=e[1],c=d((0,n.useState)(1),2),h=c[0],f=c[1],g=d((0,n.useState)(!1),2),m=g[0],p=g[1],v=d((0,n.useState)(.5),2),b=v[0],C=v[1],k=d((0,n.useState)(""),2),A=k[0],E=k[1],T=d((0,n.useState)("#000000"),2),O=T[0],I=T[1],M=d((0,n.useState)(!0),2),L=M[0],U=M[1],_=(0,n.useRef)(null),D=(0,n.useCallback)(function(t){var e,r;if(null===(r=null===(e=t.currentTarget)||void 0===e?void 0:e.files)||void 0===r?void 0:r[0]){var n=new FileReader;n.onload=function(){var t,e;E(null!==(e=null===(t=n.result)||void 0===t?void 0:t.toString())&&void 0!==e?e:"")},n.readAsDataURL(t.currentTarget.files[0])}},[]);(0,n.useEffect)(function(){if(L){var t=new Image;t.onload=function(){x.width=Math.min(t.naturalWidth,256),x.height=Math.min(t.naturalHeight,256),y.clearRect(0,0,x.width,x.height),y.filter="grayscale() invert()",y.drawImage(t,0,0,t.naturalWidth,t.naturalHeight,0,0,x.width,x.height);var e=y.getImageData(0,0,x.width,x.height),r=e.data.filter(function(t,r){return r%4==0&&0!==e.data[r+3]});r.sort(s.sortNumeric);var n=r[Math.floor(r.length/2)]/255,o=Math.sqrt(r.reduce(function(t,e){return t+Math.pow(e/255-n,2)},0)/r.length),i=parseFloat((n+o/2).toFixed(3)),a=parseFloat((1/o).toFixed(3));i==i&&i!==1/0&&i!==-1/0||(i=0),a==a&&a!==1/0&&a!==-1/0||(a=1),l(i),f(a)},t.src=A}},[A,L]),(0,n.useEffect)(function(){w.uniform1f(S.brightness,r),R()},[r]),(0,n.useEffect)(function(){w.uniform1f(S.contrast,h),R()},[h]),(0,n.useEffect)(function(){w.uniform1f(S.threshold,m?b:1/0),R()},[b,m]),(0,n.useEffect)(function(){var t=(0,s.hexToRgb)(O);w.uniform3f(S.fill,t[0],t[1],t[2]),R()},[O]),(0,n.useEffect)(function(){var t=new Image;t.onerror=t.onload=function(){j.width=t.naturalWidth,j.height=t.naturalHeight,w.viewport(0,0,j.width,j.height),w.uniform2f(S.resolution,j.width,j.height),F.source=t,F.update(),F.bind(),R()},t.src=A},[A]),(0,n.useEffect)(function(){var t;null===(t=document.querySelector("#output-img"))||void 0===t||t.appendChild(j)},[]);var P=(0,n.useCallback)(function(){E(""),R(),document.querySelector("#source-file").value=""},[]),B=d((0,n.useState)(!1),2),W=B[0],N=B[1],V=(0,n.useCallback)(function(){return N(!0)},[]),H=(0,n.useCallback)(function(t){t&&E(t),N(!1)},[]),Y=d((0,n.useState)(!1),2),G=Y[0],$=Y[1],z=(0,n.useCallback)(function(){return $(!0)},[]),J=(0,n.useCallback)(function(t){t&&E(t),$(!1)},[]),K=(0,s.useCheckbox)(U),Q=(0,s.useCheckbox)(p),X=(0,n.useCallback)(function(t){I(t.currentTarget.value)},[]),Z=(0,n.useCallback)(function(){var t=document.documentElement.dataset.theme||(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");document.documentElement.dataset.theme="dark"===t?"light":"dark"},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("main",{children:[(0,t.jsx)("h1",{children:"sketch-to-lineart"}),(0,t.jsx)("label",{htmlFor:"source-file",children:"source:"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)("input",{id:"source-file",type:"file",accept:"image/*",onChange:D})}),(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button",onClick:V,children:"Take photo"})})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("label",{htmlFor:"auto",title:"Automatically set brightness/contrast",children:"auto:"}),(0,t.jsx)("input",{id:"auto",title:"Automatically set brightness/contrast",type:"checkbox",checked:L,onChange:K}),!L&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("label",{htmlFor:"brightness",children:"brightness:"}),(0,t.jsx)(u.Range,{id:"brightness",min:0,max:5,step:.001,value:r,setValue:l}),(0,t.jsx)("label",{htmlFor:"contrast",children:"contrast:"}),(0,t.jsx)(u.Range,{id:"contrast",min:1,max:10,step:.001,value:h,setValue:f})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("label",{htmlFor:"use-threshold",title:"Output is fully opaque/fully transparent, with no partially transparent pixels",children:"use threshold:"}),(0,t.jsx)("input",{id:"use-threshold",title:"Output is fully opaque/fully transparent, with no partially transparent pixels",type:"checkbox",checked:m,onChange:Q}),m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("label",{htmlFor:"threshold",children:"threshold:"}),(0,t.jsx)(u.Range,{id:"threshold",min:0,max:1,step:.001,value:b,setValue:C})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("label",{htmlFor:"fill",children:"fill:"}),(0,t.jsx)("input",{id:"fill",type:"color",value:O,style:{backgroundColor:O},onInput:X}),(0,t.jsx)("hr",{}),(0,t.jsxs)("figure",{children:[(0,t.jsxs)("figcaption",{children:["original"," ",(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{disabled:!A,type:"button",onClick:z,children:"cutout"}),(0,t.jsx)("button",{disabled:!A,type:"button",onClick:P,children:"clear"})]})]}),(0,t.jsx)("img",{alt:"Source image",id:"source-img",src:A,ref:_})]}),(0,t.jsxs)("figure",{children:[(0,t.jsxs)("figcaption",{children:["output"," ",(0,t.jsx)("button",{type:"button",onClick:q,children:"save"})]}),(0,t.jsx)("div",{id:"output-img",className:s.rgbToLuma.apply(void 0,(0,s.hexToRgb)(O))>.5?"invert":""})]}),W&&(0,t.jsx)(i.Capture,{onCapture:H}),G&&(0,t.jsx)(a.Cutout,{srcInput:A,onCutout:J})]}),(0,t.jsxs)("footer",{children:[(0,t.jsx)("button",{id:"toggle-theme",type:"button",onClick:Z,title:"Toggle theme",children:"Toggle theme"}),"v",o.default.version]})]})}(0,r.render)((0,t.jsx)(E,{}),document.body); -},{"preact/jsx-runtime":"I8Gw","canvas-toBlob":"EQlm","file-saver":"i0aF","preact":"u8ui","preact/hooks":"qsmZ","../../package.json":"ucH8","./Capture":"cgfr","./Cutout":"hN9c","./gl":"fbLS","./Range":"DniY","./utils":"wp4r"}]},{},["mo85"], null) \ No newline at end of file +},{"preact/jsx-runtime":"I8Gw","./utils":"wp4r"}],"fbLS":[function(require,module,exports) { +"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r 0.0) {\n\t\tv = mix(0.0, contrast, v);\n\t} else {\n\t\tv = 0.0;\n\t}\n\tv = clamp(v, 0.0, 1.0);\n\tif (threshold <= 1.0) {\n\t\tv = step(threshold, v);\n\t}\n\tgl_FragColor = vec4(fill, v);\n}\n"),k=new Float32Array([-1,-1,1,-1,-1,1,1,-1,1,1,-1,1]),A=w.createBuffer();w.bindBuffer(w.ARRAY_BUFFER,A),w.bufferData(w.ARRAY_BUFFER,k,w.STATIC_DRAW);var S={position:w.getAttribLocation(C.program,"position"),tex0:w.getUniformLocation(C.program,"tex0"),resolution:w.getUniformLocation(C.program,"resolution"),brightness:w.getUniformLocation(C.program,"brightness"),contrast:w.getUniformLocation(C.program,"contrast"),threshold:w.getUniformLocation(C.program,"threshold"),fill:w.getUniformLocation(C.program,"fill")};w.enableVertexAttribArray(S.position),C.useProgram(),w.vertexAttribPointer(S.position,2,w.FLOAT,!1,0,0),w.clearColor(0,0,0,0),w.uniform1i(S.tex0,0);var F=new u.Texture(new Image,0,!1);function R(){w.drawArrays(w.TRIANGLES,0,k.length/2)}function q(){try{R(),j.toBlob(function(t){try{if(!t)throw new Error("No canvas output found");(0,e.saveAs)(t)}catch(r){console.error(r),window.alert("Something went wrong!\n"+r)}})}catch(t){console.error(t),window.alert("Something went wrong!\n"+t)}}function E(){var e=f((0,n.useState)(1),2),r=e[0],u=e[1],c=f((0,n.useState)(1),2),h=c[0],d=c[1],g=f((0,n.useState)(!1),2),m=g[0],p=g[1],v=f((0,n.useState)(.5),2),b=v[0],C=v[1],k=f((0,n.useState)(""),2),A=k[0],E=k[1],T=f((0,n.useState)("#000000"),2),O=T[0],I=T[1],M=f((0,n.useState)(!0),2),L=M[0],U=M[1],_=(0,n.useRef)(null),D=(0,n.useCallback)(function(t){var e,r;if(null===(r=null===(e=t.currentTarget)||void 0===e?void 0:e.files)||void 0===r?void 0:r[0]){var n=new FileReader;n.onload=function(){var t,e;E(null!==(e=null===(t=n.result)||void 0===t?void 0:t.toString())&&void 0!==e?e:"")},n.readAsDataURL(t.currentTarget.files[0])}},[]);(0,n.useEffect)(function(){if(L){var t=new Image;t.onload=function(){x.width=Math.min(t.naturalWidth,256),x.height=Math.min(t.naturalHeight,256),y.clearRect(0,0,x.width,x.height),y.filter="grayscale() invert()",y.drawImage(t,0,0,t.naturalWidth,t.naturalHeight,0,0,x.width,x.height);var e=y.getImageData(0,0,x.width,x.height),r=e.data.filter(function(t,r){return r%4==0&&0!==e.data[r+3]});r.sort(s.sortNumeric);var n=r[Math.floor(r.length/2)]/255,o=Math.sqrt(r.reduce(function(t,e){return t+Math.pow(e/255-n,2)},0)/r.length),i=parseFloat((n+o/2).toFixed(3)),a=parseFloat((1/o).toFixed(3));i==i&&i!==1/0&&i!==-1/0||(i=0),a==a&&a!==1/0&&a!==-1/0||(a=1),u(i),d(a)},t.src=A}},[A,L]),(0,n.useEffect)(function(){w.uniform1f(S.brightness,r),R()},[r]),(0,n.useEffect)(function(){w.uniform1f(S.contrast,h),R()},[h]),(0,n.useEffect)(function(){w.uniform1f(S.threshold,m?b:1/0),R()},[b,m]),(0,n.useEffect)(function(){var t=(0,s.hexToRgb)(O);w.uniform3f(S.fill,t[0],t[1],t[2]),R()},[O]),(0,n.useEffect)(function(){var t=new Image;t.onerror=t.onload=function(){j.width=t.naturalWidth,j.height=t.naturalHeight,w.viewport(0,0,j.width,j.height),w.uniform2f(S.resolution,j.width,j.height),F.source=t,F.update(),F.bind(),R()},t.src=A},[A]),(0,n.useEffect)(function(){var t;null===(t=document.querySelector("#output-img"))||void 0===t||t.appendChild(j)},[]);var P=(0,n.useCallback)(function(){E(""),R(),document.querySelector("#source-file").value=""},[]),B=f((0,n.useState)(!1),2),W=B[0],N=B[1],V=(0,n.useCallback)(function(){return N(!0)},[]),H=(0,n.useCallback)(function(t){t&&E(t),N(!1)},[]),Y=f((0,n.useState)(!1),2),G=Y[0],$=Y[1],z=(0,n.useCallback)(function(){return $(!0)},[]),J=(0,n.useCallback)(function(t){t&&E(t),$(!1)},[]),K=(0,s.useCheckbox)(U),Q=(0,s.useCheckbox)(p),X=(0,n.useCallback)(function(t){I(t.currentTarget.value)},[]),Z=(0,n.useCallback)(function(){var t=document.documentElement.dataset.theme||(window.matchMedia&&window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light");document.documentElement.dataset.theme="dark"===t?"light":"dark"},[]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("main",{children:[(0,t.jsx)("h1",{children:"sketch-to-lineart"}),(0,t.jsxs)("div",{class:"controls",children:[(0,t.jsx)("label",{htmlFor:"source-file",children:"source:"}),(0,t.jsxs)("ul",{children:[(0,t.jsx)("li",{children:(0,t.jsx)("input",{id:"source-file",type:"file",accept:"image/*",onChange:D})}),(0,t.jsx)("li",{children:(0,t.jsx)("button",{type:"button",onClick:V,children:"Take photo"})})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("label",{htmlFor:"auto",title:"Automatically set brightness/contrast",children:"auto:"}),(0,t.jsx)("input",{id:"auto",title:"Automatically set brightness/contrast",type:"checkbox",checked:L,onChange:K}),!L&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("label",{htmlFor:"brightness",children:"brightness:"}),(0,t.jsx)(l.Range,{id:"brightness",min:0,max:5,step:.001,value:r,setValue:u}),(0,t.jsx)("label",{htmlFor:"contrast",children:"contrast:"}),(0,t.jsx)(l.Range,{id:"contrast",min:1,max:10,step:.001,value:h,setValue:d})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("label",{htmlFor:"use-threshold",title:"Output is fully opaque/fully transparent, with no partially transparent pixels",children:"use threshold:"}),(0,t.jsx)("input",{id:"use-threshold",title:"Output is fully opaque/fully transparent, with no partially transparent pixels",type:"checkbox",checked:m,onChange:Q}),m&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("label",{htmlFor:"threshold",children:"threshold:"}),(0,t.jsx)(l.Range,{id:"threshold",min:0,max:1,step:.001,value:b,setValue:C})]}),(0,t.jsx)("hr",{}),(0,t.jsx)("label",{htmlFor:"fill",children:"fill:"}),(0,t.jsx)("input",{id:"fill",type:"color",value:O,style:{backgroundColor:O},onInput:X}),(0,t.jsx)("hr",{})]}),(0,t.jsxs)("figure",{children:[(0,t.jsxs)("figcaption",{children:["original"," ",(0,t.jsxs)("div",{children:[(0,t.jsx)("button",{disabled:!A,type:"button",onClick:z,children:"cutout"}),(0,t.jsx)("button",{disabled:!A,type:"button",onClick:P,children:"clear"})]})]}),(0,t.jsx)("img",{alt:"Source image",id:"source-img",src:A,ref:_})]}),(0,t.jsxs)("figure",{children:[(0,t.jsxs)("figcaption",{children:["output"," ",(0,t.jsx)("button",{type:"button",onClick:q,children:"save"})]}),(0,t.jsx)("div",{id:"output-img",className:s.rgbToLuma.apply(void 0,(0,s.hexToRgb)(O))>.5?"invert":""})]}),W&&(0,t.jsx)(i.Capture,{onCapture:H}),G&&(0,t.jsx)(a.Cutout,{srcInput:A,onCutout:J})]}),(0,t.jsxs)("footer",{children:[(0,t.jsx)("button",{id:"toggle-theme",type:"button",onClick:Z,title:"Toggle theme",children:"Toggle theme"}),"v",o.default.version]})]})}(0,r.render)((0,t.jsx)(E,{}),document.body); +},{"preact/jsx-runtime":"I8Gw","canvas-toBlob":"EQlm","file-saver":"i0aF","preact":"u8ui","preact/hooks":"qsmZ","../../package.json":"ucH8","./Capture":"cgfr","./Cutout":"hN9c","./Range":"DniY","./gl":"fbLS","./utils":"wp4r"}]},{},["mo85"], null) \ No newline at end of file diff --git a/docs/index.html b/docs/index.html index 41234c9..35d5af3 100644 --- a/docs/index.html +++ b/docs/index.html @@ -1 +1 @@ -sketch-to-lineart \ No newline at end of file +sketch-to-lineart \ No newline at end of file diff --git a/docs/service-worker.js b/docs/service-worker.js index a2f7cc1..531c492 100644 --- a/docs/service-worker.js +++ b/docs/service-worker.js @@ -1 +1 @@ -try{self["workbox:core:6.5.3"]&&_()}catch(t){}const t=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class e extends Error{constructor(e,s){super(t(e,s)),this.name=e,this.details=s}}try{self["workbox:routing:6.5.3"]&&_()}catch(t){}const s=t=>t&&"object"==typeof t?t:{handle:t};class n{constructor(t,e,n="GET"){this.handler=s(e),this.match=t,this.method=n}setCatchHandler(t){this.catchHandler=s(t)}}class i extends n{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class r{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=r&&r.handler;const o=t.method;if(!a&&this.i.has(o)&&(a=this.i.get(o)),!a)return;let c;try{c=a.handle({url:s,request:t,event:e,params:i})}catch(t){c=Promise.reject(t)}const h=r&&r.catchHandler;return c instanceof Promise&&(this.o||h)&&(c=c.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),c}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const a=r.match({url:t,sameOrigin:e,request:s,event:n});if(a)return i=a,(Array.isArray(i)&&0===i.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,s(t))}setCatchHandler(t){this.o=s(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new e("unregister-route-but-not-found-with-method",{method:t.method});const s=this.t.get(t.method).indexOf(t);if(!(s>-1))throw new e("unregister-route-route-not-registered");this.t.get(t.method).splice(s,1)}}let a;const o=()=>(a||(a=new r,a.addFetchListener(),a.addCacheListener()),a);const c={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},h=t=>[c.prefix,t,c.suffix].filter((t=>t&&t.length>0)).join("-"),u=t=>t||h(c.precache),l=t=>t||h(c.runtime);function f(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:6.5.3"]&&_()}catch(t){}const w="__WB_REVISION__";function d(t){if(!t)throw new e("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:s,url:n}=t;if(!n)throw new e("add-to-cache-list-unexpected-type",{entry:t});if(!s){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set(w,s),{cacheKey:i.href,url:r.href}}class p{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class y{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let g;async function b(t,s){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new e("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},a=s?s(r):r,o=function(){if(void 0===g){const t=new Response("");if("body"in t)try{new Response(t.body),g=!0}catch(t){g=!1}g=!1}return g}()?i.body:await i.blob();return new Response(o,a)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class R{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const m=new Set;try{self["workbox:strategies:6.5.3"]&&_()}catch(t){}function q(t){return"string"==typeof t?new Request(t):t}class U{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new R,this.g=[],this.v=[...t.plugins],this.R=new Map;for(const t of this.v)this.R.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:s}=this;let n=q(t);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const t=await s.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:s})}catch(t){if(t instanceof Error)throw new e("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const e of this.iterateCallbacks("fetchDidSucceed"))t=await e({event:s,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:s,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=q(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,s){const n=q(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!s)throw new e("cache-put-with-no-response",{url:(a=r.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const o=await this.m(s);if(!o)return!1;const{cacheName:c,matchOptions:h}=this.l,u=await self.caches.open(c),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,r);for(const e of a)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?o.clone():o)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of m)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:c,oldResponse:f,newResponse:o.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=q(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.R.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.g.push(t),t}async doneWaiting(){let t;for(;t=this.g.shift();)await t}destroy(){this.p.resolve(null)}async m(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class L{constructor(t={}){this.cacheName=l(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new U(this,{event:e,request:s,params:n}),r=this.q(i,s,e);return[r,this.U(r,i,s,e)]}async q(t,s,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:s});try{if(i=await this.L(s,t),!i||"error"===i.type)throw new e("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:e,event:n,request:s}),i)break;if(!i)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))i=await e({event:n,request:s,response:i});return i}async U(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class C extends L{constructor(t={}){t.cacheName=u(t.cacheName),super(t),this._=!1!==t.fallbackToNetwork,this.plugins.push(C.copyRedirectedCacheableResponsesPlugin)}async L(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.C(t,e):await this.O(t,e))}async O(t,s){let n;const i=s.params||{};if(!this._)throw new e("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const e=i.integrity,r=t.integrity,a=!r||r===e;n=await s.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||e:void 0})),e&&a&&"no-cors"!==t.mode&&(this.N(),await s.cachePut(t,n.clone()))}return n}async C(t,s){this.N();const n=await s.fetch(t);if(!await s.cachePut(t,n.clone()))throw new e("bad-precaching-response",{url:t.url,status:n.status});return n}N(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==C.copyRedirectedCacheableResponsesPlugin&&(n===C.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(C.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}C.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},C.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await b(t):t};class E{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.j=new Map,this.K=new Map,this.T=new Map,this.l=new C({cacheName:u(t),plugins:[...e,new y({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.W||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.W=!0)}addToCacheList(t){const s=[];for(const n of t){"string"==typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:t,url:i}=d(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.j.has(i)&&this.j.get(i)!==t)throw new e("add-to-cache-list-conflicting-entries",{firstEntry:this.j.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.T.has(t)&&this.T.get(t)!==n.integrity)throw new e("add-to-cache-list-conflicting-integrities",{url:i});this.T.set(t,n.integrity)}if(this.j.set(i,t),this.K.set(i,r),s.length>0){const t=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return f(t,(async()=>{const e=new p;this.strategy.plugins.push(e);for(const[e,s]of this.j){const n=this.T.get(s),i=this.K.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return f(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.j.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.j}getCachedURLs(){return[...this.j.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.j.get(e.href)}getIntegrityForCacheKey(t){return this.T.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const s=this.getCacheKeyForURL(t);if(!s)throw new e("non-precached-url",{url:t});return e=>(e.request=new Request(t),e.params=Object.assign({cacheKey:s},e.params),this.strategy.handle(e))}}let O;const N=()=>(O||(O=new E),O);class x extends n{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}function j(t){const s=N();!function(t,s,r){let a;if("string"==typeof t){const e=new URL(t,location.href);a=new n((({url:t})=>t.href===e.href),s,r)}else if(t instanceof RegExp)a=new i(t,s,r);else if("function"==typeof t)a=new n(t,s,r);else{if(!(t instanceof n))throw new e("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}o().registerRoute(a)}(new x(s,t))}var K;self.addEventListener("message",(t=>{t.data&&"SKIP_WAITING"===t.data.type&&self.skipWaiting()})),K={},function(t){N().precache(t)}([{url:"app.89c72d03.js",revision:"5a6a258084fd9d1596bb2a12158ed0ba"},{url:"icon_192.c56ee251.png",revision:"c7a69b3212feba01f21553490fa162ff"},{url:"icon_256.f6b7a4e3.png",revision:"65c365738fbce20aaba75131c768dd2b"},{url:"icon_512.b8db3d24.png",revision:"f6ee0380c34ef416bbef995ba60af69e"},{url:"icon.c7137b89.png",revision:"7190a776944b39493d52715b2a7e4aef"},{url:"index.html",revision:"f5bc7e78ce754836093c6f623e4692ba"},{url:"manifest.webmanifest",revision:"8df0cc4337c03e655a7b4c3a4946397e"},{url:"src.5059c28e.js",revision:"a94ff641aba77f0bcb36722a5d2261b2"},{url:"src.7a1d8642.css",revision:"18e9329049ac648bb895c832700cd8ba"}]),j(K); +try{self["workbox:core:7.0.0"]&&_()}catch(t){}const t=(t,...e)=>{let s=t;return e.length>0&&(s+=` :: ${JSON.stringify(e)}`),s};class e extends Error{constructor(e,s){super(t(e,s)),this.name=e,this.details=s}}try{self["workbox:routing:7.0.0"]&&_()}catch(t){}const s=t=>t&&"object"==typeof t?t:{handle:t};class n{constructor(t,e,n="GET"){this.handler=s(e),this.match=t,this.method=n}setCatchHandler(t){this.catchHandler=s(t)}}class i extends n{constructor(t,e,s){super((({url:e})=>{const s=t.exec(e.href);if(s&&(e.origin===location.origin||0===s.index))return s.slice(1)}),e,s)}}class r{constructor(){this.t=new Map,this.i=new Map}get routes(){return this.t}addFetchListener(){self.addEventListener("fetch",(t=>{const{request:e}=t,s=this.handleRequest({request:e,event:t});s&&t.respondWith(s)}))}addCacheListener(){self.addEventListener("message",(t=>{if(t.data&&"CACHE_URLS"===t.data.type){const{payload:e}=t.data,s=Promise.all(e.urlsToCache.map((e=>{"string"==typeof e&&(e=[e]);const s=new Request(...e);return this.handleRequest({request:s,event:t})})));t.waitUntil(s),t.ports&&t.ports[0]&&s.then((()=>t.ports[0].postMessage(!0)))}}))}handleRequest({request:t,event:e}){const s=new URL(t.url,location.href);if(!s.protocol.startsWith("http"))return;const n=s.origin===location.origin,{params:i,route:r}=this.findMatchingRoute({event:e,request:t,sameOrigin:n,url:s});let a=r&&r.handler;const c=t.method;if(!a&&this.i.has(c)&&(a=this.i.get(c)),!a)return;let o;try{o=a.handle({url:s,request:t,event:e,params:i})}catch(t){o=Promise.reject(t)}const h=r&&r.catchHandler;return o instanceof Promise&&(this.o||h)&&(o=o.catch((async n=>{if(h)try{return await h.handle({url:s,request:t,event:e,params:i})}catch(t){t instanceof Error&&(n=t)}if(this.o)return this.o.handle({url:s,request:t,event:e});throw n}))),o}findMatchingRoute({url:t,sameOrigin:e,request:s,event:n}){const i=this.t.get(s.method)||[];for(const r of i){let i;const a=r.match({url:t,sameOrigin:e,request:s,event:n});if(a)return i=a,(Array.isArray(i)&&0===i.length||a.constructor===Object&&0===Object.keys(a).length||"boolean"==typeof a)&&(i=void 0),{route:r,params:i}}return{}}setDefaultHandler(t,e="GET"){this.i.set(e,s(t))}setCatchHandler(t){this.o=s(t)}registerRoute(t){this.t.has(t.method)||this.t.set(t.method,[]),this.t.get(t.method).push(t)}unregisterRoute(t){if(!this.t.has(t.method))throw new e("unregister-route-but-not-found-with-method",{method:t.method});const s=this.t.get(t.method).indexOf(t);if(!(s>-1))throw new e("unregister-route-route-not-registered");this.t.get(t.method).splice(s,1)}}let a;const c=()=>(a||(a=new r,a.addFetchListener(),a.addCacheListener()),a);const o={googleAnalytics:"googleAnalytics",precache:"precache-v2",prefix:"workbox",runtime:"runtime",suffix:"undefined"!=typeof registration?registration.scope:""},h=t=>[o.prefix,t,o.suffix].filter((t=>t&&t.length>0)).join("-"),u=t=>t||h(o.precache),l=t=>t||h(o.runtime);function f(t,e){const s=e();return t.waitUntil(s),s}try{self["workbox:precaching:7.0.0"]&&_()}catch(t){}function w(t){if(!t)throw new e("add-to-cache-list-unexpected-type",{entry:t});if("string"==typeof t){const e=new URL(t,location.href);return{cacheKey:e.href,url:e.href}}const{revision:s,url:n}=t;if(!n)throw new e("add-to-cache-list-unexpected-type",{entry:t});if(!s){const t=new URL(n,location.href);return{cacheKey:t.href,url:t.href}}const i=new URL(n,location.href),r=new URL(n,location.href);return i.searchParams.set("__WB_REVISION__",s),{cacheKey:i.href,url:r.href}}class d{constructor(){this.updatedURLs=[],this.notUpdatedURLs=[],this.handlerWillStart=async({request:t,state:e})=>{e&&(e.originalRequest=t)},this.cachedResponseWillBeUsed=async({event:t,state:e,cachedResponse:s})=>{if("install"===t.type&&e&&e.originalRequest&&e.originalRequest instanceof Request){const t=e.originalRequest.url;s?this.notUpdatedURLs.push(t):this.updatedURLs.push(t)}return s}}}class p{constructor({precacheController:t}){this.cacheKeyWillBeUsed=async({request:t,params:e})=>{const s=(null==e?void 0:e.cacheKey)||this.h.getCacheKeyForURL(t.url);return s?new Request(s,{headers:t.headers}):t},this.h=t}}let y;async function g(t,s){let n=null;if(t.url){n=new URL(t.url).origin}if(n!==self.location.origin)throw new e("cross-origin-copy-response",{origin:n});const i=t.clone(),r={headers:new Headers(i.headers),status:i.status,statusText:i.statusText},a=s?s(r):r,c=function(){if(void 0===y){const t=new Response("");if("body"in t)try{new Response(t.body),y=!0}catch(t){y=!1}y=!1}return y}()?i.body:await i.blob();return new Response(c,a)}function v(t,e){const s=new URL(t);for(const t of e)s.searchParams.delete(t);return s.href}class R{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}}const b=new Set;try{self["workbox:strategies:7.0.0"]&&_()}catch(t){}function m(t){return"string"==typeof t?new Request(t):t}class q{constructor(t,e){this.u={},Object.assign(this,e),this.event=e.event,this.l=t,this.p=new R,this.v=[],this.R=[...t.plugins],this.m=new Map;for(const t of this.R)this.m.set(t,{});this.event.waitUntil(this.p.promise)}async fetch(t){const{event:s}=this;let n=m(t);if("navigate"===n.mode&&s instanceof FetchEvent&&s.preloadResponse){const t=await s.preloadResponse;if(t)return t}const i=this.hasCallback("fetchDidFail")?n.clone():null;try{for(const t of this.iterateCallbacks("requestWillFetch"))n=await t({request:n.clone(),event:s})}catch(t){if(t instanceof Error)throw new e("plugin-error-request-will-fetch",{thrownErrorMessage:t.message})}const r=n.clone();try{let t;t=await fetch(n,"navigate"===n.mode?void 0:this.l.fetchOptions);for(const e of this.iterateCallbacks("fetchDidSucceed"))t=await e({event:s,request:r,response:t});return t}catch(t){throw i&&await this.runCallbacks("fetchDidFail",{error:t,event:s,originalRequest:i.clone(),request:r.clone()}),t}}async fetchAndCachePut(t){const e=await this.fetch(t),s=e.clone();return this.waitUntil(this.cachePut(t,s)),e}async cacheMatch(t){const e=m(t);let s;const{cacheName:n,matchOptions:i}=this.l,r=await this.getCacheKey(e,"read"),a=Object.assign(Object.assign({},i),{cacheName:n});s=await caches.match(r,a);for(const t of this.iterateCallbacks("cachedResponseWillBeUsed"))s=await t({cacheName:n,matchOptions:i,cachedResponse:s,request:r,event:this.event})||void 0;return s}async cachePut(t,s){const n=m(t);var i;await(i=0,new Promise((t=>setTimeout(t,i))));const r=await this.getCacheKey(n,"write");if(!s)throw new e("cache-put-with-no-response",{url:(a=r.url,new URL(String(a),location.href).href.replace(new RegExp(`^${location.origin}`),""))});var a;const c=await this.q(s);if(!c)return!1;const{cacheName:o,matchOptions:h}=this.l,u=await self.caches.open(o),l=this.hasCallback("cacheDidUpdate"),f=l?await async function(t,e,s,n){const i=v(e.url,s);if(e.url===i)return t.match(e,n);const r=Object.assign(Object.assign({},n),{ignoreSearch:!0}),a=await t.keys(e,r);for(const e of a)if(i===v(e.url,s))return t.match(e,n)}(u,r.clone(),["__WB_REVISION__"],h):null;try{await u.put(r,l?c.clone():c)}catch(t){if(t instanceof Error)throw"QuotaExceededError"===t.name&&await async function(){for(const t of b)await t()}(),t}for(const t of this.iterateCallbacks("cacheDidUpdate"))await t({cacheName:o,oldResponse:f,newResponse:c.clone(),request:r,event:this.event});return!0}async getCacheKey(t,e){const s=`${t.url} | ${e}`;if(!this.u[s]){let n=t;for(const t of this.iterateCallbacks("cacheKeyWillBeUsed"))n=m(await t({mode:e,request:n,event:this.event,params:this.params}));this.u[s]=n}return this.u[s]}hasCallback(t){for(const e of this.l.plugins)if(t in e)return!0;return!1}async runCallbacks(t,e){for(const s of this.iterateCallbacks(t))await s(e)}*iterateCallbacks(t){for(const e of this.l.plugins)if("function"==typeof e[t]){const s=this.m.get(e),n=n=>{const i=Object.assign(Object.assign({},n),{state:s});return e[t](i)};yield n}}waitUntil(t){return this.v.push(t),t}async doneWaiting(){let t;for(;t=this.v.shift();)await t}destroy(){this.p.resolve(null)}async q(t){let e=t,s=!1;for(const t of this.iterateCallbacks("cacheWillUpdate"))if(e=await t({request:this.request,response:e,event:this.event})||void 0,s=!0,!e)break;return s||e&&200!==e.status&&(e=void 0),e}}class U{constructor(t={}){this.cacheName=l(t.cacheName),this.plugins=t.plugins||[],this.fetchOptions=t.fetchOptions,this.matchOptions=t.matchOptions}handle(t){const[e]=this.handleAll(t);return e}handleAll(t){t instanceof FetchEvent&&(t={event:t,request:t.request});const e=t.event,s="string"==typeof t.request?new Request(t.request):t.request,n="params"in t?t.params:void 0,i=new q(this,{event:e,request:s,params:n}),r=this.U(i,s,e);return[r,this.L(r,i,s,e)]}async U(t,s,n){let i;await t.runCallbacks("handlerWillStart",{event:n,request:s});try{if(i=await this._(s,t),!i||"error"===i.type)throw new e("no-response",{url:s.url})}catch(e){if(e instanceof Error)for(const r of t.iterateCallbacks("handlerDidError"))if(i=await r({error:e,event:n,request:s}),i)break;if(!i)throw e}for(const e of t.iterateCallbacks("handlerWillRespond"))i=await e({event:n,request:s,response:i});return i}async L(t,e,s,n){let i,r;try{i=await t}catch(r){}try{await e.runCallbacks("handlerDidRespond",{event:n,request:s,response:i}),await e.doneWaiting()}catch(t){t instanceof Error&&(r=t)}if(await e.runCallbacks("handlerDidComplete",{event:n,request:s,response:i,error:r}),e.destroy(),r)throw r}}class L extends U{constructor(t={}){t.cacheName=u(t.cacheName),super(t),this.C=!1!==t.fallbackToNetwork,this.plugins.push(L.copyRedirectedCacheableResponsesPlugin)}async _(t,e){const s=await e.cacheMatch(t);return s||(e.event&&"install"===e.event.type?await this.O(t,e):await this.N(t,e))}async N(t,s){let n;const i=s.params||{};if(!this.C)throw new e("missing-precache-entry",{cacheName:this.cacheName,url:t.url});{const e=i.integrity,r=t.integrity,a=!r||r===e;n=await s.fetch(new Request(t,{integrity:"no-cors"!==t.mode?r||e:void 0})),e&&a&&"no-cors"!==t.mode&&(this.j(),await s.cachePut(t,n.clone()))}return n}async O(t,s){this.j();const n=await s.fetch(t);if(!await s.cachePut(t,n.clone()))throw new e("bad-precaching-response",{url:t.url,status:n.status});return n}j(){let t=null,e=0;for(const[s,n]of this.plugins.entries())n!==L.copyRedirectedCacheableResponsesPlugin&&(n===L.defaultPrecacheCacheabilityPlugin&&(t=s),n.cacheWillUpdate&&e++);0===e?this.plugins.push(L.defaultPrecacheCacheabilityPlugin):e>1&&null!==t&&this.plugins.splice(t,1)}}L.defaultPrecacheCacheabilityPlugin={cacheWillUpdate:async({response:t})=>!t||t.status>=400?null:t},L.copyRedirectedCacheableResponsesPlugin={cacheWillUpdate:async({response:t})=>t.redirected?await g(t):t};class C{constructor({cacheName:t,plugins:e=[],fallbackToNetwork:s=!0}={}){this.K=new Map,this.T=new Map,this.W=new Map,this.l=new L({cacheName:u(t),plugins:[...e,new p({precacheController:this})],fallbackToNetwork:s}),this.install=this.install.bind(this),this.activate=this.activate.bind(this)}get strategy(){return this.l}precache(t){this.addToCacheList(t),this.k||(self.addEventListener("install",this.install),self.addEventListener("activate",this.activate),this.k=!0)}addToCacheList(t){const s=[];for(const n of t){"string"==typeof n?s.push(n):n&&void 0===n.revision&&s.push(n.url);const{cacheKey:t,url:i}=w(n),r="string"!=typeof n&&n.revision?"reload":"default";if(this.K.has(i)&&this.K.get(i)!==t)throw new e("add-to-cache-list-conflicting-entries",{firstEntry:this.K.get(i),secondEntry:t});if("string"!=typeof n&&n.integrity){if(this.W.has(t)&&this.W.get(t)!==n.integrity)throw new e("add-to-cache-list-conflicting-integrities",{url:i});this.W.set(t,n.integrity)}if(this.K.set(i,t),this.T.set(i,r),s.length>0){const t=`Workbox is precaching URLs without revision info: ${s.join(", ")}\nThis is generally NOT safe. Learn more at https://bit.ly/wb-precache`;console.warn(t)}}}install(t){return f(t,(async()=>{const e=new d;this.strategy.plugins.push(e);for(const[e,s]of this.K){const n=this.W.get(s),i=this.T.get(e),r=new Request(e,{integrity:n,cache:i,credentials:"same-origin"});await Promise.all(this.strategy.handleAll({params:{cacheKey:s},request:r,event:t}))}const{updatedURLs:s,notUpdatedURLs:n}=e;return{updatedURLs:s,notUpdatedURLs:n}}))}activate(t){return f(t,(async()=>{const t=await self.caches.open(this.strategy.cacheName),e=await t.keys(),s=new Set(this.K.values()),n=[];for(const i of e)s.has(i.url)||(await t.delete(i),n.push(i.url));return{deletedURLs:n}}))}getURLsToCacheKeys(){return this.K}getCachedURLs(){return[...this.K.keys()]}getCacheKeyForURL(t){const e=new URL(t,location.href);return this.K.get(e.href)}getIntegrityForCacheKey(t){return this.W.get(t)}async matchPrecache(t){const e=t instanceof Request?t.url:t,s=this.getCacheKeyForURL(e);if(s){return(await self.caches.open(this.strategy.cacheName)).match(s)}}createHandlerBoundToURL(t){const s=this.getCacheKeyForURL(t);if(!s)throw new e("non-precached-url",{url:t});return e=>(e.request=new Request(t),e.params=Object.assign({cacheKey:s},e.params),this.strategy.handle(e))}}let E;const O=()=>(E||(E=new C),E);class N extends n{constructor(t,e){super((({request:s})=>{const n=t.getURLsToCacheKeys();for(const i of function*(t,{ignoreURLParametersMatching:e=[/^utm_/,/^fbclid$/],directoryIndex:s="index.html",cleanURLs:n=!0,urlManipulation:i}={}){const r=new URL(t,location.href);r.hash="",yield r.href;const a=function(t,e=[]){for(const s of[...t.searchParams.keys()])e.some((t=>t.test(s)))&&t.searchParams.delete(s);return t}(r,e);if(yield a.href,s&&a.pathname.endsWith("/")){const t=new URL(a.href);t.pathname+=s,yield t.href}if(n){const t=new URL(a.href);t.pathname+=".html",yield t.href}if(i){const t=i({url:r});for(const e of t)yield e.href}}(s.url,e)){const e=n.get(i);if(e){return{cacheKey:e,integrity:t.getIntegrityForCacheKey(e)}}}}),t.strategy)}}function x(t){const s=O();!function(t,s,r){let a;if("string"==typeof t){const e=new URL(t,location.href);a=new n((({url:t})=>t.href===e.href),s,r)}else if(t instanceof RegExp)a=new i(t,s,r);else if("function"==typeof t)a=new n(t,s,r);else{if(!(t instanceof n))throw new e("unsupported-route-type",{moduleName:"workbox-routing",funcName:"registerRoute",paramName:"capture"});a=t}c().registerRoute(a)}(new N(s,t))}var j;self.addEventListener("message",(t=>{t.data&&"SKIP_WAITING"===t.data.type&&self.skipWaiting()})),j={},function(t){O().precache(t)}([{url:"app.fb100a98.js",revision:"12edfc52b56f2c966b12edd137dd1093"},{url:"icon_192.c56ee251.png",revision:"c7a69b3212feba01f21553490fa162ff"},{url:"icon_256.f6b7a4e3.png",revision:"65c365738fbce20aaba75131c768dd2b"},{url:"icon_512.b8db3d24.png",revision:"f6ee0380c34ef416bbef995ba60af69e"},{url:"icon.c7137b89.png",revision:"7190a776944b39493d52715b2a7e4aef"},{url:"index.html",revision:"fbc96f70e0c17b908fa7bb55d61788e4"},{url:"manifest.webmanifest",revision:"8df0cc4337c03e655a7b4c3a4946397e"},{url:"src.3ca4a54d.css",revision:"6a1bb05c926c80607f98bc7d3843ff5e"},{url:"src.53c24e70.js",revision:"59b8171e7ad9a397d890fc45ad7ce20a"}]),x(j); diff --git a/docs/src.3ca4a54d.css b/docs/src.3ca4a54d.css new file mode 100644 index 0000000..7e15abc --- /dev/null +++ b/docs/src.3ca4a54d.css @@ -0,0 +1 @@ +a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,main,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}[hidden]{display:none}body{line-height:1}menu,ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}:root{--white:#fff;--black:#000}html{background-color:var(--white);color:var(--black);font-family:Courier New,Courier,monospace;height:100%}*{box-sizing:border-box}body{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:1rem;gap:1rem;min-height:100%}h1{text-align:initial;font-size:200%;font-weight:700}main{grid-template-columns:0fr 1fr;grid-gap:.5rem 1rem}.controls,main{display:grid;width:100%;min-height:100%}.controls{position:sticky;top:0;background-color:var(--white);grid-column:-1/1;grid-template-columns:0fr 1fr;grid-gap:.5rem 1rem}hr{grid-column:span 2;width:100%;margin:0;border:0;border-top:1px solid var(--black);opacity:.2}h1{grid-column-start:2}@media screen and (max-width:32rem){h1{grid-column-start:unset;grid-column:span 2;text-align:center;font-size:125%}}label{text-align:right;align-self:center}ul li:not(:last-of-type):after{content:"or"}input[type=file]{width:100%}.range{display:flex;align-items:center;gap:.5rem}.range>input[type=range]{flex:auto;width:100%}.range>input[type=number]{flex:none;width:0;min-width:5rem}button:disabled,input:disabled{opacity:.5;cursor:not-allowed}canvas,img,video{border:1px solid var(--black);max-width:100%;max-height:100%}img[src=""]{display:none}dialog{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;max-width:100%;max-height:100%;background-color:transparent;border:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:1rem}dialog+.backdrop,dialog::backdrop{background-color:rgba(0,0,0,.8)}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%}dialog h2{position:absolute;top:0;color:var(--black)}dialog video{background-color:#000;width:100%;height:100%;flex:auto;min-width:0;min-height:0}dialog nav{width:100%;flex:none;display:flex;gap:1px;flex-wrap:wrap}dialog nav button{flex:auto;width:auto}button{width:100%}button,input{font-family:inherit;cursor:pointer;padding:.25rem}#fill{width:auto;appearance:none}#fill::-moz-color-swatch{display:none}#fill::-webkit-color-swatch{display:none}canvas{background-color:#fff}.invert canvas{background-color:#000}footer{margin-top:auto;font-size:75%;text-align:right;align-self:flex-end}#toggle-theme{font-size:0;color:transparent;width:auto;margin-inline-end:.5rem}#toggle-theme:after{content:"🔆";font-size:1rem;color:initial}:root[data-theme=dark]{color-scheme:dark;--white:#000;--black:#fff}:root[data-theme=dark] #toggle-theme:after{content:"🌙"}@media (prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--white:#000;--black:#fff}:root:not([data-theme]) #toggle-theme:after{content:"🌙"}}@media (pointer:coarse){button{padding:.5rem}input{padding-block:.5rem}} \ No newline at end of file diff --git a/docs/src.5059c28e.js b/docs/src.53c24e70.js similarity index 99% rename from docs/src.5059c28e.js rename to docs/src.53c24e70.js index 500e81e..55f26f2 100644 --- a/docs/src.5059c28e.js +++ b/docs/src.53c24e70.js @@ -699,7 +699,7 @@ var t=null;function e(){return t||(t=n()),t}function n(){try{throw new Error}cat var r=require("./bundle-url").getBundleURL;function e(r){Array.isArray(r)||(r=[r]);var e=r[r.length-1];try{return Promise.resolve(require(e))}catch(n){if("MODULE_NOT_FOUND"===n.code)return new s(function(n,i){t(r.slice(0,-1)).then(function(){return require(e)}).then(n,i)});throw n}}function t(r){return Promise.all(r.map(u))}var n={};function i(r,e){n[r]=e}module.exports=exports=e,exports.load=t,exports.register=i;var o={};function u(e){var t;if(Array.isArray(e)&&(t=e[1],e=e[0]),o[e])return o[e];var i=(e.substring(e.lastIndexOf(".")+1,e.length)||e).toLowerCase(),u=n[i];return u?o[e]=u(r()+e).then(function(r){return r&&module.bundle.register(t,r),r}).catch(function(r){throw delete o[e],r}):void 0}function s(r){this.executor=r,this.promise=null}s.prototype.then=function(r,e){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.then(r,e)},s.prototype.catch=function(r){return null===this.promise&&(this.promise=new Promise(this.executor)),this.promise.catch(r)}; },{"./bundle-url":"MBwg"}],"B6dB":[function(require,module,exports) { "use strict";function e(e,r,n,t,o,i,u){try{var a=e[i](u),c=a.value}catch(s){return void n(s)}a.done?r(c):Promise.resolve(c).then(t,o)}function r(r){return function(){var n=this,t=arguments;return new Promise(function(o,i){var u=r.apply(n,t);function a(r){e(u,o,i,a,c,"next",r)}function c(r){e(u,o,i,a,c,"throw",r)}a(void 0)})}}require("babel-polyfill"),require("reset-css"),require("./style");var n=document.createElement("p");n.innerText="Loading...",document.body.appendChild(n),requestAnimationFrame(r(regeneratorRuntime.mark(function e(){return regeneratorRuntime.wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.prev=0,e.next=3,require("_bundle_loader")(require.resolve("./app"));case 3:n.remove(),e.next=10;break;case 6:e.prev=6,e.t0=e.catch(0),document.body.innerHTML="

Something went wrong. Sorry :(

",console.error(e.t0);case 10:case"end":return e.stop()}},e,null,[[0,6]])}))); -},{"babel-polyfill":"JIy0","reset-css":"szrR","./style":"szrR","_bundle_loader":"wl3f","./app":[["app.89c72d03.js","mo85"],"mo85"]}],"PrmA":[function(require,module,exports) { +},{"babel-polyfill":"JIy0","reset-css":"szrR","./style":"szrR","_bundle_loader":"wl3f","./app":[["app.fb100a98.js","mo85"],"mo85"]}],"PrmA":[function(require,module,exports) { module.exports=function(n){return new Promise(function(e,o){var r=document.createElement("script");r.async=!0,r.type="text/javascript",r.charset="utf-8",r.src=n,r.onerror=function(n){r.onerror=r.onload=null,o(n)},r.onload=function(){r.onerror=r.onload=null,e()},document.getElementsByTagName("head")[0].appendChild(r)})}; },{}],0:[function(require,module,exports) { var b=require("wl3f");b.register("js",require("PrmA")); diff --git a/docs/src.7a1d8642.css b/docs/src.7a1d8642.css deleted file mode 100644 index 4888e26..0000000 --- a/docs/src.7a1d8642.css +++ /dev/null @@ -1 +0,0 @@ -a,abbr,acronym,address,applet,article,aside,audio,b,big,blockquote,body,canvas,caption,center,cite,code,dd,del,details,dfn,div,dl,dt,em,embed,fieldset,figcaption,figure,footer,form,h1,h2,h3,h4,h5,h6,header,hgroup,html,i,iframe,img,ins,kbd,label,legend,li,main,mark,menu,nav,object,ol,output,p,pre,q,ruby,s,samp,section,small,span,strike,strong,sub,summary,sup,table,tbody,td,tfoot,th,thead,time,tr,tt,u,ul,var,video{margin:0;padding:0;border:0;font-size:100%;font:inherit;vertical-align:baseline}article,aside,details,figcaption,figure,footer,header,hgroup,main,menu,nav,section{display:block}[hidden]{display:none}body{line-height:1}menu,ol,ul{list-style:none}blockquote,q{quotes:none}blockquote:after,blockquote:before,q:after,q:before{content:"";content:none}table{border-collapse:collapse;border-spacing:0}:root{--white:#fff;--black:#000}html{background-color:var(--white);color:var(--black);font-family:Courier New,Courier,monospace;height:100%}*{box-sizing:border-box}body{display:flex;flex-direction:column;justify-content:center;align-items:center;text-align:center;padding:1rem;gap:1rem;min-height:100%}h1{text-align:initial;font-size:200%;font-weight:700}main{display:grid;grid-template-columns:0fr 1fr;grid-gap:.5rem 1rem;min-height:100%}hr,main{width:100%}hr{grid-column:span 2;margin:0;border:0;border-top:1px solid var(--black);opacity:.2}h1{grid-column-start:2}@media screen and (max-width:32rem){h1{grid-column-start:unset;grid-column:span 2;text-align:center;font-size:125%}}label{text-align:right;align-self:center}ul li:not(:last-of-type):after{content:"or"}input[type=file]{width:100%}.range{display:flex;align-items:center;gap:.5rem}.range>input[type=range]{flex:auto;width:100%}.range>input[type=number]{flex:none;width:0;min-width:5rem}button:disabled,input:disabled{opacity:.5;cursor:not-allowed}canvas,img,video{border:1px solid var(--black);max-width:100%;max-height:100%}img[src=""]{display:none}dialog{position:fixed;top:0;left:0;right:0;bottom:0;width:100%;height:100%;max-width:100%;max-height:100%;background-color:transparent;border:0;display:flex;flex-direction:column;justify-content:center;align-items:center;padding:1rem}dialog+.backdrop,dialog::backdrop{background-color:rgba(0,0,0,.8)}dialog+.backdrop{position:fixed;top:0;right:0;bottom:0;left:0;width:100%;height:100%}dialog h2{position:absolute;top:0;color:var(--black)}dialog video{background-color:#000;width:100%;height:100%;flex:auto;min-width:0;min-height:0}dialog nav{width:100%;flex:none;display:flex;gap:1px;flex-wrap:wrap}dialog nav button{flex:auto;width:auto}button{width:100%}button,input{font-family:inherit;cursor:pointer;padding:.25rem}#fill{width:auto;appearance:none}#fill::-moz-color-swatch{display:none}#fill::-webkit-color-swatch{display:none}canvas{background-color:#fff}.invert canvas{background-color:#000}footer{margin-top:auto;font-size:75%;text-align:right;align-self:flex-end}#toggle-theme{font-size:0;color:transparent;width:auto;margin-inline-end:.5rem}#toggle-theme:after{content:"🔆";font-size:1rem;color:initial}:root[data-theme=dark]{color-scheme:dark;--white:#000;--black:#fff}:root[data-theme=dark] #toggle-theme:after{content:"🌙"}@media (prefers-color-scheme:dark){:root:not([data-theme]){color-scheme:dark;--white:#000;--black:#fff}:root:not([data-theme]) #toggle-theme:after{content:"🌙"}}@media (pointer:coarse){button{padding:.5rem}input{padding-block:.5rem}} \ No newline at end of file diff --git a/package-lock.json b/package-lock.json index f61e1fd..f508a21 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "sketch-to-lineart", - "version": "1.9.1", + "version": "1.10.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "sketch-to-lineart", - "version": "1.9.1", + "version": "1.10.0", "license": "MIT", "dependencies": { "babel-polyfill": "^6.26.0", diff --git a/package.json b/package.json index 59a5fb3..d045732 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "sketch-to-lineart", - "version": "1.9.1", + "version": "1.10.0", "description": "tool for converting sketches to transparent lineart", "main": "index.js", "scripts": {