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mB,WACjB,IAAI,EAAmB,KAAK,EAAE,YAAY,MACtC,EAAmB,KAAK,EAAE,YAAY,MAE1C,EAAiB,eAAiB,EAAiB,eAC/C,KAAK,OAET,EAAiB,mBAAqB,EAAiB,mBACnD,KAAK,OAAS,KAAK,SAAW,GAElC,EAAiB,iBAAmB,EAAiB,iBACjD,KAAK,OAAS,YAAc,EAClC,EAEA,YAAa,SAAS,GACpB,IAAI,EAAW,WAAW,EAAS,KAAK,EAAE,cAAc,MAUxD,OANI,EAAS,QAAU,GAAqB,MAAhB,EAAS,IAA8B,MAAhB,EAAS,KAG1D,GAAY,SAAS,QAAU,SAAS,SAAW,KAAO,SAAS,MAC/D,GAEC,CACT","file":"/npm/@polymer/iron-image@3.0.2/iron-image.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.37.0.\n * Original file: /npm/@polymer/iron-image@3.0.2/iron-image.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","/**\n@license\nCopyright (c) 2016 The Polymer Project Authors. All rights reserved.\nThis code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt\nThe complete set of authors may be found at http://polymer.github.io/AUTHORS.txt\nThe complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt\nCode distributed by Google as part of the polymer project is also\nsubject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt\n*/\nimport '@polymer/polymer/polymer-legacy.js';\n\nimport {Polymer} from '@polymer/polymer/lib/legacy/polymer-fn.js';\nimport {html} from '@polymer/polymer/lib/utils/html-tag.js';\nimport {resolveUrl} from '@polymer/polymer/lib/utils/resolve-url.js';\n\n/**\n`iron-image` is an element for displaying an image that provides useful sizing and\npreloading options not found on the standard `<img>` tag.\n\nThe `sizing` option allows the image to be either cropped (`cover`) or\nletterboxed (`contain`) to fill a fixed user-size placed on the element.\n\nThe `preload` option prevents the browser from rendering the image until the\nimage is fully loaded.  In the interim, either the element's CSS `background-color`\ncan be be used as the placeholder, or the `placeholder` property can be\nset to a URL (preferably a data-URI, for instant rendering) for an\nplaceholder image.\n\nThe `fade` option (only valid when `preload` is set) will cause the placeholder\nimage/color to be faded out once the image is rendered.\n\nExamples:\n\n  Basically identical to `<img src=\"...\">` tag:\n\n    <iron-image src=\"http://lorempixel.com/400/400\"></iron-image>\n\n  Will letterbox the image to fit:\n\n    <iron-image style=\"width:400px; height:400px;\" sizing=\"contain\"\n      src=\"http://lorempixel.com/600/400\"></iron-image>\n\n  Will crop the image to fit:\n\n    <iron-image style=\"width:400px; height:400px;\" sizing=\"cover\"\n      src=\"http://lorempixel.com/600/400\"></iron-image>\n\n  Will show light-gray background until the image loads:\n\n    <iron-image style=\"width:400px; height:400px; background-color: lightgray;\"\n      sizing=\"cover\" preload src=\"http://lorempixel.com/600/400\"></iron-image>\n\n  Will show a base-64 encoded placeholder image until the image loads:\n\n    <iron-image style=\"width:400px; height:400px;\" placeholder=\"data:image/gif;base64,...\"\n      sizing=\"cover\" preload src=\"http://lorempixel.com/600/400\"></iron-image>\n\n  Will fade the light-gray background out once the image is loaded:\n\n    <iron-image style=\"width:400px; height:400px; background-color: lightgray;\"\n      sizing=\"cover\" preload fade src=\"http://lorempixel.com/600/400\"></iron-image>\n\nCustom property | Description | Default\n----------------|-------------|----------\n`--iron-image-placeholder` | Mixin applied to #placeholder | `{}`\n`--iron-image-width` | Sets the width of the wrapped image | `auto`\n`--iron-image-height` | Sets the height of the wrapped image | `auto`\n\n@group Iron Elements\n@element iron-image\n@demo demo/index.html\n*/\nPolymer({\n  _template: html`\n    <style>\n      :host {\n        display: inline-block;\n        overflow: hidden;\n        position: relative;\n      }\n\n      #baseURIAnchor {\n        display: none;\n      }\n\n      #sizedImgDiv {\n        position: absolute;\n        top: 0px;\n        right: 0px;\n        bottom: 0px;\n        left: 0px;\n\n        display: none;\n      }\n\n      #img {\n        display: block;\n        width: var(--iron-image-width, auto);\n        height: var(--iron-image-height, auto);\n      }\n\n      :host([sizing]) #sizedImgDiv {\n        display: block;\n      }\n\n      :host([sizing]) #img {\n        display: none;\n      }\n\n      #placeholder {\n        position: absolute;\n        top: 0px;\n        right: 0px;\n        bottom: 0px;\n        left: 0px;\n\n        background-color: inherit;\n        opacity: 1;\n\n        @apply --iron-image-placeholder;\n      }\n\n      #placeholder.faded-out {\n        transition: opacity 0.5s linear;\n        opacity: 0;\n      }\n    </style>\n\n    <a id=\"baseURIAnchor\" href=\"#\"></a>\n    <div id=\"sizedImgDiv\" role=\"img\" hidden$=\"[[_computeImgDivHidden(sizing)]]\" aria-hidden$=\"[[_computeImgDivARIAHidden(alt)]]\" aria-label$=\"[[_computeImgDivARIALabel(alt, src)]]\"></div>\n    <img id=\"img\" alt$=\"[[alt]]\" hidden$=\"[[_computeImgHidden(sizing)]]\" crossorigin$=\"[[crossorigin]]\" on-load=\"_imgOnLoad\" on-error=\"_imgOnError\">\n    <div id=\"placeholder\" hidden$=\"[[_computePlaceholderHidden(preload, fade, loading, loaded)]]\" class$=\"[[_computePlaceholderClassName(preload, fade, loading, loaded)]]\"></div>\n`,\n\n  is: 'iron-image',\n\n  properties: {\n    /**\n     * The URL of an image.\n     */\n    src: {type: String, value: ''},\n\n    /**\n     * A short text alternative for the image.\n     */\n    alt: {type: String, value: null},\n\n    /**\n     * CORS enabled images support:\n     * https://developer.mozilla.org/en-US/docs/Web/HTML/CORS_enabled_image\n     */\n    crossorigin: {type: String, value: null},\n\n    /**\n     * When true, the image is prevented from loading and any placeholder is\n     * shown.  This may be useful when a binding to the src property is known to\n     * be invalid, to prevent 404 requests.\n     */\n    preventLoad: {type: Boolean, value: false},\n\n    /**\n     * Sets a sizing option for the image.  Valid values are `contain` (full\n     * aspect ratio of the image is contained within the element and\n     * letterboxed) or `cover` (image is cropped in order to fully cover the\n     * bounds of the element), or `null` (default: image takes natural size).\n     */\n    sizing: {type: String, value: null, reflectToAttribute: true},\n\n    /**\n     * When a sizing option is used (`cover` or `contain`), this determines\n     * how the image is aligned within the element bounds.\n     */\n    position: {type: String, value: 'center'},\n\n    /**\n     * When `true`, any change to the `src` property will cause the\n     * `placeholder` image to be shown until the new image has loaded.\n     */\n    preload: {type: Boolean, value: false},\n\n    /**\n     * This image will be used as a background/placeholder until the src image\n     * has loaded.  Use of a data-URI for placeholder is encouraged for instant\n     * rendering.\n     */\n    placeholder: {type: String, value: null, observer: '_placeholderChanged'},\n\n    /**\n     * When `preload` is true, setting `fade` to true will cause the image to\n     * fade into place.\n     */\n    fade: {type: Boolean, value: false},\n\n    /**\n     * Read-only value that is true when the image is loaded.\n     */\n    loaded: {notify: true, readOnly: true, type: Boolean, value: false},\n\n    /**\n     * Read-only value that tracks the loading state of the image when the\n     * `preload` option is used.\n     */\n    loading: {notify: true, readOnly: true, type: Boolean, value: false},\n\n    /**\n     * Read-only value that indicates that the last set `src` failed to load.\n     */\n    error: {notify: true, readOnly: true, type: Boolean, value: false},\n\n    /**\n     * Can be used to set the width of image (e.g. via binding); size may also\n     * be set via CSS.\n     */\n    width: {observer: '_widthChanged', type: Number, value: null},\n\n    /**\n     * Can be used to set the height of image (e.g. via binding); size may also\n     * be set via CSS.\n     *\n     * @attribute height\n     * @type number\n     * @default null\n     */\n    height: {observer: '_heightChanged', type: Number, value: null},\n  },\n\n  observers: [\n    '_transformChanged(sizing, position)',\n    '_loadStateObserver(src, preventLoad)'\n  ],\n\n  created: function() {\n    this._resolvedSrc = '';\n  },\n\n  _imgOnLoad: function() {\n    if (this.$.img.src !== this._resolveSrc(this.src)) {\n      return;\n    }\n\n    this._setLoading(false);\n    this._setLoaded(true);\n    this._setError(false);\n  },\n\n  _imgOnError: function() {\n    if (this.$.img.src !== this._resolveSrc(this.src)) {\n      return;\n    }\n\n    this.$.img.removeAttribute('src');\n    this.$.sizedImgDiv.style.backgroundImage = '';\n\n    this._setLoading(false);\n    this._setLoaded(false);\n    this._setError(true);\n  },\n\n  _computePlaceholderHidden: function() {\n    return !this.preload || (!this.fade && !this.loading && this.loaded);\n  },\n\n  _computePlaceholderClassName: function() {\n    return (this.preload && this.fade && !this.loading && this.loaded) ?\n        'faded-out' :\n        '';\n  },\n\n  _computeImgDivHidden: function() {\n    return !this.sizing;\n  },\n\n  _computeImgDivARIAHidden: function() {\n    return this.alt === '' ? 'true' : undefined;\n  },\n\n  _computeImgDivARIALabel: function() {\n    if (this.alt !== null) {\n      return this.alt;\n    }\n\n    // Polymer.ResolveUrl.resolveUrl will resolve '' relative to a URL x to\n    // that URL x, but '' is the default for src.\n    if (this.src === '') {\n      return '';\n    }\n\n    // NOTE: Use of `URL` was removed here because IE11 doesn't support\n    // constructing it. If this ends up being problematic, we should\n    // consider reverting and adding the URL polyfill as a dev dependency.\n    var resolved = this._resolveSrc(this.src);\n    // Remove query parts, get file name.\n    return resolved.replace(/[?|#].*/g, '').split('/').pop();\n  },\n\n  _computeImgHidden: function() {\n    return !!this.sizing;\n  },\n\n  _widthChanged: function() {\n    this.style.width = isNaN(this.width) ? this.width : this.width + 'px';\n  },\n\n  _heightChanged: function() {\n    this.style.height = isNaN(this.height) ? this.height : this.height + 'px';\n  },\n\n  _loadStateObserver: function(src, preventLoad) {\n    var newResolvedSrc = this._resolveSrc(src);\n    if (newResolvedSrc === this._resolvedSrc) {\n      return;\n    }\n\n    this._resolvedSrc = '';\n    this.$.img.removeAttribute('src');\n    this.$.sizedImgDiv.style.backgroundImage = '';\n\n    if (src === '' || preventLoad) {\n      this._setLoading(false);\n      this._setLoaded(false);\n      this._setError(false);\n    } else {\n      this._resolvedSrc = newResolvedSrc;\n      this.$.img.src = this._resolvedSrc;\n      this.$.sizedImgDiv.style.backgroundImage =\n          'url(\"' + this._resolvedSrc + '\")';\n\n      this._setLoading(true);\n      this._setLoaded(false);\n      this._setError(false);\n    }\n  },\n\n  _placeholderChanged: function() {\n    this.$.placeholder.style.backgroundImage =\n        this.placeholder ? 'url(\"' + this.placeholder + '\")' : '';\n  },\n\n  _transformChanged: function() {\n    var sizedImgDivStyle = this.$.sizedImgDiv.style;\n    var placeholderStyle = this.$.placeholder.style;\n\n    sizedImgDivStyle.backgroundSize = placeholderStyle.backgroundSize =\n        this.sizing;\n\n    sizedImgDivStyle.backgroundPosition = placeholderStyle.backgroundPosition =\n        this.sizing ? this.position : '';\n\n    sizedImgDivStyle.backgroundRepeat = placeholderStyle.backgroundRepeat =\n        this.sizing ? 'no-repeat' : '';\n  },\n\n  _resolveSrc: function(testSrc) {\n    var resolved = resolveUrl(testSrc, this.$.baseURIAnchor.href);\n    // NOTE: Use of `URL` was removed here because IE11 doesn't support\n    // constructing it. If this ends up being problematic, we should\n    // consider reverting and adding the URL polyfill as a dev dependency.\n    if (resolved.length >= 2 && resolved[0] === '/' && resolved[1] !== '/') {\n      // In IE location.origin might not work\n      // https://connect.microsoft.com/IE/feedback/details/1763802/location-origin-is-undefined-in-ie-11-on-windows-10-but-works-on-windows-7\n      resolved = (location.origin || location.protocol + '//' + location.host) +\n          resolved;\n    }\n    return resolved;\n  }\n});\n"]}