!function(){function r(r,e){return function(r){if(Array.isArray(r))return r}(r)||function(r,n){var e=null==r?null:"undefined"!=typeof Symbol&&r[Symbol.iterator]||r["@@iterator"];if(null!=e){var o,t,i,a,l=[],u=!0,c=!1;try{if(i=(e=e.call(r)).next,0===n){if(Object(e)!==e)return;u=!1}else for(;!(u=(o=i.call(e)).done)&&(l.push(o.value),l.length!==n);u=!0);}catch(f){c=!0,t=f}finally{try{if(!u&&null!=e.return&&(a=e.return(),Object(a)!==a))return}finally{if(c)throw t}}return l}}(r,e)||function(r,e){if(!r)return;if("string"==typeof r)return n(r,e);var o=Object.prototype.toString.call(r).slice(8,-1);"Object"===o&&r.constructor&&(o=r.constructor.name);if("Map"===o||"Set"===o)return Array.from(r);if("Arguments"===o||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(o))return n(r,e)}(r,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function n(r,n){(null==n||n>r.length)&&(n=r.length);for(var e=0,o=new Array(n);e<n;e++)o[e]=r[e];return o}System.register(["./index-legacy-33e7c04a.js"],(function(n,e){"use strict";var o,t,i,a,l,u,c,f,s,d,v,g,y,h,m,b,p,w,S,j,x;return{setters:[function(r){o=r.i,t=r.d,i=r.q,a=r.S,l=r.D,u=r.j,c=r.ad,f=r.x,s=r.ax,d=r.P,v=r.E,g=r.L,y=r.g,h=r.n,m=r.t,b=r.m,p=r.T,w=r.bb,S=r.o,j=r.I,x=r.w}],execute:function(){var e=r(o("image"),2),I=e[0],z=e[1],L={src:String,alt:String,fit:String,position:String,round:Boolean,block:Boolean,width:h,height:h,radius:h,lazyLoad:Boolean,iconSize:h,showError:m,errorIcon:b("photo-fail"),iconPrefix:String,showLoading:m,loadingIcon:b("photo")},A=t({name:I,props:L,emits:["load","error"],setup:function(r,n){var e=n.emit,o=n.slots,t=i(!1),h=i(!0),m=i(),b=a().proxy.$Lazyload,x=l((function(){var n={width:u(r.width),height:u(r.height)};return c(r.radius)&&(n.overflow="hidden",n.borderRadius=u(r.radius)),n}));f((function(){return r.src}),(function(){t.value=!1,h.value=!0}));var I=function(r){h.value&&(h.value=!1,e("load",r))},L=function(){var r=new Event("load");Object.defineProperty(r,"target",{value:m.value,enumerable:!0}),I(r)},A=function(r){t.value=!0,h.value=!1,e("error",r)},E=function(n,e,o){return o?o():y(j,{name:n,size:r.iconSize,class:e,classPrefix:r.iconPrefix},null)},P=function(){if(!t.value&&r.src){var n={alt:r.alt,class:z("img"),style:{objectFit:r.fit,objectPosition:r.position}};return r.lazyLoad?p(y("img",S({ref:m},n),null),[[w("lazy"),r.src]]):y("img",S({ref:m,src:r.src,onLoad:I,onError:A},n),null)}},$=function(r){var n=r.el,e=function(){n===m.value&&h.value&&L()};m.value?e():g(e)},O=function(r){r.el!==m.value||t.value||A()};return b&&s&&(b.$on("loaded",$),b.$on("error",O),d((function(){b.$off("loaded",$),b.$off("error",O)}))),v((function(){g((function(){var n;(null==(n=m.value)?void 0:n.complete)&&!r.lazyLoad&&L()}))})),function(){var n;return y("div",{class:z({round:r.round,block:r.block}),style:x.value},[P(),h.value&&r.showLoading?y("div",{class:z("loading")},[E(r.loadingIcon,z("loading-icon"),o.loading)]):t.value&&r.showError?y("div",{class:z("error")},[E(r.errorIcon,z("error-icon"),o.error)]):void 0,null==(n=o.default)?void 0:n.call(o)])}}});n("I",x(A))}}}))}();
