var scropperConfig = {
  "minBoxSize": {
    "width": 200,
    "height": 200
  },
  "providers": [
    {
      "match": ".*?(/(scropper/-(/(sqip|lqip|screen)(/\\d+)?)?)|([-~]/media))/",
      "endpoint": "/api/scropper/lookup"
    }
  ],
  "breakpoints": [
    {
      "dim": 10,
      "src": "/scropper/-/screen/10/{src}"
    },
    {
      "dim": 576,
      "src": "/scropper/-/screen/576/{src}"
    },
    {
      "dim": 768,
      "src": "/scropper/-/screen/768/{src}"
    },
    {
      "dim": 992,
      "src": "/scropper/-/screen/992/{src}"
    },
    {
      "dim": 1200,
      "src": "/scropper/-/screen/1200/{src}"
    },
    {
      "dim": 1920,
      "src": "/scropper/-/screen/1920/{src}"
    },
    {
      "dim": 4096,
      "src": "/scropper/-/screen/4096/{src}"
    }
  ]
};
!function(t){var e={};function r(n){if(e[n])return e[n].exports;var i=e[n]={i:n,l:!1,exports:{}};return t[n].call(i.exports,i,i.exports,r),i.l=!0,i.exports}r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)r.d(n,i,function(e){return t[e]}.bind(null,i));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=1)}([function(t,e,r){t.exports=r(2)},function(t,e,r){t.exports=r(8)},function(t,e,r){var n=function(t){"use strict";var e,r=Object.prototype,n=r.hasOwnProperty,i="function"==typeof Symbol?Symbol:{},o=i.iterator||"@@iterator",a=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function c(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,o=Object.create(i.prototype),a=new M(n||[]);return o._invoke=function(t,e,r){var n=h;return function(i,o){if(n===d)throw new Error("Generator is already running");if(n===f){if("throw"===i)throw o;return O()}for(r.method=i,r.arg=o;;){var a=r.delegate;if(a){var s=S(a,r);if(s){if(s===p)continue;return s}}if("next"===r.method)r.sent=r._sent=r.arg;else if("throw"===r.method){if(n===h)throw n=f,r.arg;r.dispatchException(r.arg)}else"return"===r.method&&r.abrupt("return",r.arg);n=d;var c=u(t,e,r);if("normal"===c.type){if(n=r.done?f:l,c.arg===p)continue;return{value:c.arg,done:r.done}}"throw"===c.type&&(n=f,r.method="throw",r.arg=c.arg)}}}(t,r,a),o}function u(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}t.wrap=c;var h="suspendedStart",l="suspendedYield",d="executing",f="completed",p={};function g(){}function m(){}function v(){}var y={};y[o]=function(){return this};var _=Object.getPrototypeOf,w=_&&_(_(I([])));w&&w!==r&&n.call(w,o)&&(y=w);var b=v.prototype=g.prototype=Object.create(y);function k(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function x(t){var e;this._invoke=function(r,i){function o(){return new Promise(function(e,o){!function e(r,i,o,a){var s=u(t[r],t,i);if("throw"!==s.type){var c=s.arg,h=c.value;return h&&"object"==typeof h&&n.call(h,"__await")?Promise.resolve(h.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(h).then(function(t){c.value=t,o(c)},function(t){return e("throw",t,o,a)})}a(s.arg)}(r,i,e,o)})}return e=e?e.then(o,o):o()}}function S(t,r){var n=t.iterator[r.method];if(n===e){if(r.delegate=null,"throw"===r.method){if(t.iterator.return&&(r.method="return",r.arg=e,S(t,r),"throw"===r.method))return p;r.method="throw",r.arg=new TypeError("The iterator does not provide a 'throw' method")}return p}var i=u(n,t.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,p;var o=i.arg;return o?o.done?(r[t.resultName]=o.value,r.next=t.nextLoc,"return"!==r.method&&(r.method="next",r.arg=e),r.delegate=null,p):o:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,p)}function L(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function E(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function M(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(L,this),this.reset(!0)}function I(t){if(t){var r=t[o];if(r)return r.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var i=-1,a=function r(){for(;++i<t.length;)if(n.call(t,i))return r.value=t[i],r.done=!1,r;return r.value=e,r.done=!0,r};return a.next=a}}return{next:O}}function O(){return{value:e,done:!0}}return m.prototype=b.constructor=v,v.constructor=m,v[s]=m.displayName="GeneratorFunction",t.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},t.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,v):(t.__proto__=v,s in t||(t[s]="GeneratorFunction")),t.prototype=Object.create(b),t},t.awrap=function(t){return{__await:t}},k(x.prototype),x.prototype[a]=function(){return this},t.AsyncIterator=x,t.async=function(e,r,n,i){var o=new x(c(e,r,n,i));return t.isGeneratorFunction(r)?o:o.next().then(function(t){return t.done?t.value:o.next()})},k(b),b[s]="Generator",b[o]=function(){return this},b.toString=function(){return"[object Generator]"},t.keys=function(t){var e=[];for(var r in t)e.push(r);return e.reverse(),function r(){for(;e.length;){var n=e.pop();if(n in t)return r.value=n,r.done=!1,r}return r.done=!0,r}},t.values=I,M.prototype={constructor:M,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=e,this.done=!1,this.delegate=null,this.method="next",this.arg=e,this.tryEntries.forEach(E),!t)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=e)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var r=this;function i(n,i){return s.type="throw",s.arg=t,r.next=n,i&&(r.method="next",r.arg=e),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return i("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),u=n.call(a,"finallyLoc");if(c&&u){if(this.prev<a.catchLoc)return i(a.catchLoc,!0);if(this.prev<a.finallyLoc)return i(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return i(a.catchLoc,!0)}else{if(!u)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return i(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r];if(i.tryLoc<=this.prev&&n.call(i,"finallyLoc")&&this.prev<i.finallyLoc){var o=i;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,p):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),p},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),E(r),p}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var i=n.arg;E(r)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:I(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),p}},t}(t.exports);try{regeneratorRuntime=n}catch(t){Function("r","regeneratorRuntime = r")(n)}},function(t,e,r){var n=r(4);"string"==typeof n&&(n=[[t.i,n,""]]);var i={hmr:!0,transform:void 0,insertInto:void 0};r(6)(n,i);n.locals&&(t.exports=n.locals)},function(t,e,r){(t.exports=r(5)(!1)).push([t.i,'html>body * div.scropper-overlay{overflow:hidden !important;pointer-events:none !important}html>body * div.scropper-overlay img{pointer-events:auto !important}html>body * .merge-props,html>body * div.scropper-overlay,html>body * div.scropper-overlay>img{opacity:1;box-shadow:none;border:none;border-image:none;border-radius:0;cursor:inherit;perspective:none;perspective-origin:50% 50%;backface-visibility:visible;transform:none;transform-origin:50% 50%;transform-style:flat;filter:none}html>body * div.scropper-overlay>img{opacity:1 !important;box-shadow:none !important;border:none !important;border-image:none !important;border-radius:0 !important;z-index:auto !important;filter:none !important;perspective:none !important;perspective-origin:50% 50% !important;backface-visibility:visible !important;text-shadow:none !important}html>body * div.scropper-overlay,html>body * div.scropper-overlay>img{position:absolute !important;display:block !important;left:0;top:0;width:0;height:0;background-image:none;background-position:0 0;background-size:auto;background-repeat:no-repeat !important;background-attachment:scroll !important;background-color:transparent !important;object-fit:fill !important;object-position:50% 50% !important;transition:all 0s ease 0s !important;bottom:auto !important;clear:none !important;clip:auto !important;color:inherit !important;counter-increment:none !important;counter-reset:none !important;direction:inherit !important;float:none !important;font-family:inherit !important;font-size:inherit !important;font-style:inherit !important;font-variant:normal !important;font-weight:inherit !important;letter-spacing:normal !important;line-height:inherit !important;list-style-type:inherit !important;list-style-position:outside !important;list-style-image:none !important;margin:0 !important;max-height:none !important;max-width:none !important;min-height:0 !important;min-width:0 !important;outline:0 !important;padding:0 !important;quotes:"" "" !important;right:auto !important;table-layout:auto !important;text-align:inherit !important;text-decoration:inherit !important;text-indent:0 !important;text-transform:none !important;unicode-bidi:normal !important;vertical-align:baseline !important;visibility:inherit !important;white-space:normal !important;word-spacing:normal !important;text-shadow:none !important;background-origin:padding-box !important;background-clip:border-box !important;box-sizing:content-box !important;column-count:auto !important;column-gap:normal !important;column-rule:medium none black !important;column-span:1 !important;column-width:auto !important;font-feature-settings:normal !important;hyphens:manual !important;word-break:normal !important}\n',""])},function(t,e,r){"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var r=function(t,e){var r=t[1]||"",n=t[3];if(!n)return r;if(e&&"function"==typeof btoa){var i=(a=n,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(a))))+" */"),o=n.sources.map(function(t){return"/*# sourceURL="+n.sourceRoot+t+" */"});return[r].concat(o).concat([i]).join("\n")}var a;return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+r+"}":r}).join("")},e.i=function(t,r){"string"==typeof t&&(t=[[null,t,""]]);for(var n={},i=0;i<this.length;i++){var o=this[i][0];null!=o&&(n[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];null!=a[0]&&n[a[0]]||(r&&!a[2]?a[2]=r:r&&(a[2]="("+a[2]+") and ("+r+")"),e.push(a))}},e}},function(t,e,r){var n,i,o={},a=(n=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=n.apply(this,arguments)),i}),s=function(t){var e={};return function(t,r){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t,e){return e?e.querySelector(t):document.querySelector(t)}.call(this,t,r);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),c=null,u=0,h=[],l=r(7);function d(t,e){for(var r=0;r<t.length;r++){var n=t[r],i=o[n.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](n.parts[a]);for(;a<n.parts.length;a++)i.parts.push(y(n.parts[a],e))}else{var s=[];for(a=0;a<n.parts.length;a++)s.push(y(n.parts[a],e));o[n.id]={id:n.id,refs:1,parts:s}}}}function f(t,e){for(var r=[],n={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};n[a]?n[a].parts.push(s):r.push(n[a]={id:a,parts:[s]})}return r}function p(t,e){var r=s(t.insertInto);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var n=h[h.length-1];if("top"===t.insertAt)n?n.nextSibling?r.insertBefore(e,n.nextSibling):r.appendChild(e):r.insertBefore(e,r.firstChild),h.push(e);else if("bottom"===t.insertAt)r.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(t.insertAt.before,r);r.insertBefore(e,i)}}function g(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=h.indexOf(t);e>=0&&h.splice(e,1)}function m(t){var e=document.createElement("style");if(void 0===t.attrs.type&&(t.attrs.type="text/css"),void 0===t.attrs.nonce){var n=function(){0;return r.nc}();n&&(t.attrs.nonce=n)}return v(e,t.attrs),p(t,e),e}function v(t,e){Object.keys(e).forEach(function(r){t.setAttribute(r,e[r])})}function y(t,e){var r,n,i,o;if(e.transform&&t.css){if(!(o="function"==typeof e.transform?e.transform(t.css):e.transform.default(t.css)))return function(){};t.css=o}if(e.singleton){var a=u++;r=c||(c=m(e)),n=b.bind(null,r,a,!1),i=b.bind(null,r,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(r=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",v(e,t.attrs),p(t,e),e}(e),n=function(t,e,r){var n=r.css,i=r.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(n=l(n));i&&(n+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([n],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,r,e),i=function(){g(r),r.href&&URL.revokeObjectURL(r.href)}):(r=m(e),n=function(t,e){var r=e.css,n=e.media;n&&t.setAttribute("media",n);if(t.styleSheet)t.styleSheet.cssText=r;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(r))}}.bind(null,r),i=function(){g(r)});return n(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;n(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var r=f(t,e);return d(r,e),function(t){for(var n=[],i=0;i<r.length;i++){var a=r[i];(s=o[a.id]).refs--,n.push(s)}t&&d(f(t,e),e);for(i=0;i<n.length;i++){var s;if(0===(s=n[i]).refs){for(var c=0;c<s.parts.length;c++)s.parts[c]();delete o[s.id]}}}};var _,w=(_=[],function(t,e){return _[t]=e,_.filter(Boolean).join("\n")});function b(t,e,r,n){var i=r?"":n.css;if(t.styleSheet)t.styleSheet.cssText=w(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var r=e.protocol+"//"+e.host,n=r+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?r+o:n+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(t,e,r){"use strict";function n(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,n.key,n)}}function o(t,e,r){return e&&i(t.prototype,e),r&&i(t,r),t}function a(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function s(t,e){var r=Object.keys(t);return Object.getOwnPropertySymbols&&r.push.apply(r,Object.getOwnPropertySymbols(t)),e&&(r=r.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),r}function c(t){for(var e=1;e<arguments.length;e++){var r=null!=arguments[e]?arguments[e]:{};e%2?s(r,!0).forEach(function(e){a(t,e,r[e])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):s(r).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))})}return t}r.r(e);var u=function(t){return t<0?0:t>1?1:t},h=function(t,e,r){return r&&(t=c({},t)),t.left&&(t.left/=e.width),t.right&&(t.right/=e.width),t.width&&(t.width/=e.width),t.top&&(t.top/=e.height),t.bottom&&(t.bottom/=e.height),t.height&&(t.height/=e.height),t},l=function(){function t(){n(this,t)}return o(t,null,[{key:"fit",value:function(t,e){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=r.rightBottom,i=void 0!==n&&n,o=r.cssCoords,a=void 0!==o&&o,s=r.normalize,c=void 0!==s&&s,u=t.width,l=t.height,d=1;if(u>e.width||l>e.height){var f=u/l;f>1?l=1*(u=Math.min(e.width,e.height*f))/f:u=(l=Math.min(e.height,1*e.width/f))*f,d=u/t.width}var p,g=(e.width-u)/2,m=(e.height-l)/2;if(i){var v=g+u,y=m+l;a&&(v=e.width-v,y=e.height-y),p={left:g,right:v,top:m,bottom:y,zoom:d}}else p={left:g,top:m,width:u,height:l,zoom:d};return c&&h(p,e),p}},{key:"measureImage",value:function(t,e){var r=function(t,r,n){e(t.naturalWidth,t.naturalHeight,{requestedSrc:r,success:n,src:t.src})},n=new Image;n.onload=function(){return r(n,t,!0)},n.onerror=function(){return r(n,t,!1)},n.src=t}},{key:"validize",value:function(e,r){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.thumbSize,o=void 0===i?t.THUMB_SIZE:i,a=u(e.cx),s=u(e.cy),h=e.box&&c({},e.box);if(h){for(var l in h)h[l]=u(h[l]);var d=h.right-h.left,f=h.bottom-h.top,p=r?o/r.width:0,g=r?o/r.height:0;d<=0||f<=0?h=null:(d<p&&(h.right=h.left+p,h.right>1&&(h.left-=h.right-1,h.right=1,h.left<=0&&(h=null))),h&&f<g&&(h.bottom=h.top+g,h.bottom>1&&(h.top-=h.bottom-1,h.bottom=1,h.top<=0&&(h=null))),h&&(a=Math.max(h.left,Math.min(h.right,a)),s=Math.max(h.top,Math.min(h.bottom,s))))}return{cx:a,cy:s,box:h}}},{key:"crop",value:function(e,r,n){var i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{},o=i.thumbSize,a=void 0===o?t.THUMB_SIZE:o,s=i.stretch,c=void 0!==s&&s,u=i.containerSize,h=void 0===u?n:u;e.dot&&(e={cx:e.dot.left,cy:e.dot.top,box:e.box}),t.validize(e,r,{thumbSize:a});var l=r.width,d=r.height,f=n.width,p=n.height,g=c?Number.MAX_VALUE:1,m=Math.min(g,Math.max(f/l,p/d)),v=e.box;if(v){var y=l*(v.right-v.left),_=d*(v.bottom-v.top),w=Math.min(3*a,r.width,r.height);m=(1-(A=w<=a?1:Math.min(1,Math.max(0,w-Math.max(f,p))/(w-a))))*m+A*Math.min(g,Math.max(m,Math.min(Math.min(f,a)/y,Math.min(p,a)/_)))}else y=.15,v={left:Math.max(0,e.cx-y),top:Math.max(0,e.cy-y),right:Math.min(1,e.cx+y),bottom:Math.min(1,e.cy+y)};var b=m*l,k=m*d,x=e.cx,S=e.cy;if(v){var L=v.left,E=1-v.right,M=v.top,I=1-v.bottom;x=L===E?.5:L<E?L/(L+E):1-E/(L+E),S=M===I?.5:M<I?M/(M+I):1-I/(M+I)}var O=(b-f)*x,j=(k-p)*S;if(v)for(var P={top:j/k,right:(O+f)/b,bottom:(j+p)/k,left:O/b},T=[{start:"left",end:"right",c:e.cx,dim:b,adjust:function(t){O+=t}},{start:"top",end:"bottom",c:e.cy,dim:k,adjust:function(t){j+=t}}],z=0;z<T.length;z++){var A;if(P[(A=T[z]).end]-P[A.start]<v[A.end]-v[A.start]){var C=(A.c-v[A.start])/(v[A.end]-v[A.start]),R=(v[A.end]-v[A.start]-(P[A.end]-P[A.start]))*A.dim;A.adjust((v[A.start]-P[A.start])*A.dim+C*R)}else P[A.end]<v[A.end]?A.adjust((v[A.end]-P[A.end])*A.dim):P[A.start]>v[A.start]&&A.adjust((v[A.start]-P[A.start])*A.dim)}var N={left:f>l&&!c?(f-l)/2:-O,top:p>d&&!c?(p-d)/2:-j,width:b,height:k};if(h&&h!==n){var U=Math.max(h.width/n.width,h.height/n.height),B=h.width-n.width*U,q=h.height-n.height*U;N.left=N.left*U+B/2,N.width*=U,N.top=N.top*U+q/2,N.height*=U}return N}}]),t}();function d(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=[],n=!0,i=!1,o=void 0;try{for(var a,s=t[Symbol.iterator]();!(n=(a=s.next()).done)&&(r.push(a.value),!e||r.length!==e);n=!0);}catch(t){i=!0,o=t}finally{try{n||null==s.return||s.return()}finally{if(i)throw o}}return r}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}l.THUMB_SIZE=200;var f=function(t){return Math.round(1e3*t)/1e3},p=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:1e-5;if("number"!=typeof t||"number"!=typeof e)return-1;var n=t-e;return Math.abs(n)<=r?0:n<0?-1:1};function g(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:10,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:-1;return(0===r?Math.round:r<0?Math.floor:Math.ceil)(t/e)}function m(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=e.gridSize,n=void 0===r?10:r,i=e.start,o=void 0===i?0:i,a=e.end,s=void 0===a?0:a;return t<o?g(t,n,-1):t>s?g(t-window.innerHeight,n,1):0}function v(t,e,r){return Math.min(m(e,r),Math.max(m(t,r),0))}function y(t,e){if(t===e)return 0;if(void 0===t||void 0===e)return t===e?0:void 0===e?-1:1;var r=Array.isArray(t),n=Array.isArray(e);if(r||n){if(r!==n)return r-n;t=r?t:[t],e=n?e:[e];for(var i=0,o=Math.max(t.length,e.length),a=0;a<o&&!i;a++)i=y(t[a],e[a]);return i}return t-e}function _(t,e,r){var n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];!e&&(e=function(t,e){return t-e});var i,o,a=0;return t.forEach(function(t){var n=r?r(t):t;(0==a++||e(n,o)<0)&&(o=n,i=t)}),n?o:i}var w=function t(e,r){return e?e.classList.contains(r)?1:t(e.parentElement,r)?.5:0:0},b=function(t){var e=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return"".concat(e?f(t):Math.round(t),"px")};function k(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:200,r=t.tagName?t.getBoundingClientRect():t,n=v(r.left,r.right,{gridSize:e,start:0,end:window.innerWidth}),i=v(r.top,r.bottom,{gridSize:e,start:0,end:window.innerHeight});return{x:n,y:i,xy:Math.sqrt(n*n+i*i)}}var x=r(0),S=r.n(x),L=S.a.mark(function t(e){var r,n;return S.a.wrap(function(t){for(;;)switch(t.prev=t.next){case 0:r=0,n=e.length;case 1:if(!(r<n)){t.next=7;break}return t.next=4,e[r];case 4:r++,t.next=1;break;case 7:case"end":return t.stop()}},t)}),E=function(t,e){if("function"!=typeof t){var r=t;t=function(){return L(r)}}var n=t(),i=0;return function(){for(var r=arguments.length>0&&void 0!==arguments[0]?arguments[0]:.5,o=arguments.length>1&&void 0!==arguments[1]?arguments[1]:100,a=performance.now(),s=i,c=0;;){var u=n.next();if(u.done){if(i=0,(u=(n=t()).next()).done)break}else++i;if(++c,e(u.value),c%o==0){var h=performance.now()-a;if(h>=r)break}if(i===s)break}return[c,performance.now()-a,!0]}},M=function(){function t(e){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:function(t,e){return t-e};n(this,t),this._size=e,this._comparer=r,this._removed=void 0,this.items=[]}return o(t,[{key:"collect",value:function(t){var e=this.items,r=this._size,n=this._comparer,i=e.length;if(r<=0)return!1;if(i<r||n(t,e[0])<0?1:n(t,e[i-1])<0?-1:0){for(var o=0;o<i;o++){if(n(t,e[o])<0)return e.splice(o,0,t),e.length>r&&(this._removed=e.pop()),t;if(t===e[o])return}return e.push(t),t}this._removed=void 0}},{key:"size",get:function(){return this._size}},{key:"comparer",get:function(){return this._comparer}},{key:"removed",get:function(){return this._removed}}]),t}(),I=function(){function t(){n(this,t),this.bounds=null,this.childListener=!1}return o(t,[{key:"check",value:function(){return!1}},{key:"update",value:function(){return!1}},{key:"updateNow",value:function(){return this.check()&&this.update()}},{key:"start",value:function(){return this.scanner._startPolling(this),!this._running&&(this._running=!0)}},{key:"stop",value:function(){return this.scanner._stopPolling(this),!!this._running&&(this._running=!1,!0)}},{key:"dispose",value:function(){this._disposed||(this._disposed=!0,this._changes=null,this._running&&this.stop(),this.scanner._dispose(this))}},{key:"_attach",value:function(t){if(this._scanner&&t!==this._scanner)throw new Error("This listener is already attached to another scanner.");this._scanner=t}},{key:"_scheduleUpdate",value:function(){this.scanner._scheduleUpdate(this)}},{key:"_updateValue",value:function(t,e){return(r=this.values[t])!==(n=e)&&(r==r||n==n)&&(this.values[t]=e,(this._changes||(this._changes={}))[t]=!0);var r,n}},{key:"_updateValues",value:function(t){var e=!1;for(var r in t){var n=t[r];e=this._updateValue(r,n)||e}return e}},{key:"_resetChanges",value:function(t){if(!t){var e=this._changes;return!!e&&(this._changes=null,e)}this._changes&&(delete this._changes[t],Object.keys(this._changes).length||(this._changes=null))}},{key:"values",get:function(){return this._values||(this._values={})}},{key:"pendingChanges",get:function(){return this._changes}},{key:"running",get:function(){return this._running}},{key:"disposed",get:function(){return this._disposed}},{key:"scanner",get:function(){if(!this._scanner)throw new Error("This listener is not attached to any scanner.");return this._scanner}}]),t}(),O=function(){function t(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:6;n(this,t),this._queue=new Map,this._loaded=new Map,this._collector=new M(e,function(t,e){return!!t.data.completed-!!e.data.completed||!!e.data.started-!!t.data.started||y(_(t.listeners,y,function(e){return e.score(t.data)},!0),_(e.listeners,y,function(t){return t.score(e.data)},!0))}),this._seq=0}return o(t,[{key:"_completed",value:function(t){var e=window.sessionStorage;e&&e.setItem(t.data.src,Date.now()),t.data.completed||(t.data.completed=Date.now(),this._loaded.set(t.data.src,t),this._queue.delete(t.data.src),t.data.image.onload=t.data.image.onerror=null,t.data.started||(t.data.started=t.data.completed,t.listeners.forEach(function(e){return e.loading&&e.loading(t.data)})),t.listeners.forEach(function(e){return e.completed&&e.completed(t.data)}))}},{key:"_checkCached",value:function(t){var e=window.sessionStorage;if(!e||!e.getItem(t.data.src))return!1;var r=t.data,n=r.image,i=r.src;if(!n.src){if(n.src=i,!n.complete)return e.removeItem(t.data.src),n.src='data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" width="1" height="1" />',!1;this._completed(t)}return n.completed}},{key:"update",value:function(){var t=this,e=new Map;return this._queue.forEach(function(r){r.data.completed||t._collector.collect(r,function(t){t.data.started&&!t.complete&&console.warn("Image removed from loading set before completed.",t)})===r&&(e.set(r,r),t._collector.removed&&e.delete(t._collector.removed))}),e.forEach(function(e){e.data.started=Date.now(),e.listeners.forEach(function(t){t.loading&&t.loading(e.data)}),e.data.image.onload=function(){return t._completed(e)},e.data.image.onerror=function(){return t._completed(e)},e.data.image.src=e.data.src,e.data.seq=t._seq++}),e.length}},{key:"register",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{score:function(t,e){return Number.MAX_VALUE},started:started,completed:completed},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=this._loaded.get(t);return n?(e&&!n.listeners.get(e)&&(e.loading&&e.loading(n.data),e.completed&&e.completed(n.data),n.listeners.set(e,e)),n.data):(n=this._queue.get(t)||{data:{src:t,image:r||new Image,added:Date.now(),started:0,completed:0,seq:-1},listeners:new Map},e&&n.listeners.set(e,e),this._checkCached(n)||this._queue.set(t,n),n.data)}}]),t}(),j=function(t){return t&&t.tagName?t.getAttribute("data-scropper-src")||("IMG"===t.tagName?t.currentSrc||t.src:P(t)):t},P=function(t){var e=window.getComputedStyle(t).backgroundImage||"";return e.startsWith("url")&&e.slice(4,-1).replace(/["']/g,"")},T=function(){function t(e){n(this,t),this._image=e.image,this._data=e,this.requestedSrc=this._data.src}return o(t,[{key:"isSizeAvailable",value:function(){return this.width>0}},{key:"isLoaded",value:function(){return!!this._data.completed}},{key:"isLoading",value:function(){return!this.isLoaded()&&!!this._data.started}},{key:"isUnavailable",value:function(){return this.isLoaded()&&!this.width}},{key:"width",get:function(){return this._image.naturalWidth}},{key:"height",get:function(){return this._image.naturalHeight}},{key:"loadInfo",get:function(){return this._data}},{key:"src",get:function(){return this._image.src}}]),t}(),z=new O(16);if(window&&window.requestAnimationFrame){window.requestAnimationFrame(function t(){for(var e=0;e<5&&z.update();e++);window.requestAnimationFrame(t)})}var A=function(t,e){var r=z.register(j(t),e);return r._imageInfo||(r._imageInfo=new T(r))},C=function(){function t(e){n(this,t),this._listeners=new Set,this._activeListeners=new Set,this._hotListeners=new Set,this._scheduledUpdates=new Set,this._running=!1,this._bounds=new Map,this._resizeHandler=this.refresh.bind(this),this._elementListeners=new WeakMap,this._refreshing=!1,this._errors=0,this._target=e}return o(t,[{key:"running",get:function(){return this._running}}]),o(t,[{key:"start",value:function(){var t=this;if(!this._running){this._running=!0,window.addEventListener("resize",this._resizeHandler),this._listeners.forEach(function(t){return t.start()});!function e(){t._running&&(t.refresh(),window.requestAnimationFrame(e))}()}}},{key:"stop",value:function(){this._running&&(this._running=!1,this._window.removeEventListener("resize",this._resizeHandler))}},{key:"registerListener",value:function(t){if(!(t instanceof I))throw new Error("Expected instance of DOMListener");return this._listeners.add(t),t._attach(this),this._running&&t.start(),function(){return t.dispose()}}},{key:"removeListener",value:function(t){this._listeners.delete(t)&&t._attach(null)}},{key:"registerListenerForElement",value:function(t,e){if(e){var r=this._elementListeners.get(e);!r&&this._elementListeners.set(e,r=new Set),r.add(t)}}},{key:"removeListenerForElement",value:function(t,e){if(t){var r=this._elementListeners.get(t);r&&r.delete(e),e.size||this._elementListeners.delete(t)}}},{key:"updateElement",value:function(t){var e=this,r=this._elementListeners.get(t);r&&r.forEach(function(r){e._listeners.has(r)?r.updateNow():e.removeListenerForElement(r,t)})}},{key:"isElementAttached",value:function(t){return t&&document.body.contains(t)}},{key:"_checkListener",value:function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:void 0;t.childListener||void 0!==e&&t.bounds&&0===k(t.bounds,25).xy!==e||(t.check()&&!t.disposed?t._scheduleUpdate():--t.hotCounter<=0&&this._hotListeners.delete(t))}},{key:"refresh",value:function(){var t=this;this._refreshing=!0,this._checkRest||(this._checkInView=E(function(){return t._activeListeners.values()},function(e){t._hotListeners.has(e)||t._checkListener(e,!0)}),this._checkRest=E(function(){return t._activeListeners.values()},function(e){t._hotListeners.has(e)||t._checkListener(e,!1)}),this._checkHot=E(function(){return t._hotListeners.values()},function(e){return t._checkListener(e)}),this._update=E(function(){return t._scheduledUpdates.values()},function(e){e.update(),t._scheduledUpdates.delete(e)}));try{var e=0;e+=d(this._checkHot(3,25),2)[1],e+=d(this._checkInView(4-e,25),2)[1],e+=d(this._checkRest(5-e,25),2)[1],e+=d(this._update(10-e,25),2)[1],this._errors=0}catch(t){this._errors++<5&&(console.error(t),5===this._errors&&console.error("Errors happened more than 5 times in a row. Additional errors will not be logged."))}finally{this._refreshing=!1}}},{key:"getBounds",value:function(t){var e=this._bounds.get(t),r=t.getBoundingClientRect();if(r={left:r.left+window.pageXOffset,top:r.top+window.pageYOffset,width:r.width,height:r.height},e&&function(t,e){for(var r in t)if("number"==typeof t[r]&&p(t[r],e[r]))return!1;return!0}(r,e.rect))return e;var n=function(t){var e=window.getComputedStyle(t);return{top:parseInt(e.borderTopWidth),right:parseInt(e.borderRightWidth),bottom:parseInt(e.borderBottomWidth),left:parseInt(e.borderLeftWidth)}}(t);if(e={left:t.offsetLeft,top:t.offsetTop,width:t.offsetWidth-n.left-n.right,height:t.offsetHeight-n.top-n.bottom,rect:r},t.offsetParent){var i=this.getBounds(t.offsetParent,!0);e.left+=i.left,e.top+=i.top}return this._bounds.set(t,e),e}},{key:"_scheduleUpdate",value:function(t){this._validateListener(t),t.hotCounter=100,this._hotListeners.add(t),this._scheduledUpdates.add(t)}},{key:"_startPolling",value:function(t){this._validateListener(t),this._activeListeners.add(t)}},{key:"_stopPolling",value:function(t){this._validateListener(t),this._activeListeners.delete(t)}},{key:"_dispose",value:function(t){this._activeListeners.delete(t),this._listeners.delete(t)}},{key:"_validateListener",value:function(t){var e=!(arguments.length>1&&void 0!==arguments[1])||arguments[1],r=this._listeners.has(t);if(!r&&e)throw console.error("Invalid listener",t,this._listeners),new Error("The listener does not belong to this scanner.");return r}}]),t}();function R(t){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function N(t){return(N="function"==typeof Symbol&&"symbol"===R(Symbol.iterator)?function(t){return R(t)}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":R(t)})(t)}function U(t,e){return!e||"object"!==N(e)&&"function"!=typeof e?function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t):e}function B(t){return(B=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function q(t,e){return(q=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function D(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),e&&q(t,e)}function V(t,e,r){return(V="undefined"!=typeof Reflect&&Reflect.get?Reflect.get:function(t,e,r){var n=function(t,e){for(;!Object.prototype.hasOwnProperty.call(t,e)&&null!==(t=B(t)););return t}(t,e);if(n){var i=Object.getOwnPropertyDescriptor(n,e);return i.get?i.get.call(r):i.value}})(t,e,r||t)}var H=function(){function t(e){var r=this;n(this,t),this._providers=[],this._cache=new WeakMap,this._config=e,this._config.waitForLoad(function(){var t=r._config.settings.providers||[];r._providers=t.map(function(t){var e=t.match&&new RegExp(t.match,"i"),r=new Map;return{match:function(t,r){return e.test(t)},get:function(t,e){var n=r.get(t);if(n)return e(n,!0,!0);var i=new XMLHttpRequest;i.open("GET",t),i.onload=function(){if(i.readyState===i.DONE&&200===i.status){var n=i.responseXML&&i.responseXML.documentElement;if(n){var o=n.getAttribute("scropper");if(o)return(o=(o=JSON.parse(o))&&o.cropSettings)&&(o.width=1*n.getAttribute("width"),o.height=1*n.getAttribute("height")),r.set(t,o),void e(o,!0,!1)}e({dot:{top:.5,left:.5}},!0,!1)}},i.send()}}})})}return o(t,[{key:"isScropped",value:function(t){var e=j(t);return t&&this.isScroppedOrParentIs(t)&&(t.getAttribute("data-scropper")||this._providers.some(function(t){return t.match(e)}))}},{key:"isScroppedOrParentIs",value:function(t){return!w(t,"no-scrop")}},{key:"getValues",value:function(t){return{scropperAttr:t.getAttribute("data-scropper")}}},{key:"hasChanges",value:function(t){return t.scropperAttr||t.originalSrc}},{key:"getCropSettings",value:function(t,e,r,n,i){var o,a=this;if(n.scropperAttr)return o=JSON.parse(n.scropperAttr),this._cache.set(t,o),i(o,!0,!0);if(!r.originalSrc&&this._cache.has(t))return i(this._cache.get(t),!0,!0);var s=n.originalSrc,c=!0,u=!1,h=void 0;try{for(var l,d=this._providers[Symbol.iterator]();!(c=(l=d.next()).done);c=!0){var f=l.value;if(f.match(s,e))return f.get(s,function(e,r,n){r&&a._cache.set(t,e),r||console.warn("No scrop data found.",{src:s,data:e}),i(e,r?e:null,n)})}}catch(t){u=!0,h=t}finally{try{c||null==d.return||d.return()}finally{if(u)throw h}}return console.warn("No scrop data provider matched the image.",{src:s}),null}},{key:"selectors",get:function(){return selectors}}]),t}(),F=(r(3),"scrop-first"),G="scrop-up",W=function(t){function e(t){var r,i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},o=i.scropDataProvider,a=i.imageProvider;if(n(this,e),!t)throw new Error("target element expected.");if(!(o instanceof H))throw new Error("ScropDataProvider expected.");return(r=U(this,B(e).call(this)))._originalTarget=null,r._currentRequestId=0,r._loadingScropSettingsSrc=void 0,r._scropDataProvider=o,r._hasExternalImageProvider=!!a,"IMG"===t.tagName&&t.addEventListener("contextmenu",function(e){if(r.values.imageSrc){var n=t.src;t.src=r.values.imageSrc,setTimeout(function(){return t.src=n})}}),r._imageListener={score:function(){var e=k(t,200),n=[Math.min(Math.abs(e.xy),2),-r._prefetch,Math.abs(e.y),-r._priority,e.y<0,Math.abs(e.x)];return n},loading:function(t){r.values.imageIsLoading=!0}},r._imageProvider=a||function(t,e){var n=e.currentImage;return n&&n.requestedSrc===j(t)?n:A(t,r._imageListener)},r._originalTarget=r._target=t,r}return D(e,I),o(e,[{key:"start",value:function(){V(B(e.prototype),"start",this).call(this)&&(this.scanner.registerListenerForElement(this,this._originalTarget),this._prefetch=w(this._originalTarget,F),this._priority=w(this._originalTarget,G))}},{key:"dispose",value:function(){return V(B(e.prototype),"dispose",this).call(this)}},{key:"check",value:function(){var t=this,e=this._originalTarget;if(!this.scanner.isElementAttached(this._originalTarget))return this.dispose(),!1;var r=this.scanner.getBounds(e),n=this.values;this.bounds=r;var i=f(r.width),o=f(r.height);i&&o?this._updateValues({width:i,height:o,visible:!0}):this._updateValue("visible",!1),this._updateValues({scaleX:window.devicePixelRatio||1,scaleY:window.devicePixelRatio||1});var a=j(e);if(n.originalSrc===a||this._target===this._originalTarget&&this._originalTarget.style.backgroundImage===n.renderedSrc||(this._updateValue("originalSrc",a),this._updateValue("settings",{cropSettings:{dot:{left:.5,top:.5}},defaults:!0})),!n.maxSize&&"IMG"!==this._originalTarget.tagName){var s=window.getComputedStyle(this._originalTarget).backgroundSize.split(" ");this._updateValue("maxSize",s)}this._updateValues(this._scropDataProvider.getValues(this._originalTarget)),this._updateValue("loadingImageWidth",n.loadingImage&&(n.loadingImage.width||n.loadingImage.isLoaded()));var c=this.pendingChanges;if(c&&n.imageIsLoading&&(this._loadingScropSettingsSrc!==n.originalSrc||this._scropDataProvider.hasChanges(c))){this._loadingScropSettingsSrc=n.originalSrc,this._incLoading();var u=++this._currentRequestId;this._scropDataProvider.getCropSettings(this,this._originalTarget,c,n,function(e,r,i){if(u===t._currentRequestId)if(t._decLoading(i),n.settings||e&&r)e&&(e&&!e.cropSettings&&(e={cropSettings:e}),t._updateValue("settings",e));else if(!t._hasExternalImageProvider)return void t.dispose()})}if(c&&(c.width||c.settings||c.height||c.scaleX||c.scaleY||c.originalSrc||c.loadingImageWidth||c.visible)){var h=n.settings&&n.settings.cropSettings&&n.settings.cropSettings.box,l=h?h.right-h.left:1,d=n.visible?i:350,p=n.visible?o:350,g=Math.max(d,p);g/l>960&&(d/=l=Math.min(1,g/960),p/=l),n.loadingImage=this._imageProvider(n.originalSrc,{targetSize:{width:d*n.scaleX,height:p*n.scaleY},currentImage:n.loadingImage,el:this._originalTarget,listener:this._imageListener})}if(!n.loadingImage||n.loadingImage.isPlaceholder||n.image&&!n.loadingImage.isLoaded()||this._updateValue("image",n.loadingImage),n.image&&(this._updateValue("imageSrc",n.image.src),n.image.width)){var m=e["bfred-it:object-fit-images"];if(m&&m.img){var v=m.img;delete m.img,v.src=n.imageSrc,this._updateValue("ofr",!0)}}return this.values.renderedSrc&&this._originalTarget.style.backgroundImage!==this.values.renderedSrc?this._updateValue("refreshImage",!0):this.values.refreshImage=!1,this.pendingChanges}},{key:"update",value:function(){var t=this.values,e=this._target,r=this._resetChanges(),n=t.settings,i=t.image,o=t.width,a=t.height,s=t.loadBackdrop,c=e!==this._originalTarget?e.firstElementChild:null;if(r){if(r.ofr&&(e.style.fontFamily="helv",e.removeAttribute("data-ofi-src")),r.transparentSrc&&"IMG"===e.tagName&&(e.src=t.transparentSrc),r.imageSrc||r.loadBackdrop||t.refreshImage){var u=[];t.loadBackdrop&&u.push("url('".concat(t.loadBackdrop.src,"')")),t.imageSrc&&(c?c.src=t.imageSrc:u.push("url('".concat(t.imageSrc,"')")),e.setAttribute("data-scrp-seq",t.image.loadInfo.seq)),e.style.backgroundImage=u.join(","),e.style.backgroundRepeat="no-repeat",this.values.renderedSrc=e.style.backgroundImage}if(!t.visible)return;if(n&&(i&&i.width||s&&s.width)){var h={width:o,height:a},d=this._evaluateMaxBackgroundSize(this._originalTarget,t.maxSize);d&&(h.width=Math.min(d.width,h.width),h.height=Math.min(d.height,h.height));var f,p=!1!==n.stretch;n.targetSize?(p=!!n.stretch,f=h,h={width:Math.max(h.width,n.targetSize.width),height:Math.max(h.height,n.targetSize.height)}):n.zoom&&(p=!!n.stretch,f=h,h={width:h.width/n.zoom,height:h.height/n.zoom});var g=[],m=[];if(i){var v={width:i.width/t.scaleX,height:i.height/t.scaleY},y=l.crop(n.cropSettings,v,h,{stretch:p,containerSize:f});y&&(c?function(t,e){var r=Math.floor(e.top),n=Math.floor(e.left),i=Math.floor(e.width),o=Math.floor(e.height),a=e.left-n,s=e.top-r,c=e.width/i,u=e.height/o;t.style.left=b(n),t.style.top=b(r),t.style.width=b(i),t.style.height=b(o),t.style.transformOrigin="0 0",t.style.transform="translate(".concat(b(a,!0),", ").concat(b(s,!0),") scale(").concat(c,", ").concat(u,")")}(c,y):(g.push("".concat(b(y.width,!0)," ").concat(b(y.height,!0))),m.push("".concat(b(y.left,!0)," ").concat(b(y.top,!0)))))}e.style.backgroundSize=g.join(","),e.style.backgroundPosition=m.join(",")}}}},{key:"_evaluateMaxBackgroundSize",value:function(t,e){if(!e||0===e.length)return null;var r,n;if(1===e.length&&(e[1]=e[0]),-1!==e[0].indexOf("px"))r=parseInt(e[0]);else{if(-1===e[0].indexOf("%"))return;r=this.scanner.getBounds(t).width*parseFloat(e[0])/100}if(-1!==e[1].indexOf("px"))n=parseInt(e[1]);else{if(-1===e[1].indexOf("%"))return null;n=this.scanner.getBounds(t).height*parseFloat(e[1])/100}return{width:r,height:n}}},{key:"_incLoading",value:function(){this._updateValue("loading",(this.values.loading||0)+1)}},{key:"_decLoading",value:function(t){var e=this.values.loading;e&&(--e,this._updateValue("loading",e),0==e&&t&&this._resetChanges("loading"))}},{key:"target",get:function(){return this._target}}]),e}(),X=function(){function t(){n(this,t),this._waiting=[],this._ready=!1,this.presets=[],this.minBoxSize={width:0,height:0},this._settings=null}return o(t,[{key:"setConfig",value:function(t){if(t){t.minBoxSize&&(this.minBoxSize=t.minBoxSize,K.THUMB_SIZE=t.minBoxSize.width),t.presets&&(this.presets=t.presets),this._settings=t,this._ready=!0;var e=!0,r=!1,n=void 0;try{for(var i,o=this._waiting[Symbol.iterator]();!(e=(i=o.next()).done);e=!0){(0,i.value)()}}catch(t){r=!0,n=t}finally{try{e||null==o.return||o.return()}finally{if(r)throw n}}}}},{key:"load",value:function(t){var e=this;this._ready||function(t,e,r){var n=new XMLHttpRequest;n.open(e?"POST":"GET",t),n.timeout=6e4,n.setRequestHeader("Content-Type","application/json"),n.onreadystatechange=function(){if(n.readyState===XMLHttpRequest.DONE){if(200===n.status)try{return r(JSON.parse(n.responseText),!0,!1)}catch(t){return r(n.responseText,!1,!1)}return r(null,!1,!1)}},n.send(e?JSON.stringify(e):void 0)}(t,null,function(t,r,n){r?e.setConfig(t):console.error("Config not found or invalid JSON returned.",{response:t})})}},{key:"waitForLoad",value:function(t){this._ready?t():this._waiting.push(t)}},{key:"settings",get:function(){return this._settings}},{key:"selectors",get:function(){return this._selectors}}]),t}(),J=function(t){function e(t,r){var i;if(n(this,e),!(t instanceof X))throw new Error("ScropperConfig expected");if(!(r instanceof H))throw new Error("ScropDataProvider expected");return(i=U(this,B(e).call(this)))._imageIterator=null,i._selectorIterator=null,i._imageProvider=void 0,i._stop=!1,i._loadHandler=function(t){t.target&&"IMG"===t.target.tagName&&i._mapElement(t.target)},i._scropped=new WeakMap,i._config=t,i._scropDataProvider=r,i}return D(e,I),o(e,[{key:"start",value:function(){var t=this;this._config.waitForLoad(function(){var r=t._config.settings.breakpoints;if(r&&r.length){var n=t._config.settings.providers&&t._config.settings.providers[0],i=n&&n.match&&new RegExp(n.match,"i");t._imageProvider=function(t,e){var n=e.targetSize,o=e.currentImage,a=e.listener,s=t,c=o&&o.requestedSrc===s?o:A(t,a);if(c.isPlaceholder=!c.breakpointDim,!c.width&&!c.isLoaded())return c;var u=c.breakpointDim;if(u&&c.width<u&&c.height<u)return c.fullSize=!0,c;var h=n.width,l=n.height,d=c.width/c.height||1;if(d<h/l?l=1*h/d:h=l*d,-1!==t.indexOf("?")&&(t=t.substring(0,t.indexOf("?"))),i&&(t=t.replace(i,"")),c.breakpointDim&&h<=c.width&&l<=c.height)return c;for(var f=0;f<r.length;f++){var p=r[f].dim||Number.MAX_VALUE;if(!(c.breakpointDim>=p)&&(f===r.length-1||h<=p&&l<=p)){(c=A(r[f].src.replace("{src}",t),a)).requestedSrc=s,c.breakpointDim=p;break}}return c}}V(B(e.prototype),"start",t).call(t)&&(document.addEventListener("load",t._loadHandler,!0),t._imageIterator=E(document.getElementsByTagName("IMG"),function(e){return t._mapElement(e)}),t._selectorIterator=E(document.getElementsByClassName("scrop"),function(e){return t._mapElement(e)}))})}},{key:"check",value:function(){this._imageIterator&&this._imageIterator(.6),this._selectorIterator&&this._selectorIterator(.4)}},{key:"stop",value:function(){V(B(e.prototype),"stop",this).call(this)&&document.removeEventListener("load",this._loadHandler,!0)}},{key:"_mapElement",value:function(t){if(!this._scropped.has(t)&&this._scropDataProvider.isScropped(t)){this._scropped.set(t,!0);var e=new W(t,{scropDataProvider:this._scropDataProvider,imageProvider:this._imageProvider});this.scanner.registerListener(e)}}}]),e}(),Y=new X,Z=new H(Y),$=new C(window,document);$.registerListener(new J(Y,Z));var K=l;Y.setConfig("undefined"!=typeof scropperConfig?scropperConfig:window.__Scropper_config),Y.load("scropper.config.js"),$.start(),window.scanner=$}]);