/*! * Copyright (c) 2017 Apple Inc. All rights reserved. * * # LivePhotosKit JS License * * **IMPORTANT:** This Apple LivePhotosKit software is supplied to you by Apple * Inc. ("Apple") in consideration of your agreement to the following terms, and * your use, reproduction, or installation of this Apple software constitutes * acceptance of these terms. If you do not agree with these terms, please do not * use, reproduce or install this Apple software. * * This Apple LivePhotosKit software is supplied to you by Apple Inc. ("Apple") in * consideration of your agreement to the following terms, and your use, * reproduction, or installation of this Apple software constitutes acceptance of * these terms. If you do not agree with these terms, please do not use, reproduce * or install this Apple software. * * This software is licensed to you only for use with LivePhotos that you are * authorized or legally permitted to embed or display on your website. * * The LivePhotosKit Software is only licensed and intended for the purposes set * forth above and may not be used for other purposes or in other contexts without * Apple's prior written permission. For the sake of clarity, you may not and * agree not to or enable others to, modify or create derivative works of the * LivePhotosKit Software. * * Neither the name, trademarks, service marks or logos of Apple Inc. may be used * to endorse or promote products, services without specific prior written * permission from Apple. Except as expressly stated in this notice, no other * rights or licenses, express or implied, are granted by Apple herein. * * The LivePhotosKit Software is provided by Apple on an "AS IS" basis. APPLE * MAKES NO WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE * IMPLIED WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A * PARTICULAR PURPOSE, REGARDING THE LIVEPHOTOSKIT SOFTWARE OR ITS USE AND * OPERATION ALONE OR IN COMBINATION WITH YOUR PRODUCTS, SYSTEMS, OR SERVICES. * APPLE DOES NOT WARRANT THAT THE LIVEPHOTOSKIT SOFTWARE WILL MEET YOUR * REQUIREMENTS, THAT THE OPERATION OF THE LIVEPHOTOSKIT SOFTWARE WILL BE * UNINTERRUPTED OR ERROR-FREE, THAT DEFECTS IN THE LIVEPHOTOSKIT SOFTWARE WILL BE * CORRECTED, OR THAT THE LIVEPHOTOSKIT SOFTWARE WILL BE COMPATIBLE WITH FUTURE * APPLE PRODUCTS, SOFTWARE OR SERVICES. NO ORAL OR WRITTEN INFORMATION OR ADVICE * GIVEN BY APPLE OR AN APPLE AUTHORIZED REPRESENTATIVE WILL CREATE A WARRANTY. * * IN NO EVENT SHALL APPLE BE LIABLE FOR ANY DIRECT, SPECIAL, INDIRECT, INCIDENTAL * OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS * INTERRUPTION) RELATING TO OR ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, * OR INSTALLATION, OF THE LIVEPHOTOSKIT SOFTWARE BY YOU OR OTHERS, HOWEVER CAUSED * AND WHETHER UNDER THEORY OF CONTRACT, TORT (INCLUDING NEGLIGENCE), STRICT * LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. SOME JURISDICTIONS DO NOT ALLOW THE LIMITATION OF LIABILITY FOR * PERSONAL INJURY, OR OF INCIDENTAL OR CONSEQUENTIAL DAMAGES, SO THIS LIMITATION * MAY NOT APPLY TO YOU. In no event shall Apple's total liability to you for all * damages (other than as may be required by applicable law in cases involving * personal injury) exceed the amount of fifty dollars ($50.00). The foregoing * limitations will apply even if the above stated remedy fails of its essential * purpose. * * * **ACKNOWLEDGEMENTS:** * https://cdn.apple-livephotoskit.com/lpk/1/acknowledgements.txt * * v1.5.8 */ !function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.LivePhotosKit=t():e.LivePhotosKit=t()}(this,function(){return function(e){function t(i){if(r[i])return r[i].exports;var n=r[i]={i:i,l:!1,exports:{}};return e[i].call(n.exports,n,n.exports,t),n.l=!0,n.exports}var r={};return t.m=e,t.c=r,t.i=function(e){return e},t.d=function(e,r,i){t.o(e,r)||Object.defineProperty(e,r,{configurable:!1,enumerable:!0,get:i})},t.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return t.d(r,"a",r),r},t.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},t.p="",t(t.s=69)}([function(e,t,r){"use strict";function i(e){if(e){var t=e.staticMembers;t&&n.call(this,t),n.call(this.prototype,e)}}function n(e){for(var t in e)if(e.hasOwnProperty(t)&&"staticMembers"!==t){var r=Object.getOwnPropertyDescriptor(e,t);r.get||r.set?Object.defineProperty(this,t,r):a.call(this,t,e[t])}}function a(e,t){var r=this[e];return r instanceof Function&&t instanceof Function?o.call(this,e,t,r):L.instanceOrKindOf(t,L.Metadata)?s.call(this,e,t):void(this[e]=t)}function o(e,t,r){this[e]=function(){var e=this._super;this._super=r;var i=t.apply(this,arguments);return this._super=e,i}}function s(e,t){this.hasOwnProperty("_metadatas")||(this._metadatas=Object.create(this._metadatas)),(t.isLPKClass?t.sharedInstance:t).registerOnDefinition(this,e)}function d(e){var t=this["_callbacksFor_"+e];if(t){var r=void 0;if(arguments.length>1){r=L.arrayPool.get();for(var i=1,n=arguments.length;i1)for(var i=0;i1?t-1:0),i=1;i1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),n=1;n1?t-1:0),i=1;i1?t-1:0),i=1;i0&&void 0!==arguments[0]?arguments[0]:{};l.a&&!e.videoSrc&&e.photoSrc?o.a.warn("Changing a `photoSrc` independent of its `videoSrc` can result in unexpected behavior"):l.a&&e.videoSrc&&!e.photoSrc&&o.a.warn("Changing a `videoSrc` independent of its `photoSrc` can result in unexpected behavior");var t=S?{photoSrc:S.photo,videoSrc:S.videoSrc,effectType:S.effectType,autoplay:S.autoplay,proactivelyLoadsVideo:S.proactivelyLoadsVideo}:{},r=c({},t,e),i=(r.photoSrc,r.videoSrc,r.effectType),u=r.autoplay,h=r.proactivelyLoadsVideo;E=a.a.objectPool.get(),r.preloadedEffectType=i,r.autoplay=!1!==u;var f=i||d.a.default;d.a.toPlaybackStyle(f)===s.a.LOOP&&r.autoplay&&(l.a&&!h&&o.a.warn("When using a looping asset you should set `proactivelyLoadsVideo` to `true` unless `autoplay` is also set to `false`"),r.proactivelyLoadsVideo=!0);for(var p in r)if(Object.prototype.hasOwnProperty.call(r,p)){var v=m[p];v.isProperty&&!v.readOnly?E[p]=r[p]:o.a.warn("LivePhotosKit.Player: Initial configuration for `"+p+"` was ignored, because the property is not a writable property.")}if(S)for(var y in E){var g=E[y];S[y]=g}else S=n.a.create(O,E);a.a.objectPool.ret(E),E=null};O.setProperties=L,O.setProperties(t);for(var C,F,V=0;(C=b[V])&&(F=T[V]);V++)!function(e,t,r){r.isMethod?(x.value=S[t].bind(S),Object.defineProperty(O,t,x)):r.isProperty&&(k.set=r.readOnly?function(){}:function(e){S[t]=e},k.get=function(){return S[t]},Object.defineProperty(O,t,k))}(0,C,F);x.value=function(){var e=arguments.length,t=arguments[e-1];if(e<1||!(t instanceof Function))throw new Error("Invalid arguments passed to `observe`. Form: key, [key, …], callback.");for(var r=a.a.arrayPool.get(),i=0,n=e;i=3||"string"==typeof arguments[0]&&"string"==typeof arguments[1])throw new Error("LivePhotosKit.Player: Creating a new Player using arguments of the form 'photoSrc, videoSrc, [targetElement, [options]]' is no longer supported. Instead, use the new signature, '[targetElement, [options]]");return o.a.warn("The `LivePhotosKit.Player` method will be deprecated in an upcoming release. Please use the `LivePhotosKit.augementElementAsPlayer` or `LivePhotosKit.createPlayer` methods, instead."),e?E(e,t):S(t)},w=function e(t,r){i(this,e),this.fire=function(){r[t.keyOnObject]()},this.disconnect=function(){t.unregisterFromDefinition(r)},this.connect=function(){t.registerOnDefinition(r)}}},function(e,t,r){"use strict";var i=/_lpk_debug=true/i;t.a=i.test(window.location.search)||i.test(window.location.hash)},function(e,t,r){"use strict";var i={setUpForRender:function(){this.attachInto(this.renderer)},tearDownFromRender:function(){this.detach(),this._super()},renderStyles:function(e){for(var t,r=this.element,i=r.style,n=0;t=e[n];n++){var a=t,o=a.styleKey,s=a.value;i[o]!==s&&(i[o]=s)}}};t.a=i},function(e,t,r){"use strict";var i=r(65),n=r(66),a=r(99);t.a={APP_NAME:"LivePhotosKit",BUILD_NUMBER:i.a,MASTERING_NUMBER:n.a,FEEDBACK_URL_PREFIX:"https://feedbackws.icloud.com",LIVEPHOTOSKIT_LOADED:"livephotoskitloaded",URL_PREFIX:"https://cdn.apple-livephotoskit.com",VERSION:a.a}},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",function(){return u});var n=r(3),a=r(94),o=r(18),s=r(10),d=r(1),l=function(){function e(e,t){for(var r=0;r0&&void 0!==arguments[0]?arguments[0]:{};i(this,e),this._setInstanceProps(r),this._createCanvas(),this.redraw(),this._addEventListeners(),s.a.observe("locale",function(){return t.updateBadgeText()})}return l(e,[{key:"attachPlayerInstance",value:function(e){e.attachBadgeView(this),this.updateBadgeText(e.effectType)}},{key:"redraw",value:function(){var e=this.progress;e>0&&this.shouldAnimateProgressRing?this._animateProgressRing():this._redraw(e)}},{key:"reset",value:function(){var e=this._requestedFrame;e&&cancelAnimationFrame(e),this._progress=0,this._previousProgress=0,this.redraw()}},{key:"appendTo",value:function(e){e.appendChild(this.element)}},{key:"updateAriaLabel",value:function(){var e=n.a.toLocalizedString(this.effectType),t=s.a.getString("VideoEffects.Badge");this.element.setAttribute("aria-label",t+": "+e)}},{key:"updateBadgeText",value:function(e){e?this.effectType=e:e=this.effectType,this.label=e?n.a.toBadgeText(e):"",this.playbackStyle=n.a.toPlaybackStyle(e),this.updateAriaLabel(),this._redraw()}},{key:"_createCanvas",value:function(){var e=this.element;if(e){if("canvas"!==e.tagName.toLowerCase())throw new Error("Backing element for LivePhotoBadge needs to be an HTMLCanvasElement.")}else e=this.element=document.createElement("canvas");e.setAttribute("role","button"),this.updateAriaLabel(),e.classList.add("lpk-badge"),this._context=e.getContext("2d")}},{key:"_setCanvasSize",value:function(){var e=this.element,t=o.a(),r=this.height,i=this.width;e.height=r*t,e.width=i*t,e.style.height=r+"px",e.style.width=i+"px"}},{key:"_setInstanceProps",value:function(e){var t={};for(var r in c)t.hasOwnProperty.call(c,r)&&(this[r]=e.hasOwnProperty(r)?e[r]:c[r]);this.defaultProps=c}},{key:"_redraw",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=(this.element,this.label),r=t.toLowerCase()||n.a.default;this._setCanvasSize(),this._context.clearRect(0,0,this.width,this.height),this._drawBackground(),this._drawLabel(),this.shouldShowError||(this._drawInnerCircle(),n.a.toPlaybackStyle(r)!==d.a.LOOP?this._drawPlayArrow():this._drawLoopCircle()),this.shouldShowError?(this._drawProgressRing(1),this._drawErrorSlash()):this.progress>0?this._drawProgressRing(e):this._drawDottedCircle()}},{key:"_drawBackground",value:function(){var e=o.a(),t=this._context,r=this.borderRadius*e,i=this.width*e,n=this.height*e;t.beginPath(),t.moveTo(r,0),t.lineTo(i-r,0),t.quadraticCurveTo(i,0,i,r),t.lineTo(i,n-r),t.quadraticCurveTo(i,n,i-r,n),t.lineTo(r,n),t.quadraticCurveTo(0,n,0,n-r),t.lineTo(0,r),t.quadraticCurveTo(0,0,r,0),t.closePath(),t.fillStyle=this.backgroundColor,t.fill()}},{key:"_drawDottedCircle",value:function(){for(var t=e.numberOfDots,r=this.dottedRadius*o.a(),i=0;i0?s.width:0;return this._width=(d>2?a:-2)+2*t+2*n+Math.ceil(d/o.a())}},{key:"fontStyle",get:function(){return this.fontSize*o.a()+'pt/1 system, -apple-system, BlinkMacSystemFont, "Helvetica Neue", Helvetica'}},{key:"x0",get:function(){return(this.dottedRadius+this.leftPadding)*o.a()}},{key:"y0",get:function(){return this.height/2*o.a()}},{key:"progress",set:function(e){"number"==typeof e&&(this._previousProgress=this._progress,this._progress=e,this.redraw())},get:function(){return this._progress}},{key:"shouldShowError",set:function(e){this._shouldShowError=!!e,this._redraw(this.progress)},get:function(){return this._shouldShowError}}],[{key:"numberOfDots",get:function(){return 1===o.a()?17:26}}]),e}()},function(e,t,r){"use strict";var i=r(74),n=r(0),a=r(6),o=i.a.extend({mimeType:n.a.observableProperty({dependencies:["_mimeTypeFromXHR"],get:function(e){return this._mimeTypeFromXHR||e||null}}),_mimeTypeFromXHR:n.a.observableProperty(),requiresMimeTypeForRawArrayBufferSrc:!0,exposedMimeTypeKeyForErrorStrings:"mimeType",exposedSrcKeyForErrorStrings:"src",abortCurrentLoad:function(){this.__xhr&&(this._detachXHR(),this._xhr.abort()),this._mimeTypeFromXHR=null,this.abortCurrentSecondaryLoad()},loadSrc:function(e){if("string"==typeof e){this._mimeTypeFromXHR=null,this._attachXHR();var t=this._xhr;t.open("GET",e),t.responseType="arraybuffer",t.send(null)}else if(e instanceof ArrayBuffer){if(!this.mimeType&&this.requiresMimeTypeForRawArrayBufferSrc)throw new Error("MIME Type must be assigned to `"+this.exposedMimeTypeKeyForErrorStrings+"` prior to assigning a raw ArrayBuffer to `"+this.exposedSrcKeyForErrorStrings+"`.");this.beginSecondaryLoad(e,this.mimeType)}},get _xhr(){var e=this.__xhr;return e||(e=this.__xhr=new XMLHttpRequest),e},_detachXHR:function(){var e=this._xhr;e.removeEventListener("progress",this._xhrProgress),e.removeEventListener("readystatechange",this._xhrReadyStateChanged)},_attachXHR:function(){var e=this._xhr;e.addEventListener("progress",this._xhrProgress),e.addEventListener("readystatechange",this._xhrReadyStateChanged)},_xhrReadyStateChanged:function(){if("loading"===this.state){if(this._xhr.readyState>=2&&200!==this._xhr.status){var e=new Error("Failed to download resource from URL assigned to '"+this.exposedSrcKeyForErrorStrings+"'.");return e.errCode=a.a.FAILED_TO_DOWNLOAD_RESOURCE,this.loadDidFail(e)}return 4===this._xhr.readyState&&200===this._xhr.status?this._xhrLoadDidFinish():void 0}},_xhrProgress:function(e){if(e&&e.total){var t=(+e.loaded||0)/e.total;+t===t&&(this.progress=Math.max(0,Math.min(1,t)))}},_xhrLoadDidFinish:function(){this._mimeTypeFromXHR=this._xhr.getResponseHeader("Content-Type"),this.beginSecondaryLoad(this._xhr.response,this.mimeType)},beginSecondaryLoad:function(e,t){this._defaultSecondaryLoadTimeout=setTimeout(this.loadDidSucceed.bind(this,e),0)},abortCurrentSecondaryLoad:function(){this._defaultSecondaryLoadTimeout&&(clearTimeout(this._defaultSecondaryLoadTimeout),this._defaultSecondaryLoadTimeout=null)},init:function(){this._xhrReadyStateChanged=this._xhrReadyStateChanged.bind(this),this._xhrProgress=this._xhrProgress.bind(this),this._super()}});t.a=o},function(e,t,r){"use strict";var i=r(2);t.a=i.a.isEdge||i.a.isIE},function(e,t,r){"use strict";function i(){d.forEach(function(e){return e()})}function n(e){d.push(e)}function a(){return window.devicePixelRatio}function o(){return Math.ceil(a())}t.b=n,t.a=o;var s=void 0,d=[];!function(){window.matchMedia&&(s=window.matchMedia("only screen and (-webkit-min-device-pixel-ratio:1.3),only screen and (-o-min-device-pixel-ratio:13/10),only screen and (min-resolution:120dpi)"),s.addListener(i))}()},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}var n=function(){function e(e,t){for(var r=0;r0&&(this._k.length=0,this._v.length=0)}}]),e}();t.a=a},function(e,t,r){"use strict";function i(e){if(null===e)return"_null";if(void 0===e)return"_undefined";if(e.hasOwnProperty("_LPKGUID"))return e._LPKGUID;var t=void 0===e?"undefined":n(e);switch(t){case"number":Object.is(e,-0)&&(e="-0");case"string":case"boolean":return t+e;case"object":case"function":o++;var r=t+o;return a.value=r,Object.defineProperty(e,"_LPKGUID",a),r;default:throw"unrecognized object type"}}t.a=i;var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},a={value:"",enumerable:!1,writable:!1,configurable:!1},o=0},function(e,t,r){function i(e){return r(n(e))}function n(e){var t=a[e];if(!(t+1))throw new Error("Cannot find module '"+e+"'.");return t}var a={"./ar-sa.lproj/strings.json":22,"./ca-es.lproj/strings.json":23,"./cs-cz.lproj/strings.json":24,"./da-dk.lproj/strings.json":25,"./de-de.lproj/strings.json":26,"./el-gr.lproj/strings.json":27,"./en-au.lproj/strings.json":28,"./en-ca.lproj/strings.json":29,"./en-gb.lproj/strings.json":30,"./en-nz.lproj/strings.json":31,"./en-us.lproj/strings.json":32,"./es-es.lproj/strings.json":33,"./es-mx.lproj/strings.json":34,"./fi-fi.lproj/strings.json":35,"./fr-ca.lproj/strings.json":36,"./fr-fr.lproj/strings.json":37,"./hi-in.lproj/strings.json":38,"./hr-hr.lproj/strings.json":39,"./hu-hu.lproj/strings.json":40,"./id-id.lproj/strings.json":41,"./it-it.lproj/strings.json":42,"./iw-il.lproj/strings.json":43,"./ja-jp.lproj/strings.json":44,"./ko-kr.lproj/strings.json":45,"./ms-my.lproj/strings.json":46,"./nb-no.lproj/strings.json":47,"./nl-nl.lproj/strings.json":48,"./no-no.lproj/strings.json":49,"./pl-pl.lproj/strings.json":50,"./pt-br.lproj/strings.json":51,"./pt-pt.lproj/strings.json":52,"./ro-ro.lproj/strings.json":53,"./ru-ru.lproj/strings.json":54,"./sk-sk.lproj/strings.json":55,"./sl-si.lproj/strings.json":56,"./sv-se.lproj/strings.json":57,"./th-th.lproj/strings.json":58,"./tr-tr.lproj/strings.json":59,"./uk-ua.lproj/strings.json":60,"./vi-vi.lproj/strings.json":61,"./vi-vn.lproj/strings.json":62,"./zh-cn.lproj/strings.json":63,"./zh-tw.lproj/strings.json":64};i.keys=function(){return Object.keys(a)},i.resolve=n,e.exports=i,i.id=21},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"تكرار حلقي","VideoEffects.Badge":"شارة","VideoEffects.Badge.Title.Bounce":"ارتداد","VideoEffects.Badge.Title.LongExposure":"تعرض طويل للضوء"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Bucle","VideoEffects.Badge":"Etiqueta","VideoEffects.Badge.Title.Bounce":"Rebot","VideoEffects.Badge.Title.LongExposure":"Llarga exposició"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Smyčka","VideoEffects.Badge":"Odznak","VideoEffects.Badge.Title.Bounce":"Odrážení","VideoEffects.Badge.Title.LongExposure":"Dlouhá expozice"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Sløjfe","VideoEffects.Badge":"Mærke","VideoEffects.Badge.Title.Bounce":"Returner","VideoEffects.Badge.Title.LongExposure":"Lang eksponering"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Endlosschleife","VideoEffects.Badge":"Name","VideoEffects.Badge.Title.Bounce":"Hüpfen","VideoEffects.Badge.Title.LongExposure":"Langzeitbelichtung"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Επανάληψη","VideoEffects.Badge":"Ταμπέλα","VideoEffects.Badge.Title.Bounce":"Αναπήδηση","VideoEffects.Badge.Title.LongExposure":"Μακρά έκθεση"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Bounce":"Bounce","VideoEffects.Badge.Title.LongExposure":"Long Exposure"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Bounce":"Bounce","VideoEffects.Badge.Title.LongExposure":"Long Exposure"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Bounce":"Long Exposure","VideoEffects.Badge.Title.LongExposure":"Long Exposure"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Bounce":"Bounce","VideoEffects.Badge.Title.LongExposure":"Long Exposure"}},function(e,t){e.exports={"VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge.Title.Bounce":"Bounce","VideoEffects.Badge.Title.LongExposure":"Long Exposure"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Indicador","VideoEffects.Badge.Title.Bounce":"Rebote","VideoEffects.Badge.Title.LongExposure":"Larga exposición"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Indicador","VideoEffects.Badge.Title.Bounce":"Rebote","VideoEffects.Badge.Title.LongExposure":"Exposición prolongada"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Silmukka","VideoEffects.Badge":"Merkki","VideoEffects.Badge.Title.Bounce":"Edestakaisin","VideoEffects.Badge.Title.LongExposure":"Pitkä valotus"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Boucle","VideoEffects.Badge":"Pastille","VideoEffects.Badge.Title.Bounce":"Rebond","VideoEffects.Badge.Title.LongExposure":"Longue exposition"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Boucle","VideoEffects.Badge":"Pictogramme","VideoEffects.Badge.Title.Bounce":"Rebond","VideoEffects.Badge.Title.LongExposure":"Pose longue"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"लूप","VideoEffects.Badge":"बैज","VideoEffects.Badge.Title.Bounce":"बाउंस","VideoEffects.Badge.Title.LongExposure":"लंबा एक्सपोज़र"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Petlja","VideoEffects.Badge":"Bedž","VideoEffects.Badge.Title.Bounce":"Zrcalna petlja","VideoEffects.Badge.Title.LongExposure":"Duga eksp."}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Jelvény","VideoEffects.Badge.Title.Bounce":"Oda-vissza","VideoEffects.Badge.Title.LongExposure":"Hosszú expozíció"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Tanda","VideoEffects.Badge.Title.Bounce":"Memantul","VideoEffects.Badge.Title.LongExposure":"Pencahayaan Lama"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Identificativo","VideoEffects.Badge.Title.Bounce":"Rimbalzo","VideoEffects.Badge.Title.LongExposure":"Esposizione lunga"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"לולאה","VideoEffects.Badge":"תגית","VideoEffects.Badge.Title.Bounce":"הקפץ","VideoEffects.Badge.Title.LongExposure":"חשיפה ארוכה"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"ループ","VideoEffects.Badge":"バッジ","VideoEffects.Badge.Title.Bounce":"バウンス","VideoEffects.Badge.Title.LongExposure":"長時間露光"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"루프","VideoEffects.Badge":"배지","VideoEffects.Badge.Title.Bounce":"바운스","VideoEffects.Badge.Title.LongExposure":"장노출"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Gelung","VideoEffects.Badge":"Lencana","VideoEffects.Badge.Title.Bounce":"Lantun","VideoEffects.Badge.Title.LongExposure":"Pendedahan"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Gjenta","VideoEffects.Badge":"Merke","VideoEffects.Badge.Title.Bounce":"Sprett","VideoEffects.Badge.Title.LongExposure":"Lang lukkertid"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Herhaal","VideoEffects.Badge":"Badge","VideoEffects.Badge.Title.Bounce":"Stuiteren","VideoEffects.Badge.Title.LongExposure":"Lange belichting"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Gjenta","VideoEffects.Badge":"Merke","VideoEffects.Badge.Title.Bounce":"Sprett","VideoEffects.Badge.Title.LongExposure":"Lang lukkertid"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"W pętli","VideoEffects.Badge":"Plakat","VideoEffects.Badge.Title.Bounce":"Odbicia","VideoEffects.Badge.Title.LongExposure":"Długa eksp."}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loop","VideoEffects.Badge":"Identificador","VideoEffects.Badge.Title.Bounce":"Vai e Volta","VideoEffects.Badge.Title.LongExposure":"Longa exposição"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Repetição contínua","VideoEffects.Badge":"Cartaz","VideoEffects.Badge.Title.Bounce":"Pingue‑pongue","VideoEffects.Badge.Title.LongExposure":"Longa exposição"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"În buclă","VideoEffects.Badge":"Insignă","VideoEffects.Badge.Title.Bounce":"Ricoșeu","VideoEffects.Badge.Title.LongExposure":"Expunere lungă"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Петля","VideoEffects.Badge":"Значок","VideoEffects.Badge.Title.Bounce":"Маятник","VideoEffects.Badge.Title.LongExposure":"Длинная выдержка"}},function(e,t){e.exports={"VideoEffects.Badge":"Odznak","VideoEffects.Badge.Title.Bounce":"Odrážanie","VideoEffects.Badge.Title.LongExposure":"Dlhá expozícia"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Zanka","VideoEffects.Badge":"Identifikacijska kartica","VideoEffects.Badge.Title.Bounce":"Odbijanje","VideoEffects.Badge.Title.LongExposure":"Dolga osvetlitev"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Loopa","VideoEffects.Badge":"Bricka","VideoEffects.Badge.Title.Bounce":"Studsa","VideoEffects.Badge.Title.LongExposure":"Lång exponering"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"เล่นวน","VideoEffects.Badge":"ป้ายกำกับ","VideoEffects.Badge.Title.Bounce":"เด้ง","VideoEffects.Badge.Title.LongExposure":"การเปิดรับแสงนาน"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Döngü","VideoEffects.Badge":"İşaret","VideoEffects.Badge.Title.Bounce":"PinPon","VideoEffects.Badge.Title.LongExposure":"Uzun Pozlama"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Петля","VideoEffects.Badge":"Значок","VideoEffects.Badge.Title.Bounce":"Відрух","VideoEffects.Badge.Title.LongExposure":"Тривала експозиція"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Lặp lại","VideoEffects.Badge":"Biểu trưng","VideoEffects.Badge.Title.Bounce":"Nảy lên","VideoEffects.Badge.Title.LongExposure":"Phơi sáng lâu"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"Lặp lại","VideoEffects.Badge":"Biểu trưng","VideoEffects.Badge.Title.Bounce":"Nảy lên","VideoEffects.Badge.Title.LongExposure":"Phơi sáng lâu"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"循环播放","VideoEffects.Badge":"标记","VideoEffects.Badge.Title.Bounce":"来回播放","VideoEffects.Badge.Title.LongExposure":"长曝光"}},function(e,t){e.exports={"VideoEffects.Badge.Title.Loop":"循環播放","VideoEffects.Badge":"標記","VideoEffects.Badge.Title.Bounce":"來回播放","VideoEffects.Badge.Title.LongExposure":"長時間曝光"}},function(e,t,r){"use strict";t.a="2420ProjectDev22"},function(e,t,r){"use strict";t.a="2420BDev20"},function(e,t,r){"use strict";var i=r(72),n=r(76),a=r(78),o=r(81),s=r(79),d=r(4),l=r(0),c=r(8),u=r(5),h=r(1);a.a.register(),o.a.register(),s.a.register();var f=c.a.extend({approach:"",autoplay:!0,caption:"",_hasInitialized:!1,_lastRecipe:null,recipe:l.a.observableProperty({get:function(){var e=d.a.getRecipeFromPlaybackStyle(this.playbackStyle);return this._setRecipe(e),e},set:function(e){this._setRecipe(e)}}),_setRecipe:function(e){e&&e!==this._lastRecipe&&(this._lastRecipe=e,this.setUpRenderLayers())},requestMoreCompatibleRecipe:function(){this.recipe=this.recipe.requestMoreCompatibleRecipe()},duration:l.a.observableProperty({dependencies:["recipe","provider.videoDuration","provider.photoTime"],get:function(e){var t=this.recipe,r=this.provider,i=r.photoTime,n=r.videoDuration;return t?t.calculateAnimationDuration(e,n,i):0}}),displayWidth:0,displayHeight:0,get backingWidth(){return Math.round(this.displayWidth*devicePixelRatio)},get backingHeight(){return Math.round(this.displayHeight*devicePixelRatio)},get renderLayerWidth(){return this.displayWidth},get renderLayerHeight(){return this.displayHeight},get videoWidth(){return this.videoDecoder.videoWidth},get videoHeight(){return this.videoDecoder.videoHeight},photoWidth:l.a.proxyProperty("photo.width"),photoHeight:l.a.proxyProperty("photo.height"),photo:l.a.proxyProperty("provider.photo"),video:l.a.proxyProperty("provider.video"),photoTime:l.a.proxyProperty("provider.photoTime"),frameTimes:l.a.proxyProperty("provider.frameTimes"),effectType:l.a.proxyProperty("provider.effectType"),preloadedEffectType:l.a.proxyProperty("provider.preloadedEffectType"),playbackStyle:l.a.proxyProperty("provider.playbackStyle"),currentTime:l.a.observableProperty({defaultValue:0,dependencies:["duration"],get:function(e){return Math.min(this.duration||0,Math.max(0,e||0))},didChange:function(e){this.prepareToRenderAtTime(e)}}),canRenderCurrentTime:l.a.observableProperty({readOnly:!0,dependencies:["currentTime"],get:function(){return this.canRenderAtTime(this.currentTime)}}),_currentTimeRenderObserver:l.a.observer("currentTime","canRenderCurrentTime",function(e,t){t&&(this.renderedTime=e)}),renderedTime:l.a.observableProperty({defaultValue:0,didChange:function(e){this.renderAtTime(e),this.currentTime=e}}),areAllRenderLayersPrepared:l.a.observableProperty({defaultValue:!1}),isFullyPreparedForPlayback:l.a.observableProperty({readOnly:!0,dependencies:["video","areAllRenderLayersPrepared","photoTime","frameTimes","playbackStyle"],get:function(){return Boolean(this.video&&this.areAllRenderLayersPrepared&&(this.photoTime||this.playbackStyle!==h.a.HINT)&&Array.isArray(this.frameTimes))}}),cannotRenderDueToMissingPhotoTimeOrFrameTimes:l.a.observableProperty({readOnly:!0,dependencies:["video","areAllRenderLayersPrepared","photoTime","frameTimes","playbackStyle"],get:function(){return Boolean(this.video&&this.areAllRenderLayersPrepared&&(!this.photoTime&&this.playbackStyle===h.a.HINT||!Array.isArray(this.frameTimes)))}}),renderLayers:l.a.property(function(){return[]}),videoDecoder:l.a.observableProperty(function(){return this._videoDecoderClass.create({owner:this})}),_videoDecoderClass:i.a.extend({owner:l.a.observableProperty(),provider:l.a.proxyProperty("owner.provider")}),provider:l.a.observableProperty(function(){return n.a.create()}),init:function(){this._super(),this.element.className=((this.element.className||"")+" lpk-live-photo-renderer").trim(),this.element.style.position="absolute",this.element.style.overflow="hidden",this.element.style.textAlign="left"},updateSize:function(e,t){if(!arguments.length)return void(this.displayWidth&&this.displayHeight&&this.updateSize(this.displayWidth,this.displayHeight));this.displayWidth=e=Math.round(e),this.displayHeight=t=Math.round(t),this.element.style.width=e+"px",this.element.style.height=t+"px";for(var r,i=0;r=this.renderLayers[i];i++)r.updateSize(this.renderLayerWidth,this.renderLayerHeight)},_imageOrVideoDidEnterOrLeave:l.a.observer("videoDecoder.canProvideFrames","photo",function(){this.prepareToRenderAtTime(this.currentTime)}),prepareToRenderAtTime:l.a.boundFunction(function(e){this.propertyChanged("canRenderCurrentTime");for(var t,r=!0,i=0;t=this.renderLayers[i];i++)r=t.prepareToRenderAtTime(e)&&r;this.areAllRenderLayersPrepared=r}),canRenderAtTime:function(e){if(0===e)return!0;if(!this.duration&&e)return!1;for(var t,r=!0,i="",n=0;t=this.renderLayers[n];n++)t.canRenderAtTime(e)||(r=!1,i+=(i?", ":"Cannot render; waiting for ")+t.layerName);return i&&u.a.log(i+"."),r},renderAtTime:function(e){if(this.duration)for(var t,r=0;t=this.renderLayers[r];r++)t.renderAtTime(e)},getNewRenderLayers:function(){return this.recipe.getRenderLayers(this)},setUpRenderLayers:function(){var e=this.renderLayers;e&&this._cleanUpRenderLayers(e),this.renderLayers=this.getNewRenderLayers(),this.updateSize(),this.currentTime=0,this.prepareToRenderAtTime(0)},_cleanUpRenderLayers:function(e){for(var t,r=0;t=e[r];r++)t.dispose(),t.tearDownFromRender()},reduceMemoryFootprint:function(){for(var e,t=0;e=this.renderLayers[t];t++)e.reduceMemoryFootprint()},_clearRetainedFramesWhenNecessary:l.a.observer("provider.videoRotation","provider.frameTimes",function(){this.reduceMemoryFootprint(),this.prepareToRenderAtTime(this.currentTime)})});t.a=f},function(e,t,r){"use strict";var i=r(67),n=i.a.extend({approach:"dom"});t.a=n},function(e,t,r){"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r.d(t,"Localization",function(){return c}),r.d(t,"BUILD_NUMBER",function(){return u}),r.d(t,"MASTERING_NUMBER",function(){return h}),r.d(t,"VERSION",function(){return f}),r.d(t,"LIVEPHOTOSKIT_LOADED",function(){return p});var i=r(14),n=r(9),a=r(10),o=r(11);r.d(t,"augmentElementAsPlayer",function(){return o.a}),r.d(t,"createPlayer",function(){return o.b}),r.d(t,"Player",function(){return o.c});var s=r(6);r.d(t,"Errors",function(){return s.a});var d=r(15);r.d(t,"LivePhotoBadge",function(){return d.a});var l=r(1);r.d(t,"PlaybackStyle",function(){return l.a});var c={get locale(){return a.a.locale},set locale(e){a.a.locale=e}},u=i.a.BUILD_NUMBER,h=i.a.MASTERING_NUMBER,f=i.a.VERSION,p=i.a.LIVEPHOTOSKIT_LOADED,v="undefined"!=typeof window&&"undefined"!=typeof document;if(v){var y=window.document;setTimeout(function(){return y.dispatchEvent(r.i(n.a)())});if(y.styleSheets&&document.head){for(var g=null,m=null,b=0;b0)}),init:function(){this._super.apply(this,arguments),e.attachBadgeView(this.badgeView)}}).create()):null},didChange:function(e){this._nativeControls_previousValue&&this._nativeControls_previousValue.detach(),this._nativeControls_previousValue=e,e&&e.attachInto(this)}}),init:function(e,t){var i=this;if(e&&!n(e))throw"Any pre-existing element provided for use as a LivePhotosKit.Player must be able to append child DOM nodes.";e&&e.childNodes.length&&(e.innerHTML="");for(var a in t)Object.prototype.hasOwnProperty.call(t,a)&&(this[a]=t[a]);this._super(e);switch(this.element.className.indexOf("lpk-live-photo-player")<0&&(this.element.className=this.element.className+" lpk-live-photo-player"),this.element.setAttribute("role","image"),r.i(u.a)(this.element,"position")||this.element.style.position){case"absolute":case"fixed":case"relative":break;default:this.element.style.position="relative"}switch(r.i(u.a)(this.element,"display")||this.element.style.display){case"block":case"inline-block":case"table":case"table-caption":case"table-column-group":case"table-header-group":case"table-footer-group":case"table-row-group":case"table-cell":case"table-column":case"table-row":break;default:this.element.style.display="inline-block"}this.renderer.attachInto(this),this.renderer.eventDispatchingElement=this.element,window.addEventListener("resize",this.updateSize),"ontouchstart"in document.documentElement&&(this.addEventListener("touchstart",function(){return i.play()},!1),this.addEventListener("touchend",function(){return i.beginFinishingPlaybackEarly()},!1))},play:function(){if(!this.isPlaying){var e=this.provider;e.video||(e.needsLoadedVideoForPlayback=!0),this.wantsToPlay=!0,this.canPlay&&(this.isPlaying=!0,this._lastFrameNow=Date.now(),this._nextFrame())}return this.isPlaying},pause:function(){this.isPlaying=!1,this.wantsToPlay=!1,this._cancelNextFrame()},stop:function(){this.pause(),this.currentTime=0,this.renderer.duration=NaN},toggle:function(){this.wantsToPlay?this.pause():this.play()},beginFinishingPlaybackEarly:function(){this.recipe.beginFinishingPlaybackEarly(this)},_stopWhenAnotherPlayerStarts:l.a.observer("_constructor.activeInstance",function(e){e&&e!==this&&(this.stop(),this.renderer.reduceMemoryFootprint())}),_constructor:l.a.observableProperty(function(){return f}),_stopPlaybackWhenItemsLoadOrUnload:l.a.observer("video","photo",function(){!this.isPlaying||this.playbackStyle===h.a.LOOP&&this.autoplay||this.stop()}),addEventListener:function(e,t,r){var i=this.element;i.addEventListener.call(i,e,t,r)},removeEventListener:function(e,t,r){var i=this.element;i.removeEventListener.call(i,e,t,r)},_nextFrame:function(){var e=Date.now(),t=(e-this._lastFrameNow)*this.playbackRate;this._lastFrameNow=e,this.currentTime===this.renderedTime&&(this.currentTime+=t/1e3),this.recipe&&this.recipe.continuePlayback(this)},_cancelNextFrame:function(){cancelAnimationFrame(this._rafID)},updateSize:l.a.boundFunction(function(e,t){if(this.photoWidth&&this.photoHeight){var i=!0===e?void 0:e,n=!0===e?e:void 0;if(isNaN(i)||isNaN(t)?(i=this.element.offsetWidth,t=this.element.offsetHeight):(i=Math.round(i),t=Math.round(t),this.element.style.width=i+"px",this.element.style.height=t+"px"),i&&t){if(!(this._lastUpdateChangeToken!==(this._lastUpdateChangeToken=i+":"+t))&&!n)return!1;var a=r.i(d.a)(this.photoWidth,this.photoHeight,i,t),o=Math.ceil(a.height),s=Math.ceil(a.width),l=Math.floor(i/2-s/2),c=Math.round(t/2-o/2),u=this.renderer;u.element.style.top=c+"px",u.element.style.left=l+"px",u.updateSize(s,o),this.displayWidth=i,this.displayHeight=t,this.nativeControls&&this.nativeControls.updateToRendererLayout(l,c,s,o)}}}),_dispatchPhotoLoadEventOnNewPhoto:l.a.observer("photo",function(e){e&&this.dispatchEvent(r.i(c.c)())}),_dispatchVideoLoadEventOnNewVideo:l.a.observer("video",function(e){e&&this.dispatchEvent(r.i(c.d)())}),throwError:function(e){this.dispatchEvent(r.i(c.e)({error:e,errorCode:e.errCode}))}}),p=document.createElement("div");t.a=f},function(e,t,r){"use strict";function i(){p=!1}function n(){}function a(e,t){return-(e.importance-t.importance)||e.number-t.number}function o(e,t){for(var r=0,i=e.length,n=0;n=this.frameTimes.length)return this.duration;var t=0|e,r=Math.ceil(e);if(t===r)return this.frameTimes[t];var i=this.frameTimes[t],n=r=d&&l.numberr&&u.number<=r+2&&p;if(h||(f=!1),f){if(!this._isPlaying){this._isPlaying=!0;try{var v=this.video.play();v&&v.then instanceof Function&&v.then(n,i)}catch(e){p=!1}}this._expectedNextSeenFrameNumber=u.number,this._scheduleArtificialSeek()}else this._isPlaying&&(this._isPlaying=!1,this.video.pause()),this._expectedNextSeenFrameNumber=NaN,this.video.currentTime=u.time+1e-4,this._isSeeking=!0}}),_frameWillDispose:function(e){this._removePendingFrame(e)},_removePendingFrame:function(e){o(this._pendingFrames,e),this._pendingFrames.length||this._unscheduleArtificialSeek()}});t.a=v},function(e,t,r){"use strict";function i(e){e.container=document.createElement("div"),e.container.frame=e,e.container.innerHTML='
',e.textBox=e.container.lastChild,e.container.insertBefore(e.image,e.textBox),e.image.style.position="absolute",e.container.style.cssText="position:relative; display:inline-block; border: 1px solid black;";var t=e._debug_aspect||(e._debug_aspect=e.videoDecoder&&(e.videoDecoder.videoWidth>e.videoDecoder.videoHeight?"landscape":"portrait"));e.container.style.width=e.image.style.width="landscape"===t?"40px":"30px",e.container.style.height=e.image.style.height="landscape"===t?"30px":"40px",document.body.appendChild(e.container)}r.d(t,"a",function(){return c});var n=r(12),a=r(92),o=r(5),s=r(0),d=r(90),l=r(2),c=s.a.Object.extend(d.a,a.a,{staticMembers:{getPoolingCacheKey:function(e,t){return"f"+t+"_in_"+e.id}},container:null,image:null,_context:null,number:-1,time:-1,importance:0,videoDecoder:null,readyState:0,_poolingCacheKey:null,_debugShowInDOM:n.a,lacksOwnPixelData:!1,_postDispose:function(){this.image.width=this.image.height=0},get backingFrame(){return this.lacksOwnPixelData?this.videoDecoder.getNearestDecodedFrame(this.number)||this:this},init:function(){this._postDispose=this._postDispose.bind(this);var e=this.image=document.createElement("canvas");this._context=this.image.getContext("2d"),this._super(),this._debugShowInDOM?i(this):h&&(h.appendChild(e),e.style.cssText="position: absolute; top: 0px; width:1px; height: 1px; display: inline-block;",e.style.left=u+++"px")},initFromPool:function(e,t){clearTimeout(this._postDisposalTimeout),this.videoDecoder=e,this.number=t,this.time=e.frameTimes[t],this._debugShowInDOM&&(this.textBox.innerHTML=this.number)},dispose:function(){this.resetReadiness(),this.videoDecoder._frameWillDispose(this),this.number=this.time=-1,this.importance=0,this.videoDecoder=null,this.readyState=0,this.lacksOwnPixelData=!1,this._postDisposalTimeout=setTimeout(this._postDispose,3e3),this.constructor._disposeInstance(this),this._debugShowInDOM&&(this.textBox.innerHTML="x",this.textBox.style.color="#FF0000",this._context.clearRect(0,0,this.image.width,this.image.height))},didPend:function(){this.readyState=1,this._debugShowInDOM&&(this.textBox.style.color="#FF8800")},didDecode:function(){this.obtainPixelData(),this.readyState=2,this.resolveReadiness(this),this._debugShowInDOM&&(this.textBox.style.color="#00FF00")},obtainPixelData:function(){var e=this.image,t=this._context,r=this.videoDecoder,i=r.videoRotation,n=r.videoWidth,a=r.videoHeight,o=i%180==0?n:a,s=i%180==0?a:n;e.width===n&&e.height===a||(e.width=n,e.height=a),l.a.isFirefox&&t.getImageData(0,0,1,1);for(var d=0;d=2,a=0,o=e.length;a>r)*(0!=(i&1<0)switch(t.metaData.values.items[g]){case 1:m=h.a.LOOP;break;case 2:m=h.a.BOUNCE;break;case 3:m=h.a.EXPOSURE}this.effectType=m}}),y=[0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0],g=[[1,0,0,0,1,0,0,0,1],[0,1,0,-1,0,0,0,0,1],[-1,0,0,0,-1,0,0,0,1],[0,-1,0,1,0,0,0,0,1]];t.a=v},function(e,t,r){"use strict";var i=r(4),n=r(1),a=r(2),o=a.a.isSafari,s=i.a.create({correspondingPlaybackStyle:n.a.FULL,get minimumShortenedDuration(){return this.enterDuration+this.exitDuration+.01},get spontaneousFinishDuration(){return this.exitDuration},enterDuration:1/3,exitDuration:.5,videoBeginTime:.15,zoomScaleFactor:1.075,blurRadius:5,blurRadiusStep:.2,requiresInterpolation:!0,quantizeRadius:function(e){return this.blurRadiusStep?Math.round(e/this.blurRadiusStep)*this.blurRadiusStep:e},easeInOut:function(e){return e<0?0:e>1?1:.5-.5*Math.cos(e*Math.PI)},calculateAnimationDuration:function(e,t,r){var i=t?t+this.videoBeginTime+this.exitDuration:0;return Math.max(0,Math.min(e||1/0,i))},getEntranceExitParameter:function(e,t){return Math.min(Math.max(0,Math.min(1,1-this.easeInOut((e-(t-this.exitDuration))/this.exitDuration))),1-Math.max(0,Math.min(1,1-this.easeInOut(e/this.enterDuration))))||0},getTransform:function(e,t,r,i){var n=arguments.length>4&&void 0!==arguments[4]?arguments[4]:1,a=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1,o=arguments.length>6&&void 0!==arguments[6]?arguments[6]:1,s=1+(this.zoomScaleFactor-1)*this.getEntranceExitParameter(e,t),d=-(s-1)/2*r,l=-(s-1)/2*i,c=Math.round(d*devicePixelRatio)/devicePixelRatio,u=Math.round(l*devicePixelRatio)/devicePixelRatio;return Math.abs(s-n)<1e-5?"translate3d("+c+"px, "+u+"px, 0) scale3d("+a+", "+o+", 1)":d||l||s?"translate3d("+d+"px, "+l+"px, 0) scale3d("+s+", "+s+", 1)":"translate3d(0, 0, 0)"},photo:i.a.PhotoIngredient.create({opacity:i.a.computedStyle(function(e){if(ethis.recipe.enterDuration&&e1?1:.5-.5*Math.cos(e*Math.PI)},calculateAnimationDuration:function(e,t,r){var i=t?t-r+this.exitBlurDuration:0;return Math.max(0,Math.min(e||1/0,i))},photo:i.a.PhotoIngredient.create({hideDuration:.06,get returnDuration(){return this.recipe.exitBlurDuration},opacity:i.a.computedStyle(function(e){if(ethis.hideDuration&&e0?"none":""})}),video:i.a.InterpolatedVideoIngredient.create({lookaheadTime:.01+7/15,videoTimeAtTime:function(e){return e%this.renderer.duration},prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e,e+this.lookaheadTime)},display:i.a.computedStyle(function(e){return""})}),beginFinishingPlaybackEarly:function(e){e.autoplay||(e.isPlaying?e.pause():e.wantsToPlay=!1)},continuePlayback:function(e){var t=e.currentTime,r=e.duration;t>=r&&(e.currentTime=t%r),e._rafID=requestAnimationFrame(e._nextFrame.bind(e))}}));t.a=a},function(e,t,r){"use strict";var i=r(4),n=r(80),a=r(1);n.a.register();var o=i.a.create({correspondingPlaybackStyle:a.a.LOOP,photo:i.a.PhotoIngredient.create({display:i.a.computedStyle(function(e){return this.isPlaying||e>0?"none":""})}),video:i.a.VideoIngredient.create({display:i.a.computedStyle(function(e){return""})}),beginFinishingPlaybackEarly:function(e){e.autoplay||(e.isPlaying?e.pause():e.wantsToPlay=!1)},continuePlayback:function(e){var t=e.currentTime,r=e.duration;t>=r&&(e.currentTime=t%r),e._rafID=requestAnimationFrame(e._nextFrame.bind(e))},requestMoreCompatibleRecipe:function(e){return i.a.registerRecipeWithPlaybackStyle(n.a,this.correspondingPlaybackStyle),n.a}});t.a=o},function(e,t,r){"use strict";var i=r(0),n=r(85),a=r(1),o=r(13),s=n.a.extend(o.a,{_loCanvas:null,_hiCanvas:null,backingScaleFactor:1,setUpForRender:function(){var e=this.element,t=(this.isPlaying,this.renderer),r=t.autoplay,n=t.parentView,o=t.playbackStyle,s=t.video;if(!this._loCanvas||!this._hiCanvas){e.innerHTML&&(e.innerHTML="");var d=this._loCanvas=i.a.canvasPool.get(),l=this._hiCanvas=i.a.canvasPool.get();d._context=d.getContext("2d"),l._context=l.getContext("2d"),d.style.cssText=l.style.cssText="position: absolute; left: 0; top: 0; width: 100%; height: 100%; transform: translateZ(0);",e.appendChild(d),e.appendChild(l),this._swapCanvases()}e.className="lpk-render-layer lpk-video",e.style.position="absolute",e.style.transformOrigin="0 0",e.style.zIndex=1,this._super(),o===a.a.LOOP&&(this.shouldLoop=!0),this.shouldLoop&&requestAnimationFrame(function(){s.currentTime=-1,r&&n.play()}),window.test=this},updateSize:function(e,t){if(!arguments.length)return this._super();this._super(e,t);var r=Math.ceil(e*this.backingScaleFactor),i=Math.ceil(t*this.backingScaleFactor);this.backingScaleX=r/e,this.backingScaleY=i/t,this.element.style.width=r+"px",this.element.style.height=i+"px",this._loCanvas&&this._hiCanvas&&(this._loCanvas.width=this._hiCanvas.width=r*devicePixelRatio,this._loCanvas.height=this._hiCanvas.height=i*devicePixelRatio,this._loCanvas._drawnFrameNumber=this._hiCanvas._drawnFrameNumber=-1,this.renderAtTime())},renderAtTime:function(e){if(!arguments.length)return this._super();this._super(e);var t=this.backingScaleX,r=this.backingScaleY;1===t&&1===r||(this.element.style.transform+=" scale3d("+1/t+", "+1/r+", 1)")},renderFramePair:function(e,t,r){(e&&this._hiCanvas._drawnFrameNumber===e.number||t&&this._loCanvas._drawnFrameNumber===t.number)&&this._swapCanvases(),this._putFrameInCanvasIfNeeded(e,this._loCanvas),this._putFrameInCanvasIfNeeded(t,this._hiCanvas),t&&(this._hiCanvas.style.opacity=r)},_swapCanvases:function(){var e=this._hiCanvas;this._hiCanvas=this._loCanvas,this._loCanvas=e,this._loCanvas.style.opacity="",this._loCanvas.style.zIndex=1,this._hiCanvas.style.zIndex=2},_putFrameInCanvasIfNeeded:function(e,t){t._drawnFrameNumber!==(t._drawnFrameNumber=e?e.number:-1)&&(t.setAttribute("data-frame-number",t._drawnFrameNumber.toString()),e?t._context.drawImage(e.image,0,0,t.width,t.height):t._context.clearRect(0,0,t.width,t.height))},dispose:function(){this._super(),this._loCanvas&&i.a.canvasPool.ret(this._loCanvas),this._hiCanvas&&i.a.canvasPool.ret(this._hiCanvas)},tearDownFromRender:function(){var e=this.renderer,t=e.parentView;this.shouldLoop=!1,t&&t.stop(),this._clearAllRetainedFrames(),this._super()}});t.a=s},function(e,t,r){"use strict";var i=r(86),n=r(13),a=r(93),o=i.a.extend(n.a,{tagName:"canvas",get _canvas(){return this.element},get _context(){return this.__context||(this.__context=this._canvas.getContext("2d"))},init:function(){this._super.apply(this,arguments),this.element.className="lpk-render-layer lpk-photo",this.element.style.position="absolute",this.element.style.width=this.element.style.height="100%",this.element.style.transformOrigin="0 0",this.element.style.zIndex=2},tearDownFromRender:function(){this._super(),this._canvas.width=this._canvas.height=0},updateSize:function(e,t){if(!arguments.length)return this._super();this._super(e,t);var i=Math.ceil(e*devicePixelRatio),n=Math.ceil(t*devicePixelRatio),o=this.photo,s=this._canvas;this._lastPhoto===(this._lastPhoto=o)&&s.width===i&&s.height===n||(s.width=i,s.height=n,o&&r.i(a.a)(this._context,o,0,0,i,n))}});t.a=o},function(e,t,r){"use strict";var i=r(0),n=r(2),a=r(13),o=r(87),s=o.a.extend(a.a,{_isPlayingChanged:i.a.observer("isPlaying",function(e){this._video&&(e?(this.duration=1/0,this.play()):this.pause())}),_isVisible:!1,applyStyles:function(){var e=this.element,t=this.video,r=this.videoRotation,i=t.videoHeight,n=t.videoWidth,a=1;[90,270].indexOf(r)>=0&&(a=n/i);var o="\n height: 100%;\n position: absolute;\n width: 100%;\n -moz-transform: scale("+a+") rotate("+r+"deg);\n -webkit-transform: scale("+a+") rotate("+r+"deg);\n -o-transform: scale("+a+") rotate("+r+"deg);\n -ms-transform: scale("+a+") rotate("+r+"deg);\n transform: scale("+a+") rotate("+r+"deg);\n z-index: 1;\n ";e.setAttribute("style",o),e.className="lpk-render-layer lpk-video",t.style.height="100%",t.style.width="100%"},cleanupElement:function(){var e=this.element,t=this.renderer,r=this._video,i=t.parentView;e.innerHtml&&(e.innerHtml=""),r&&(r.loop=!1,r.muted=!1,r.removeEventListener("pause",this.playIfPlaying)),i&&i.stop(),delete this._video},pause:function(){var e=this._isVisible,t=this._video;e&&t.pause()},play:function(){if(this._isVisible){var e=this._video,t=e.play();t?t.catch(this._handlePlayFailure):n.a.isIE||n.a.isEdge||(e.pause(),setTimeout(this._handlePlayFailure))}},_handlePlayFailure:i.a.boundFunction(function(){this.renderer.requestMoreCompatibleRecipe()}),playIfPlaying:i.a.boundFunction(function(){var e=this.isPlaying,t=this._video;if(e&&t.paused){var r=t.play();r&&r.catch(function(){})}}),setUpForRender:function(){var e=this.element,t=(this.isPlaying,this.renderer),r=t.autoplay,i=t.parentView,n=t.video;this.cleanupElement(),e.appendChild(n),this.applyStyles(),n.loop=!0,n.muted=!0,this._video=n,this._isVisible=!0,this._super(),r&&(n.addEventListener("pause",this.playIfPlaying),i.play())},tearDownFromRender:function(){this.cleanupElement(),this._isVisible=!1,this._super()}});t.a=s},function(e,t,r){"use strict";function i(e){e.retain()}function n(e){e.release()}var a=r(0),o=r(7),s=r(17),d=o.a.extend({videoDecoder:a.a.proxyProperty("renderer.videoDecoder"),videoDuration:a.a.proxyProperty("videoDecoder.duration"),canRender:a.a.proxyProperty({readOnly:!0,proxyPath:"videoDecoder.canProvideFrames"}),init:function(){this._super.apply(this,arguments);var e=this.layerName,t=this.recipe;this._framePrepIDKey=t.name+"_"+e+"_framePrepID"},videoTimeAtTime:function(e){return e},_videoTimeAtTime:function(e){return isNaN(e)?e:this.videoTimeAtTime(e)},prepareToRenderAtTime:function(e){var t=this._currentPrepID=++l;if(!this.canRender)return!1;this.prepareVideoFramesFromTime(e);for(var r,i=this._retainedFrames,n=0,a=0;r=i[a];a++)2!==r.readyState&&(r[this._framePrepIDKey]=t,r.onReadyOrFail(this._frameDidPrepare),n++);return this._preppingFrameCount=n,!n},reduceMemoryFootprint:function(){this._super(),this._clearAllRetainedFrames()},_clearAllRetainedFrames:function(){this._clearExtraRetainedFrames(),this._clearRetainedInstantaneousFrames()},_clearExtraRetainedFrames:function(){var e=this._retainedFrames;e&&(e.forEach(n),e.length=0)},_clearRetainedInstantaneousFrames:function(){this._retainedLoFrame&&this._retainedLoFrame.release(),this._retainedHiFrame&&this._retainedHiFrame.release(),this._retainedLoFrame=this._retainedHiFrame=null},_frameDidPrepare:a.a.boundFunction(function(e){e[this._framePrepIDKey]===this._currentPrepID&&(e[this._framePrepIDKey]=void 0,--this._preppingFrameCount||this.renderer.prepareToRenderAtTime(this.renderer.currentTime))}),prepareVideoFramesFromTime:function(e){this.retainFramesForTime(e)},canRenderAtTime:function(e){if("none"===this.display(e))return!0;if(!this.canRender)return!1;for(var t,r=!0,i=this.requiredFramesForTime(e),n=0;t=i[n];n++)r=r&&2===t.readyState,t.retain().release();return r},renderAtTime:function(e){if(!arguments.length)return this._super();if("none"===this.display(e))return this._clearRetainedInstantaneousFrames(),this._super(e);var t=this._videoTimeAtTime(e),r=this.requiredFramesForVideoTime(t),i=r[0]||null,n=r[1]||null;if(i&&i.retain(),n&&n.retain(),this._clearRetainedInstantaneousFrames(),this._retainedLoFrame=i,this._retainedHiFrame=n,i&&(i=i.backingFrame),n&&(n=n.backingFrame),i&&n&&i.number>n.number){var a=i;n=i,i=a}i===n&&(n=null);var o=!i||n?this.videoDecoder.fractionalIndexForTime(t):i.frameNumber,s=o-(0|o);this.renderFramePair(i,n,s),this._super(e)},renderFramePair:function(){},requiredFramesForVideoTime:function(e,t,r){isNaN(t)&&(t=e);var i=this.videoDecoder,n=this.videoDuration,a=i.frameCount,o=c;if(o.length=0,t<0||e>n||isNaN(e)||isNaN(t))return o;var d=Math.max(0,Math.floor(i.fractionalIndexForTime(e))),l=Math.min(i.frameCount,Math.ceil(i.fractionalIndexForTime(t))),u=l=0;l--){var c=d[l],u=c.time;(!o||u>a/2)&&(n(c),d.splice(l,1))}d.push.apply(d,s)},retainFramesForTime:function(e,t,r){return this.retainFramesForVideoTime(this._videoTimeAtTime(e),this._videoTimeAtTime(t),r)},dispose:function(){this.retainFramesForVideoTime(NaN),this._super()}}),l=1,c=[];t.a=d},function(e,t,r){"use strict";var i=r(7),n=r(0),a=i.a.extend({isPlaying:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.parentView.isPlaying"}),photo:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.photo"}),canRender:n.a.proxyProperty("photo"),canRenderAtTime:function(e){var t=this.photo;return!("none"!==this.display(e)&&(!t||t instanceof Image&&!t.complete))}});t.a=a},function(e,t,r){"use strict";var i=r(7),n=r(0),a=i.a.extend({canRender:n.a.proxyProperty({readOnly:!0,proxyPath:"video"}),isPlaying:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.parentView.isPlaying"}),video:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.video"}),videoRotation:n.a.proxyProperty({readOnly:!0,proxyPath:"renderer.provider.videoRotation"})});t.a=a},function(e,t,r){"use strict";function i(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function n(e){var t=r.i(o.a)(e),i=l.get(t);if(i)return i;var n=e.map(function(e){if("i"===e[0]&&h(e[1]))return"I"+e.substring(1)});return e=e.concat(n.filter(function(e){return!!e})),i=new RegExp(e.join("|"),"g"),l.set(t,i),i}function a(e,t){var r=e.charCodeAt(0),i=t.charCodeAt(0),n=new Map;return function(e){var t=n.get(e);if(void 0!==t)return t;var a=e.charCodeAt(0);return t=a>=r&&a<=i,n.set(e,t),t}}var o=r(20),s=function(){function e(e,t){for(var r=0;r>>1,this.h>>>1)}},{key:"length",value:function(){return this.w*this.h}}])}(),function(){function e(t,r,n){i(this,e),this.bytes=new Uint8Array(t),this.start=r||0,this.pos=this.start,this.end=r+n||this.bytes.length}return s(e,[{key:"readU8Array",value:function(e){if(this.pos>this.end-e)return null;var t=this.bytes.subarray(this.pos,this.pos+e);return this.pos+=e,t}},{key:"readU32Array",value:function(e,t,r){if(t=t||1,this.pos>this.end-e*t*4)return null;if(1===t){for(var i=new Uint32Array(e),n=0;n>24}},{key:"readU8",value:function(){return this.pos>=this.end?null:this.bytes[this.pos++]}},{key:"read16",value:function(){return this.readU16()<<16>>16}},{key:"readU16",value:function(){if(this.pos>=this.end-1)return null;var e=this.bytes[this.pos+0]<<8|this.bytes[this.pos+1];return this.pos+=2,e}},{key:"read24",value:function(){return this.readU24()<<8>>8}},{key:"readU24",value:function(){var e=this.pos,t=this.bytes;if(e>this.end-3)return null;var r=t[e+0]<<16|t[e+1]<<8|t[e+2];return this.pos+=3,r}},{key:"peek32",value:function(e){var t=this.pos,r=this.bytes;if(t>this.end-4)return null;var i=r[t+0]<<24|r[t+1]<<16|r[t+2]<<8|r[t+3];return e&&(this.pos+=4),i}},{key:"read32",value:function(){return this.peek32(!0)}},{key:"readU32",value:function(){return this.peek32(!0)>>>0}},{key:"read4CC",value:function(){var e=this.pos;if(e>this.end-4)return null;for(var t="",r=0;r<4;r++)t+=String.fromCharCode(this.bytes[e+r]);return this.pos+=4,t}},{key:"readFP16",value:function(){return this.read32()/65536}},{key:"readFP8",value:function(){return this.read16()/256}},{key:"readISO639",value:function(){for(var e=this.readU16(),t="",r=0;r<3;r++){var i=e>>>5*(2-r)&31;t+=String.fromCharCode(i+96)}return t}},{key:"readUTF8",value:function(e){for(var t="",r=0;rthis.end)&&a("Index out of bounds (bounds: [0, "+this.end+"], index: "+e+")."),this.pos=e}},{key:"subStream",value:function(t,r){return new e(this.bytes.buffer,t,r)}},{key:"uint",value:function(e){for(var t=this.position,r=t+e,i=0,n=t;n0&&(x.name=e.readUTF8(l));break;case"minf":o.name="Media Information Box",a();break;case"stbl":o.name="Sample Table Box",a();break;case"stsd":var k=o;k.name="Sample Description Box",t(),k.sd=[],e.readU32(),a();break;case"avc1":var E=o;e.reserved(6,0),E.dataReferenceIndex=e.readU16(),n(0==e.readU16()),n(0==e.readU16()),e.readU32(),e.readU32(),e.readU32(),E.width=e.readU16(),E.height=e.readU16(),E.horizontalResolution=e.readFP16(),E.verticalResolution=e.readFP16(),n(0==e.readU32()),E.frameCount=e.readU16(),E.compressorName=e.readPString(32),E.depth=e.readU16(),n(65535==e.readU16()),a();break;case"mp4a":var S=o;if(e.reserved(6,0),S.dataReferenceIndex=e.readU16(),S.version=e.readU16(),0!==S.version){i();break}e.skip(2),e.skip(4),S.channelCount=e.readU16(),S.sampleSize=e.readU16(),S.compressionId=e.readU16(),S.packetSize=e.readU16(),S.sampleRate=e.readU32()>>>16,a();break;case"esds":o.name="Elementary Stream Descriptor",t(),i();break;case"avcC":var O=o;O.name="AVC Configuration Box",O.configurationVersion=e.readU8(),O.avcProfileIndicaation=e.readU8(),O.profileCompatibility=e.readU8(),O.avcLevelIndication=e.readU8(),O.lengthSizeMinusOne=3&e.readU8(),n(3==O.lengthSizeMinusOne,"TODO"),d=31&e.readU8(),O.sps=[];for(var w=0;w=8,"Cannot parse large media data yet."),A.data=e.readU8Array(r());break;case"mebx":o.name="Mebx",a();break;case"meta":o.name="Metadata",a();break;case"keys":var D=o;D.name="Metadata Item Keys",t();var M=D.keyCount=e.read32(),U=D.offset-D.size;D.keyList=new Map;for(var N=1;N<=M;N++){var z=e.read32()-8;z<1||z>U||(e.skip(4),D.keyList.set(e.readUTF8(z),N))}this.metaData.keys=D;break;case"ilst":var H=o;H.name="Metadata Item List",H.items=[];for(var K=H.offset+H.size;e.position0){var s=t[a-1],d=o.firstChunk-s.firstChunk,l=s.samplesPerChunk*d;if(!(e>=l))return{index:i+Math.floor(e/s.samplesPerChunk),offset:e%s.samplesPerChunk};if(e-=l,a===t.length-1)return{index:i+d+Math.floor(e/o.samplesPerChunk),offset:e%o.samplesPerChunk};i+=d}}n(!1)}},{key:"chunkToOffset",value:function(e){return this.trak.mdia.minf.stbl.stco.table[e]}},{key:"sampleToOffset",value:function(e){var t=this.sampleToChunk(e);return this.chunkToOffset(t.index)+this.sampleToSize(e-t.offset,t.offset)}},{key:"timeToSample",value:function(e){for(var t=this.trak.mdia.minf.stbl.stts.table,r=0,i=0;i=n))return r+Math.floor(e/t[i].delta);e-=n,r+=t[i].count}}},{key:"sampleToTime",value:function(e){for(var t=this.trak.mdia.minf.stbl.stts.table,r=0,i=0,n=0;n0;){var a=new d(t.buffer,r).readU32();n.push(t.subarray(r+4,r+a+4)),r=r+a+4}return n}}]),e}()},function(e,t,r){"use strict";var i={staticMembers:{_pool:null,_cache:null,init:function(){this._pool=[],this._cache={},this._super()},getPoolingCacheKey:function(){throw"Must implement `getPoolingCacheKey` to use PoolCaching."},getCached:function(){var e=this.getPoolingCacheKey.apply(this,arguments),t=this._cache[e];return t||(t=this._cache[e]=this._pool.pop()||this.create(),t._poolingCacheKey=e,t.initFromPool.apply(t,arguments)),t},peekCached:function(){var e=this.getPoolingCacheKey.apply(this,arguments);return this._cache[e]||null},_disposeInstance:function(e){delete this._cache[e._poolingCacheKey],e._poolingCacheKey=void 0,e._poolingLifecycleCount=1+(0|e._poolingLifecycleCount),this._pool.push(e)}},dispose:function(){},_poolingCacheKey:null,initFromPool:function(){},_retainCount:0,retain:function(){return this._retainCount++,this},release:function(){return this._retainCount--,this._retainCount||this.dispose(),this}};t.a=i},function(e,t,r){"use strict";function i(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function a(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}r.d(t,"a",function(){return c}),r.d(t,"b",function(){return h}),r.d(t,"c",function(){return p}),r.d(t,"d",function(){return y});var o=r(19),s=function(){function e(e,t){for(var r=0;r2?r-2:0),f=2;f=1)return e.drawImage.apply(e,i.apply(h,arguments)),!0;var C=void 0;if(p){C="_cachedSmoothDownsample_from"+m+","+b+","+_+","+P+"@"+L+"x";var F=t[C];if(F)return e.drawImage(F,0,0,F.width,F.height,T,x,k,E),!0}if(v)return e.drawImage.apply(e,i.apply(h,arguments)),!1;var V=1,B=_,R=P,j=Math.max(Math.pow(2,Math.ceil(Math.log(B)/Math.log(2))),a.width),I=Math.max(Math.pow(2,Math.ceil(Math.log(R)/Math.log(2))),a.height);for(a.width===j&&a.height===I||(a.width=s.width=j,a.height=s.height=I),o.drawImage(t,m,b,_,P,0,0,_,P);V>L;){d.drawImage(a,0,0,B,R,0,0,B=Math.ceil(B/2),R=Math.ceil(R/2)),o.clearRect(0,0,B,R);var A=a;a=s,s=A;var D=o;o=d,d=D,V/=2}if(p){var M=document.createElement("canvas");M.width=B,M.height=R,M.getContext("2d").drawImage(a,0,0),t[C]=M}return e.drawImage(a,0,0,B,R,T,x,k,E),o.clearRect(0,0,_,P),d.clearRect(0,0,_,P),!0}};u.usingCache=function(){return l=!0,this},u.avoidingWorkIf=function(e){return c=e,this};var h=[];t.a=u},function(e,t,r){"use strict";function i(){var e="_callbacksForEventHandler"+ ++n;return function(t){var r=this[e]||(this[e]=[]);if("function"==typeof t)return r.push(t);if(r)for(var i=0,n=r.length;im;return p=p||{},p.width=b?h:f*g,p.height=b?h/g:f,p}function n(e,t,r,n,a){return i(!1,e,t,r,n,a,arguments.length)}t.a=n},function(e,t,r){"use strict";t.a="1.5.8"}])}); //# sourceMappingURL=resources/livephotoskit.js.map