-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path94.b52624f37fbd86f10601.js
1 lines (1 loc) · 2.02 KB
/
94.b52624f37fbd86f10601.js
1
"use strict";(self.webpackChunksparkworks_console=self.webpackChunksparkworks_console||[]).push([[94],{47094:function(C,g,r){r.r(g),r.d(g,{amplify_s3_image:function(){return E}});var h=r(8239),k=r(75134),w=r(47289),O=r(88774),t=r.n(O),o=r(65513),P=r(45013),D=r(22594),f=(r(84158),r(55210)),i=new P.k("S3Image"),E=function(){function u(s){(0,k.Z)(this,u),(0,o.r)(this,s),this.contentType="binary/octet-stream",this.level=D.A.Public}return(0,w.Z)(u,[{key:"watchHandler",value:(s=(0,h.Z)(t().mark(function _(){return t().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.load();case 2:case"end":return a.stop()}},_,this)})),function(){return s.apply(this,arguments)})},{key:"componentWillLoad",value:function(){var s=(0,h.Z)(t().mark(function _(){return t().wrap(function(a){for(;;)switch(a.prev=a.next){case 0:return a.next=2,this.load();case 2:case"end":return a.stop()}},_,this)}));return function(){return s.apply(this,arguments)}}()},{key:"load",value:function(){var s=(0,h.Z)(t().mark(function _(){var n,a,p,v,d,m,y,c;return t().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:if(a=this.path,p=this.body,v=this.contentType,d=this.level,m=this.track,y=this.identityId,(n=this.imgKey)||a){e.next=4;break}return i.debug("empty imgKey and path"),e.abrupt("return");case 4:if(i.debug("loading "+(c=n||a)+"..."),e.prev=6,!p){e.next=10;break}return e.next=10,(0,f.p)(n,p,d,m,v,i);case 10:return e.next=12,(0,f.g)(c,d,m,y,i);case 12:this.src=e.sent,e.next=19;break;case 15:throw e.prev=15,e.t0=e.catch(6),i.debug(e.t0),new Error(e.t0);case 19:case"end":return e.stop()}},_,this,[[6,15]])}));return function(){return s.apply(this,arguments)}}()},{key:"render",value:function(){return(0,o.h)(o.H,null,this.src&&(0,o.h)("img",Object.assign({src:this.src,alt:this.alt,onLoad:this.handleOnLoad,onError:this.handleOnError},this.imgProps)))}}],[{key:"watchers",get:function(){return{body:["watchHandler"]}}}]),u;var s}();E.style=":host{height:inherit;width:inherit;--height:inherit;--width:inherit}img{height:var(--height);width:var(--width)}"}}]);