UNPKG

@knapsack/app

Version:

Build Design Systems on top of knapsack, by Basalt

2 lines • 40.5 kB
(window.webpackJsonp=window.webpackJsonp||[]).push([["vendors~App-7KZ9F~d99e2b41"],{"../node_modules/@aws-amplify/storage/lib-esm/index.js":function(e,t,r){var n=r("../node_modules/@aws-amplify/core/lib-esm/index.js"),o=r("../node_modules/aws-sdk/clients/s3.js"),__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},__awaiter=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n.throw(e))}catch(e){i(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function verb(i){return function(a){return function step(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},i=new n.c("AWSS3Provider"),s="undefined"!=typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("amplify_default"):"@@amplify_default",dispatchStorageEvent=function(e,t,r,o,i){e&&n.f.dispatch("storage",{event:t,data:{attrs:r,metrics:o},message:i},"Storage",s)},a=function(){function AWSS3Provider(e){this._config=e||{},i.debug("Storage Options",this._config)}return AWSS3Provider.prototype.getCategory=function(){return AWSS3Provider.CATEGORY},AWSS3Provider.prototype.getProviderName=function(){return AWSS3Provider.PROVIDER_NAME},AWSS3Provider.prototype.configure=function(e){if(i.debug("configure Storage",e),!e)return this._config;var t=n.j.parseMobilehubConfig(e);return this._config=Object.assign({},this._config,t.Storage),this._config.bucket||i.debug("Do not have bucket yet"),this._config},AWSS3Provider.prototype.get=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,o,s,a,u,l,c,f;return __generator(this,(function(d){switch(d.label){case 0:return[4,this._ensureCredentials()];case 1:return d.sent()?(r=Object.assign({},this._config,t),n=r.bucket,o=r.download,s=r.track,a=r.expires,u=this._prefix(r),l=u+e,c=this._createS3(r),i.debug("get "+e+" from "+l),f={Bucket:n,Key:l},!0===o?[2,new Promise((function(t,r){c.getObject(f,(function(n,o){n?(dispatchStorageEvent(s,"download",{method:"get",result:"failed"},null,"Download failed with "+n.message),r(n)):(dispatchStorageEvent(s,"download",{method:"get",result:"success"},{fileSize:Number(o.Body.length)},"Download success for "+e),t(o))}))}))]:(a&&(f.Expires=a),[2,new Promise((function(t,r){try{var n=c.getSignedUrl("getObject",f);dispatchStorageEvent(s,"getSignedUrl",{method:"get",result:"success"},null,"Signed URL: "+n),t(n)}catch(t){i.warn("get signed url error",t),dispatchStorageEvent(s,"getSignedUrl",{method:"get",result:"failed"},null,"Could not get a signed URL for "+e),r(t)}}))])):[2,Promise.reject("No credentials")]}}))}))},AWSS3Provider.prototype.put=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n,o,s,a,u,l,c,f,d,p,h,g,v,b,y,m,w,S,_,P,A,j;return __generator(this,(function(C){switch(C.label){case 0:return[4,this._ensureCredentials()];case 1:if(!C.sent())return[2,Promise.reject("No credentials")];n=Object.assign({},this._config,r),o=n.bucket,s=n.track,a=n.progressCallback,u=n.contentType,l=n.contentDisposition,c=n.cacheControl,f=n.expires,d=n.metadata,p=n.tagging,h=n.serverSideEncryption,g=n.SSECustomerAlgorithm,v=n.SSECustomerKey,b=n.SSECustomerKeyMD5,y=n.SSEKMSKeyId,m=u||"binary/octet-stream",w=this._prefix(n),S=w+e,_=this._createS3(n),i.debug("put "+e+" to "+S),P={Bucket:o,Key:S,Body:t,ContentType:m},c&&(P.CacheControl=c),l&&(P.ContentDisposition=l),f&&(P.Expires=f),d&&(P.Metadata=d),p&&(P.Tagging=p),h&&(P.ServerSideEncryption=h,g&&(P.SSECustomerAlgorithm=g),v&&(P.SSECustomerKey=v),b&&(P.SSECustomerKeyMD5=b),y&&(P.SSEKMSKeyId=y)),C.label=2;case 2:return C.trys.push([2,4,,5]),[4,_.upload(P).on("httpUploadProgress",(function(e){a&&("function"==typeof a?a(e):i.warn("progressCallback should be a function, not a "+typeof a))})).promise()];case 3:return A=C.sent(),i.debug("upload result",A),dispatchStorageEvent(s,"upload",{method:"put",result:"success"},null,"Upload success for "+e),[2,{key:A.Key.substr(w.length)}];case 4:throw j=C.sent(),i.warn("error uploading",j),dispatchStorageEvent(s,"upload",{method:"put",result:"failed"},null,"Error uploading "+e),j;case 5:return[2]}}))}))},AWSS3Provider.prototype.remove=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,o,s,a,u,l;return __generator(this,(function(c){switch(c.label){case 0:return[4,this._ensureCredentials()];case 1:return c.sent()?(r=Object.assign({},this._config,t),n=r.bucket,o=r.track,s=this._prefix(r),a=s+e,u=this._createS3(r),i.debug("remove "+e+" from "+a),l={Bucket:n,Key:a},[2,new Promise((function(t,r){u.deleteObject(l,(function(n,i){n?(dispatchStorageEvent(o,"delete",{method:"remove",result:"failed"},null,"Deletion of "+e+" failed with "+n),r(n)):(dispatchStorageEvent(o,"delete",{method:"remove",result:"success"},null,"Deleted "+e+" successfully"),t(i))}))}))]):[2,Promise.reject("No credentials")]}}))}))},AWSS3Provider.prototype.list=function(e,t){return __awaiter(this,void 0,void 0,(function(){var r,n,o,s,a,u,l;return __generator(this,(function(c){switch(c.label){case 0:return[4,this._ensureCredentials()];case 1:return c.sent()?(r=Object.assign({},this._config,t),n=r.bucket,o=r.track,s=this._prefix(r),a=s+e,u=this._createS3(r),i.debug("list "+e+" from "+a),l={Bucket:n,Prefix:a},[2,new Promise((function(e,t){u.listObjects(l,(function(r,n){if(r)i.warn("list error",r),dispatchStorageEvent(o,"list",{method:"list",result:"failed"},null,"Listing items failed: "+r.message),t(r);else{var a=n.Contents.map((function(e){return{key:e.Key.substr(s.length),eTag:e.ETag,lastModified:e.LastModified,size:e.Size}}));dispatchStorageEvent(o,"list",{method:"list",result:"success"},null,a.length+" items returned from list operation"),i.debug("list",a),e(a)}}))}))]):[2,Promise.reject("No credentials")]}}))}))},AWSS3Provider.prototype._ensureCredentials=function(){var e=this;return n.e.get().then((function(t){if(!t)return!1;var r=n.e.shear(t);return i.debug("set credentials for storage",r),e._config.credentials=r,!0})).catch((function(e){return i.warn("ensure credentials error",e),!1}))},AWSS3Provider.prototype._prefix=function(e){var t=e.credentials,r=e.level,n=e.customPrefix||{},o=e.identityId||t.identityId,i=(void 0!==n.private?n.private:"private/")+o+"/",s=(void 0!==n.protected?n.protected:"protected/")+o+"/",a=void 0!==n.public?n.public:"public/";switch(r){case"private":return i;case"protected":return s;default:return a}},AWSS3Provider.prototype._createS3=function(e){var t=e.bucket,r=e.region,n=e.credentials,i={};return e.dangerouslyConnectToHttpEndpointForTesting&&(i={endpoint:"http://localhost:20005",s3BucketEndpoint:!0,s3ForcePathStyle:!0}),new o(__assign({apiVersion:"2006-03-01",params:{Bucket:t},signatureVersion:"v4",region:r,credentials:n},i))},AWSS3Provider.CATEGORY="Storage",AWSS3Provider.PROVIDER_NAME="AWSS3",AWSS3Provider}(),Storage_assign=function(){return(Storage_assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},Storage_awaiter=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n.throw(e))}catch(e){i(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))},Storage_generator=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function verb(i){return function(a){return function step(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},u=new n.c("StorageClass"),l=function(){function StorageClass(){this._config={},this._pluggables=[],u.debug("Storage Options",this._config),this.get=this.get.bind(this),this.put=this.put.bind(this),this.remove=this.remove.bind(this),this.list=this.list.bind(this)}return StorageClass.prototype.getModuleName=function(){return"Storage"},StorageClass.prototype.addPluggable=function(e){if(e&&"Storage"===e.getCategory()){this._pluggables.push(e);return e.configure(this._config[e.getProviderName()])}},StorageClass.prototype.getPluggable=function(e){var t=this._pluggables.find((function(t){return t.getProviderName()===e}));return void 0===t?(u.debug("No plugin found with providerName",e),null):t},StorageClass.prototype.removePluggable=function(e){this._pluggables=this._pluggables.filter((function(t){return t.getProviderName()!==e}))},StorageClass.prototype.configure=function(e){var t=this;if(u.debug("configure Storage"),!e)return this._config;var r=n.j.parseMobilehubConfig(e),o=Object.keys(r.Storage),i=["bucket","region","level","track","customPrefix","serverSideEncryption","SSECustomerAlgorithm","SSECustomerKey","SSECustomerKeyMD5","SSEKMSKeyId"],isInStorageArrayKeys=function(e){return i.some((function(t){return t===e}))};return o&&o.find((function(e){return isInStorageArrayKeys(e)}))&&!r.Storage.AWSS3&&(r.Storage.AWSS3={}),Object.entries(r.Storage).map((function(e){var t=e[0],n=e[1];t&&isInStorageArrayKeys(t)&&void 0!==n&&(r.Storage.AWSS3[t]=n,delete r.Storage[t])})),Object.keys(r.Storage).forEach((function(e){"string"!=typeof r.Storage[e]&&(t._config[e]=Storage_assign(Storage_assign({},t._config[e]),r.Storage[e]))})),this._pluggables.forEach((function(e){e.configure(t._config[e.getProviderName()])})),0===this._pluggables.length&&this.addPluggable(new a),this._config},StorageClass.prototype.get=function(e,t){return Storage_awaiter(this,void 0,void 0,(function(){var r,n,o;return Storage_generator(this,(function(i){return r=(t||{}).provider,n=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(u.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,o.get(e,t)]}))}))},StorageClass.prototype.put=function(e,t,r){return Storage_awaiter(this,void 0,void 0,(function(){var n,o,i;return Storage_generator(this,(function(s){return n=(r||{}).provider,o=void 0===n?"AWSS3":n,void 0===(i=this._pluggables.find((function(e){return e.getProviderName()===o})))&&(u.debug("No plugin found with providerName",o),Promise.reject("No plugin found in Storage for the provider")),[2,i.put(e,t,r)]}))}))},StorageClass.prototype.remove=function(e,t){return Storage_awaiter(this,void 0,void 0,(function(){var r,n,o;return Storage_generator(this,(function(i){return r=(t||{}).provider,n=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(u.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,o.remove(e,t)]}))}))},StorageClass.prototype.list=function(e,t){return Storage_awaiter(this,void 0,void 0,(function(){var r,n,o;return Storage_generator(this,(function(i){return r=(t||{}).provider,n=void 0===r?"AWSS3":r,void 0===(o=this._pluggables.find((function(e){return e.getProviderName()===n})))&&(u.debug("No plugin found with providerName",n),Promise.reject("No plugin found in Storage for the provider")),[2,o.list(e,t)]}))}))},StorageClass}(),lib_esm_assign=function(){return(lib_esm_assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},c=new n.c("Storage"),f=null;if(!f){c.debug("Create Storage Instance"),(f=new l).vault=new l;var d=f.configure;f.configure=function(e){c.debug("storage configure called");var t=lib_esm_assign({},d.call(f,e));Object.keys(t).forEach((function(e){"string"!=typeof t[e]&&(t[e]=lib_esm_assign(lib_esm_assign({},t[e]),{level:"private"}))})),c.debug("storage vault configure called"),f.vault.configure(t)}}var p=f;n.o.register(p);t.a=p},"../node_modules/@aws-amplify/xr/lib-esm/index.js":function(e,t,r){var n,o=r("../node_modules/@aws-amplify/core/lib-esm/index.js"),__assign=function(){return(__assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},i=new o.c("AbstractXRProvider"),s=function(){function AbstractXRProvider(e){void 0===e&&(e={}),this._config=e}return AbstractXRProvider.prototype.configure=function(e){return void 0===e&&(e={}),this._config=__assign(__assign({},e),this._config),i.debug("configure "+this.getProviderName(),this._config),this.options},AbstractXRProvider.prototype.getCategory=function(){return"XR"},Object.defineProperty(AbstractXRProvider.prototype,"options",{get:function(){return __assign({},this._config)},enumerable:!0,configurable:!0}),AbstractXRProvider}(),a=(n=function(e,t){return(n=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)},function(e,t){function __(){this.constructor=e}n(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}),u=function(e){function XRError(){return null!==e&&e.apply(this,arguments)||this}return a(XRError,e),XRError}(Error),l=function(e){function XRNoSceneConfiguredError(){return null!==e&&e.apply(this,arguments)||this}return a(XRNoSceneConfiguredError,e),XRNoSceneConfiguredError}(u),c=function(e){function XRSceneNotFoundError(){return null!==e&&e.apply(this,arguments)||this}return a(XRSceneNotFoundError,e),XRSceneNotFoundError}(u),f=function(e){function XRSceneNotLoadedError(){return null!==e&&e.apply(this,arguments)||this}return a(XRSceneNotLoadedError,e),XRSceneNotLoadedError}(u),d=function(e){function XRNoDomElement(){return null!==e&&e.apply(this,arguments)||this}return a(XRNoDomElement,e),XRNoDomElement}(u),p=function(e){function XRSceneLoadFailure(){return null!==e&&e.apply(this,arguments)||this}return a(XRSceneLoadFailure,e),XRSceneLoadFailure}(u),h=function(e){function XRProviderNotConfigured(){return null!==e&&e.apply(this,arguments)||this}return a(XRProviderNotConfigured,e),XRProviderNotConfigured}(u),g=function(){var extendStatics=function(e,t){return(extendStatics=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var r in t)t.hasOwnProperty(r)&&(e[r]=t[r])})(e,t)};return function(e,t){function __(){this.constructor=e}extendStatics(e,t),e.prototype=null===t?Object.create(t):(__.prototype=t.prototype,new __)}}(),SumerianProvider_assign=function(){return(SumerianProvider_assign=Object.assign||function(e){for(var t,r=1,n=arguments.length;r<n;r++)for(var o in t=arguments[r])Object.prototype.hasOwnProperty.call(t,o)&&(e[o]=t[o]);return e}).apply(this,arguments)},__awaiter=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n.throw(e))}catch(e){i(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))},__generator=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function verb(i){return function(a){return function step(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},v=new o.c("SumerianProvider"),b=function(e){function SumerianProvider(t){return void 0===t&&(t={}),e.call(this,t)||this}return g(SumerianProvider,e),SumerianProvider.prototype.getProviderName=function(){return"SumerianProvider"},SumerianProvider.prototype.loadScript=function(e){return __awaiter(this,void 0,void 0,(function(){return __generator(this,(function(t){return[2,new Promise((function(t,r){var n=document.createElement("script");n.src=e,n.addEventListener("load",(function(e){t()})),n.addEventListener("error",(function(t){r(new Error("Failed to load script: "+e))})),document.head.appendChild(n)}))]}))}))},SumerianProvider.prototype.loadScene=function(e,t,r){return __awaiter(this,void 0,void 0,(function(){var n,i,s,a,u,l,c,f,h,g,b,y,m,w,S,_,P,A,j,C,k,E,x,O,R;return __generator(this,(function(U){switch(U.label){case 0:if(!e)throw l="No scene name passed into loadScene",v.error(l),new p(l);if(!t)throw l="No dom element id passed into loadScene",v.error(l),new d(l);if(!(n=document.getElementById(t)))throw l="DOM element id, "+t+" not found",v.error(l),new d(l);if(!(i=this.getScene(e)).sceneConfig)throw l="No scene config configured for scene: "+e,v.error(l),new p(l);if(s=i.sceneConfig.url,a=i.sceneConfig.sceneId,i.sceneConfig.hasOwnProperty("region"))u=i.sceneConfig.region;else{if(!this.options.hasOwnProperty("region"))throw l="No region configured for scene: "+e,v.error(l),new p(l);u=this.options.region}c={region:u,customUserAgent:o.d.userAgent+"-SumerianScene"},f={headers:{"X-Amz-User-Agent":o.d.userAgent}},h=s,U.label=1;case 1:return U.trys.push([1,3,,4]),[4,o.e.get()];case 2:return g=U.sent(),c.credentials=g,b={secret_key:g.secretAccessKey,access_key:g.accessKeyId,session_token:g.sessionToken},y={region:u,service:"sumerian"},m=o.m.sign({method:"GET",url:s},b,y),f.headers=SumerianProvider_assign(SumerianProvider_assign({},f.headers),m.headers),h=m.url,[3,4];case 3:return U.sent(),v.debug("No credentials available, the request will be unsigned"),[3,4];case 4:return[4,fetch(h,f)];case 5:return[4,(w=U.sent()).json()];case 6:if(S=U.sent(),403===w.status)throw S.message?(v.error("Failure to authenticate user: "+S.message),new p("Failure to authenticate user: "+S.message)):(v.error("Failure to authenticate user"),new p("Failure to authenticate user"));return _=S.bundleData[a],[4,fetch(_.url,{headers:_.headers})];case 7:return[4,U.sent().json()];case 8:P=U.sent(),U.label=9;case 9:return U.trys.push([9,11,,12]),[4,this.loadScript(P[a].bootstrapperUrl)];case 10:return U.sent(),[3,12];case 11:throw A=U.sent(),v.error(A),new p(A);case 12:return j=r.progressCallback?r.progressCallback:void 0,C=i.publishParamOverrides?i.publishParamOverrides:void 0,k={element:n,sceneId:a,sceneBundle:P,apiResponse:S,progressCallback:j,publishParamOverrides:C,awsSDKConfigOverride:c},[4,window.SumerianBootstrapper.loadScene(k)];case 13:for(E=U.sent(),i.sceneController=E,i.isLoaded=!0,x=0,O=E.sceneLoadWarnings;x<O.length;x++)R=O[x],v.warn("loadScene warning: "+R);return[2]}}))}))},SumerianProvider.prototype.isSceneLoaded=function(e){return this.getScene(e).isLoaded||!1},SumerianProvider.prototype.getScene=function(e){if(!this.options.scenes){var t="No scenes were defined in the configuration";throw v.error(t),new l(t)}if(!e){t="No scene name was passed";throw v.error(t),new c(t)}if(!this.options.scenes[e]){t="Scene '"+e+"' is not configured";throw v.error(t),new c(t)}return this.options.scenes[e]},SumerianProvider.prototype.getSceneController=function(e){if(!this.options.scenes){var t="No scenes were defined in the configuration";throw v.error(t),new l(t)}var r=this.options.scenes[e];if(!r){t="Scene '"+e+"' is not configured";throw v.error(t),new c(t)}var n=r.sceneController;if(!n){t="Scene controller for '"+e+"' has not been loaded";throw v.error(t),new f(t)}return n},SumerianProvider.prototype.isVRCapable=function(e){return this.getSceneController(e).vrCapable},SumerianProvider.prototype.isVRPresentationActive=function(e){return this.getSceneController(e).vrPresentationActive},SumerianProvider.prototype.start=function(e){this.getSceneController(e).start()},SumerianProvider.prototype.enterVR=function(e){this.getSceneController(e).enterVR()},SumerianProvider.prototype.exitVR=function(e){this.getSceneController(e).exitVR()},SumerianProvider.prototype.isMuted=function(e){return this.getSceneController(e).muted},SumerianProvider.prototype.setMuted=function(e,t){this.getSceneController(e).muted=t},SumerianProvider.prototype.onSceneEvent=function(e,t,r){this.getSceneController(e).on(t,r)},SumerianProvider.prototype.enableAudio=function(e){this.getSceneController(e).enableAudio()},SumerianProvider}(s),XR_awaiter=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function fulfilled(e){try{step(n.next(e))}catch(e){i(e)}}function rejected(e){try{step(n.throw(e))}catch(e){i(e)}}function step(e){e.done?o(e.value):function adopt(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(fulfilled,rejected)}step((n=n.apply(e,t||[])).next())}))},XR_generator=function(e,t){var r,n,o,i,s={label:0,sent:function(){if(1&o[0])throw o[1];return o[1]},trys:[],ops:[]};return i={next:verb(0),throw:verb(1),return:verb(2)},"function"==typeof Symbol&&(i[Symbol.iterator]=function(){return this}),i;function verb(i){return function(a){return function step(i){if(r)throw new TypeError("Generator is already executing.");for(;s;)try{if(r=1,n&&(o=2&i[0]?n.return:i[0]?n.throw||((o=n.return)&&o.call(n),0):n.next)&&!(o=o.call(n,i[1])).done)return o;switch(n=0,o&&(i=[2&i[0],o.value]),i[0]){case 0:case 1:o=i;break;case 4:return s.label++,{value:i[1],done:!1};case 5:s.label++,n=i[1],i=[0];continue;case 7:i=s.ops.pop(),s.trys.pop();continue;default:if(!(o=(o=s.trys).length>0&&o[o.length-1])&&(6===i[0]||2===i[0])){s=0;continue}if(3===i[0]&&(!o||i[1]>o[0]&&i[1]<o[3])){s.label=i[1];break}if(6===i[0]&&s.label<o[1]){s.label=o[1],o=i;break}if(o&&s.label<o[2]){s.label=o[2],s.ops.push(i);break}o[2]&&s.ops.pop(),s.trys.pop();continue}i=t.call(e,s)}catch(e){i=[6,e],n=0}finally{r=o=0}if(5&i[0])throw i[1];return{value:i[0]?i[1]:void 0,done:!0}}([i,a])}}},y=new o.c("XR"),m="SumerianProvider",w=function(){function XR(e){this._options=e,y.debug("XR Options",this._options),this._defaultProvider=m,this._pluggables={},this.addPluggable(new b)}return XR.prototype.configure=function(e){var t=this,r=e?e.XR||e:{};return y.debug("configure XR",{opt:r}),this._options=Object.assign({},this._options,r),Object.entries(this._pluggables).map((function(e){var n=e[0],o=e[1];n!==t._defaultProvider||r[t._defaultProvider]?o.configure(t._options[n]):o.configure(t._options)})),this._options},XR.prototype.addPluggable=function(e){return XR_awaiter(this,void 0,void 0,(function(){return XR_generator(this,(function(t){return e&&"XR"===e.getCategory()?(this._pluggables[e.getProviderName()]=e,[2,e.configure(this._options)]):[2]}))}))},XR.prototype.loadScene=function(e,t,r,n){return void 0===r&&(r={}),void 0===n&&(n=this._defaultProvider),XR_awaiter(this,void 0,void 0,(function(){return XR_generator(this,(function(o){switch(o.label){case 0:if(!this._pluggables[n])throw new h("Provider '"+n+"' not configured");return[4,this._pluggables[n].loadScene(e,t,r)];case 1:return[2,o.sent()]}}))}))},XR.prototype.isSceneLoaded=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].isSceneLoaded(e)},XR.prototype.getSceneController=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].getSceneController(e)},XR.prototype.isVRCapable=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].isVRCapable(e)},XR.prototype.isVRPresentationActive=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].isVRPresentationActive(e)},XR.prototype.start=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].start(e)},XR.prototype.enterVR=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].enterVR(e)},XR.prototype.exitVR=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].exitVR(e)},XR.prototype.isMuted=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].isMuted(e)},XR.prototype.setMuted=function(e,t,r){if(void 0===r&&(r=this._defaultProvider),!this._pluggables[r])throw new h("Provider '"+r+"' not configured");return this._pluggables[r].setMuted(e,t)},XR.prototype.onSceneEvent=function(e,t,r,n){if(void 0===n&&(n=this._defaultProvider),!this._pluggables[n])throw new h("Provider '"+n+"' not configured");return this._pluggables[n].onSceneEvent(e,t,r)},XR.prototype.enableAudio=function(e,t){if(void 0===t&&(t=this._defaultProvider),!this._pluggables[t])throw new h("Provider '"+t+"' not configured");return this._pluggables[t].enableAudio(e)},XR}(),S=new o.c("XR"),_=null;_||(S.debug("Create XR Instance"),_=new w(null));var P=_;o.o.register(P);t.a=P},"../node_modules/@aws-crypto/crc32/build/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/tslib/tslib.es6.js");t.crc32=function crc32(e){return(new o).update(e).digest()};var o=function(){function Crc32(){this.checksum=4294967295}return Crc32.prototype.update=function(e){var t,r;try{for(var o=n.__values(e),s=o.next();!s.done;s=o.next()){var a=s.value;this.checksum=this.checksum>>>8^i[255&(this.checksum^a)]}}catch(e){t={error:e}}finally{try{s&&!s.done&&(r=o.return)&&r.call(o)}finally{if(t)throw t.error}}return this},Crc32.prototype.digest=function(){return(4294967295^this.checksum)>>>0},Crc32}();t.Crc32=o;var i=Uint32Array.from([0,1996959894,3993919788,2567524794,124634137,1886057615,3915621685,2657392035,249268274,2044508324,3772115230,2547177864,162941995,2125561021,3887607047,2428444049,498536548,1789927666,4089016648,2227061214,450548861,1843258603,4107580753,2211677639,325883990,1684777152,4251122042,2321926636,335633487,1661365465,4195302755,2366115317,997073096,1281953886,3579855332,2724688242,1006888145,1258607687,3524101629,2768942443,901097722,1119000684,3686517206,2898065728,853044451,1172266101,3705015759,2882616665,651767980,1373503546,3369554304,3218104598,565507253,1454621731,3485111705,3099436303,671266974,1594198024,3322730930,2970347812,795835527,1483230225,3244367275,3060149565,1994146192,31158534,2563907772,4023717930,1907459465,112637215,2680153253,3904427059,2013776290,251722036,2517215374,3775830040,2137656763,141376813,2439277719,3865271297,1802195444,476864866,2238001368,4066508878,1812370925,453092731,2181625025,4111451223,1706088902,314042704,2344532202,4240017532,1658658271,366619977,2362670323,4224994405,1303535960,984961486,2747007092,3569037538,1256170817,1037604311,2765210733,3554079995,1131014506,879679996,2909243462,3663771856,1141124467,855842277,2852801631,3708648649,1342533948,654459306,3188396048,3373015174,1466479909,544179635,3110523913,3462522015,1591671054,702138776,2966460450,3352799412,1504918807,783551873,3082640443,3233442989,3988292384,2596254646,62317068,1957810842,3939845945,2647816111,81470997,1943803523,3814918930,2489596804,225274430,2053790376,3826175755,2466906013,167816743,2097651377,4027552580,2265490386,503444072,1762050814,4150417245,2154129355,426522225,1852507879,4275313526,2312317920,282753626,1742555852,4189708143,2394877945,397917763,1622183637,3604390888,2714866558,953729732,1340076626,3518719985,2797360999,1068828381,1219638859,3624741850,2936675148,906185462,1090812512,3747672003,2825379669,829329135,1181335161,3412177804,3160834842,628085408,1382605366,3423369109,3138078467,570562233,1426400815,3317316542,2998733608,733239954,1555261956,3268935591,3050360625,752459403,1541320221,2607071920,3965973030,1969922972,40735498,2617837225,3943577151,1913087877,83908371,2512341634,3803740692,2075208622,213261112,2463272603,3855990285,2094854071,198958881,2262029012,4057260610,1759359992,534414190,2176718541,4139329115,1873836001,414664567,2282248934,4279200368,1711684554,285281116,2405801727,4167216745,1634467795,376229701,2685067896,3608007406,1308918612,956543938,2808555105,3495958263,1231636301,1047427035,2932959818,3654703836,1088359270,936918e3,2847714899,3736837829,1202900863,817233897,3183342108,3401237130,1404277552,615818150,3134207493,3453421203,1423857449,601450431,3009837614,3294710456,1567103746,711928724,3020668471,3272380065,1510334235,755167117])},"../node_modules/@aws-sdk/eventstream-marshaller/build/EventStreamMarshaller.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/@aws-sdk/eventstream-marshaller/build/HeaderMarshaller.js"),o=r("../node_modules/@aws-sdk/eventstream-marshaller/build/splitMessage.js"),i=r("../node_modules/@aws-crypto/crc32/build/index.js"),s=function(){function EventStreamMarshaller(e,t){this.headerMarshaller=new n.HeaderMarshaller(e,t)}return EventStreamMarshaller.prototype.marshall=function(e){var t=e.headers,r=e.body,n=this.headerMarshaller.format(t),o=n.byteLength+r.byteLength+16,s=new Uint8Array(o),a=new DataView(s.buffer,s.byteOffset,s.byteLength),u=new i.Crc32;return a.setUint32(0,o,!1),a.setUint32(4,n.byteLength,!1),a.setUint32(8,u.update(s.subarray(0,8)).digest(),!1),s.set(n,12),s.set(r,n.byteLength+12),a.setUint32(o-4,u.update(s.subarray(8,o-4)).digest(),!1),s},EventStreamMarshaller.prototype.unmarshall=function(e){var t=o.splitMessage(e),r=t.headers,n=t.body;return{headers:this.headerMarshaller.parse(r),body:n}},EventStreamMarshaller}();t.EventStreamMarshaller=s},"../node_modules/@aws-sdk/eventstream-marshaller/build/HeaderMarshaller.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/tslib/tslib.es6.js"),o=r("../node_modules/@aws-sdk/util-hex-encoding/build/index.js"),i=r("../node_modules/@aws-sdk/eventstream-marshaller/build/Int64.js"),s=function(){function HeaderMarshaller(e,t){this.toUtf8=e,this.fromUtf8=t}return HeaderMarshaller.prototype.format=function(e){var t,r,o,i,s=[];try{for(var a=n.__values(Object.keys(e)),u=a.next();!u.done;u=a.next()){var l=u.value,c=this.fromUtf8(l);s.push(Uint8Array.from([c.byteLength]),c,this.formatHeaderValue(e[l]))}}catch(e){t={error:e}}finally{try{u&&!u.done&&(r=a.return)&&r.call(a)}finally{if(t)throw t.error}}var f=new Uint8Array(s.reduce((function(e,t){return e+t.byteLength}),0)),d=0;try{for(var p=n.__values(s),h=p.next();!h.done;h=p.next()){var g=h.value;f.set(g,d),d+=g.byteLength}}catch(e){o={error:e}}finally{try{h&&!h.done&&(i=p.return)&&i.call(p)}finally{if(o)throw o.error}}return f},HeaderMarshaller.prototype.formatHeaderValue=function(e){switch(e.type){case"boolean":return Uint8Array.from([e.value?0:1]);case"byte":return Uint8Array.from([2,e.value]);case"short":var t=new DataView(new ArrayBuffer(3));return t.setUint8(0,3),t.setInt16(1,e.value,!1),new Uint8Array(t.buffer);case"integer":var r=new DataView(new ArrayBuffer(5));return r.setUint8(0,4),r.setInt32(1,e.value,!1),new Uint8Array(r.buffer);case"long":var n=new Uint8Array(9);return n[0]=5,n.set(e.value.bytes,1),n;case"binary":var s=new DataView(new ArrayBuffer(3+e.value.byteLength));s.setUint8(0,6),s.setUint16(1,e.value.byteLength,!1);var a=new Uint8Array(s.buffer);return a.set(e.value,3),a;case"string":var u=this.fromUtf8(e.value),l=new DataView(new ArrayBuffer(3+u.byteLength));l.setUint8(0,7),l.setUint16(1,u.byteLength,!1);var c=new Uint8Array(l.buffer);return c.set(u,3),c;case"timestamp":var f=new Uint8Array(9);return f[0]=8,f.set(i.Int64.fromNumber(e.value.valueOf()).bytes,1),f;case"uuid":if(!v.test(e.value))throw new Error("Invalid UUID received: "+e.value);var d=new Uint8Array(17);return d[0]=9,d.set(o.fromHex(e.value.replace(/\-/g,"")),1),d}},HeaderMarshaller.prototype.parse=function(e){for(var t={},r=0;r<e.byteLength;){var n=e.getUint8(r++),s=this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,n));switch(r+=n,e.getUint8(r++)){case 0:t[s]={type:a,value:!0};break;case 1:t[s]={type:a,value:!1};break;case 2:t[s]={type:u,value:e.getInt8(r++)};break;case 3:t[s]={type:l,value:e.getInt16(r,!1)},r+=2;break;case 4:t[s]={type:c,value:e.getInt32(r,!1)},r+=4;break;case 5:t[s]={type:f,value:new i.Int64(new Uint8Array(e.buffer,e.byteOffset+r,8))},r+=8;break;case 6:var v=e.getUint16(r,!1);r+=2,t[s]={type:d,value:new Uint8Array(e.buffer,e.byteOffset+r,v)},r+=v;break;case 7:var b=e.getUint16(r,!1);r+=2,t[s]={type:p,value:this.toUtf8(new Uint8Array(e.buffer,e.byteOffset+r,b))},r+=b;break;case 8:t[s]={type:h,value:new Date(new i.Int64(new Uint8Array(e.buffer,e.byteOffset+r,8)).valueOf())},r+=8;break;case 9:var y=new Uint8Array(e.buffer,e.byteOffset+r,16);r+=16,t[s]={type:g,value:o.toHex(y.subarray(0,4))+"-"+o.toHex(y.subarray(4,6))+"-"+o.toHex(y.subarray(6,8))+"-"+o.toHex(y.subarray(8,10))+"-"+o.toHex(y.subarray(10))};break;default:throw new Error("Unrecognized header type tag")}}return t},HeaderMarshaller}();t.HeaderMarshaller=s;var a="boolean",u="byte",l="short",c="integer",f="long",d="binary",p="string",h="timestamp",g="uuid",v=/^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/},"../node_modules/@aws-sdk/eventstream-marshaller/build/Int64.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/@aws-sdk/util-hex-encoding/build/index.js"),o=function(){function Int64(e){if(this.bytes=e,8!==e.byteLength)throw new Error("Int64 buffers must be exactly 8 bytes")}return Int64.fromNumber=function(e){if(e>0x8000000000000000||e<-0x8000000000000000)throw new Error(e+" is too large (or, if negative, too small) to represent as an Int64");for(var t=new Uint8Array(8),r=7,n=Math.abs(Math.round(e));r>-1&&n>0;r--,n/=256)t[r]=n;return e<0&&negate(t),new Int64(t)},Int64.prototype.valueOf=function(){var e=this.bytes.slice(0),t=128&e[0];return t&&negate(e),parseInt(n.toHex(e),16)*(t?-1:1)},Int64.prototype.toString=function(){return String(this.valueOf())},Int64}();function negate(e){for(var t=0;t<8;t++)e[t]^=255;for(t=7;t>-1&&(e[t]++,0===e[t]);t--);}t.Int64=o},"../node_modules/@aws-sdk/eventstream-marshaller/build/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/tslib/tslib.es6.js");n.__exportStar(r("../node_modules/@aws-sdk/eventstream-marshaller/build/EventStreamMarshaller.js"),t),n.__exportStar(r("../node_modules/@aws-sdk/eventstream-marshaller/build/Int64.js"),t)},"../node_modules/@aws-sdk/eventstream-marshaller/build/splitMessage.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/@aws-crypto/crc32/build/index.js"),o=4,i=2*o,s=4,a=i+2*s;t.splitMessage=function splitMessage(e){var t=e.byteLength,r=e.byteOffset,u=e.buffer;if(t<a)throw new Error("Provided message too short to accommodate event stream message overhead");var l=new DataView(u,r,t),c=l.getUint32(0,!1);if(t!==c)throw new Error("Reported message length does not match received message length");var f=l.getUint32(o,!1),d=l.getUint32(i,!1),p=l.getUint32(t-s,!1),h=(new n.Crc32).update(new Uint8Array(u,r,i));if(d!==h.digest())throw new Error("The prelude checksum specified in the message ("+d+") does not match the calculated CRC32 checksum ("+h.digest()+")");if(h.update(new Uint8Array(u,r+i,t-(i+s))),p!==h.digest())throw new Error("The message checksum ("+h.digest()+") did not match the expected value of "+p);return{headers:new DataView(u,r+i+s,f),body:new Uint8Array(u,r+i+s+f,c-f-(i+s+s))}}},"../node_modules/@aws-sdk/is-array-buffer/build/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0}),t.isArrayBuffer=function isArrayBuffer(e){return"function"==typeof ArrayBuffer&&e instanceof ArrayBuffer||"[object ArrayBuffer]"===Object.prototype.toString.call(e)}},"../node_modules/@aws-sdk/util-buffer-from/build/index.js":function(e,t,r){(function(e){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/node-libs-browser/node_modules/buffer/index.js"),o=r("../node_modules/@aws-sdk/is-array-buffer/build/index.js");t.fromArrayBuffer=function fromArrayBuffer(t,r,i){if(void 0===r&&(r=0),void 0===i&&(i=t.byteLength-r),!o.isArrayBuffer(t))throw new Error("argument passed to fromArrayBuffer was not an ArrayBuffer");if("function"==typeof n.Buffer.from&&n.Buffer.from!==Uint8Array.from)return n.Buffer.from(t,r,i);if(0!==r||i!==t.byteLength)throw new Error("Unable to convert TypedArray to Buffer in Node "+e.version);return new n.Buffer(t)},t.fromString=function fromString(e,t){if("string"!=typeof e)throw new Error("argument passed to fromString was not a string");return"function"==typeof n.Buffer.from&&n.Buffer.from!==Uint8Array.from?n.Buffer.from(e,t):new n.Buffer(e,t)}}).call(this,r("../node_modules/process/browser.js"))},"../node_modules/@aws-sdk/util-hex-encoding/build/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});for(var n={},o={},i=0;i<256;i++){var s=i.toString(16).toLowerCase();1===s.length&&(s="0"+s),n[i]=s,o[s]=i}t.fromHex=function fromHex(e){if(e.length%2!=0)throw new Error("Hex encoded strings must have an even number length");for(var t=new Uint8Array(e.length/2),r=0;r<e.length;r+=2){var n=e.substr(r,2).toLowerCase();if(!(n in o))throw new Error("Cannot decode unrecognized sequence "+n+" as hexadecimal");t[r/2]=o[n]}return t},t.toHex=function toHex(e){for(var t="",r=0;r<e.byteLength;r++)t+=n[e[r]];return t}},"../node_modules/@aws-sdk/util-utf8-node/build/index.js":function(e,t,r){Object.defineProperty(t,"__esModule",{value:!0});var n=r("../node_modules/@aws-sdk/util-buffer-from/build/index.js");t.fromUtf8=function fromUtf8(e){var t=n.fromString(e,"utf8");return new Uint8Array(t.buffer,t.byteOffset,t.byteLength/Uint8Array.BYTES_PER_ELEMENT)},t.toUtf8=function toUtf8(e){return n.fromArrayBuffer(e.buffer,e.byteOffset,e.byteLength).toString("utf8")}}}]); //# sourceMappingURL=vendors~App-7KZ9F~d99e2b41.chunk.eaa5497fb7f7db0479e3.js.map