diff --git a/resources/todomvc/architecture-examples/preact-complex/dist/app.js b/resources/todomvc/architecture-examples/preact-complex/dist/app.js index 2bcbace5e..c7964b699 100644 --- a/resources/todomvc/architecture-examples/preact-complex/dist/app.js +++ b/resources/todomvc/architecture-examples/preact-complex/dist/app.js @@ -4,5 +4,5 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -ie=ce,function(){var e={}.hasOwnProperty;function t(){for(var n=[],_=0;_{u.current&&(u.current.focus(),u.current.setSelectionRange(u.current.value.length,u.current.value.length))}),[r]),f("li",{class:se({completed:o.completed,editing:r}),"data-priority":4-l%5},f("div",{class:"view"},f("input",{class:"toggle",type:"checkbox",checked:o.completed,onChange:function(e){_(o),e.preventDefault()}}),f("label",{onDblClick:function(){i(!0)}},o.title),f("button",{class:"destroy",onClick:function(){n(o)}})),r?f("div",{class:"input-container"},f("input",{class:"edit",id:"edit-todo-input",ref:u,onBlur:c,onKeyDown:function(e){"Escape"===e.key?i(!1):"Enter"===e.key&&c(e)},defaultValue:o.title}),f("label",{class:"visually-hidden",htmlFor:"edit-todo-input"},"Edit Todo Input"," ")):null)}const fe={all:e=>!0,active:e=>!e.completed,completed:e=>e.completed};function pe(e){let{onChange:t,onToggle:n,onRemove:_,onSave:o,todos:l,route:r}=e;const i=l.filter(fe[r]);return f("main",{class:"main"},f("div",{class:"toggle-all-container"},f("input",{class:"toggle-all",type:"checkbox",checked:0===l.filter(fe.active).length,onChange:t}),f("label",{class:"toggle-all-label",htmlFor:"toggle-all"},"Toggle All Input")),f("ul",{class:"todo-list show-priority"},i.map(((e,t)=>f(ae,{key:e.id,todo:e,onToggle:n,onRemove:_,onSave:o,index:t})))))}function de(e){let{todos:t,route:n,onClearCompleted:_}=e;const o=t.filter((e=>!e.completed)).length,l=t.length-o;return f("footer",{class:"footer"},f("span",{class:"todo-count"},`${o} ${1===o?"item":"items"} left!`),f("ul",{class:"filters"},f("li",null,f("a",{href:"#/",class:se({selected:"all"===n})},"All"))," ",f("li",null,f("a",{href:"#/active",class:se({selected:"active"===n})},"Active"))," ",f("li",null,f("a",{href:"#/completed",class:se({selected:"completed"===n})},"Completed"))),l>0&&f("button",{class:"clear-completed",onClick:_},"Clear completed"))}const he=()=>{let e=String(location.hash||"").split("/").pop();return fe[e]||(e="all"),e};!function(n,_,o){var l,r,u;t.__&&t.__(n,_),r=(l="function"==typeof o)?null:o&&o.__k||_.__k,u=[],T(_,n=(!l&&o||_).__k=f(d,null,[n]),r||i,i,void 0!==_.ownerSVGElement,!l&&o?[o]:r?null:_.firstChild?e.call(_.childNodes):null,u,!l&&o?o:r?r.__e:_.firstChild,l),N(u,n)}(f((function(){const[,e]=G(Date.now()),[t,n]=G("all"),_=function(e){const t=[e];function n(){t.forEach((e=>e()))}return{addItem:function(e){le=le.concat({id:oe(),title:e,completed:!1}),n()},toggleAll:function(e){le=le.map((t=>({...t,completed:e}))),n()},toggleItem:function(e){le=le.map((t=>t!==e?t:{...t,completed:!t.completed})),n()},removeItem:function(e){le=le.filter((t=>t!==e)),n()},updateItem:function(e,t){le=le.map((n=>n!==e?n:{...n,title:t})),n()},clearCompleted:function(){le=le.filter((e=>!e.completed)),n()},getTodos:function(){return[...le]}}}((function(){e(Date.now())}));return z((()=>{function e(){n(he())}addEventListener("hashchange",e),e()}),[]),f(d,null,f(re,{onKeyDown:function(e){if("Enter"===e.key){const t=e.target.value.trim();t&&(_.addItem(t),e.target.value="")}}}),_.getTodos().length>0?f(d,null,f(pe,{todos:_.getTodos(),route:t,onChange:function(e){_.toggleAll(e.target.checked)},onToggle:_.toggleItem,onRemove:_.removeItem,onSave:_.updateItem}),f(de,{todos:_.getTodos(),route:t,onClearCompleted:_.clearCompleted})):null)}),null),document.querySelector(".todoapp"))}(); +ie=ce,function(){var e={}.hasOwnProperty;function t(){for(var n=[],_=0;_{u.current&&(u.current.focus(),u.current.setSelectionRange(u.current.value.length,u.current.value.length))}),[r]),f("li",{class:se({completed:o.completed,editing:r}),"data-priority":4-l%5},f("div",{class:"view"},f("input",{class:"toggle",type:"checkbox",checked:o.completed,onChange:function(e){_(o),e.preventDefault()}}),f("label",{onDblClick:function(){i(!0)}},o.title),f("button",{class:"destroy",onClick:function(){n(o)}})),r?f("div",{class:"input-container"},f("input",{class:"edit",id:"edit-todo-input",ref:u,onBlur:c,onKeyDown:function(e){"Escape"===e.key?i(!1):"Enter"===e.key&&c(e)},defaultValue:o.title}),f("label",{class:"visually-hidden",htmlFor:"edit-todo-input"},"Edit Todo Input"," ")):null)}const fe={all:e=>!0,active:e=>!e.completed,completed:e=>e.completed};function pe(e){let{onChange:t,onToggle:n,onRemove:_,onSave:o,todos:l,route:r}=e;const i=l.filter(fe[r]);return f("main",{class:"main"},f("div",{class:"toggle-all-container"},f("input",{class:"toggle-all",type:"checkbox",id:"toggle-all",checked:0===l.filter(fe.active).length,onChange:t}),f("label",{class:"toggle-all-label",htmlFor:"toggle-all"},"Toggle All Input")),f("ul",{class:"todo-list show-priority"},i.map(((e,t)=>f(ae,{key:e.id,todo:e,onToggle:n,onRemove:_,onSave:o,index:t})))))}function de(e){let{todos:t,route:n,onClearCompleted:_}=e;const o=t.filter((e=>!e.completed)).length,l=t.length-o;return f("footer",{class:"footer"},f("span",{class:"todo-count"},`${o} ${1===o?"item":"items"} left!`),f("ul",{class:"filters"},f("li",null,f("a",{href:"#/",class:se({selected:"all"===n})},"All"))," ",f("li",null,f("a",{href:"#/active",class:se({selected:"active"===n})},"Active"))," ",f("li",null,f("a",{href:"#/completed",class:se({selected:"completed"===n})},"Completed"))),l>0&&f("button",{class:"clear-completed",onClick:_},"Clear completed"))}const he=()=>{let e=String(location.hash||"").split("/").pop();return fe[e]||(e="all"),e};!function(n,_,o){var l,r,u;t.__&&t.__(n,_),r=(l="function"==typeof o)?null:o&&o.__k||_.__k,u=[],T(_,n=(!l&&o||_).__k=f(d,null,[n]),r||i,i,void 0!==_.ownerSVGElement,!l&&o?[o]:r?null:_.firstChild?e.call(_.childNodes):null,u,!l&&o?o:r?r.__e:_.firstChild,l),N(u,n)}(f((function(){const[,e]=G(Date.now()),[t,n]=G("all"),_=function(e){const t=[e];function n(){t.forEach((e=>e()))}return{addItem:function(e){le=le.concat({id:oe(),title:e,completed:!1}),n()},toggleAll:function(e){le=le.map((t=>({...t,completed:e}))),n()},toggleItem:function(e){le=le.map((t=>t!==e?t:{...t,completed:!t.completed})),n()},removeItem:function(e){le=le.filter((t=>t!==e)),n()},updateItem:function(e,t){le=le.map((n=>n!==e?n:{...n,title:t})),n()},clearCompleted:function(){le=le.filter((e=>!e.completed)),n()},getTodos:function(){return[...le]}}}((function(){e(Date.now())}));return z((()=>{function e(){n(he())}addEventListener("hashchange",e),e()}),[]),f(d,null,f(re,{onKeyDown:function(e){if("Enter"===e.key){const t=e.target.value.trim();t&&(_.addItem(t),e.target.value="")}}}),_.getTodos().length>0?f(d,null,f(pe,{todos:_.getTodos(),route:t,onChange:function(e){_.toggleAll(e.target.checked)},onToggle:_.toggleItem,onRemove:_.removeItem,onSave:_.updateItem}),f(de,{todos:_.getTodos(),route:t,onClearCompleted:_.clearCompleted})):null)}),null),document.querySelector(".todoapp"))}(); //# sourceMappingURL=app.js.map diff --git a/resources/todomvc/architecture-examples/preact-complex/dist/app.js.map b/resources/todomvc/architecture-examples/preact-complex/dist/app.js.map index 7002b2143..5d9cbcc33 100644 --- a/resources/todomvc/architecture-examples/preact-complex/dist/app.js.map +++ b/resources/todomvc/architecture-examples/preact-complex/dist/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sources":["../node_modules/preact/dist/preact.module.js","../node_modules/preact/hooks/dist/hooks.module.js","../src/app/model.js","../src/app/header.js","../node_modules/classnames/index.js","../src/app/item.js","../src/app/utils.js","../src/app/main.js","../src/app/footer.js","../src/app/app.js","../src/index.js"],"sourcesContent":["var n,l,u,i,t,r,o,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,i){var t,r,o,f={};for(o in u)\"key\"==o?t=u[o]:\"ref\"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function d(){return{current:null}}function _(n){return n.children}function k(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&t.sort(f));w.__r=0}function x(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,g,m,w=i&&i.__k||s,x=w.length;for(u.__k=[],h=0;h0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=w[h])||y&&d.key==y.key&&d.type===y.type)w[h]=void 0;else for(v=0;v=0;l--)if((u=n.__k[l])&&(i=$(u)))return i;return null}function H(n,l,u,i,t){var r;for(r in u)\"children\"===r||\"key\"===r||r in l||T(n,r,null,u[r],i);for(r in l)t&&\"function\"!=typeof l[r]||\"children\"===r||\"key\"===r||\"value\"===r||\"checked\"===r||u[r]===l[r]||T(n,r,l[r],u[r],i)}function I(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function T(n,l,u,i,t){var r;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof i&&(n.style.cssText=i=\"\"),i)for(l in i)u&&l in u||I(n.style,l,\"\");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])r=l!==(l=l.replace(/Capture$/,\"\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?z:j,r):n.removeEventListener(l,r?z:j,r);else if(\"dangerouslySetInnerHTML\"!==l){if(t)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&-1==l.indexOf(\"-\")?n.removeAttribute(l):n.setAttribute(l,u))}}function j(n){return this.l[n.type+!1](l.event?l.event(n):n)}function z(n){return this.l[n.type+!0](l.event?l.event(n):n)}function L(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,b,g,m,w,A,P,C,$,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if(\"function\"==typeof I){if(g=u.props,m=(s=I.contextType)&&t[s.__c],w=s?m?m.props.value:s.__:t,i.__c?b=(a=u.__c=i.__c).__=a.__E:(\"prototype\"in I&&I.prototype.render?u.__c=a=new I(g,w):(u.__c=a=new k(g,w),a.constructor=I,a.render=q),m&&m.sub(a),a.props=g,a.state||(a.state={}),a.context=w,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,I.getDerivedStateFromProps(g,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==I.getDerivedStateFromProps&&g!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(g,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(g,a.__s,w)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=g,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),A=0;A2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function F(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,m(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),\"function\"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),m(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},k.prototype.render=_,t=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},w.__r=0,e=0;export{k as Component,_ as Fragment,E as cloneElement,F as createContext,y as createElement,d as createRef,y as h,D as hydrate,i as isValidElement,l as options,B as render,P as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n.__b,a=n.__r,v=n.diffed,l=n.__c,m=n.unmount;function d(t,u){n.__h&&n.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function p(u,i){var o=d(t++,3);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o))}function y(u,i){var o=d(t++,4);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o))}function _(n){return o=5,F(function(){return{current:n}},[])}function A(n,t,r){o=6,y(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function x(t,r){n.useDebugValue&&n.useDebugValue(r?r(t):t)}function P(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function V(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[]}catch(r){t.__H.__h=[],n.__e(r,t.__v)}}n.__b=function(n){r=null,e&&e(n)},n.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r},n.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===n.requestAnimationFrame||((i=n.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},n.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return!n.__||w(n)})}catch(u){r.some(function(n){n.__h&&(n.__h=[])}),r=[],n.__e(u,t.__v)}}),l&&l(t,r)},n.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n)}catch(n){r=n}}),u.__H=void 0,r&&n.__e(r,u.__v))};var g=\"function\"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r))}function k(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function w(n){var t=r;n.__c=n.__(),r=t}function z(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return\"function\"==typeof t?t(n):t}export{T as useCallback,q as useContext,x as useDebugValue,p as useEffect,P as useErrorBoundary,V as useId,A as useImperativeHandle,y as useLayoutEffect,F as useMemo,s as useReducer,_ as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","/* Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\n\nThe MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */\n\n// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\n\nfunction nanoid(size = 21) {\n let id = \"\";\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size;\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0];\n }\n return id;\n}\nlet todos = [];\n\nexport default function TodoModel(sub) {\n const onChanges = [sub];\n\n function inform() {\n onChanges.forEach((cb) => cb());\n }\n\n function addItem(title) {\n todos = todos.concat({\n id: nanoid(),\n title,\n completed: false,\n });\n inform();\n }\n\n function toggleItem(todoToToggle) {\n todos = todos.map((todo) => todo !== todoToToggle ? todo : { ...todo, completed: !todo.completed });\n inform();\n }\n\n function removeItem(todo) {\n todos = todos.filter((t) => t !== todo);\n inform();\n }\n\n function updateItem(todoToSave, title) {\n todos = todos.map((todo) => todo !== todoToSave ? todo : { ...todo, title });\n inform();\n }\n\n function toggleAll(completed) {\n todos = todos.map((todo) => ({ ...todo, completed }));\n inform();\n }\n\n function clearCompleted() {\n todos = todos.filter((todo) => !todo.completed);\n inform();\n }\n\n function getTodos() {\n return [...todos];\n }\n\n return {\n addItem,\n toggleAll,\n toggleItem,\n removeItem,\n updateItem,\n clearCompleted,\n getTodos,\n };\n}\n","import { h } from \"preact\";\n\nexport default function TodoHeader({ onKeyDown }) {\n return (\n
\n

todos

\n \n
\n );\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import cx from \"classnames\";\nimport { h } from \"preact\";\nimport { useState, useEffect, useRef } from \"preact/hooks\";\nexport default function TodoItem({ onSave, onRemove, onToggle, todo, index }) {\n const [editing, setEditing] = useState(false);\n const inputRef = useRef(null);\n\n /**\n * useEffect keeps track of the 'editing' state change.\n * If the input field is present, we set focus programmatically.\n */\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);\n }\n }, [editing]);\n\n function handleSubmit(e) {\n const val = e.target.value.trim();\n if (val) {\n onSave(todo, val);\n setEditing(false);\n } else {\n onRemove(todo);\n }\n }\n\n function handleKeyDown(e) {\n if (e.key === \"Escape\")\n setEditing(false);\n else if (e.key === \"Enter\")\n handleSubmit(e);\n }\n\n function handleDoubleClick() {\n setEditing(true);\n }\n\n function handleToggle(e) {\n onToggle(todo);\n e.preventDefault();\n }\n\n function handleRemove() {\n onRemove(todo);\n }\n\n return (\n
  • \n
    \n \n \n
    \n {editing\n ?
    \n \n \n
    \n : null}\n
  • \n );\n}\n","export const FILTERS = {\n all: (todo) => true,\n active: (todo) => !todo.completed,\n completed: (todo) => todo.completed,\n};\n","import { h } from \"preact\";\n\nimport TodoItem from \"./item\";\nimport { FILTERS } from \"./utils\";\n\nexport default function TodoMain({ onChange, onToggle, onRemove, onSave, todos, route }) {\n const visibleTodos = todos.filter(FILTERS[route]);\n const activeTodoCount = todos.filter(FILTERS[\"active\"]).length;\n\n return (\n
    \n
    \n \n \n
    \n
      \n {visibleTodos.map((todo, index) =>\n \n )}\n
    \n
    \n );\n}\n","import cx from \"classnames\";\nimport { h } from \"preact\";\n\nexport default function TodoFooter({ todos, route, onClearCompleted }) {\n const activeTodoCount = todos.filter((todo) => !todo.completed).length;\n const completedTodoCount = todos.length - activeTodoCount;\n\n return (\n
    \n {`${activeTodoCount} ${activeTodoCount === 1 ? \"item\" : \"items\"} left!`}\n \n {completedTodoCount > 0\n && \n }\n
    \n );\n}\n","import { h, Fragment } from \"preact\";\nimport { useEffect, useState } from \"preact/hooks\";\n\nimport TodoModel from \"./model\";\nimport TodoHeader from \"./header\";\nimport TodoMain from \"./main.js\";\nimport TodoFooter from \"./footer\";\nimport { FILTERS } from \"./utils\";\n\nconst getRoute = () => {\n let route = String(location.hash || \"\")\n .split(\"/\")\n .pop();\n\n if (!FILTERS[route])\n route = \"all\";\n\n return route;\n};\n\nexport default function App() {\n const [, setUpdatedAt] = useState(Date.now());\n const [route, setRoute] = useState(\"all\");\n\n /**\n * The udpate function gets called from the model after changes are made.\n * This sets state in the app component, which forces a re-render.\n *\n */\n function update() {\n setUpdatedAt(Date.now());\n }\n\n const model = TodoModel(update);\n\n /**\n * useEffect with an empty dependency array runs on the initial mount of the component.\n * Since it doesn't depend on state or prop changes, it will only run once.\n */\n useEffect(() => {\n function handleHashChange() {\n setRoute(getRoute());\n }\n\n addEventListener(\"hashchange\", handleHashChange);\n handleHashChange();\n }, []);\n\n function handleKeyDown(e) {\n if (e.key === \"Enter\") {\n const value = e.target.value.trim();\n\n if (value) {\n model.addItem(value);\n e.target.value = \"\";\n }\n }\n }\n\n function toggleAll(e) {\n model.toggleAll(e.target.checked);\n }\n\n return (\n <>\n \n {model.getTodos().length > 0\n ? <>\n \n \n \n : null}\n \n );\n}\n","import { h, render } from \"preact\";\nimport App from \"./app/app\";\nimport \"todomvc-app-css/index.css\";\nimport \"./styles.css\";\n\nrender(, document.querySelector(\".todoapp\"));\n"],"names":["n","h","l","u","v","parentNode","removeChild","s","slice","t","r","i","o","f","c","e","__b","a","__r","diffed","__c","m","unmount","d","__h","__H","__","length","push","__V","B","__N","setState","filter","every","call","this","forEach","props","shouldComponentUpdate","componentWillUpdate","__e","p","__s","z","_","F","current","b","shift","__P","k","w","__v","requestAnimationFrame","j","some","g","clearTimeout","cancelAnimationFrame","setTimeout","urlAlphabet","nanoid","id","arguments","undefined","Math","random","todos","TodoHeader","_ref","onKeyDown","class","placeholder","autoFocus","hasOwn","hasOwnProperty","classNames","classes","arg","argType","Array","isArray","inner","apply","toString","Object","prototype","includes","key","join","module","exports","default","window","TodoItem","onSave","onRemove","onToggle","todo","index","editing","setEditing","useState","inputRef","useRef","handleSubmit","val","target","value","trim","useEffect","focus","setSelectionRange","cx","completed","type","checked","onChange","preventDefault","onDblClick","title","onClick","ref","onBlur","defaultValue","htmlFor","FILTERS","all","active","TodoMain","route","visibleTodos","map","TodoFooter","onClearCompleted","activeTodoCount","completedTodoCount","href","selected","getRoute","String","location","hash","split","pop","render","setUpdatedAt","Date","now","setRoute","model","sub","onChanges","inform","cb","addItem","concat","toggleAll","toggleItem","todoToToggle","removeItem","updateItem","todoToSave","clearCompleted","getTodos","TodoModel","handleHashChange","addEventListener","Fragment","document","querySelector"],"mappings":"6BA0BaA,8FAjBG,SAAAC,EAAOD,EAAKE,GAE3B,IAAK,IAAIC,KAAKD,EAAOF,EAAIG,GAAKD,EAAMC,GACpC,OAA6BH,CAC7B,CAQM,SAASI,EAAWJ,G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CuD,GACJ,EA0BIQ,WAxBJ,SAAoBC,EAAY1C,GAC5BrD,GAAQA,GAAMiE,KAAKlC,GAASA,IAASgE,EAAahE,EAAO,IAAKA,EAAMsB,WACpEiC,GACJ,EAsBIU,eAfJ,WACIhG,GAAQA,GAAMnC,QAAQkE,IAAUA,EAAKgB,YACrCuC,GACJ,EAaIW,SAXJ,WACI,MAAO,IAAIjG,GACf,EAWJ,COhEkBkG,EAJd,WACInB,EAAaC,KAAKC,MACtB,IAgCA,OAxBAtC,GAAU,KACN,SAASwD,IACLjB,EAASV,KACb,CAEA4B,iBAAiB,aAAcD,GAC/BA,GAAkB,GACnB,IAkBCtK,EAAAwK,EACIxK,KAAAA,EAACoE,GAAU,CAACE,UAjBpB,SAAuBxD,GACnB,GAAc,UAAVA,EAAE0E,IAAiB,CACnB,MAAMoB,EAAQ9F,EAAE6F,OAAOC,MAAMC,OAEzBD,IACA0C,EAAMK,QAAQ/C,GACd9F,EAAE6F,OAAOC,MAAQ,GAEzB,CACJ,IASS0C,EAAMc,WAAW1I,OAAS,EACrB1B,EAAAwK,EACExK,KAAAA,EAACiI,GAAQ,CAAC9D,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOb,SATjE,SAAmBvG,GACfwI,EAAMO,UAAU/I,EAAE6F,OAAOS,QAC7B,EAOsFnB,SAAUqD,EAAMQ,WAAY9D,SAAUsD,EAAMU,WAAYjE,OAAQuD,EAAMW,aAC5IjK,EAACqI,GAAU,CAAClE,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOI,iBAAkBgB,EAAMa,kBAE7E,KAGlB,GCrEa,MAAGM,SAASC,cAAc","x_google_ignoreList":[0,1,4]} \ No newline at end of file +{"version":3,"file":"app.js","sources":["../node_modules/preact/dist/preact.module.js","../node_modules/preact/hooks/dist/hooks.module.js","../src/app/model.js","../src/app/header.js","../node_modules/classnames/index.js","../src/app/item.js","../src/app/utils.js","../src/app/main.js","../src/app/footer.js","../src/app/app.js","../src/index.js"],"sourcesContent":["var n,l,u,i,t,r,o,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,i){var t,r,o,f={};for(o in u)\"key\"==o?t=u[o]:\"ref\"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function d(){return{current:null}}function _(n){return n.children}function k(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&t.sort(f));w.__r=0}function x(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,g,m,w=i&&i.__k||s,x=w.length;for(u.__k=[],h=0;h0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=w[h])||y&&d.key==y.key&&d.type===y.type)w[h]=void 0;else for(v=0;v=0;l--)if((u=n.__k[l])&&(i=$(u)))return i;return null}function H(n,l,u,i,t){var r;for(r in u)\"children\"===r||\"key\"===r||r in l||T(n,r,null,u[r],i);for(r in l)t&&\"function\"!=typeof l[r]||\"children\"===r||\"key\"===r||\"value\"===r||\"checked\"===r||u[r]===l[r]||T(n,r,l[r],u[r],i)}function I(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function T(n,l,u,i,t){var r;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof i&&(n.style.cssText=i=\"\"),i)for(l in i)u&&l in u||I(n.style,l,\"\");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])r=l!==(l=l.replace(/Capture$/,\"\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?z:j,r):n.removeEventListener(l,r?z:j,r);else if(\"dangerouslySetInnerHTML\"!==l){if(t)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&-1==l.indexOf(\"-\")?n.removeAttribute(l):n.setAttribute(l,u))}}function j(n){return this.l[n.type+!1](l.event?l.event(n):n)}function z(n){return this.l[n.type+!0](l.event?l.event(n):n)}function L(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,b,g,m,w,A,P,C,$,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if(\"function\"==typeof I){if(g=u.props,m=(s=I.contextType)&&t[s.__c],w=s?m?m.props.value:s.__:t,i.__c?b=(a=u.__c=i.__c).__=a.__E:(\"prototype\"in I&&I.prototype.render?u.__c=a=new I(g,w):(u.__c=a=new k(g,w),a.constructor=I,a.render=q),m&&m.sub(a),a.props=g,a.state||(a.state={}),a.context=w,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,I.getDerivedStateFromProps(g,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==I.getDerivedStateFromProps&&g!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(g,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(g,a.__s,w)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=g,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),A=0;A2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function F(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,m(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),\"function\"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),m(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},k.prototype.render=_,t=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},w.__r=0,e=0;export{k as Component,_ as Fragment,E as cloneElement,F as createContext,y as createElement,d as createRef,y as h,D as hydrate,i as isValidElement,l as options,B as render,P as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n.__b,a=n.__r,v=n.diffed,l=n.__c,m=n.unmount;function d(t,u){n.__h&&n.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function p(u,i){var o=d(t++,3);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o))}function y(u,i){var o=d(t++,4);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o))}function _(n){return o=5,F(function(){return{current:n}},[])}function A(n,t,r){o=6,y(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function x(t,r){n.useDebugValue&&n.useDebugValue(r?r(t):t)}function P(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function V(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[]}catch(r){t.__H.__h=[],n.__e(r,t.__v)}}n.__b=function(n){r=null,e&&e(n)},n.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r},n.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===n.requestAnimationFrame||((i=n.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},n.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return!n.__||w(n)})}catch(u){r.some(function(n){n.__h&&(n.__h=[])}),r=[],n.__e(u,t.__v)}}),l&&l(t,r)},n.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n)}catch(n){r=n}}),u.__H=void 0,r&&n.__e(r,u.__v))};var g=\"function\"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r))}function k(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function w(n){var t=r;n.__c=n.__(),r=t}function z(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return\"function\"==typeof t?t(n):t}export{T as useCallback,q as useContext,x as useDebugValue,p as useEffect,P as useErrorBoundary,V as useId,A as useImperativeHandle,y as useLayoutEffect,F as useMemo,s as useReducer,_ as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","/* Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\n\nThe MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */\n\n// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\n\nfunction nanoid(size = 21) {\n let id = \"\";\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size;\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0];\n }\n return id;\n}\nlet todos = [];\n\nexport default function TodoModel(sub) {\n const onChanges = [sub];\n\n function inform() {\n onChanges.forEach((cb) => cb());\n }\n\n function addItem(title) {\n todos = todos.concat({\n id: nanoid(),\n title,\n completed: false,\n });\n inform();\n }\n\n function toggleItem(todoToToggle) {\n todos = todos.map((todo) => todo !== todoToToggle ? todo : { ...todo, completed: !todo.completed });\n inform();\n }\n\n function removeItem(todo) {\n todos = todos.filter((t) => t !== todo);\n inform();\n }\n\n function updateItem(todoToSave, title) {\n todos = todos.map((todo) => todo !== todoToSave ? todo : { ...todo, title });\n inform();\n }\n\n function toggleAll(completed) {\n todos = todos.map((todo) => ({ ...todo, completed }));\n inform();\n }\n\n function clearCompleted() {\n todos = todos.filter((todo) => !todo.completed);\n inform();\n }\n\n function getTodos() {\n return [...todos];\n }\n\n return {\n addItem,\n toggleAll,\n toggleItem,\n removeItem,\n updateItem,\n clearCompleted,\n getTodos,\n };\n}\n","import { h } from \"preact\";\n\nexport default function TodoHeader({ onKeyDown }) {\n return (\n
    \n

    todos

    \n \n
    \n );\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import cx from \"classnames\";\nimport { h } from \"preact\";\nimport { useState, useEffect, useRef } from \"preact/hooks\";\nexport default function TodoItem({ onSave, onRemove, onToggle, todo, index }) {\n const [editing, setEditing] = useState(false);\n const inputRef = useRef(null);\n\n /**\n * useEffect keeps track of the 'editing' state change.\n * If the input field is present, we set focus programmatically.\n */\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);\n }\n }, [editing]);\n\n function handleSubmit(e) {\n const val = e.target.value.trim();\n if (val) {\n onSave(todo, val);\n setEditing(false);\n } else {\n onRemove(todo);\n }\n }\n\n function handleKeyDown(e) {\n if (e.key === \"Escape\")\n setEditing(false);\n else if (e.key === \"Enter\")\n handleSubmit(e);\n }\n\n function handleDoubleClick() {\n setEditing(true);\n }\n\n function handleToggle(e) {\n onToggle(todo);\n e.preventDefault();\n }\n\n function handleRemove() {\n onRemove(todo);\n }\n\n return (\n
  • \n
    \n \n \n
    \n {editing\n ?
    \n \n \n
    \n : null}\n
  • \n );\n}\n","export const FILTERS = {\n all: (todo) => true,\n active: (todo) => !todo.completed,\n completed: (todo) => todo.completed,\n};\n","import { h } from \"preact\";\n\nimport TodoItem from \"./item\";\nimport { FILTERS } from \"./utils\";\n\nexport default function TodoMain({ onChange, onToggle, onRemove, onSave, todos, route }) {\n const visibleTodos = todos.filter(FILTERS[route]);\n const activeTodoCount = todos.filter(FILTERS[\"active\"]).length;\n\n return (\n
    \n
    \n \n \n
    \n
      \n {visibleTodos.map((todo, index) =>\n \n )}\n
    \n
    \n );\n}\n","import cx from \"classnames\";\nimport { h } from \"preact\";\n\nexport default function TodoFooter({ todos, route, onClearCompleted }) {\n const activeTodoCount = todos.filter((todo) => !todo.completed).length;\n const completedTodoCount = todos.length - activeTodoCount;\n\n return (\n
    \n {`${activeTodoCount} ${activeTodoCount === 1 ? \"item\" : \"items\"} left!`}\n \n {completedTodoCount > 0\n && \n }\n
    \n );\n}\n","import { h, Fragment } from \"preact\";\nimport { useEffect, useState } from \"preact/hooks\";\n\nimport TodoModel from \"./model\";\nimport TodoHeader from \"./header\";\nimport TodoMain from \"./main.js\";\nimport TodoFooter from \"./footer\";\nimport { FILTERS } from \"./utils\";\n\nconst getRoute = () => {\n let route = String(location.hash || \"\")\n .split(\"/\")\n .pop();\n\n if (!FILTERS[route])\n route = \"all\";\n\n return route;\n};\n\nexport default function App() {\n const [, setUpdatedAt] = useState(Date.now());\n const [route, setRoute] = useState(\"all\");\n\n /**\n * The udpate function gets called from the model after changes are made.\n * This sets state in the app component, which forces a re-render.\n *\n */\n function update() {\n setUpdatedAt(Date.now());\n }\n\n const model = TodoModel(update);\n\n /**\n * useEffect with an empty dependency array runs on the initial mount of the component.\n * Since it doesn't depend on state or prop changes, it will only run once.\n */\n useEffect(() => {\n function handleHashChange() {\n setRoute(getRoute());\n }\n\n addEventListener(\"hashchange\", handleHashChange);\n handleHashChange();\n }, []);\n\n function handleKeyDown(e) {\n if (e.key === \"Enter\") {\n const value = e.target.value.trim();\n\n if (value) {\n model.addItem(value);\n e.target.value = \"\";\n }\n }\n }\n\n function toggleAll(e) {\n model.toggleAll(e.target.checked);\n }\n\n return (\n <>\n \n {model.getTodos().length > 0\n ? <>\n \n \n \n : null}\n \n );\n}\n","import { h, render } from \"preact\";\nimport App from \"./app/app\";\nimport \"todomvc-app-css/index.css\";\nimport \"./styles.css\";\n\nrender(, document.querySelector(\".todoapp\"));\n"],"names":["n","h","l","u","v","parentNode","removeChild","s","slice","t","r","i","o","f","c","e","__b","a","__r","diffed","__c","m","unmount","d","__h","__H","__","length","push","__V","B","__N","setState","filter","every","call","this","forEach","props","shouldComponentUpdate","componentWillUpdate","__e","p","__s","z","_","F","current","b","shift","__P","k","w","__v","requestAnimationFrame","j","some","g","clearTimeout","cancelAnimationFrame","setTimeout","urlAlphabet","nanoid","id","arguments","undefined","Math","random","todos","TodoHeader","_ref","onKeyDown","class","placeholder","autoFocus","hasOwn","hasOwnProperty","classNames","classes","arg","argType","Array","isArray","inner","apply","toString","Object","prototype","includes","key","join","module","exports","default","window","TodoItem","onSave","onRemove","onToggle","todo","index","editing","setEditing","useState","inputRef","useRef","handleSubmit","val","target","value","trim","useEffect","focus","setSelectionRange","cx","completed","type","checked","onChange","preventDefault","onDblClick","title","onClick","ref","onBlur","defaultValue","htmlFor","FILTERS","all","active","TodoMain","route","visibleTodos","map","TodoFooter","onClearCompleted","activeTodoCount","completedTodoCount","href","selected","getRoute","String","location","hash","split","pop","render","setUpdatedAt","Date","now","setRoute","model","sub","onChanges","inform","cb","addItem","concat","toggleAll","toggleItem","todoToToggle","removeItem","updateItem","todoToSave","clearCompleted","getTodos","TodoModel","handleHashChange","addEventListener","Fragment","document","querySelector"],"mappings":"6BA0B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IAAS6D,EAAe7D,EAAO,IAAKA,EAAMgB,WAAYhB,EAAKgB,aACvFuC,GACJ,EA8BIO,WA5BJ,SAAoB9D,GAChB/B,GAAQA,GAAMnC,QAAQxB,GAAMA,IAAM0F,IAClCuD,GACJ,EA0BIQ,WAxBJ,SAAoBC,EAAY1C,GAC5BrD,GAAQA,GAAMiE,KAAKlC,GAASA,IAASgE,EAAahE,EAAO,IAAKA,EAAMsB,WACpEiC,GACJ,EAsBIU,eAfJ,WACIhG,GAAQA,GAAMnC,QAAQkE,IAAUA,EAAKgB,YACrCuC,GACJ,EAaIW,SAXJ,WACI,MAAO,IAAIjG,GACf,EAWJ,COhEkBkG,EAJd,WACInB,EAAaC,KAAKC,MACtB,IAgCA,OAxBAtC,GAAU,KACN,SAASwD,IACLjB,EAASV,KACb,CAEA4B,iBAAiB,aAAcD,GAC/BA,GAAkB,GACnB,IAkBCtK,EAAAwK,EACIxK,KAAAA,EAACoE,GAAU,CAACE,UAjBpB,SAAuBxD,GACnB,GAAc,UAAVA,EAAE0E,IAAiB,CACnB,MAAMoB,EAAQ9F,EAAE6F,OAAOC,MAAMC,OAEzBD,IACA0C,EAAMK,QAAQ/C,GACd9F,EAAE6F,OAAOC,MAAQ,GAEzB,CACJ,IASS0C,EAAMc,WAAW1I,OAAS,EACrB1B,EAAAwK,EACExK,KAAAA,EAACiI,GAAQ,CAAC9D,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOb,SATjE,SAAmBvG,GACfwI,EAAMO,UAAU/I,EAAE6F,OAAOS,QAC7B,EAOsFnB,SAAUqD,EAAMQ,WAAY9D,SAAUsD,EAAMU,WAAYjE,OAAQuD,EAAMW,aAC5IjK,EAACqI,GAAU,CAAClE,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOI,iBAAkBgB,EAAMa,kBAE7E,KAGlB,GCrEa,MAAGM,SAASC,cAAc","x_google_ignoreList":[0,1,4]} \ No newline at end of file diff --git a/resources/todomvc/architecture-examples/preact/dist/app.js b/resources/todomvc/architecture-examples/preact/dist/app.js index 2bcbace5e..c7964b699 100644 --- a/resources/todomvc/architecture-examples/preact/dist/app.js +++ b/resources/todomvc/architecture-examples/preact/dist/app.js @@ -4,5 +4,5 @@ Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames */ -ie=ce,function(){var e={}.hasOwnProperty;function t(){for(var n=[],_=0;_{u.current&&(u.current.focus(),u.current.setSelectionRange(u.current.value.length,u.current.value.length))}),[r]),f("li",{class:se({completed:o.completed,editing:r}),"data-priority":4-l%5},f("div",{class:"view"},f("input",{class:"toggle",type:"checkbox",checked:o.completed,onChange:function(e){_(o),e.preventDefault()}}),f("label",{onDblClick:function(){i(!0)}},o.title),f("button",{class:"destroy",onClick:function(){n(o)}})),r?f("div",{class:"input-container"},f("input",{class:"edit",id:"edit-todo-input",ref:u,onBlur:c,onKeyDown:function(e){"Escape"===e.key?i(!1):"Enter"===e.key&&c(e)},defaultValue:o.title}),f("label",{class:"visually-hidden",htmlFor:"edit-todo-input"},"Edit Todo Input"," ")):null)}const fe={all:e=>!0,active:e=>!e.completed,completed:e=>e.completed};function pe(e){let{onChange:t,onToggle:n,onRemove:_,onSave:o,todos:l,route:r}=e;const i=l.filter(fe[r]);return f("main",{class:"main"},f("div",{class:"toggle-all-container"},f("input",{class:"toggle-all",type:"checkbox",checked:0===l.filter(fe.active).length,onChange:t}),f("label",{class:"toggle-all-label",htmlFor:"toggle-all"},"Toggle All Input")),f("ul",{class:"todo-list show-priority"},i.map(((e,t)=>f(ae,{key:e.id,todo:e,onToggle:n,onRemove:_,onSave:o,index:t})))))}function de(e){let{todos:t,route:n,onClearCompleted:_}=e;const o=t.filter((e=>!e.completed)).length,l=t.length-o;return f("footer",{class:"footer"},f("span",{class:"todo-count"},`${o} ${1===o?"item":"items"} left!`),f("ul",{class:"filters"},f("li",null,f("a",{href:"#/",class:se({selected:"all"===n})},"All"))," ",f("li",null,f("a",{href:"#/active",class:se({selected:"active"===n})},"Active"))," ",f("li",null,f("a",{href:"#/completed",class:se({selected:"completed"===n})},"Completed"))),l>0&&f("button",{class:"clear-completed",onClick:_},"Clear completed"))}const he=()=>{let e=String(location.hash||"").split("/").pop();return fe[e]||(e="all"),e};!function(n,_,o){var l,r,u;t.__&&t.__(n,_),r=(l="function"==typeof o)?null:o&&o.__k||_.__k,u=[],T(_,n=(!l&&o||_).__k=f(d,null,[n]),r||i,i,void 0!==_.ownerSVGElement,!l&&o?[o]:r?null:_.firstChild?e.call(_.childNodes):null,u,!l&&o?o:r?r.__e:_.firstChild,l),N(u,n)}(f((function(){const[,e]=G(Date.now()),[t,n]=G("all"),_=function(e){const t=[e];function n(){t.forEach((e=>e()))}return{addItem:function(e){le=le.concat({id:oe(),title:e,completed:!1}),n()},toggleAll:function(e){le=le.map((t=>({...t,completed:e}))),n()},toggleItem:function(e){le=le.map((t=>t!==e?t:{...t,completed:!t.completed})),n()},removeItem:function(e){le=le.filter((t=>t!==e)),n()},updateItem:function(e,t){le=le.map((n=>n!==e?n:{...n,title:t})),n()},clearCompleted:function(){le=le.filter((e=>!e.completed)),n()},getTodos:function(){return[...le]}}}((function(){e(Date.now())}));return z((()=>{function e(){n(he())}addEventListener("hashchange",e),e()}),[]),f(d,null,f(re,{onKeyDown:function(e){if("Enter"===e.key){const t=e.target.value.trim();t&&(_.addItem(t),e.target.value="")}}}),_.getTodos().length>0?f(d,null,f(pe,{todos:_.getTodos(),route:t,onChange:function(e){_.toggleAll(e.target.checked)},onToggle:_.toggleItem,onRemove:_.removeItem,onSave:_.updateItem}),f(de,{todos:_.getTodos(),route:t,onClearCompleted:_.clearCompleted})):null)}),null),document.querySelector(".todoapp"))}(); +ie=ce,function(){var e={}.hasOwnProperty;function t(){for(var n=[],_=0;_{u.current&&(u.current.focus(),u.current.setSelectionRange(u.current.value.length,u.current.value.length))}),[r]),f("li",{class:se({completed:o.completed,editing:r}),"data-priority":4-l%5},f("div",{class:"view"},f("input",{class:"toggle",type:"checkbox",checked:o.completed,onChange:function(e){_(o),e.preventDefault()}}),f("label",{onDblClick:function(){i(!0)}},o.title),f("button",{class:"destroy",onClick:function(){n(o)}})),r?f("div",{class:"input-container"},f("input",{class:"edit",id:"edit-todo-input",ref:u,onBlur:c,onKeyDown:function(e){"Escape"===e.key?i(!1):"Enter"===e.key&&c(e)},defaultValue:o.title}),f("label",{class:"visually-hidden",htmlFor:"edit-todo-input"},"Edit Todo Input"," ")):null)}const fe={all:e=>!0,active:e=>!e.completed,completed:e=>e.completed};function pe(e){let{onChange:t,onToggle:n,onRemove:_,onSave:o,todos:l,route:r}=e;const i=l.filter(fe[r]);return f("main",{class:"main"},f("div",{class:"toggle-all-container"},f("input",{class:"toggle-all",type:"checkbox",id:"toggle-all",checked:0===l.filter(fe.active).length,onChange:t}),f("label",{class:"toggle-all-label",htmlFor:"toggle-all"},"Toggle All Input")),f("ul",{class:"todo-list show-priority"},i.map(((e,t)=>f(ae,{key:e.id,todo:e,onToggle:n,onRemove:_,onSave:o,index:t})))))}function de(e){let{todos:t,route:n,onClearCompleted:_}=e;const o=t.filter((e=>!e.completed)).length,l=t.length-o;return f("footer",{class:"footer"},f("span",{class:"todo-count"},`${o} ${1===o?"item":"items"} left!`),f("ul",{class:"filters"},f("li",null,f("a",{href:"#/",class:se({selected:"all"===n})},"All"))," ",f("li",null,f("a",{href:"#/active",class:se({selected:"active"===n})},"Active"))," ",f("li",null,f("a",{href:"#/completed",class:se({selected:"completed"===n})},"Completed"))),l>0&&f("button",{class:"clear-completed",onClick:_},"Clear completed"))}const he=()=>{let e=String(location.hash||"").split("/").pop();return fe[e]||(e="all"),e};!function(n,_,o){var l,r,u;t.__&&t.__(n,_),r=(l="function"==typeof o)?null:o&&o.__k||_.__k,u=[],T(_,n=(!l&&o||_).__k=f(d,null,[n]),r||i,i,void 0!==_.ownerSVGElement,!l&&o?[o]:r?null:_.firstChild?e.call(_.childNodes):null,u,!l&&o?o:r?r.__e:_.firstChild,l),N(u,n)}(f((function(){const[,e]=G(Date.now()),[t,n]=G("all"),_=function(e){const t=[e];function n(){t.forEach((e=>e()))}return{addItem:function(e){le=le.concat({id:oe(),title:e,completed:!1}),n()},toggleAll:function(e){le=le.map((t=>({...t,completed:e}))),n()},toggleItem:function(e){le=le.map((t=>t!==e?t:{...t,completed:!t.completed})),n()},removeItem:function(e){le=le.filter((t=>t!==e)),n()},updateItem:function(e,t){le=le.map((n=>n!==e?n:{...n,title:t})),n()},clearCompleted:function(){le=le.filter((e=>!e.completed)),n()},getTodos:function(){return[...le]}}}((function(){e(Date.now())}));return z((()=>{function e(){n(he())}addEventListener("hashchange",e),e()}),[]),f(d,null,f(re,{onKeyDown:function(e){if("Enter"===e.key){const t=e.target.value.trim();t&&(_.addItem(t),e.target.value="")}}}),_.getTodos().length>0?f(d,null,f(pe,{todos:_.getTodos(),route:t,onChange:function(e){_.toggleAll(e.target.checked)},onToggle:_.toggleItem,onRemove:_.removeItem,onSave:_.updateItem}),f(de,{todos:_.getTodos(),route:t,onClearCompleted:_.clearCompleted})):null)}),null),document.querySelector(".todoapp"))}(); //# sourceMappingURL=app.js.map diff --git a/resources/todomvc/architecture-examples/preact/dist/app.js.map b/resources/todomvc/architecture-examples/preact/dist/app.js.map index 7002b2143..5d9cbcc33 100644 --- a/resources/todomvc/architecture-examples/preact/dist/app.js.map +++ b/resources/todomvc/architecture-examples/preact/dist/app.js.map @@ -1 +1 @@ -{"version":3,"file":"app.js","sources":["../node_modules/preact/dist/preact.module.js","../node_modules/preact/hooks/dist/hooks.module.js","../src/app/model.js","../src/app/header.js","../node_modules/classnames/index.js","../src/app/item.js","../src/app/utils.js","../src/app/main.js","../src/app/footer.js","../src/app/app.js","../src/index.js"],"sourcesContent":["var n,l,u,i,t,r,o,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,i){var t,r,o,f={};for(o in u)\"key\"==o?t=u[o]:\"ref\"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function d(){return{current:null}}function _(n){return n.children}function k(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&t.sort(f));w.__r=0}function x(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,g,m,w=i&&i.__k||s,x=w.length;for(u.__k=[],h=0;h0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=w[h])||y&&d.key==y.key&&d.type===y.type)w[h]=void 0;else for(v=0;v=0;l--)if((u=n.__k[l])&&(i=$(u)))return i;return null}function H(n,l,u,i,t){var r;for(r in u)\"children\"===r||\"key\"===r||r in l||T(n,r,null,u[r],i);for(r in l)t&&\"function\"!=typeof l[r]||\"children\"===r||\"key\"===r||\"value\"===r||\"checked\"===r||u[r]===l[r]||T(n,r,l[r],u[r],i)}function I(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function T(n,l,u,i,t){var r;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof i&&(n.style.cssText=i=\"\"),i)for(l in i)u&&l in u||I(n.style,l,\"\");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])r=l!==(l=l.replace(/Capture$/,\"\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?z:j,r):n.removeEventListener(l,r?z:j,r);else if(\"dangerouslySetInnerHTML\"!==l){if(t)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&-1==l.indexOf(\"-\")?n.removeAttribute(l):n.setAttribute(l,u))}}function j(n){return this.l[n.type+!1](l.event?l.event(n):n)}function z(n){return this.l[n.type+!0](l.event?l.event(n):n)}function L(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,b,g,m,w,A,P,C,$,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if(\"function\"==typeof I){if(g=u.props,m=(s=I.contextType)&&t[s.__c],w=s?m?m.props.value:s.__:t,i.__c?b=(a=u.__c=i.__c).__=a.__E:(\"prototype\"in I&&I.prototype.render?u.__c=a=new I(g,w):(u.__c=a=new k(g,w),a.constructor=I,a.render=q),m&&m.sub(a),a.props=g,a.state||(a.state={}),a.context=w,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,I.getDerivedStateFromProps(g,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==I.getDerivedStateFromProps&&g!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(g,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(g,a.__s,w)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=g,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),A=0;A2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function F(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,m(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),\"function\"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),m(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},k.prototype.render=_,t=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},w.__r=0,e=0;export{k as Component,_ as Fragment,E as cloneElement,F as createContext,y as createElement,d as createRef,y as h,D as hydrate,i as isValidElement,l as options,B as render,P as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n.__b,a=n.__r,v=n.diffed,l=n.__c,m=n.unmount;function d(t,u){n.__h&&n.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function p(u,i){var o=d(t++,3);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o))}function y(u,i){var o=d(t++,4);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o))}function _(n){return o=5,F(function(){return{current:n}},[])}function A(n,t,r){o=6,y(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function x(t,r){n.useDebugValue&&n.useDebugValue(r?r(t):t)}function P(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function V(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[]}catch(r){t.__H.__h=[],n.__e(r,t.__v)}}n.__b=function(n){r=null,e&&e(n)},n.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r},n.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===n.requestAnimationFrame||((i=n.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},n.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return!n.__||w(n)})}catch(u){r.some(function(n){n.__h&&(n.__h=[])}),r=[],n.__e(u,t.__v)}}),l&&l(t,r)},n.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n)}catch(n){r=n}}),u.__H=void 0,r&&n.__e(r,u.__v))};var g=\"function\"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r))}function k(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function w(n){var t=r;n.__c=n.__(),r=t}function z(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return\"function\"==typeof t?t(n):t}export{T as useCallback,q as useContext,x as useDebugValue,p as useEffect,P as useErrorBoundary,V as useId,A as useImperativeHandle,y as useLayoutEffect,F as useMemo,s as useReducer,_ as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","/* Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\n\nThe MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */\n\n// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\n\nfunction nanoid(size = 21) {\n let id = \"\";\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size;\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0];\n }\n return id;\n}\nlet todos = [];\n\nexport default function TodoModel(sub) {\n const onChanges = [sub];\n\n function inform() {\n onChanges.forEach((cb) => cb());\n }\n\n function addItem(title) {\n todos = todos.concat({\n id: nanoid(),\n title,\n completed: false,\n });\n inform();\n }\n\n function toggleItem(todoToToggle) {\n todos = todos.map((todo) => todo !== todoToToggle ? todo : { ...todo, completed: !todo.completed });\n inform();\n }\n\n function removeItem(todo) {\n todos = todos.filter((t) => t !== todo);\n inform();\n }\n\n function updateItem(todoToSave, title) {\n todos = todos.map((todo) => todo !== todoToSave ? todo : { ...todo, title });\n inform();\n }\n\n function toggleAll(completed) {\n todos = todos.map((todo) => ({ ...todo, completed }));\n inform();\n }\n\n function clearCompleted() {\n todos = todos.filter((todo) => !todo.completed);\n inform();\n }\n\n function getTodos() {\n return [...todos];\n }\n\n return {\n addItem,\n toggleAll,\n toggleItem,\n removeItem,\n updateItem,\n clearCompleted,\n getTodos,\n };\n}\n","import { h } from \"preact\";\n\nexport default function TodoHeader({ onKeyDown }) {\n return (\n
    \n

    todos

    \n \n
    \n );\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import cx from \"classnames\";\nimport { h } from \"preact\";\nimport { useState, useEffect, useRef } from \"preact/hooks\";\nexport default function TodoItem({ onSave, onRemove, onToggle, todo, index }) {\n const [editing, setEditing] = useState(false);\n const inputRef = useRef(null);\n\n /**\n * useEffect keeps track of the 'editing' state change.\n * If the input field is present, we set focus programmatically.\n */\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);\n }\n }, [editing]);\n\n function handleSubmit(e) {\n const val = e.target.value.trim();\n if (val) {\n onSave(todo, val);\n setEditing(false);\n } else {\n onRemove(todo);\n }\n }\n\n function handleKeyDown(e) {\n if (e.key === \"Escape\")\n setEditing(false);\n else if (e.key === \"Enter\")\n handleSubmit(e);\n }\n\n function handleDoubleClick() {\n setEditing(true);\n }\n\n function handleToggle(e) {\n onToggle(todo);\n e.preventDefault();\n }\n\n function handleRemove() {\n onRemove(todo);\n }\n\n return (\n
  • \n
    \n \n \n
    \n {editing\n ?
    \n \n \n
    \n : null}\n
  • \n );\n}\n","export const FILTERS = {\n all: (todo) => true,\n active: (todo) => !todo.completed,\n completed: (todo) => todo.completed,\n};\n","import { h } from \"preact\";\n\nimport TodoItem from \"./item\";\nimport { FILTERS } from \"./utils\";\n\nexport default function TodoMain({ onChange, onToggle, onRemove, onSave, todos, route }) {\n const visibleTodos = todos.filter(FILTERS[route]);\n const activeTodoCount = todos.filter(FILTERS[\"active\"]).length;\n\n return (\n
    \n
    \n \n \n
    \n
      \n {visibleTodos.map((todo, index) =>\n \n )}\n
    \n
    \n );\n}\n","import cx from \"classnames\";\nimport { h } from \"preact\";\n\nexport default function TodoFooter({ todos, route, onClearCompleted }) {\n const activeTodoCount = todos.filter((todo) => !todo.completed).length;\n const completedTodoCount = todos.length - activeTodoCount;\n\n return (\n
    \n {`${activeTodoCount} ${activeTodoCount === 1 ? \"item\" : \"items\"} left!`}\n \n {completedTodoCount > 0\n && \n }\n
    \n );\n}\n","import { h, Fragment } from \"preact\";\nimport { useEffect, useState } from \"preact/hooks\";\n\nimport TodoModel from \"./model\";\nimport TodoHeader from \"./header\";\nimport TodoMain from \"./main.js\";\nimport TodoFooter from \"./footer\";\nimport { FILTERS } from \"./utils\";\n\nconst getRoute = () => {\n let route = String(location.hash || \"\")\n .split(\"/\")\n .pop();\n\n if (!FILTERS[route])\n route = \"all\";\n\n return route;\n};\n\nexport default function App() {\n const [, setUpdatedAt] = useState(Date.now());\n const [route, setRoute] = useState(\"all\");\n\n /**\n * The udpate function gets called from the model after changes are made.\n * This sets state in the app component, which forces a re-render.\n *\n */\n function update() {\n setUpdatedAt(Date.now());\n }\n\n const model = TodoModel(update);\n\n /**\n * useEffect with an empty dependency array runs on the initial mount of the component.\n * Since it doesn't depend on state or prop changes, it will only run once.\n */\n useEffect(() => {\n function handleHashChange() {\n setRoute(getRoute());\n }\n\n addEventListener(\"hashchange\", handleHashChange);\n handleHashChange();\n }, []);\n\n function handleKeyDown(e) {\n if (e.key === \"Enter\") {\n const value = e.target.value.trim();\n\n if (value) {\n model.addItem(value);\n e.target.value = \"\";\n }\n }\n }\n\n function toggleAll(e) {\n model.toggleAll(e.target.checked);\n }\n\n return (\n <>\n \n {model.getTodos().length > 0\n ? <>\n \n \n \n : null}\n \n );\n}\n","import { h, render } from \"preact\";\nimport App from \"./app/app\";\nimport \"todomvc-app-css/index.css\";\nimport \"./styles.css\";\n\nrender(, document.querySelector(\".todoapp\"));\n"],"names":["n","h","l","u","v","parentNode","removeChild","s","slice","t","r","i","o","f","c","e","__b","a","__r","diffed","__c","m","unmount","d","__h","__H","__","length","push","__V","B","__N","setState","filter","every","call","this","forEach","props","shouldComponentUpdate","componentWillUpdate","__e","p","__s","z","_","F","current","b","shift","__P","k","w","__v","requestAnimationFrame","j","some","g","clearTimeout","cancelAnimationFrame","setTimeout","urlAlphabet","nanoid","id","arguments","undefined","Math","random","todos","TodoHeader","_ref","onKeyDown","class","placeholder","autoFocus","hasOwn","hasOwnProperty","classNames","classes","arg","argType","Array","isArray","inner","apply","toString","Object","prototype","includes","key","join","module","exports","default","window","TodoItem","onSave","onRemove","onToggle","todo","index","editing","setEditing","useState","inputRef","useRef","handleSubmit","val","target","value","trim","useEffect","focus","setSelectionRange","cx","completed","type","checked","onChange","preventDefault","onDblClick","title","onClick","ref","onBlur","defaultValue","htmlFor","FILTERS","all","active","TodoMain","route","visibleTodos","map","TodoFooter","onClearCompleted","activeTodoCount","completedTodoCount","href","selected","getRoute","String","location","hash","split","pop","render","setUpdatedAt","Date","now","setRoute","model","sub","onChanges","inform","cb","addItem","concat","toggleAll","toggleItem","todoToToggle","removeItem","updateItem","todoToSave","clearCompleted","getTodos","TodoModel","handleHashChange","addEventListener","Fragment","document","querySelector"],"mappings":"6BA0BaA,8FAjBG,SAAAC,EAAOD,EAAKE,GAE3B,IAAK,IAAIC,KAAKD,EAAOF,EAAIG,GAAKD,EAAMC,GACpC,OAA6BH,CAC7B,CAQM,SAASI,EAAWJ,GAC1B,IAAIE,EAAaF,EAAKK,WAClBH,GAAYA,EAAWI,YAAYN,EACvC,4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AAMiE,KAAKlC,GAASA,IAASgE,EAAahE,EAAO,IAAKA,EAAMsB,WACpEiC,GACJ,EAsBIU,eAfJ,WACIhG,GAAQA,GAAMnC,QAAQkE,IAAUA,EAAKgB,YACrCuC,GACJ,EAaIW,SAXJ,WACI,MAAO,IAAIjG,GACf,EAWJ,COhEkBkG,EAJd,WACInB,EAAaC,KAAKC,MACtB,IAgCA,OAxBAtC,GAAU,KACN,SAASwD,IACLjB,EAASV,KACb,CAEA4B,iBAAiB,aAAcD,GAC/BA,GAAkB,GACnB,IAkBCtK,EAAAwK,EACIxK,KAAAA,EAACoE,GAAU,CAACE,UAjBpB,SAAuBxD,GACnB,GAAc,UAAVA,EAAE0E,IAAiB,CACnB,MAAMoB,EAAQ9F,EAAE6F,OAAOC,MAAMC,OAEzBD,IACA0C,EAAMK,QAAQ/C,GACd9F,EAAE6F,OAAOC,MAAQ,GAEzB,CACJ,IASS0C,EAAMc,WAAW1I,OAAS,EACrB1B,EAAAwK,EACExK,KAAAA,EAACiI,GAAQ,CAAC9D,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOb,SATjE,SAAmBvG,GACfwI,EAAMO,UAAU/I,EAAE6F,OAAOS,QAC7B,EAOsFnB,SAAUqD,EAAMQ,WAAY9D,SAAUsD,EAAMU,WAAYjE,OAAQuD,EAAMW,aAC5IjK,EAACqI,GAAU,CAAClE,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOI,iBAAkBgB,EAAMa,kBAE7E,KAGlB,GCrEa,MAAGM,SAASC,cAAc","x_google_ignoreList":[0,1,4]} \ No newline at end of file +{"version":3,"file":"app.js","sources":["../node_modules/preact/dist/preact.module.js","../node_modules/preact/hooks/dist/hooks.module.js","../src/app/model.js","../src/app/header.js","../node_modules/classnames/index.js","../src/app/item.js","../src/app/utils.js","../src/app/main.js","../src/app/footer.js","../src/app/app.js","../src/index.js"],"sourcesContent":["var n,l,u,i,t,r,o,f,e,c={},s=[],a=/acit|ex(?:s|g|n|p|$)|rph|grid|ows|mnc|ntw|ine[ch]|zoo|^ord|itera/i;function h(n,l){for(var u in l)n[u]=l[u];return n}function v(n){var l=n.parentNode;l&&l.removeChild(n)}function y(l,u,i){var t,r,o,f={};for(o in u)\"key\"==o?t=u[o]:\"ref\"==o?r=u[o]:f[o]=u[o];if(arguments.length>2&&(f.children=arguments.length>3?n.call(arguments,2):i),\"function\"==typeof l&&null!=l.defaultProps)for(o in l.defaultProps)void 0===f[o]&&(f[o]=l.defaultProps[o]);return p(l,f,t,r,null)}function p(n,i,t,r,o){var f={type:n,props:i,key:t,ref:r,__k:null,__:null,__b:0,__e:null,__d:void 0,__c:null,__h:null,constructor:void 0,__v:null==o?++u:o};return null==o&&null!=l.vnode&&l.vnode(f),f}function d(){return{current:null}}function _(n){return n.children}function k(n,l){this.props=n,this.context=l}function b(n,l){if(null==l)return n.__?b(n.__,n.__.__k.indexOf(n)+1):null;for(var u;ll&&t.sort(f));w.__r=0}function x(n,l,u,i,t,r,o,f,e,a){var h,v,y,d,k,g,m,w=i&&i.__k||s,x=w.length;for(u.__k=[],h=0;h0?p(d.type,d.props,d.key,d.ref?d.ref:null,d.__v):d)){if(d.__=u,d.__b=u.__b+1,null===(y=w[h])||y&&d.key==y.key&&d.type===y.type)w[h]=void 0;else for(v=0;v=0;l--)if((u=n.__k[l])&&(i=$(u)))return i;return null}function H(n,l,u,i,t){var r;for(r in u)\"children\"===r||\"key\"===r||r in l||T(n,r,null,u[r],i);for(r in l)t&&\"function\"!=typeof l[r]||\"children\"===r||\"key\"===r||\"value\"===r||\"checked\"===r||u[r]===l[r]||T(n,r,l[r],u[r],i)}function I(n,l,u){\"-\"===l[0]?n.setProperty(l,null==u?\"\":u):n[l]=null==u?\"\":\"number\"!=typeof u||a.test(l)?u:u+\"px\"}function T(n,l,u,i,t){var r;n:if(\"style\"===l)if(\"string\"==typeof u)n.style.cssText=u;else{if(\"string\"==typeof i&&(n.style.cssText=i=\"\"),i)for(l in i)u&&l in u||I(n.style,l,\"\");if(u)for(l in u)i&&u[l]===i[l]||I(n.style,l,u[l])}else if(\"o\"===l[0]&&\"n\"===l[1])r=l!==(l=l.replace(/Capture$/,\"\")),l=l.toLowerCase()in n?l.toLowerCase().slice(2):l.slice(2),n.l||(n.l={}),n.l[l+r]=u,u?i||n.addEventListener(l,r?z:j,r):n.removeEventListener(l,r?z:j,r);else if(\"dangerouslySetInnerHTML\"!==l){if(t)l=l.replace(/xlink(H|:h)/,\"h\").replace(/sName$/,\"s\");else if(\"width\"!==l&&\"height\"!==l&&\"href\"!==l&&\"list\"!==l&&\"form\"!==l&&\"tabIndex\"!==l&&\"download\"!==l&&l in n)try{n[l]=null==u?\"\":u;break n}catch(n){}\"function\"==typeof u||(null==u||!1===u&&-1==l.indexOf(\"-\")?n.removeAttribute(l):n.setAttribute(l,u))}}function j(n){return this.l[n.type+!1](l.event?l.event(n):n)}function z(n){return this.l[n.type+!0](l.event?l.event(n):n)}function L(n,u,i,t,r,o,f,e,c){var s,a,v,y,p,d,b,g,m,w,A,P,C,$,H,I=u.type;if(void 0!==u.constructor)return null;null!=i.__h&&(c=i.__h,e=u.__e=i.__e,u.__h=null,o=[e]),(s=l.__b)&&s(u);try{n:if(\"function\"==typeof I){if(g=u.props,m=(s=I.contextType)&&t[s.__c],w=s?m?m.props.value:s.__:t,i.__c?b=(a=u.__c=i.__c).__=a.__E:(\"prototype\"in I&&I.prototype.render?u.__c=a=new I(g,w):(u.__c=a=new k(g,w),a.constructor=I,a.render=q),m&&m.sub(a),a.props=g,a.state||(a.state={}),a.context=w,a.__n=t,v=a.__d=!0,a.__h=[],a._sb=[]),null==a.__s&&(a.__s=a.state),null!=I.getDerivedStateFromProps&&(a.__s==a.state&&(a.__s=h({},a.__s)),h(a.__s,I.getDerivedStateFromProps(g,a.__s))),y=a.props,p=a.state,a.__v=u,v)null==I.getDerivedStateFromProps&&null!=a.componentWillMount&&a.componentWillMount(),null!=a.componentDidMount&&a.__h.push(a.componentDidMount);else{if(null==I.getDerivedStateFromProps&&g!==y&&null!=a.componentWillReceiveProps&&a.componentWillReceiveProps(g,w),!a.__e&&null!=a.shouldComponentUpdate&&!1===a.shouldComponentUpdate(g,a.__s,w)||u.__v===i.__v){for(u.__v!==i.__v&&(a.props=g,a.state=a.__s,a.__d=!1),a.__e=!1,u.__e=i.__e,u.__k=i.__k,u.__k.forEach(function(n){n&&(n.__=u)}),A=0;A2&&(f.children=arguments.length>3?n.call(arguments,2):i),p(l.type,f,t||l.key,r||l.ref,null)}function F(n,l){var u={__c:l=\"__cC\"+e++,__:n,Consumer:function(n,l){return n.children(l)},Provider:function(n){var u,i;return this.getChildContext||(u=[],(i={})[l]=this,this.getChildContext=function(){return i},this.shouldComponentUpdate=function(n){this.props.value!==n.value&&u.some(function(n){n.__e=!0,m(n)})},this.sub=function(n){u.push(n);var l=n.componentWillUnmount;n.componentWillUnmount=function(){u.splice(u.indexOf(n),1),l&&l.call(n)}}),n.children}};return u.Provider.__=u.Consumer.contextType=u}n=s.slice,l={__e:function(n,l,u,i){for(var t,r,o;l=l.__;)if((t=l.__c)&&!t.__)try{if((r=t.constructor)&&null!=r.getDerivedStateFromError&&(t.setState(r.getDerivedStateFromError(n)),o=t.__d),null!=t.componentDidCatch&&(t.componentDidCatch(n,i||{}),o=t.__d),o)return t.__E=t}catch(l){n=l}throw n}},u=0,i=function(n){return null!=n&&void 0===n.constructor},k.prototype.setState=function(n,l){var u;u=null!=this.__s&&this.__s!==this.state?this.__s:this.__s=h({},this.state),\"function\"==typeof n&&(n=n(h({},u),this.props)),n&&h(u,n),null!=n&&this.__v&&(l&&this._sb.push(l),m(this))},k.prototype.forceUpdate=function(n){this.__v&&(this.__e=!0,n&&this.__h.push(n),m(this))},k.prototype.render=_,t=[],o=\"function\"==typeof Promise?Promise.prototype.then.bind(Promise.resolve()):setTimeout,f=function(n,l){return n.__v.__b-l.__v.__b},w.__r=0,e=0;export{k as Component,_ as Fragment,E as cloneElement,F as createContext,y as createElement,d as createRef,y as h,D as hydrate,i as isValidElement,l as options,B as render,P as toChildArray};\n//# sourceMappingURL=preact.module.js.map\n","import{options as n}from\"preact\";var t,r,u,i,o=0,f=[],c=[],e=n.__b,a=n.__r,v=n.diffed,l=n.__c,m=n.unmount;function d(t,u){n.__h&&n.__h(r,t,o||u),o=0;var i=r.__H||(r.__H={__:[],__h:[]});return t>=i.__.length&&i.__.push({__V:c}),i.__[t]}function h(n){return o=1,s(B,n)}function s(n,u,i){var o=d(t++,2);if(o.t=n,!o.__c&&(o.__=[i?i(u):B(void 0,u),function(n){var t=o.__N?o.__N[0]:o.__[0],r=o.t(t,n);t!==r&&(o.__N=[r,o.__[1]],o.__c.setState({}))}],o.__c=r,!r.u)){var f=function(n,t,r){if(!o.__c.__H)return!0;var u=o.__c.__H.__.filter(function(n){return n.__c});if(u.every(function(n){return!n.__N}))return!c||c.call(this,n,t,r);var i=!1;return u.forEach(function(n){if(n.__N){var t=n.__[0];n.__=n.__N,n.__N=void 0,t!==n.__[0]&&(i=!0)}}),!(!i&&o.__c.props===n)&&(!c||c.call(this,n,t,r))};r.u=!0;var c=r.shouldComponentUpdate,e=r.componentWillUpdate;r.componentWillUpdate=function(n,t,r){if(this.__e){var u=c;c=void 0,f(n,t,r),c=u}e&&e.call(this,n,t,r)},r.shouldComponentUpdate=f}return o.__N||o.__}function p(u,i){var o=d(t++,3);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__H.__h.push(o))}function y(u,i){var o=d(t++,4);!n.__s&&z(o.__H,i)&&(o.__=u,o.i=i,r.__h.push(o))}function _(n){return o=5,F(function(){return{current:n}},[])}function A(n,t,r){o=6,y(function(){return\"function\"==typeof n?(n(t()),function(){return n(null)}):n?(n.current=t(),function(){return n.current=null}):void 0},null==r?r:r.concat(n))}function F(n,r){var u=d(t++,7);return z(u.__H,r)?(u.__V=n(),u.i=r,u.__h=n,u.__V):u.__}function T(n,t){return o=8,F(function(){return n},t)}function q(n){var u=r.context[n.__c],i=d(t++,9);return i.c=n,u?(null==i.__&&(i.__=!0,u.sub(r)),u.props.value):n.__}function x(t,r){n.useDebugValue&&n.useDebugValue(r?r(t):t)}function P(n){var u=d(t++,10),i=h();return u.__=n,r.componentDidCatch||(r.componentDidCatch=function(n,t){u.__&&u.__(n,t),i[1](n)}),[i[0],function(){i[1](void 0)}]}function V(){var n=d(t++,11);if(!n.__){for(var u=r.__v;null!==u&&!u.__m&&null!==u.__;)u=u.__;var i=u.__m||(u.__m=[0,0]);n.__=\"P\"+i[0]+\"-\"+i[1]++}return n.__}function b(){for(var t;t=f.shift();)if(t.__P&&t.__H)try{t.__H.__h.forEach(k),t.__H.__h.forEach(w),t.__H.__h=[]}catch(r){t.__H.__h=[],n.__e(r,t.__v)}}n.__b=function(n){r=null,e&&e(n)},n.__r=function(n){a&&a(n),t=0;var i=(r=n.__c).__H;i&&(u===r?(i.__h=[],r.__h=[],i.__.forEach(function(n){n.__N&&(n.__=n.__N),n.__V=c,n.__N=n.i=void 0})):(i.__h.forEach(k),i.__h.forEach(w),i.__h=[])),u=r},n.diffed=function(t){v&&v(t);var o=t.__c;o&&o.__H&&(o.__H.__h.length&&(1!==f.push(o)&&i===n.requestAnimationFrame||((i=n.requestAnimationFrame)||j)(b)),o.__H.__.forEach(function(n){n.i&&(n.__H=n.i),n.__V!==c&&(n.__=n.__V),n.i=void 0,n.__V=c})),u=r=null},n.__c=function(t,r){r.some(function(t){try{t.__h.forEach(k),t.__h=t.__h.filter(function(n){return!n.__||w(n)})}catch(u){r.some(function(n){n.__h&&(n.__h=[])}),r=[],n.__e(u,t.__v)}}),l&&l(t,r)},n.unmount=function(t){m&&m(t);var r,u=t.__c;u&&u.__H&&(u.__H.__.forEach(function(n){try{k(n)}catch(n){r=n}}),u.__H=void 0,r&&n.__e(r,u.__v))};var g=\"function\"==typeof requestAnimationFrame;function j(n){var t,r=function(){clearTimeout(u),g&&cancelAnimationFrame(t),setTimeout(n)},u=setTimeout(r,100);g&&(t=requestAnimationFrame(r))}function k(n){var t=r,u=n.__c;\"function\"==typeof u&&(n.__c=void 0,u()),r=t}function w(n){var t=r;n.__c=n.__(),r=t}function z(n,t){return!n||n.length!==t.length||t.some(function(t,r){return t!==n[r]})}function B(n,t){return\"function\"==typeof t?t(n):t}export{T as useCallback,q as useContext,x as useDebugValue,p as useEffect,P as useErrorBoundary,V as useId,A as useImperativeHandle,y as useLayoutEffect,F as useMemo,s as useReducer,_ as useRef,h as useState};\n//# sourceMappingURL=hooks.module.js.map\n","/* Borrowed from https://github.com/ai/nanoid/blob/3.0.2/non-secure/index.js\n\nThe MIT License (MIT)\n\nCopyright 2017 Andrey Sitnik \n\nPermission is hereby granted, free of charge, to any person obtaining a copy of\nthis software and associated documentation files (the \"Software\"), to deal in\nthe Software without restriction, including without limitation the rights to\nuse, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of\nthe Software, and to permit persons to whom the Software is furnished to do so,\nsubject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS\nFOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR\nCOPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER\nIN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN\nCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */\n\n// This alphabet uses `A-Za-z0-9_-` symbols.\n// The order of characters is optimized for better gzip and brotli compression.\n// References to the same file (works both for gzip and brotli):\n// `'use`, `andom`, and `rict'`\n// References to the brotli default dictionary:\n// `-26T`, `1983`, `40px`, `75px`, `bush`, `jack`, `mind`, `very`, and `wolf`\nlet urlAlphabet = \"useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict\";\n\nfunction nanoid(size = 21) {\n let id = \"\";\n // A compact alternative for `for (var i = 0; i < step; i++)`.\n let i = size;\n while (i--) {\n // `| 0` is more compact and faster than `Math.floor()`.\n id += urlAlphabet[(Math.random() * 64) | 0];\n }\n return id;\n}\nlet todos = [];\n\nexport default function TodoModel(sub) {\n const onChanges = [sub];\n\n function inform() {\n onChanges.forEach((cb) => cb());\n }\n\n function addItem(title) {\n todos = todos.concat({\n id: nanoid(),\n title,\n completed: false,\n });\n inform();\n }\n\n function toggleItem(todoToToggle) {\n todos = todos.map((todo) => todo !== todoToToggle ? todo : { ...todo, completed: !todo.completed });\n inform();\n }\n\n function removeItem(todo) {\n todos = todos.filter((t) => t !== todo);\n inform();\n }\n\n function updateItem(todoToSave, title) {\n todos = todos.map((todo) => todo !== todoToSave ? todo : { ...todo, title });\n inform();\n }\n\n function toggleAll(completed) {\n todos = todos.map((todo) => ({ ...todo, completed }));\n inform();\n }\n\n function clearCompleted() {\n todos = todos.filter((todo) => !todo.completed);\n inform();\n }\n\n function getTodos() {\n return [...todos];\n }\n\n return {\n addItem,\n toggleAll,\n toggleItem,\n removeItem,\n updateItem,\n clearCompleted,\n getTodos,\n };\n}\n","import { h } from \"preact\";\n\nexport default function TodoHeader({ onKeyDown }) {\n return (\n
    \n

    todos

    \n \n
    \n );\n}\n","/*!\n\tCopyright (c) 2018 Jed Watson.\n\tLicensed under the MIT License (MIT), see\n\thttp://jedwatson.github.io/classnames\n*/\n/* global define */\n\n(function () {\n\t'use strict';\n\n\tvar hasOwn = {}.hasOwnProperty;\n\tvar nativeCodeString = '[native code]';\n\n\tfunction classNames() {\n\t\tvar classes = [];\n\n\t\tfor (var i = 0; i < arguments.length; i++) {\n\t\t\tvar arg = arguments[i];\n\t\t\tif (!arg) continue;\n\n\t\t\tvar argType = typeof arg;\n\n\t\t\tif (argType === 'string' || argType === 'number') {\n\t\t\t\tclasses.push(arg);\n\t\t\t} else if (Array.isArray(arg)) {\n\t\t\t\tif (arg.length) {\n\t\t\t\t\tvar inner = classNames.apply(null, arg);\n\t\t\t\t\tif (inner) {\n\t\t\t\t\t\tclasses.push(inner);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else if (argType === 'object') {\n\t\t\t\tif (arg.toString !== Object.prototype.toString && !arg.toString.toString().includes('[native code]')) {\n\t\t\t\t\tclasses.push(arg.toString());\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\tfor (var key in arg) {\n\t\t\t\t\tif (hasOwn.call(arg, key) && arg[key]) {\n\t\t\t\t\t\tclasses.push(key);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn classes.join(' ');\n\t}\n\n\tif (typeof module !== 'undefined' && module.exports) {\n\t\tclassNames.default = classNames;\n\t\tmodule.exports = classNames;\n\t} else if (typeof define === 'function' && typeof define.amd === 'object' && define.amd) {\n\t\t// register as 'classnames', consistent with npm package name\n\t\tdefine('classnames', [], function () {\n\t\t\treturn classNames;\n\t\t});\n\t} else {\n\t\twindow.classNames = classNames;\n\t}\n}());\n","import cx from \"classnames\";\nimport { h } from \"preact\";\nimport { useState, useEffect, useRef } from \"preact/hooks\";\nexport default function TodoItem({ onSave, onRemove, onToggle, todo, index }) {\n const [editing, setEditing] = useState(false);\n const inputRef = useRef(null);\n\n /**\n * useEffect keeps track of the 'editing' state change.\n * If the input field is present, we set focus programmatically.\n */\n useEffect(() => {\n if (inputRef.current) {\n inputRef.current.focus();\n inputRef.current.setSelectionRange(inputRef.current.value.length, inputRef.current.value.length);\n }\n }, [editing]);\n\n function handleSubmit(e) {\n const val = e.target.value.trim();\n if (val) {\n onSave(todo, val);\n setEditing(false);\n } else {\n onRemove(todo);\n }\n }\n\n function handleKeyDown(e) {\n if (e.key === \"Escape\")\n setEditing(false);\n else if (e.key === \"Enter\")\n handleSubmit(e);\n }\n\n function handleDoubleClick() {\n setEditing(true);\n }\n\n function handleToggle(e) {\n onToggle(todo);\n e.preventDefault();\n }\n\n function handleRemove() {\n onRemove(todo);\n }\n\n return (\n
  • \n
    \n \n \n
    \n {editing\n ?
    \n \n \n
    \n : null}\n
  • \n );\n}\n","export const FILTERS = {\n all: (todo) => true,\n active: (todo) => !todo.completed,\n completed: (todo) => todo.completed,\n};\n","import { h } from \"preact\";\n\nimport TodoItem from \"./item\";\nimport { FILTERS } from \"./utils\";\n\nexport default function TodoMain({ onChange, onToggle, onRemove, onSave, todos, route }) {\n const visibleTodos = todos.filter(FILTERS[route]);\n const activeTodoCount = todos.filter(FILTERS[\"active\"]).length;\n\n return (\n
    \n
    \n \n \n
    \n
      \n {visibleTodos.map((todo, index) =>\n \n )}\n
    \n
    \n );\n}\n","import cx from \"classnames\";\nimport { h } from \"preact\";\n\nexport default function TodoFooter({ todos, route, onClearCompleted }) {\n const activeTodoCount = todos.filter((todo) => !todo.completed).length;\n const completedTodoCount = todos.length - activeTodoCount;\n\n return (\n
    \n {`${activeTodoCount} ${activeTodoCount === 1 ? \"item\" : \"items\"} left!`}\n \n {completedTodoCount > 0\n && \n }\n
    \n );\n}\n","import { h, Fragment } from \"preact\";\nimport { useEffect, useState } from \"preact/hooks\";\n\nimport TodoModel from \"./model\";\nimport TodoHeader from \"./header\";\nimport TodoMain from \"./main.js\";\nimport TodoFooter from \"./footer\";\nimport { FILTERS } from \"./utils\";\n\nconst getRoute = () => {\n let route = String(location.hash || \"\")\n .split(\"/\")\n .pop();\n\n if (!FILTERS[route])\n route = \"all\";\n\n return route;\n};\n\nexport default function App() {\n const [, setUpdatedAt] = useState(Date.now());\n const [route, setRoute] = useState(\"all\");\n\n /**\n * The udpate function gets called from the model after changes are made.\n * This sets state in the app component, which forces a re-render.\n *\n */\n function update() {\n setUpdatedAt(Date.now());\n }\n\n const model = TodoModel(update);\n\n /**\n * useEffect with an empty dependency array runs on the initial mount of the component.\n * Since it doesn't depend on state or prop changes, it will only run once.\n */\n useEffect(() => {\n function handleHashChange() {\n setRoute(getRoute());\n }\n\n addEventListener(\"hashchange\", handleHashChange);\n handleHashChange();\n }, []);\n\n function handleKeyDown(e) {\n if (e.key === \"Enter\") {\n const value = e.target.value.trim();\n\n if (value) {\n model.addItem(value);\n e.target.value = \"\";\n }\n }\n }\n\n function toggleAll(e) {\n model.toggleAll(e.target.checked);\n }\n\n return (\n <>\n \n {model.getTodos().length > 0\n ? <>\n \n \n \n : null}\n \n );\n}\n","import { h, render } from \"preact\";\nimport App from \"./app/app\";\nimport \"todomvc-app-css/index.css\";\nimport \"./styles.css\";\n\nrender(, document.querySelector(\".todoapp\"));\n"],"names":["n","h","l","u","v","parentNode","removeChild","s","slice","t","r","i","o","f","c","e","__b","a","__r","diffed","__c","m","unmount","d","__h","__H","__","length","push","__V","B","__N","setState","filter","every","call","this","forEach","props","shouldComponentUpdate","componentWillUpdate","__e","p","__s","z","_","F","current","b","shift","__P","k","w","__v","requestAnimationFrame","j","some","g","clearTimeout","cancelAnimationFrame","setTimeout","urlAlphabet","nanoid","id","arguments","undefined","Math","random","todos","TodoHeader","_ref","onKeyDown","class","placeholder","autoFocus","hasOwn","hasOwnProperty","classNames","classes","arg","argType","Array","isArray","inner","apply","toString","Object","prototype","includes","key","join","module","exports","default","window","TodoItem","onSave","onRemove","onToggle","todo","index","editing","setEditing","useState","inputRef","useRef","handleSubmit","val","target","value","trim","useEffect","focus","setSelectionRange","cx","completed","type","checked","onChange","preventDefault","onDblClick","title","onClick","ref","onBlur","defaultValue","htmlFor","FILTERS","all","active","TodoMain","route","visibleTodos","map","TodoFooter","onClearCompleted","activeTodoCount","completedTodoCount","href","selected","getRoute","String","location","hash","split","pop","render","setUpdatedAt","Date","now","setRoute","model","sub","onChanges","inform","cb","addItem","concat","toggleAll","toggleItem","todoToToggle","removeItem","updateItem","todoToSave","clearCompleted","getTodos","TodoModel","handleHashChange","addEventListener","Fragment","document","querySelector"],"mappings":"6BA0BaA,8FAjBG,SAAAC,EAAOD,EAAKE,GAE3B,IAAK,IAAIC,KAAKD,EA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GACJ,EA8BIO,WA5BJ,SAAoB9D,GAChB/B,GAAQA,GAAMnC,QAAQxB,GAAMA,IAAM0F,IAClCuD,GACJ,EA0BIQ,WAxBJ,SAAoBC,EAAY1C,GAC5BrD,GAAQA,GAAMiE,KAAKlC,GAASA,IAASgE,EAAahE,EAAO,IAAKA,EAAMsB,WACpEiC,GACJ,EAsBIU,eAfJ,WACIhG,GAAQA,GAAMnC,QAAQkE,IAAUA,EAAKgB,YACrCuC,GACJ,EAaIW,SAXJ,WACI,MAAO,IAAIjG,GACf,EAWJ,COhEkBkG,EAJd,WACInB,EAAaC,KAAKC,MACtB,IAgCA,OAxBAtC,GAAU,KACN,SAASwD,IACLjB,EAASV,KACb,CAEA4B,iBAAiB,aAAcD,GAC/BA,GAAkB,GACnB,IAkBCtK,EAAAwK,EACIxK,KAAAA,EAACoE,GAAU,CAACE,UAjBpB,SAAuBxD,GACnB,GAAc,UAAVA,EAAE0E,IAAiB,CACnB,MAAMoB,EAAQ9F,EAAE6F,OAAOC,MAAMC,OAEzBD,IACA0C,EAAMK,QAAQ/C,GACd9F,EAAE6F,OAAOC,MAAQ,GAEzB,CACJ,IASS0C,EAAMc,WAAW1I,OAAS,EACrB1B,EAAAwK,EACExK,KAAAA,EAACiI,GAAQ,CAAC9D,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOb,SATjE,SAAmBvG,GACfwI,EAAMO,UAAU/I,EAAE6F,OAAOS,QAC7B,EAOsFnB,SAAUqD,EAAMQ,WAAY9D,SAAUsD,EAAMU,WAAYjE,OAAQuD,EAAMW,aAC5IjK,EAACqI,GAAU,CAAClE,MAAOmF,EAAMc,WAAYlC,MAAOA,EAAOI,iBAAkBgB,EAAMa,kBAE7E,KAGlB,GCrEa,MAAGM,SAASC,cAAc","x_google_ignoreList":[0,1,4]} \ No newline at end of file diff --git a/resources/todomvc/architecture-examples/preact/src/app/main.js b/resources/todomvc/architecture-examples/preact/src/app/main.js index 4cc584f4a..88ee891b7 100644 --- a/resources/todomvc/architecture-examples/preact/src/app/main.js +++ b/resources/todomvc/architecture-examples/preact/src/app/main.js @@ -10,7 +10,7 @@ export default function TodoMain({ onChange, onToggle, onRemove, onSave, todos, return (
    - + diff --git a/resources/todomvc/architecture-examples/react-complex/dist/app.bundle.js b/resources/todomvc/architecture-examples/react-complex/dist/app.bundle.js index 2ffe4b38e..28363ba2e 100644 --- a/resources/todomvc/architecture-examples/react-complex/dist/app.bundle.js +++ b/resources/todomvc/architecture-examples/react-complex/dist/app.bundle.js @@ -1,3 +1,3 @@ /*! For license information please see app.bundle.js.LICENSE.txt */ -(()=>{var e,t,n={184:(e,t)=>{var n;!function(){"use strict";var r={}.hasOwnProperty;function l(){for(var e=[],t=0;t{"use strict";var t=Object.getOwnPropertySymbols,n=Object.prototype.hasOwnProperty,r=Object.prototype.propertyIsEnumerable;e.exports=function(){try{if(!Object.assign)return!1;var e=new String("abc");if(e[5]="de","5"===Object.getOwnPropertyNames(e)[0])return!1;for(var t={},n=0;n<10;n++)t["_"+String.fromCharCode(n)]=n;if("0123456789"!==Object.getOwnPropertyNames(t).map((function(e){return t[e]})).join(""))return!1;var r={};return"abcdefghijklmnopqrst".split("").forEach((function(e){r[e]=e})),"abcdefghijklmnopqrst"===Object.keys(Object.assign({},r)).join("")}catch(e){return!1}}()?Object.assign:function(e,l){for(var a,o,i=function(e){if(null==e)throw new TypeError("Object.assign cannot be called with null or undefined");return Object(e)}(e),u=1;u{"use strict";var r=n(294),l=n(418),a=n(840);function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n