!function(e){var t={};function n(r){if(t[r])return t[r].exports;var o=t[r]={i:r,l:!1,exports:{}};return e[r].call(o.exports,o,o.exports,n),o.l=!0,o.exports}n.m=e,n.c=t,n.d=function(e,t,r){n.o(e,t)||Object.defineProperty(e,t,{enumerable:!0,get:r})},n.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.t=function(e,t){if(1&t&&(e=n(e)),8&t)return e;if(4&t&&"object"==typeof e&&e&&e.__esModule)return e;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:e}),2&t&&"string"!=typeof e)for(var o in e)n.d(r,o,function(t){return e[t]}.bind(null,o));return r},n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,"a",t),t},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n.p="",n(n.s=0)}([function(e,t,n){e.exports=n(1)},function(e,t){px.import({scene:"px:scene.1.js",keys:"px:tools.keys.js"}).then(function(t){e.exports.wantsClearscreen=function(){return!0};var n=t.scene,r=t.scene.root,o=t.keys,a=px.getPackageBaseFilePath();const i=n.animation.TWEEN_LINEAR,c=n.animation.OPTION_FASTFORWARD,u=n.stretch.STRETCH;var f=null,l=null,s=null,p=null,y=!1,h=!0;function m(e){return new Promise(function(e,t){s.animateTo({a:1},.25,i,c,1).then(t=>{l.a=0,t.animateTo({a:0},1.5,i,c,1),t.animateTo({y:n.h/2,h:2},.5,i,c,1).then(t=>{t.animateTo({x:n.w/2,w:2},.35,i,c,1).then(t=>{e()})})})})}function d(e){return new Promise(function(e,t){s.animateTo({a:1},1.5,i,c,1),s.animateTo({x:0,w:n.w},.35,i,c,1).then(t=>{t.animateTo({y:0,h:n.h},.5,i,c,1).then(t=>{l.animateTo({a:1},.35,i,c,1),s.animateTo({a:0},.35,i,c,1),e()})})})}function x(e,t){n.create({t:"rect",parent:r,x:0,y:0,w:e,h:t,fillColor:"#000",a:1,interactive:!1});f=n.create({t:"object",parent:r,x:0,y:0,w:e,h:t,focus:!0,interactive:!0}),l=n.create({t:"image",parent:f,x:0,y:0,w:e,h:t,url:a+"/Background.jpg",interactive:!1,stretchX:u,stretchY:u}),s=n.create({t:"rect",parent:f,x:0,y:0,w:e,h:t,fillColor:"#fff",a:0,interactive:!1}),p=n.create({t:"text",w:600,h:40,parent:l,x:n.w/2-180,y:.92*n.h,pixelSize:24,textColor:"#fff",text:"Press Any Key to Toggle ON/OFF",interactive:!1,a:0}),Promise.all([l.ready,s.ready,f.ready,p.ready]).then(e=>{p.animateTo({a:.8},2),f.on("onKeyDown",function(e){if(1==y||e.keyCode!=o.SPACE)return;y=!0,(0==h?d:m)(e).then(e=>{y=!1,h=!h})}),s.cx=n.w/2,s.cy=n.h/2})}n.on("onResize",function(e){x(e.w,e.h)}),x(n.w,n.h)}).catch(function(e){console.error("Import for SparkPowerOff.js failed: "+e)})}]); //# sourceMappingURL=output.js.map