text: var $jscomp=$jscomp||{};$jscomp.scope={};$jscomp.ASSUME_ES5=!1;$jscomp.ASSUME_NO_NATIVE_MAP=!1;$jscomp.ASSUME_NO_NATIVE_SET=!1;$jscomp.defineProperty=$jscomp.ASSUME_ES5||"function"==typeof Object.defineProperties?Object.defineProperty:function(b,c,d){b!=Array.prototype&&b!=Object.prototype&&(b[c]=d.value)};$jscomp.getGlobal=function(b){return"undefined"!=typeof window&&window===b?b:"undefined"!=typeof global&&null!=global?global:b};$jscomp.global=$jscomp.getGlobal(this);$jscomp.SYMBOL_PREFIX="jscomp_symbol_";
  $jscomp.initSymbol=function(){$jscomp.initSymbol=function(){};$jscomp.global.Symbol||($jscomp.global.Symbol=$jscomp.Symbol)};$jscomp.Symbol=function(){var b=0;return function(c){return $jscomp.SYMBOL_PREFIX+(c||"")+b++}}();
  $jscomp.initSymbolIterator=function(){$jscomp.initSymbol();var b=$jscomp.global.Symbol.iterator;b||(b=$jscomp.global.Symbol.iterator=$jscomp.global.Symbol("iterator"));"function"!=typeof Array.prototype[b]&&$jscomp.defineProperty(Array.prototype,b,{configurable:!0,writable:!0,value:function(){return $jscomp.arrayIterator(this)}});$jscomp.initSymbolIterator=function(){}};$jscomp.arrayIterator=function(b){var c=0;return $jscomp.iteratorPrototype(function(){return c<b.length?{done:!1,value:b[c++]}:{done:!0}})};
  $jscomp.iteratorPrototype=function(b){$jscomp.initSymbolIterator();b={next:b};b[$jscomp.global.Symbol.iterator]=function(){return this};return b};$jscomp.makeIterator=function(b){$jscomp.initSymbolIterator();$jscomp.initSymbol();$jscomp.initSymbolIterator();var c=b[Symbol.iterator];return c?c.call(b):$jscomp.arrayIterator(b)};$jscomp.objectCreate=$jscomp.ASSUME_ES5||"function"==typeof Object.create?Object.create:function(b){var c=function(){};c.prototype=b;return new c};
  $jscomp.underscoreProtoCanBeSet=function(){var b={a:!0},c={};try{return c.__proto__=b,c.a}catch(d){}return!1};$jscomp.setPrototypeOf="function"==typeof Object.setPrototypeOf?Object.setPrototypeOf:$jscomp.underscoreProtoCanBeSet()?function(b,c){b.__proto__=c;if(b.__proto__!==c)throw new TypeError(b+" is not extensible");return b}:null;
  $jscomp.inherits=function(b,c){b.prototype=$jscomp.objectCreate(c.prototype);b.prototype.constructor=b;if($jscomp.setPrototypeOf){var d=$jscomp.setPrototypeOf;d(b,c)}else for(d in c)if("prototype"!=d)if(Object.defineProperties){var e=Object.getOwnPropertyDescriptor(c,d);e&&Object.defineProperty(b,d,e)}else b[d]=c[d];b.superClass_=c.prototype};
  $jscomp.polyfill=function(b,c,d,e){if(c){d=$jscomp.global;b=b.split(".");for(e=0;e<b.length-1;e++){var f=b[e];f in d||(d[f]={});d=d[f]}b=b[b.length-1];e=d[b];c=c(e);c!=e&&null!=c&&$jscomp.defineProperty(d,b,{configurable:!0,writable:!0,value:c})}};
  $jscomp.polyfill("Array.from",function(b){return b?b:function(b,d,e){$jscomp.initSymbolIterator();d=null!=d?d:function(b){return b};var c=[],g=b[Symbol.iterator];if("function"==typeof g)for(b=g.call(b);!(g=b.next()).done;)c.push(d.call(e,g.value));else{g=b.length;for(var h=0;h<g;h++)c.push(d.call(e,b[h]))}return c}},"es6","es3");
  $jscomp.iteratorFromArray=function(b,c){$jscomp.initSymbolIterator();b instanceof String&&(b+="");var d=0,e={next:function(){if(d<b.length){var f=d++;return{value:c(f,b[f]),done:!1}}e.next=function(){return{done:!0,value:void 0}};return e.next()}};e[Symbol.iterator]=function(){return e};return e};$jscomp.polyfill("Array.prototype.keys",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(b){return b})}},"es6","es3");
  $jscomp.checkStringArgs=function(b,c,d){if(null==b)throw new TypeError("The 'this' value for String.prototype."+d+" must not be null or undefined");if(c instanceof RegExp)throw new TypeError("First argument to String.prototype."+d+" must not be a regular expression");return b+""};
  $jscomp.polyfill("String.prototype.startsWith",function(b){return b?b:function(b,d){var c=$jscomp.checkStringArgs(this,b,"startsWith");b+="";var f=c.length,g=b.length;d=Math.max(0,Math.min(d|0,c.length));for(var h=0;h<g&&d<f;)if(c[d++]!=b[h++])return!1;return h>=g}},"es6","es3");$jscomp.polyfill("Object.is",function(b){return b?b:function(b,d){return b===d?0!==b||1/b===1/d:b!==b&&d!==d}},"es6","es3");
  $jscomp.polyfill("Array.prototype.includes",function(b){return b?b:function(b,d){var c=this;c instanceof String&&(c=String(c));var f=c.length;for(d=d||0;d<f;d++)if(c[d]==b||Object.is(c[d],b))return!0;return!1}},"es7","es3");$jscomp.polyfill("String.prototype.includes",function(b){return b?b:function(b,d){return-1!==$jscomp.checkStringArgs(this,b,"includes").indexOf(b,d||0)}},"es6","es3");
  $jscomp.polyfill("Array.prototype.entries",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(b,d){return[b,d]})}},"es6","es3");$jscomp.owns=function(b,c){return Object.prototype.hasOwnProperty.call(b,c)};
  $jscomp.polyfill("WeakMap",function(b){function c(b){$jscomp.owns(b,e)||$jscomp.defineProperty(b,e,{value:{}})}function d(b){var d=Object[b];d&&(Object[b]=function(b){c(b);return d(b)})}if(function(){if(!b||!Object.seal)return!1;try{var c=Object.seal({}),d=Object.seal({}),e=new b([[c,2],[d,3]]);if(2!=e.get(c)||3!=e.get(d))return!1;e.delete(c);e.set(d,4);return!e.has(c)&&4==e.get(d)}catch(k){return!1}}())return b;var e="$jscomp_hidden_"+Math.random().toString().substring(2);d("freeze");d("preventExtensions");
  d("seal");var f=0,g=function(b){this.id_=(f+=Math.random()+1).toString();if(b){$jscomp.initSymbol();$jscomp.initSymbolIterator();b=$jscomp.makeIterator(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}};g.prototype.set=function(b,d){c(b);if(!$jscomp.owns(b,e))throw Error("WeakMap key fail: "+b);b[e][this.id_]=d;return this};g.prototype.get=function(b){return $jscomp.owns(b,e)?b[e][this.id_]:void 0};g.prototype.has=function(b){return $jscomp.owns(b,e)&&$jscomp.owns(b[e],this.id_)};g.prototype.delete=
  function(b){return $jscomp.owns(b,e)&&$jscomp.owns(b[e],this.id_)?delete b[e][this.id_]:!1};return g},"es6","es3");$jscomp.MapEntry=function(){};
  $jscomp.polyfill("Map",function(b){if(!$jscomp.ASSUME_NO_NATIVE_MAP&&function(){if(!b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),d=new b($jscomp.makeIterator([[c,"s"]]));if("s"!=d.get(c)||1!=d.size||d.get({x:4})||d.set({x:4},"t")!=d||2!=d.size)return!1;var e=d.entries(),f=e.next();if(f.done||f.value[0]!=c||"s"!=f.value[1])return!1;f=e.next();return f.done||4!=f.value[0].x||"t"!=f.value[1]||!e.next().done?!1:!0}catch(l){return!1}}())return b;$jscomp.initSymbol();
  $jscomp.initSymbolIterator();var c=new WeakMap,d=function(b){this.data_={};this.head_=g();this.size=0;if(b){b=$jscomp.makeIterator(b);for(var c;!(c=b.next()).done;)c=c.value,this.set(c[0],c[1])}};d.prototype.set=function(b,c){var d=e(this,b);d.list||(d.list=this.data_[d.id]=[]);d.entry?d.entry.value=c:(d.entry={next:this.head_,previous:this.head_.previous,head:this.head_,key:b,value:c},d.list.push(d.entry),this.head_.previous.next=d.entry,this.head_.previous=d.entry,this.size++);return this};d.prototype.delete=
  function(b){b=e(this,b);return b.entry&&b.list?(b.list.splice(b.index,1),b.list.length||delete this.data_[b.id],b.entry.previous.next=b.entry.next,b.entry.next.previous=b.entry.previous,b.entry.head=null,this.size--,!0):!1};d.prototype.clear=function(){this.data_={};this.head_=this.head_.previous=g();this.size=0};d.prototype.has=function(b){return!!e(this,b).entry};d.prototype.get=function(b){return(b=e(this,b).entry)&&b.value};d.prototype.entries=function(){return f(this,function(b){return[b.key,
  b.value]})};d.prototype.keys=function(){return f(this,function(b){return b.key})};d.prototype.values=function(){return f(this,function(b){return b.value})};d.prototype.forEach=function(b,c){for(var d=this.entries(),e;!(e=d.next()).done;)e=e.value,b.call(c,e[1],e[0],this)};d.prototype[Symbol.iterator]=d.prototype.entries;var e=function(b,d){var e=d&&typeof d;"object"==e||"function"==e?c.has(d)?e=c.get(d):(e=""+ ++h,c.set(d,e)):e="p_"+d;var f=b.data_[e];if(f&&$jscomp.owns(b.data_,e))for(b=0;b<f.length;b++){var g=
  f[b];if(d!==d&&g.key!==g.key||d===g.key)return{id:e,list:f,index:b,entry:g}}return{id:e,list:f,index:-1,entry:void 0}},f=function(b,c){var d=b.head_;return $jscomp.iteratorPrototype(function(){if(d){for(;d.head!=b.head_;)d=d.previous;for(;d.next!=d.head;)return d=d.next,{done:!1,value:c(d)};d=null}return{done:!0,value:void 0}})},g=function(){var b={};return b.previous=b.next=b.head=b},h=0;return d},"es6","es3");
  $jscomp.polyfill("Set",function(b){if(!$jscomp.ASSUME_NO_NATIVE_SET&&function(){if(!b||!b.prototype.entries||"function"!=typeof Object.seal)return!1;try{var c=Object.seal({x:4}),e=new b($jscomp.makeIterator([c]));if(!e.has(c)||1!=e.size||e.add(c)!=e||1!=e.size||e.add({x:4})!=e||2!=e.size)return!1;var f=e.entries(),g=f.next();if(g.done||g.value[0]!=c||g.value[1]!=c)return!1;g=f.next();return g.done||g.value[0]==c||4!=g.value[0].x||g.value[1]!=g.value[0]?!1:f.next().done}catch(h){return!1}}())return b;
  $jscomp.initSymbol();$jscomp.initSymbolIterator();var c=function(b){this.map_=new Map;if(b){b=$jscomp.makeIterator(b);for(var c;!(c=b.next()).done;)this.add(c.value)}this.size=this.map_.size};c.prototype.add=function(b){this.map_.set(b,b);this.size=this.map_.size;return this};c.prototype.delete=function(b){b=this.map_.delete(b);this.size=this.map_.size;return b};c.prototype.clear=function(){this.map_.clear();this.size=0};c.prototype.has=function(b){return this.map_.has(b)};c.prototype.entries=function(){return this.map_.entries()};
  c.prototype.values=function(){return this.map_.values()};c.prototype.keys=c.prototype.values;c.prototype[Symbol.iterator]=c.prototype.values;c.prototype.forEach=function(b,c){var d=this;this.map_.forEach(function(e){return b.call(c,e,e,d)})};return c},"es6","es3");$jscomp.polyfill("Array.prototype.values",function(b){return b?b:function(){return $jscomp.iteratorFromArray(this,function(b,d){return d})}},"es6","es3");
  $jscomp.findInternal=function(b,c,d){b instanceof String&&(b=String(b));for(var e=b.length,f=0;f<e;f++){var g=b[f];if(c.call(d,g,f,b))return{i:f,v:g}}return{i:-1,v:void 0}};$jscomp.polyfill("Array.prototype.findIndex",function(b){return b?b:function(b,d){return $jscomp.findInternal(this,b,d).i}},"es6","es3");
  $jscomp.polyfill("Object.assign",function(b){return b?b:function(b,d){for(var c=1;c<arguments.length;c++){var f=arguments[c];if(f)for(var g in f)$jscomp.owns(f,g)&&(b[g]=f[g])}return b}},"es6","es3");function clg(b){for(var c=[],d=0;d<arguments.length;++d)c[d-0]=arguments[d];console.log(Array.from(c).join(","))}window.clg=clg;function ast(b,c){console.assert(b,void 0===c?"anon":c)}window.ast=ast;function find(b,c){if(-1!==c.indexOf(b))return b}
  function eko(b,c){console.log("eko <"+b+"> = "+c.toString());return c}function xor(b,c){return b?!c:c}window.xor=xor;function uuidv4(){return"10000000-1000-4000-8000-100000000000".replace(/[018]/g,function(b){return(b^window.crypto.getRandomValues(new Uint8Array(1))[0]&15>>b/4).toString(16)})}window.uuidv4=uuidv4;
  function localStorageLoad(b){var c=Object.keys(window.localStorage||{}),d=[],e=c.length;for(clg("lsl sees keys"+c);e--;)c[e].startsWith(b)&&d.push(JSON.parse(window.localStorage.getItem(c[e])||""));return d}Storage.prototype.setObject=function(b,c){this.setItem(b,JSON.stringify(c))};Storage.prototype.getObject=function(b){return(b=this.getItem(b))&&JSON.parse(b)};var MISSING={},QUEUE_COMPACT_SIZE=500;
  function define(b,c){for(var d in c){var e=Object.getOwnPropertyDescriptor(c,d);e.enumerable=!1;Object.defineProperty(b,d,e)}}var ArrayQueue=function(){this._head=this.size=0;this._items=[]};ArrayQueue.prototype.emptyp=function(){return 0===this.size};ArrayQueue.prototype.push=function(b){this._items.push(b);return++this.size};
  ArrayQueue.prototype.shift=function(){if(this.size){var b=this._items[this._head];this._head===QUEUE_COMPACT_SIZE?(this._items=this._items.slice(this._head+1),this._head=0,this.size--):this._items[this._head++]=MISSING;return b}};ArrayQueue.prototype.clear=function(){this._head=this.size=0;this._items.length=0};ArrayQueue.prototype.forEach=function(b,c){if(this.size)for(var d=this._head,e=0;d<this._items.length;d++){var f=this._items[d];f!==MISSING&&b.call(c,f,e++,this)}};
  var Stack=function(){var b=function(){var b=[];return[function(){return b.push.apply(b,arguments)},function(){return b.pop.apply(b,arguments)},function(){return b.length},function(c){return b.length=c},function(){return b[b.length-1]},function(c){return b.includes(c)},function(){return b}]}();this.push=b[0];this.pop=b[1];this.getLength=b[2];this.setLength=b[3];this.peek=b[4];this.includes=b[5];this.elts=b[6];this.push.apply(this,arguments)};
  Array.prototype.somex=function(b){for(var c=$jscomp.makeIterator(this.entries()),d=c.next();!d.done;d=c.next()){var e=$jscomp.makeIterator(d.value);d=e.next().value;e=e.next().value;if(d=b(d,e))return d}return null};var causation=new Stack,callStack=new Stack,depender=null,gNotToBe=!1,gCPropDepth=0,gCDebug=!1,gStop=!1,ppulse=0;function gpulse(){return ppulse}var gPar=null,onePulsep=!1,dpLogp=!1;
  function dataPulseNext(b){onePulsep||(dpLogp&&clg("dpnext "+(void 0===b?"anon":b)),ppulse+=1);return ppulse}function cellsReset(b){b=void 0===b?{}:b;gCDebug=b.debug;clientQHandler=b.clientQHandler;cellsInit()}function cellsInit(){ppulse=0}var deferChanges=!1,clientQHandler=null,gCustomPropagator=null,gWithinIntegrity=!1,gSlotObserver={};function gSlotObserverDef(b,c){gSlotObserver[b]&&clg("gSlotObserverDef overwriting $(slot) observer");gSlotObserver[b]=c}var qNotify=new ArrayQueue,qAwaken=new ArrayQueue;
  window.qAwaken=qAwaken;var qClient=new ArrayQueue,qEphemReset=new ArrayQueue,qChange=new ArrayQueue;function ufbAdd(b,c){b.push(c)}function withoutCDependency(b){return function(c){var d=depender;depender=null;try{return b(c)}finally{depender=d}}}function withoutIntegrity(b){var c=gWithinIntegrity,d=deferChanges;try{deferChanges=gWithinIntegrity=!1,b()}finally{gWithinIntegrity=c,deferChanges=d}}
  function withIntegrity(b,c,d){if(!gStop)if(gWithinIntegrity){if(b)return ufbAdd(b,[c,d]),"deferred-to-ufb";d(b,c)}else{var e=gWithinIntegrity,f=deferChanges;gWithinIntegrity=!0;deferChanges=!1;try{gpulse()&&b!==qChange||dataPulseNext("cwi");var g=d(b,c);finBiz(qNotify);return g}finally{gWithinIntegrity=e,deferChanges=f}}}window.withIntegrity=withIntegrity;function withChg(b,c){withIntegrity(qChange,b,c)}window.withChg=withChg;
  function finBiz(b){for(;b;)switch(b){case qNotify:qDo("notify",b);qDo("awaken",qAwaken);b=qNotify.emptyp()?qClient:qNotify;break;case qClient:(clientQHandler||qDo)("client",b);b=qClient.emptyp()?qEphemReset:qClient;break;case qEphemReset:qDo("reset empheral",b);b=qChange;break;case qChange:if(b=b.shift()){var c=$jscomp.makeIterator(b);b=c.next().value;c=c.next().value;dataPulseNext("change");c("change",b);b=qNotify}else b=null;break;default:throw"finBiz sees invalid q: "+b.toString();}}
  function qDo(b,c){c.forEach(function(c){var d=$jscomp.makeIterator(c);c=d.next().value;d=d.next().value;d(b,c)});c.clear()}$jscomp.initSymbol();
  var kUnbound=Symbol("unbound"),kUncurrent="uncurrent",kValid="valid",kAwake="c-awake",kQuiesced="c-quiesced",kNascent="nascent",kOptimizedAwayp="optimized-away",kOptimizeWhenValued="optimize-when-valued",kOnceAsked="lazy-once-asked",kUntilAsked="lazy-until-asked",kAlways="lazy-always",kObserverUnresolved="kObserverUnresolved",Cell=function(b,c,d,e,f,g,h){h=void 0===h?!d:h;this.name=void 0===g?"anon":g;this.md=null;this.pulseObserved=this.pulseLastChanged=this.pulse=-1;this.lazy=null;this.callers=
  new Set;this.useds=new Set;this.ephemeralp=e;this.inputp=d;this.observer=f;this.optimize=h;this.synapticp=this.slotOwning=!1;c?(this.rule=c,this.pv=kUnbound,this.state=kNascent,this.others={}):(this.pv=b,this.state=kValid);Object.defineProperty(this,"v",{enumerable:!0,get:this.slotValue,set:this.slotValueSet})};Cell.prototype.mx=function(){return this.md};Cell.prototype.optimizedAwayp=function(){return this.state===kOptimizedAwayp};Cell.prototype.unboundp=function(){return this.pv===kUnbound};
  Cell.prototype.uncurrentp=function(){return this.pv===kUncurrent};Cell.prototype.validp=function(){return!(this.unboundp()||this.uncurrentp())};Cell.prototype.valueState=function(){return this.unboundp()?kUnbound:this.uncurrentp()?kUncurrent:kValid};Cell.prototype.valueChangedp=function(b,c){return b!==c};Cell.prototype.currentp=function(){return this.pulse>=gpulse()};Cell.prototype.pulseUpdate=function(b){this.optimizedAwayp()||(ast(gpulse()>=this.pulse),this.pulse=gpulse())};
  Cell.prototype.awaken=function(){this.rule?this.currentp()||this.calcNSet("c-awaken"):gpulse()>this.pulseObserved&&(this.observe(kUnbound,"awaken"),this.ephemeralReset())};Cell.prototype.slotValue=function(){var b=void 0,c=this;withIntegrity(null,null,function(){var d=c.pv;b=c.ensureValueIsCurrent("c-read",null);!c.md&&c.state===kNascent&&gpulse()>c.pulseObserved&&(c.state=kAwake,c.observe(d,"cget"),c.ephemeralReset())});depender&&depender.recordDependency(this);return b};
  Cell.prototype.slotValueSet=function(b){var c=this;if(deferChanges)throw"Assign to "+this.name+" must be deferred by wrapping it in WITH-INTEGRITY";find(this.lazy,[kOnceAsked,kAlways,!0])?this.valueAssume(b,null):withChg(this.name,function(){c.valueAssume(b,null)})};Cell.prototype.recordDependency=function(b){b.optimizedAwayp()||(this.useds.add(b),ast(0<this.useds.size),b.callerEnsure(this))};Cell.prototype.callerEnsure=function(b){this.callers.add(b)};Cell.prototype.callerDrop=function(b){this.callers.delete(b)};
  Cell.prototype.ensureValueIsCurrent=function(b,c){if(gNotToBe)return this.validp()?this.pv:null;if(this.currentp())return this.pv;if(!this.inputp||!this.validp()||this.rule&&this.optimize===kOptimizeWhenValued&&null===this.pv){if(this.md&&this.md.mDeadp())throw"evic: read of dead "+this.name+" of "+this.md.name;b=!1;if(this.validp())for(var d=$jscomp.makeIterator(this.useds.values()),e=d.next();!e.done;e=d.next()){if(e=e.value,e.ensureValueIsCurrent("nested",this),e.pulseLastChanged>this.pulse){b=
  !0;break}}else b=!0;b?this.currentp()||this.calcNSet("evic",c):this.pulseUpdate("valid-uninfluence")}return this.pv};Cell.prototype.calcNSet=function(b,c){if(callStack.includes(this))throw callStack.elts(),clg("cyclic dependency: about to calculate "+this.name+" already calculating"),"cyclic dependency detected. see console for deets";b=this.calcNLink();if(!this.optimizedAwayp())return this.valueAssume(b,null)};
  Cell.prototype.calcNLink=function(){var b=depender,c=deferChanges;depender=this;deferChanges=!0;try{return callStack.push(this),this.unlinkFromUsed("pre-rule-clear"),this.rule(this)}finally{callStack.pop(),depender=b,deferChanges=c}};
  Cell.prototype.valueAssume=function(b,c){var d=this,e=this;withoutCDependency(function(){var f=e.pv,g=e.valueState();e.pv=b;e.state=kAwake;e.md&&!e.synapticp&&mdSlotValueStore(e.md,e.name,b);e.pulseUpdate("sv-assume");if("propagate"===c||-1===[kValid,kUncurrent].indexOf(g)||e.valueChangedp(b,f))g=e.rule?e.optimize:null,g===kOptimizeWhenValued?e.pv&&(e.unlinkFromUsed("opti-when"),d.optimizeAwayMaybe(f)):g&&e.optimizeAwayMaybe(f),"no-propagate"===c||e.optimizedAwayp()||e.propagate(f,e.callers)})();
  return b};Cell.prototype.propagate=function(b,c){if(onePulsep)gCustomPropagator&&gCustomPropagator(this,b);else{this.pulseLastChanged=gpulse();var d=depender,e=callStack,f=gCPropDepth,g=deferChanges;try{this.propagateToCallers(c),(gpulse()>this.pulseObserved||find(this.lazy,[kOnceAsked,kAlways,!0]))&&this.observe(b,"propagate"),this.ephemeralReset()}finally{depender=d,callStack=e,gCPropDepth=f,deferChanges=g}}};
  Cell.prototype.propagateToCallers=function(b){if(b.size){var c=this;withIntegrity(qNotify,c,function(){causation.push(c);try{for(var d=$jscomp.makeIterator(b.values()),e=d.next();!e.done;e=d.next()){var f=e.value;f.state===kQuiesced||f.currentp()||find(f.lazy,[!0,kAlways,kOnceAsked])||!f.useds.has(c)||f.calcNSet("propagate")}}finally{causation.pop()}})}};
  Cell.prototype.observerResolve=function(){!this.observer&&this.md&&(this.observer=this.md.slotObserverResolve(this.name));return this.observer===kObserverUnresolved?null:this.observer};Cell.prototype.observe=function(b,c){(c=this.observerResolve())&&c(this.name,this.md,this.pv,b,this)};Cell.prototype.ephemeralReset=function(){if(this.ephemeralp){var b=this;withIntegrity(qEphemReset,this,function(){b.pv=null})}};
  Cell.prototype.unlinkFromUsed=function(b){b=$jscomp.makeIterator(this.useds.values());for(var c=b.next();!c.done;c=b.next())c.value.callerDrop(this);this.useds.clear()};Cell.prototype.mdCellFlush=function(){};
  Cell.prototype.optimizeAwayMaybe=function(b){if(this.rule&&!this.useds.size&&this.optimize&&!this.optimizedAwayp()&&this.validp()&&!this.synapticp&&!this.inputp){this.state=kOptimizedAwayp;this.observe(b,"optimized-away");this.md&&this.mdCellFlush();b=$jscomp.makeIterator(this.callers.values());for(var c=b.next();!c.done;c=b.next())c=c.value,this.callerDrop(c),c.ensureValueIsCurrent("opti-used",this)}};Cell.prototype.quiesce=function(){this.unlinkFromCallers();this.unlinkFromUsed("quiesce")};
  Cell.prototype.unlinkFromCallers=function(){this.state=kUncurrent;for(var b=$jscomp.makeIterator(this.callers.values()),c=b.next();!c.done;c=b.next())this.callerDrop(c.value);this.callers.clear()};Cell.prototype.kidValuesKids=function(){var b=this,c=b.md,d=b.pv===kUnbound?[]:b.pv;return c.kidValues.map(function(e){var f=d.findIndex(function(c){return b.md.kidKey(c)===e});return-1===f?c.kidFactory(b,e):d[f]})};
  Cell.prototype.fm=function(b,c,d){if(b){if(!this.md)throw"Family search attempted from Cell "+this+" lacking md (s/b a Model)";return this.md.fm(b,c,d)}};Cell.prototype.fmUp=function(b,c,d){if(!this.md)throw"fmUp search attempted from Cell "+this+" lacking md (s/b a Model)";return this.md.fmUp(b,c,d)};Cell.prototype.fmDown=function(b,c,d){if(!this.md)throw"fmDown search attempted from Cell "+this+" lacking md (s/b a Model)";return this.md.fmDown(b,d,c)};window.Cell=Cell;Cell.prototype.mx=Cell.prototype.mx;
  function mdSlotValueStore(b,c,d){}function cF(b,c){return Object.assign(new Cell(null,b,!1,!1,null),c)}window.cF=cF;function cF1(b,c){return Object.assign(new Cell(null,function(c){return withoutCDependency(b)(c)},!1,!1,null),c)}function cF_(b,c){return Object.assign(new Cell(null,b,!1,!1,null),{lazy:!0},c)}function c_F(b,c){return Object.assign(new Cell(null,b,!1,!1,null),{lazy:kUntilAsked},c)}function cFI(b,c){return Object.assign(new Cell(null,b,!0,!1,null),c)}window.cFI=cFI;
  function cI(b,c){return Object.assign(new Cell(b,null,!0,!1,null),c)}window.cI=cI;function cIe(b,c){return Object.assign(new Cell(b,null,!0,!0,null),c)}function obsDbg(b,c,d,e,f){console.log("obsDbg! "+b+" "+(c?c.name||c.id:"noMd")+" new="+d+" prior="+(e===kUnbound?"unbound":e))}function XobsDbg(b,c,d,e,f){};function cdrArgs(b){return Array.apply(null,b).slice(1)}window.cdrArgs=cdrArgs;function cddrArgs(b){return Array.apply(null,b).slice(2)}window.cddrArgs=cddrArgs;var kAwakening="md-awakening",kDoomed="md-doomed",kDead="md-dead",sid=0;window.sid=sid;
  var Model=function(b,c,d,e){var f=this;e=void 0===e?!0:e;this.par=b||gPar;this.id=void 0;this.name=c;this.kids=this.mdType=null;this.cells={};this.others={};this.state=kNascent;this.awakenOnInitp=this.doomed=!1;this.adoptCt=0;b={};for(var g in d)b.slot=g,d.hasOwnProperty(b.slot)&&(b.value=d[b.slot],b.value instanceof Cell?(b.value.name=b.slot,b.value.md=this,this.cells[b.slot]=b.value,Object.defineProperty(this,b.slot,{enumerable:!0,get:function(b){return function(){return b.value.slotValue()}}(b),
  set:function(b){return function(c){return b.value.slotValueSet(c)}}(b)})):Object.defineProperty(this,b.slot,{enumerable:!0,get:function(b){return function(){return b.value}}(b),set:function(b){return function(c){throw"Slot "+b.slot+" cannot be set to "+c+" because it is not mediated by an input Cell";}}(b)}),b={value:b.value,slot:b.slot});e&&(this.awakenOnInitp?this.awaken():withIntegrity(qAwaken,this,function(b){f.awaken()}))};Model.cname=function(){return"Model"};
  Model.prototype.awaken=function(){if(this.state!==kNascent)return this;this.state=kAwakening;for(var b in this.cells){var c=this.cells[b];console.assert(c.md,"No md for cell "+c.name+" at md awaken");find(c.lazy,[!0,kAlways,kUntilAsked])||c.awaken()}this.state=kAwake};Model.prototype.slotObserverResolve=function(b){return null};Model.prototype.fmd=function(b,c,d){return this.fm(b,Object.assign({mep:!1,upp:!1,insidep:!0},d),c)};
  Model.prototype.fm=function(b,c,d){var e=null;if(d){var f=this.others[d];if(f)return f}c=Object.assign({mep:!1,mustp:!0,insidep:!1,upp:!0,wocd:!0},c);f=depender;depender=c.wocd?null:depender;try{var g=this.fmTv(b,c);if(g)e=this.others[d]=g;else if(c.mustp)throw"fget failed what = "+b.toString()+", id "+this.id+", where = "+this.name;}finally{depender=f}return e};Model.prototype.fmUp=function(b,c,d){return this.fm(b,Object.assign({upp:!0,mep:!1},c),d)};
  Model.prototype.fmDown=function(b,c,d){return this.fm(b,Object.assign({upp:!1,insidep:!0,mep:!1},c),d)};Model.prototype.fmatch=function(b){return"function"===typeof b&&b(this)||"string"===typeof b&&this.name===b||this===b?this:null};Model.prototype.fmTv=function(b,c){return c.mep&&this.fmatch(b)||c.insidep&&this.kids&&this.kids.somex(function(d,e){if(d=e!==c.skip&&e.fmTv(b,Object.assign({},c,{upp:!1,mep:!0})))return d})||c.upp&&this.par&&this.par.fmTv(b,Object.assign({},c,{mep:!0,insidep:!0,skip:this}))};
  Model.prototype.mDeadp=function(){return this.state===kDead};window.Model=Model;Model.prototype.awaken=Model.prototype.awaken;var isModel=function(b){return b instanceof Model};function mkm(b,c,d,e,f){f=void 0===f?"Model":f;d=Object.assign({},d,e?{kids:cKids(e)}:null);b=new window[f](b,c,d);if(!isModel(b))throw"mkm made not-modelp";return b}window.mkm=mkm;function pkdFlat(b,c){c=void 0===c?[]:c;for(var d=0;d<b.length;++d)null!=b[d]&&(b[d]instanceof Array?pkdFlat(b[d],c):c.push(b[d]));return c}
  function cKids(b,c){c=void 0===c?{}:c;return Object.assign(new Cell(null,function(c){if(!isModel(c.md))throw"ckids c.md not model";c=kfExpand(c,b);return c instanceof Array?pkdFlat(c):[c]},!1,!1,null),c)}window.cKids=cKids;var kfExpandFinal=function(b){return null===b||isModel(b)||b instanceof Array&&b.every(kfExpandFinal)};
  function kfExpand(b,c){if(kfExpandFinal(c))return c;if("function"===typeof c)return kfExpand(b,c(b));if(c instanceof Array)return kfExpand(b,c.map(function(c){return kfExpand(b,c)}));clg("expand bad kf",c,null===c,typeof c);throw"kfexpand fell thru";};var jsDom=[];function dom2mx(b,c){var d=jsDom[b.id];if(!d&&(void 0===c||c))throw"dom2mx cannot find jsDom with dom.sid "+b.sid+", dom.id "+b.id;return d}function obsContent(b,c,d,e,f){e!==kUnbound&&(ast(c.dom,"Tag obs Content"),c.dom.innerHTML=d)}
  function obsKids(b,c,d,e,f){if(e!==kUnbound){b=c.dom;c=document.createDocumentFragment();ast(b);for(f=0;f<d.length;++f){var g=d[f];if(find(g,e))ast(g.dom),c.appendChild(b.removeChild(g.dom));else{var h=document.createElement("div");h.innerHTML=g.toHTML();g=g.domCache=h.removeChild(h.firstChild);c.appendChild(g)}}b.innerHTML=null;b.appendChild(c)}}function obsDisabled(b,c,d,e,f){e!==kUnbound&&(c.dom.disabled=!!d)}function obsStyleProperty(b,c,d,e,f){e!==kUnbound&&(c.dom.style[b]=d)}
  function obsTagEventHandler(b,c,d,e,f){e!==kUnbound&&(c.dom.style.set[b]=d)}var AttrAliases=new Map([["class","className"]]);function obsAttrGlobal(b,c,d,e,f){e!==kUnbound&&(b=AttrAliases.get(b)||b,c.dom[b]=d)}var TagSession=function(b,c,d){var e=Object.assign({sid:++sid},d);Model.call(this,b,c||d.name,e,!1)};$jscomp.inherits(TagSession,Model);
  TagSession.make=function(b,c,d){b=new TagSession(b,c,d);b.awakenOnInitp?b.awaken():withIntegrity(qAwaken,b,function(b){clg("awakening tag session!!!",b.name);b.awaken();return null})};TagSession.cname=function(){return"TagSession"};TagSession.prototype.init=function(){Router(this.routes).init()};window.TagSession=TagSession;
  var Tag=function(b,c,d){var e=Object.assign({},d);delete e.id;Model.call(this,b,c||d.name,e,!1);var f=this;this.sid=++sid;this.id=d.id?d.id:this.sid;this.slotObservers=[];jsDom[this.id]=this;this.domCache=null;Object.defineProperty(this,"dom",{enumerable:!0,get:function(){if(null===f.domCache&&(f.domCache=document.getElementById(f.id),ast(f.domCache,"Unable to locate DOM for Tag via Tag.id "+f.id),!f.domCache))throw"Tag unanble find DOM";return f.domCache}});this.awakenOnInitp?this.awaken():withIntegrity(qAwaken,
  this,function(b){f.awaken()})};$jscomp.inherits(Tag,Model);Tag.prototype.dbg=function(){return"tag "+this.tag+" nm="+this.name+" id="+this.id+" "};Tag.cname=function(){return"Tag"};Tag.prototype.toHTML=function(){var b=this.tag,c=tagAttrsBuild(this),d=tagStyleBuild(this);c=c+" "+d;ast(b);return"<"+b+' id="'+this.id+'" '+c+">"+(this.content||this.kidsToHTML())+"</"+b+">"};Tag.mxToHTML=function(b){return b.reduce(function(b,d){return b+d().toHTML()},"")};
  Tag.prototype.kidsToHTML=function(){return this.kids?this.kids.reduce(function(b,c){return b+c.toHTML()},""):""};Tag.prototype.slotObserverResolve=function(b){var c=this.slotObservers[b];c||(c="content"===b?obsContent:"kids"===b?obsKids:"disabled"===b?obsDisabled:CommonCSSPropsJS.get(b)?obsStyleProperty:TagEvents.has(b)?obsTagEventHandler:TagAttributesGlobal.has(b)?obsAttrGlobal:kObserverUnresolved,this.slotObservers[b]=c);return c};
  Tag.prototype.fmTag=function(b,c){return this.fmUp(function(c){return c.tag===b},{},c)};window.Tag=Tag;var isTag=function(b){return b instanceof Tag};function setClick(b,c){jsDom[b.id].click=c}
  var TagAttributesGlobal=new Set("accesskey autofocus checked class contenteditable contextmenu dir draggable dropzone hidden href id itemid itemprop itemref itemscope itemtype lang spellcheck src style tabindex title translate type".split(" ")),TagEvents=new Set("onabort onautocomplete onautocompleteerror onblur oncancel oncanplay oncanplaythrough onchange onclick onclose oncontextmenu oncuechange ondblclick ondrag ondragend ondragenter ondragexit ondragleave ondragover ondragstart ondrop ondurationchange onemptied onended onerror onfocus oninput oninvalid onkeydown onkeypress onkeyup onload onloadeddata onloadedmetadata onloadstart onmousedown onmouseenter onmouseleave onmousemove onmouseout onmouseover onmouseup onmousewheel onpause onplay onplaying onprogress onratechange onreset onresize onscroll onseeked onseeking onselect onshow onsort onstalled onsubmit onsuspend ontimeupdate ontoggle onvolumechange onwaiting".split(" ")),HtmlProperties=
  new Set("contentEditable dataset dir isContentEditable lang offsetHeight offsetLeft offsetParent offsetTop offsetWidth onabort onblur onchange onclick onclose oncontextmenu oncopy oncut ondblclick onerror onfocus oninput onkeydown onkeypress onkeyup onload onmousedown onmousemove onmouseout onmouseover onmouseup onpaste onpointercancel onpointerdown onpointerenter onpointerleave onpointermove onpointerout onpointerover onpointerup onreset onresize onscroll onselect onselectstart onsubmit ontouchcancel ontouchmove ontouchstart outerText style tabIndex title".split(" ")),
  CSSProps=new Set("align-content align-items align-self all <angle> animation animation-delay animation-direction animation-duration animation-fill-mode animation-iteration-count animation-name animation-play-state animation-timing-function backface-visibility background background-attachment background-blend-mode background-clip background-color background-image background-origin background-position background-repeat background-size block-size border border-block-end border-block-end-color border-block-end-style border-block-end-width border-block-start border-block-start-color border-block-start-style border-block-start-width border-bottom border-bottom-color border-bottom-left-radius border-bottom-right-radius border-bottom-style border-bottom-width border-collapse border-color border-image border-image-outset border-image-repeat border-image-slice border-image-source border-image-width border-inline-end border-inline-end-color border-inline-end-style border-inline-end-width border-inline-start border-inline-start-color border-inline-start-style border-inline-start-width border-left border-left-color border-left-style border-left-width border-radius border-right border-right-color border-right-style border-right-width border-spacing border-style border-top border-top-color border-top-left-radius border-top-right-radius border-top-style border-top-width border-width bottom box-decoration-break box-shadow box-sizing break-after break-before break-inside caption-side ch clear clip clip-path cm color column-count column-fill column-gap column-rule column-rule-color column-rule-style column-rule-width column-span column-width columns content counter-increment counter-reset cursor direction display empty-cells filter flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap float font font-family font-feature-settings font-kerning font-language-override font-size font-size-adjust font-stretch font-style font-synthesis font-variant font-variant-alternates font-variant-caps font-variant-east-asian font-variant-ligatures font-variant-numeric font-variant-position font-weight grid grid-area grid-auto-columns grid-auto-flow grid-auto-rows grid-column grid-column-end grid-column-gap grid-column-start grid-gap grid-row grid-row-end grid-row-gap grid-row-start grid-template grid-template-areas grid-template-columns grid-template-rows height hyphens hz image-orientation image-rendering image-resolution ime-mode initial inline-size isolation justify-content left letter-spacing line-break line-height list-style list-style-image list-style-position list-style-type margin margin-block-end margin-block-start margin-bottom margin-inline-end margin-inline-start margin-left margin-right margin-top mask mask-clip mask-composite mask-image mask-mode mask-origin mask-position mask-repeat mask-size mask-type max-block-size max-height max-inline-size max-width min-block-size min-height min-inline-size min-width mix-blend-mode object-fit object-position offset-block-end offset-block-start offset-inline-end offset-inline-start opacity order orphans outline outline-color outline-offset outline-style outline-width overflow overflow-wrap overflow-x overflow-y padding padding-block-end padding-block-start padding-bottom padding-inline-end padding-inline-start padding-left padding-right padding-top page-break-after page-break-before page-break-inside perspective perspective-origin pointer-events position quotes resize revert right ruby-align ruby-merge ruby-position scroll-behavior scroll-snap-coordinate scroll-snap-destination scroll-snap-type shape-image-threshold shape-margin shape-outside tab-size table-layout text-align text-align-last text-combine-upright text-decoration text-decoration-color text-decoration-line text-decoration-style text-emphasis text-emphasis-color text-emphasis-position text-emphasis-style text-indent text-orientation text-overflow text-rendering text-shadow text-transform text-underline-position top touch-action transform transform-box transform-origin transform-style transition transition-delay transition-duration transition-property transition-timing-function unicode-bidi unset vertical-align vh visibility vmax vmin vw white-space widows width will-change word-break word-spacing word-wrap writing-mode z-index zoom".split(" ")),
  CommonCSSPropsJS=new Map([["background","background"],["backgroundAttachment","background-attachment"],["backgroundColor","background-color"],["backgroundImage","background-image"],["backgroundPosition","background-position"],["backgroundRepeat","background-repeat"],["border","border"],["borderBottom","border-bottom"],["borderBottomColor","border-bottom-color"],["borderBottomStyle","border-bottom-style"],["borderBottomWidth","border-bottom-width"],["borderColor","border-color"],["borderLeft","border-left"],
  ["borderLeftColor","border-left-color"],["borderLeftStyle","border-left-style"],["borderLeftWidth","border-left-width"],["borderRight","border-right"],["borderRightColor","border-right-color"],["borderRightStyle","border-right-style"],["borderRightWidth","border-right-width"],["borderStyle","border-style"],["borderTop","border-top"],["borderTopColor","border-top-color"],["borderTopStyle","border-top-style"],["borderTopWidth","border-top-width"],["borderWidth","border-width"],["clear","clear"],["clip",
  "clip"],["color","color"],["cursor","cursor"],["display","display"],["filter","filter"],["font","font"],["fontFamily","font-family"],["fontSize","font-size"],["fontVariant","font-variant"],["fontWeight","font-weight"],["height","height"],["left","left"],["letterSpacing","letter-spacing"],["lineHeight","line-height"],["listStyle","list-style"],["listStyleImage","list-style-image"],["listStylePosition","list-style-position"],["listStyleType","list-style-type"],["margin","margin"],["marginBottom","margin-bottom"],
  ["marginLeft","margin-left"],["marginRight","margin-right"],["marginTop","margin-top"],["overflow","overflow"],["padding","padding"],["paddingBottom","padding-bottom"],["paddingLeft","padding-left"],["paddingRight","padding-right"],["paddingTop","padding-top"],["pageBreakAfter","page-break-after"],["pageBreakBefore","page-break-before"],["position","position"],["cssFloat","float"],["textAlign","text-align"],["textDecoration","text-decoration"],["textIndent","text-indent"],["textTransform","text-transform"],
  ["top","top"],["verticalAlign","vertical-align"],["visibility","visibility"],["width","width"],["zIndex","z-index"]]);
  function tagAttrsBuild(b){var c="",d={},e;for(e in b){if(b.hasOwnProperty(e))if(TagEvents.has(e))d.code=b[e],c=["this","\\("].every(function(b){return function(c){return-1==b.code.search(c)}}(d))?c+(" "+e+'="'+b[e]+'(this, event)"'):c+(" "+e+'="'+d.code+'"');else switch(e){case "disabled":case "autofocus":case "hidden":case "checked":b[e]&&(c+=" "+e);break;case "value":c+=" "+e+'="'+b[e]+'"';break;case "placeholder":c+=" "+e+'="'+b[e]+'"';break;default:TagAttributesGlobal.has(e)&&b[e]&&(c+=" "+e+
  '="'+b[e]+'"')}d={code:d.code}}return c}function tagStyleBuild(b){var c="",d;for(d in b)if(b.hasOwnProperty(d)){var e=CommonCSSPropsJS.get(d);e&&(c+=e+":"+b[d]+";")}return""===c?"":' style="'+c+'"'}function tag(b,c,d){return function(e){var f=Object.assign({},{tag:b},d?{kids:cKids(d)}:null,c);e=new Tag(e?e.md:null,c.name||b,f);if(!isTag(e))throw"tag made not-isTag";return e}}function div(b){return tag("div",b,cdrArgs(arguments))}function header(b){return tag("header",b,cdrArgs(arguments))}
  function footer(b){return tag("footer",b,cdrArgs(arguments))}function h1(b,c){return tag("h1",Object.assign({content:b},c),cddrArgs(arguments))}function h2(b,c){return tag("h2",Object.assign({content:b},c),cddrArgs(arguments))}function h3(b,c){return tag("h3",Object.assign({content:b},c),cddrArgs(arguments))}function h4(b,c){return tag("h4",Object.assign({content:b},c),cddrArgs(arguments))}function h5(b,c){return tag("h5",Object.assign({content:b},c),cddrArgs(arguments))}
  function h6(b,c){return tag("h6",Object.assign({content:b},c),cddrArgs(arguments))}function section(b){return tag("section",b,cdrArgs(arguments))}function ul(b){return tag("ul",b,cdrArgs(arguments))}function li(b){return tag("li",b,cdrArgs(arguments))}function label(b,c){return tag("label",Object.assign({content:b},c),cddrArgs(arguments))}function labelx(b){ast(b.content,"labelx sees islots sans content");return tag("label",b,cdrArgs(arguments))}
  function button(b,c,d){return tag("button",Object.assign({content:b},c),cddrArgs(arguments))}function span(b){return tag("span",b)}function input(b){return tag("input",b,cdrArgs(arguments))}function p(b,c){return tag("p",Object.assign({content:c},b))}function img(b){return tag("img",b)}function a(b,c){return tag("a",Object.assign({content:c},b))}
  var MXStorable=function(b){b=b||{};b=Object.assign({id:(b.lsPrefix||"MXSTOR_ANON")+uuidv4(),created:Date.now()},b,{deleted:b.deleted||cI(null)});Model.call(this,null,null,b,!1);this.store()};$jscomp.inherits(MXStorable,Model);MXStorable.cname=Model.cname;MXStorable.storableProperties=function(){return["id","created","deleted"]};MXStorable.prototype.toJSON=function(){var b=this;return this.constructor.storableProperties().reduce(function(c,d){c[d]=b[d];return c},{})};
  MXStorable.load=function(b,c){c=window.localStorage.getObject(c);return new b(c)};MXStorable.obsAnyChange=function(b,c,d,e,f){c.store()};MXStorable.prototype.slotObserverResolve=function(b){return MXStorable.obsAnyChange};MXStorable.prototype.store=function(){MXStorable.storeObject(this.id,this.toJSON())};MXStorable.storeObject=function(b,c){window.localStorage.setObject(b,c)};MXStorable.prototype.delete=function(){this.deleted=Date.now()};
  MXStorable.loadAllItems=function(b,c){return Object.keys(window.localStorage).filter(function(b){return b.startsWith(c)}).map(function(c){return MXStorable.load(b,c)})};window.MXStorable=MXStorable;MXStorable.prototype.make=MXStorable.prototype.make;MXStorable.prototype.toJSON=MXStorable.prototype.toJSON;MXStorable.prototype.load=MXStorable.prototype.load;MXStorable.prototype.store=MXStorable.prototype.store;MXStorable.prototype.storeObject=MXStorable.prototype.storeObject;
  MXStorable.prototype["delete"]=MXStorable.prototype.delete;MXStorable.prototype.loadAllItems=MXStorable.prototype.loadAllItems;var TODO_LS_PREFIX="todos-MatrixJS.",Todo=function(b){MXStorable.call(this,Object.assign({lsPrefix:TODO_LS_PREFIX},b,{title:cI(b.title),completed:cI(b.completed||!1)}))};$jscomp.inherits(Todo,MXStorable);Todo.cname=MXStorable.cname;Todo.loadAllItems=MXStorable.loadAllItems;Todo.storeObject=MXStorable.storeObject;Todo.obsAnyChange=MXStorable.obsAnyChange;Todo.load=MXStorable.load;Todo.storableProperties=function(){return["title","completed"].concat(MXStorable.storableProperties.call(this))};
  Todo.mxLoad=function(){return mkm(null,"TodoGroup",{itemsRaw:cI(MXStorable.loadAllItems(Todo,TODO_LS_PREFIX).sort(function(b,c){return b.created<c.created?-1:1})||[]),items:cF(function(b){return b.mx().itemsRaw.filter(function(b){return!b.deleted})}),routeItems:cF(function(b){return b.mx().items.filter(function(b){return"All"===todoRoute.v||xor("Active"===todoRoute.v,b.completed)}).sort(function(b,d){return b.created<d.created?-1:1})}),empty:cF(function(b){return 0===b.mx().items.length})})};
  var todoRoute=cFI(function(b){b=window.localStorage.getObject("todo-matrix.route");return null===b?"All":b},{observer:function(b,c,d){return window.localStorage.setObject("todo-matrix.route",d)}}),Todos=Todo.mxLoad();var todoSession=new TagSession(null,"TodoSSBSession",{routes:{"/completed":function(){clg("routev completed");todoRoute.v="Completed";return null},"/active":function(){return todoRoute.v="Active"},"/":function(){return todoRoute.v="All"}}});
  function todoSSB(){todoSession.init();return Tag.mxToHTML([section({class:"todoapp",name:"todoapp"},header({class:"header"},h1("todos"),input({class:"new-todo",autofocus:!0,placeholder:"What needs doing?",onkeypress:"todoAddNew"})),section({class:"main",hidden:cF(function(b){return Todos.empty})},input({id:"toggle-all",type:"checkbox",class:"toggle-all",checked:cF(function(b){return 0<Todos.items.length&&Todos.items.every(function(b){return b.completed})})}),label("Mark all as complete",{for:"toggle-all",
  onclick:"toggleAllCompletion( this)"}),ul({class:"todo-list",name:"todo-list",kidValues:cF(function(b){return Todos.routeItems}),kidKey:function(b){return b.todo},kidFactory:todoListItem},function(b){return b.kidValuesKids()})),todoDashboard()),footer({class:"info"},["Double-click the text of a todo to change it",'Created by <a href="http://tiltontec.com">Kenneth Tilton','Source on  <a href="https://github.com/kennytilton/MatrixJS/tree/master/js/matrixjs">GitHub','Inspired by <a href="http://todomvc.com">TodoMVC</a>'].map(function(b){return p({},
  b)}))])}window.todoSSB=todoSSB;function todoAddNew(b,c){"Enter"===c.key&&(b=c.target.value.trim(),""!==b&&(Todos.itemsRaw=Todos.itemsRaw.concat(new Todo({title:b}))),c.target.value=null)}function toggleAllCompletion(b){b=document.getElementById("toggle-all");var c=!dom2mx(b).checked;Todos.items.filter(function(b){return xor(b.completed,c)}).map(function(b){return b.completed=c})}
  function todoListItem(b,c){return li({todo:c,class:cF(function(b){return c.completed?"completed":""})},div({class:"view"},input({class:"toggle",type:"checkbox",checked:cF(function(b){return c.completed}),todo:c,onclick:"let todo = dom2mx(this).todo;todo.completed = !todo.completed",title:cF(function(b){return"Mark "+(c.completed?"in":"")+"complete."})}),label(cF(function(b){return c.title}),{ondblclick:"todoStartEditing"}),button(null,{class:"destroy",todo:c,onclick:"dom2mx(this).todo.delete()"})),
  input({name:"myEditor",class:"edit",todo:c,value:cFI(function(b){return c.title}),onblur:"todoEdit",onkeydown:"todoEdit",onkeypress:"todoEdit"}))}function todoStartEditing(b,c){b=dom2mx(b).fmTag("li","myLi");c=b.fmDown("myEditor");c.dom.li=b;b.dom.classList.add("editing");c.dom.focus();c.dom.setSelectionRange(0,c.dom.value.length)}
  function todoEdit(b,c){b=b.li;if(b.dom.classList.contains("editing")&&("blur"===c.type||["Escape","Enter"].includes(c.key))){if("Escape"===c.key)c.target.value=b.todo.title;else{var d=c.target.value.trim();""===d?b.todo.delete():b.todo.title=c.target.value=d}b.dom.classList.remove("editing")}}
  function todoDashboard(){return footer({class:"footer",hidden:cF(function(b){return Todos.empty})},span({class:"todo-count",content:cF(function(b){b=Todos.items.filter(function(b){return!b.completed}).length;return"<strong>"+b+"</strong> item"+(1===b?"":"s")+" remaining"})}),ul({class:"filters",name:"filters"},[["All","#/"],["Active","#/active"],["Completed","#/completed"]].map(function(b){b=$jscomp.makeIterator(b);var c=b.next().value;b=b.next().value;return li({},a({href:b,content:c,selected:cF(function(b){return todoRoute.v===
  c}),class:cF(function(b){return b.md.selected?"selected":""})}))})),button("Clear completed",{class:"clear-completed",hidden:cF(function(b){return 0===Todos.items.filter(function(b){return b.completed}).length}),onclick:"Todos.items.filter( td => td.completed ).map( td => td.delete())"}))};
  