},addEventListener("DOMContentLoaded",function(){if(CustomElements.useNative===!1){var a=Element.prototype.createShadowRoot;Element.prototype.createShadowRoot=function(){var b=a.call(this);return CustomElements.watchShadow(this),b}}}),Platform.templateContent=function(a){if(window.HTMLTemplateElement&&HTMLTemplateElement.bootstrap&&HTMLTemplateElement.bootstrap(a),!a.content&&!a._content){for(var b=document.createDocumentFragment();a.firstChild;)b.appendChild(a.firstChild);a._content=b}return a.content||a._content}}(window.Platform),function(a){"use strict";function b(a){return void 0!==m[a]}function c(){h.call(this),this._isInvalid=!0}function d(a){return""==a&&c.call(this),a.toLowerCase()}function e(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,63,96].indexOf(b)?a:encodeURIComponent(a)}function f(a){var b=a.charCodeAt(0);return b>32&&127>b&&-1==[34,35,60,62,96].indexOf(b)?a:encodeURIComponent(a)}function g(a,g,h){function i(a){t.push(a)}var j=g||"scheme start",k=0,l="",r=!1,s=!1,t=[];a:for(;(a[k-1]!=o||0==k)&&!this._isInvalid;){var u=a[k];switch(j){case"scheme start":if(!u||!p.test(u)){if(g){i("Invalid scheme.");break a}l="",j="no scheme";continue}l+=u.toLowerCase(),j="scheme";break;case"scheme":if(u&&q.test(u))l+=u.toLowerCase();else{if(":"!=u){if(g){if(o==u)break a;i("Code point not allowed in scheme: "+u);break a}l="",k=0,j="no scheme";continue}if(this._scheme=l,l="",g)break a;b(this._scheme)&&(this._isRelative=!0),j="file"==this._scheme?"relative":this._isRelative&&h&&h._scheme==this._scheme?"relative or authority":this._isRelative?"authority first slash":"scheme data"}break;case"scheme data":"?"==u?(query="?",j="query"):"#"==u?(this._fragment="#",j="fragment"):o!=u&&" "!=u&&"\n"!=u&&"\r"!=u&&(this._schemeData+=e(u));break;case"no scheme":if(h&&b(h._scheme)){j="relative";continue}i("Missing scheme."),c.call(this);break;case"relative or authority":if("/"!=u||"/"!=a[k+1]){i("Expected /, got: "+u),j="relative";continue}j="authority ignore slashes";break;case"relative":if(this._isRelative=!0,"file"!=this._scheme&&(this._scheme=h._scheme),o==u){this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query;break a}if("/"==u||"\\"==u)"\\"==u&&i("\\ is an invalid code point."),j="relative slash";else if("?"==u)this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query="?",j="query";else{if("#"!=u){var v=a[k+1],w=a[k+2];("file"!=this._scheme||!p.test(u)||":"!=v&&"|"!=v||o!=w&&"/"!=w&&"\\"!=w&&"?"!=w&&"#"!=w)&&(this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._path.pop()),j="relative path";continue}this._host=h._host,this._port=h._port,this._path=h._path.slice(),this._query=h._query,this._fragment="#",j="fragment"}break;case"relative slash":if("/"!=u&&"\\"!=u){"file"!=this._scheme&&(this._host=h._host,this._port=h._port),j="relative path";continue}"\\"==u&&i("\\ is an invalid code point."),j="file"==this._scheme?"file host":"authority ignore slashes";break;case"authority first slash":if("/"!=u){i("Expected '/', got: "+u),j="authority ignore slashes";continue}j="authority second slash";break;case"authority second slash":if(j="authority ignore slashes","/"!=u){i("Expected '/', got: "+u);continue}break;case"authority ignore slashes":if("/"!=u&&"\\"!=u){j="authority";continue}i("Expected authority, got: "+u);break;case"authority":if("@"==u){r&&(i("@ already seen."),l+="%40"),r=!0;for(var x=0;x<l.length;x++){vary=l[x];if(""!=y&&"\n"!=y&&"\r"!=y)if(":"!=y||null!==this._password){varz=e(y);null!==this._password?this._password+=z:this._username+=z}elsethis._password="";elsei("Invalidwhitespaceinauthority.")}l=""}else{if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){k-=l.length,l="",j="host";continue}l+=u}break;case"filehost":if(o==u||"/"==u||"\\"==u||"?"==u||"#"==u){2!=l.length||!p.test(l[0])||":"!=l[1]&&"|"!=l[1]?0==l.length?j="relativepathstart":(this._host=d.call(this,l),l="",j="relativepathstart"):j="relative path";continue}""==u||"\n"==u||"\r"==u?i("Invalidwhitespaceinfilehost."):l+=u;break;case"host":case"hostname":if(":"!=u||s){if(o==u|
}function n(a){o(a),d(a,function(a){o(a)})}function o(a){C?j(function(){p(a)}):p(a)}function p(a){(a.attachedCallback||a.detachedCallback||a.__upgraded__&&A.dom)&&(A.dom&&console.group("removed:",a.localName),r(a)||(a.__inserted=(a.__inserted||0)-1,a.__inserted>0&&(a.__inserted=0),a.__inserted<0?A.dom&&console.warn("removed:",a.localName,"insert/removecount:",a.__inserted):a.detachedCallback&&a.detachedCallback()),A.dom&&console.groupEnd())}functionq(a){returnwindow.ShadowDOMPolyfill?ShadowDOMPolyfill.wrapIfNeeded(a):a}functionr(a){for(varb=a,c=q(document);b;){if(b==c)return!0;b=b.parentNode||b.host}}functions(a){if(a.shadowRoot&&!a.shadowRoot.__watched){A.dom&&console.log("watchingshadow-rootfor:",a.localName);for(varb=a.shadowRoot;b;)t(b),b=b.olderShadowRoot}}functiont(a){a.__watched||(w(a),a.__watched=!0)}functionu(a){if(A.dom){varb=a[0];if(b&&"childList"===b.type&&b.addedNodes&&b.addedNodes){for(varc=b.addedNodes[0];c&&c!==document&&!c.host;)c=c.parentNode;vard=c&&(c.URL||c._URL||c.host&&c.host.localName)||"";d=d.split("/?").shift().split("/").pop()}console.group("mutations(%d)[%s]",a.length,d||"")}a.forEach(function(a){"childList"===a.type&&(G(a.addedNodes,function(a){a.localName&&g(a)}),G(a.removedNodes,function(a){a.localName&&n(a)}))}),A.dom&&console.groupEnd()}functionv(){u(F.takeRecords()),k()}functionw(a){F.observe(a,{childList:!0,subtree:!0})}functionx(a){w(a)}functiony(a){A.dom&&console.group("upgradeDocument:",a.baseURI.split("/").pop()),g(a),A.dom&&console.groupEnd()}functionz(a){a=q(a);for(varb,c=a.querySelectorAll("link[rel="+B+"]"),d=0,e=c.length;e>d&&(b=c[d]);d++)b.import&&b.import.__parsed&&z(b.import);y(a)}var A=window.logFlags||{},B=window.HTMLImports?HTMLImports.IMPORT_LINK_TYPE:"none",C=!window.MutationObserver||window.MutationObserver===window.JsMutationObserver;a.hasPolyfillMutations=C;var D=!1,E=[],F=new MutationObserver(u),G=Array.prototype.forEach.call.bind(Array.prototype.forEach);a.IMPORT_LINK_TYPE=B,a.watchShadow=s,a.upgradeDocumentTree=z,a.upgradeAll=g,a.upgradeSubtree=f,a.insertedNode=i,a.observeDocument=x,a.upgradeDocument=y,a.takeRecords=v}(window.CustomElements),function(a){function b(b,g){var h=g||{};if(!b)throw new Error("document.registerElement: first argument `name` must not be empty");if(b.indexOf("-")<0)thrownewError("document.registerElement:firstargument('name')mustcontainadash('-').Argumentprovidedwas'"+String(b)+"'.");if(c(b))thrownewError("Failedtoexecute'registerElement'on'Document':Registrationfailedfortype'"+String(b)+"'.Thetypenameisinvalid.");if(n(b))thrownewError("DuplicateDefinitionError:atypewithname'"+String(b)+"'isalreadyregistered");if(!h.prototype)thrownewError("Optionsmissingrequiredprototypeproperty");returnh.__name=b.toLowerCase(),h.lifecycle=h.lifecycle||{},h.ancestry=d(h.extends),e(h),f(h),l(h.prototype),o(h.__name,h),h.ctor=p(h),h.ctor.prototype=h.prototype,h.prototype.constructor=h.ctor,a.ready&&a.upgradeDocumentTree(document),h.ctor}functionc(a){for(varb=0;b<y.length;b++)if(a===y[b])return!0}functiond(a){varb=n(a);returnb?d(b.extends).concat([b]):[]}functione(a){for(varb,c=a.extends,d=0;b=a.ancestry[d];d++)c=b.is&&b.tag;a.tag=c||a.__name,c&&(a.is=a.__name)}functionf(a){if(!Object.__proto__){varb=HTMLElement.prototype;if(a.is){varc=document.createElement(a.tag),d=Object.getPrototypeOf(c);d===a.prototype&&(b=d)}for(vare,f=a.prototype;f&&f!==b;)e=Object.getPrototypeOf(f),f.__proto__=e,f=e;a.native=b}}functiong(a){returnh(B(a.tag),a)}functionh(b,c){returnc.is&&b.setAttribute("is",c.is),i(b,c),b.__upgraded__=!0,k(b),a.insertedNode(b),a.upgradeSubtree(b),b}functioni(a,b){Object.__proto__?a.__proto__=b.prototype:(j(a,b.prototype,b.native),a.__proto__=b.prototype)}functionj(a,b,c){for(vard={},e=b;e!==c&&e!==HTMLElement.prototype;){for(varf,g=Object.getOwnPropertyNames(e),h=0;f=g[h];h++)d[f]||(Object.defineProperty(a,f,Object.getOwnPropertyDescriptor(e,f)),d[f]=1);e=Object.getPrototypeOf(e)}}functionk(a){a.createdCallback&&a.createdCallback()}functionl(a){if(!a.setAttri
},_register:function(){c(this.extends)&&!b(this.extends)&&console.warn("%s is attempting to extend %s, an unregistered element or one that was not registered with Polymer.",this.name,this.extends),this.register(this.name,this.extends),this.registered=!0},waitingForPrototype:function(a){return h(a)?void 0:(i(a,this),this.handleNoScript(a),!0)},handleNoScript:function(a){this.hasAttribute("noscript")&&!this.noscript&&(this.noscript=!0,Polymer(a))},waitingForResources:function(){return this._needsResources},waitingForQueue:function(){return f.enqueue(this,this.registerWhenReady,this._register)},loadResources:function(){this._needsResources=!0,this.loadStyles(function(){this._needsResources=!1,this.registerWhenReady()}.bind(this))}});e.publish(e.declaration,j),g(function(){document.body.removeAttribute("unresolved"),document.dispatchEvent(new CustomEvent("polymer-ready",{bubbles:!0}))}),document.registerElement("polymer-element",{prototype:j})}(Polymer),function(){var a=document.createElement("polymer-element");a.setAttribute("name","auto-binding"),a.setAttribute("extends","template"),a.init(),Polymer("auto-binding",{createdCallback:function(){this.syntax=this.bindingDelegate=this.makeSyntax(),Polymer.whenPolymerReady(function(){this.model=this,this.setAttribute("bind",""),this.async(function(){this.marshalNodeReferences(this.parentNode),this.fire("template-bound")})}.bind(this))},makeSyntax:function(){var a=Object.create(Polymer.api.declaration.events),b=this;a.findController=function(){return b.model};var c=new PolymerExpressions,d=c.prepareBinding;return c.prepareBinding=function(b,e,f){return a.prepareEventBinding(b,e,f)||d.call(c,b,e,f)},c}})}();</script><polymer-elementname="gui-row"attributes="name comment"assetpath="../elements/gui-row/"><template><div><style>#row{font:10px'LucidaGrande',sans-serif;color:#ecebe0;-webkit-font-smoothing:antialiased;height:2.9em;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;-webkit-transition:background-color.2slinear;-moz-transition:background-color.2slinear;-o-transition:background-color.2slinear;-ms-transition:background-color.2slinear;transition:background-color.2slinear;border-bottom:1pxsolidrgba(255,255,255,.05)}:host-context(.touch-true)#row{font-size:13.5px}#controller{height:100%}#name{padding:08px;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;width:38%;cursor:default}.comment-true#name{cursor:pointer}:host-context(.touch-true)#name{font-size:11px;width:30%}#nameInner{overflow:hidden;-o-text-overflow:ellipsis;text-overflow:ellipsis}#comment{font:10px'LucidaGrande',sans-serif;color:#ecebe0;-webkit-font-smoothing:antialiased;line-height:1.6em;background:#e0cf99;color:#333;-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box;overflow:hidden;-webkit-transition:height.15scubic-bezier(0.25,.25,0,1);-moz-transition:height.15scubic-bezier(0.25,.25,0,1);-o-transition:height.15scubic-bezier(0.25,.25,0,1);-ms-transition:height.15scubic-bezier(0.25,.25,0,1);transition:height.15scubic-bezier(0.25,.25,0,1);position:absolute;z-index:999;pointer-events:none;-webkit-transform:translate3d(0,20px,0);-moz-transform:translate3d(0,20px,0);-o-transform:translate3d(0,20px,0);-ms-transform:translate3d(0,20px,0);transform:translate3d(0,20px,0);opacity:0;-ms-filter:"alpha(Opacity=0)";filter:alpha(opacity=0);-webkit-transition:all.2scubic-bezier(0.25,.25,0,1);-moz-transition:all.2scubic-bezier(0.25,.25,0,1);-o-transition:all.2scubic-bezier(0.25,.25,0,1);-ms-transition:all.2scubic-bezier(0.25,.25,0,1);transition:all.2scubic-bezier(0.25,.25,0,1)}:host-context(.touch-true)#comment{font-size:13.5px}#comment.open-true{opacity:1;-ms-filter:none;filter:none;-webkit-transform:translate3d(0,0,0);-moz-transform:translate3d(0,0,0);-o-transform:translate3d(0,0,0);-ms-transform:translate3d(0,0,0);transform:translate3d(0,0,0)}:host-context(.touch-false)#comment.open-true{-webkit-transition-delay:200ms;-moz-transition-delay:200ms;-o-transition-delay:200ms;-ms-transition-delay:20
<divhidden><script>Polymer("dat-gui-base",{ready:function(){this.update()},update:function(){},init:function(){},serialize:function(){returnJSON.stringify(this.value)},unserialize:function(obj){this.value=JSON.parse(obj)},ignore:function(){},watch:function(object,path){this.object=object;this.path=path;this.bind("value",newPathObserver(this.object,this.path))},valueChanged:function(){this.fire("change",this.value);this.update()},on:function(event,listener){this.addEventListener(event,listener);returnthis},map:function(x,a,b,c,d){return(x-a)/(b-a)*(d-c)+c},listen:function(){Gui.warn("controller.listen() is deprecated. All controllers are listened for free.");returnthis},getValue:function(){returnthis.value},setValue:function(v){this.value=v;returnthis},onChange:function(v){this.addEventListener("change",function(e){v(e.detail)});returnthis},onFinishChange:function(v){returnthis.onChange(v)}});</script><polymer-elementname="dat-gui-base"attributes="object path value"assetpath="../elements/dat-gui-base/"></polymer-element><script>Gui.register("dat-gui-number",function(value){returntypeofvalue=="number"});Polymer("dat-gui-number",{value:0,decimals:3,computed:{slider:"min !== undefined && max !== undefined"},ready:function(){var_this=this;window.addEventListener("keydown",function(e){if(e.keyCode==18){_this._alt=true}},false);window.addEventListener("keyup",function(e){if(e.keyCode==18){_this._alt=false}},false)},init:function(min,max,step){this.min=min;this.max=max;this.step=step},valueChanged:function(newValue){if(this.step!==undefined){this.value=Math.round(this.value/this.step)*this.step}if(this.min!==undefined){this.value=Math.max(this.value,this.min)}if(this.max!==undefined){this.value=Math.min(this.value,this.max)}this.super()},minChanged:function(){this.value=Math.max(this.value,this.min);this.update()},maxChanged:function(){this.value=Math.min(this.value,this.max);this.update()},update:function(){varratio=this.map(this.value,this.min,this.max,0,1);if(this.min<0&&this.max>0){this.$.container.classList.add("straddle-zero");varzero=this.map(0,this.min,this.max,0,1);if(this.value>=0){this.$.fill.style.left=zero*100+"%";this.$.fill.style.width=(ratio-zero)*100+"%";this.$.fill.style.right=""}else{this.$.fill.style.left="";this.$.fill.style.width=(zero-ratio)*100+"%";this.$.fill.style.right=(1-zero)*100+"%"}}else{this.$.container.classList.remove("straddle-zero");if(this.max>0){this.$.fill.style.left=0;this.$.fill.style.width=ratio*100+"%";this.$.fill.style.right=""}else{this.$.fill.style.left="";this.$.fill.style.width=(1-ratio)*100+"%";this.$.fill.style.right=0}}this.$.knob.style.left=ratio*100+"%";this.$.container.classList.toggle("positive",this.value>=0);this.$.container.classList.toggle("negative",this.value<0);this.super()},click:function(e){this.$.input.select()},keydown:function(e){if(e.keyCode==13){this.$.input.blur()}},down:function(e){e.preventDefault();this._rect=this.$.track.getBoundingClientRect();if(!this._alt){this.value=this.valueFromX(e.x)}this.fire("sliderDown")},up:function(e){this.fire("sliderUp")},trackstart:function(e){this._dragFriction=1},trackx:function(e){if(this.step===undefined){vardv=this.valueFromDX(e.ddx);if(this._alt){dv/=10}this.value+=dv*this._dragFriction}else{this.value=this.valueFromX(e.pageX)}},tracky:function(e){this._dragFriction=Math.max(.01,Math.min(1,this.map(e.dy,50,300,1,.1)))},blur:function(e){varv=parseFloat(this.$.input.value);if(v===v){this.value=v}},truncate:function(v){if(v%1!==0&&this.decimals!==undefined){returnthis.limitDecimals(v,this.decimals)}else{returnv}},limitDecimals:function(v,maxDecimals){varstr=v.toString();varnumDecimals=str.substring(str.indexOf(".")+1).length;str=v.toFixed(Math.min(numDecimals,this.decimals));for(varz,i=0,l=str.length;i<l;i++){if(str.charAt(i)!=="0"){z=i}}returnstr.substring(0,z+1)},valueFromX:function(x){returnthis.map(x,this._rect.left,this._rect.right,this.min,this.max)},valueFromDX:function(dx){returnthis.map(dx,0,this._rect.width,0,this.max-this.min)}});</script><polymer-elementname="dat-gui-number"attrib
<divhidden><script>Polymer("dat-gui-option",{key:null,ready:function(){this.options={}},init:function(options){if(Array.isArray(options)){options.forEach(function(opt){this.options[opt]=opt},this)}else{this.options=options}},serialize:function(){returnJSON.stringify(this.key)},unserialize:function(obj){this.value=this.options[JSON.parse(obj)]},valueChanged:function(){for(variinthis.options){if(this.options[i]===this.value){this.key=i;break}}this.super()},keyChanged:function(){this.value=this.options[this.key]},keys:function(object){if(object){returnObject.keys(object)}}});</script><polymer-elementname="dat-gui-option"extends="dat-gui-base"attributes="options key"assetpath="../elements/dat-gui-option/"><template><style>#container{height:100%;cursor:pointer;padding-left:8px}select{outline:0}</style><divid="container"horizontal=""layout=""center=""><selectvalue="{{ key }}"on-change="{{ change }}"><templaterepeat="{{ name in options | keys }}"><optionvalue="{{ name }}">{{ name }}</option></template></select></div></template></polymer-element></div>