@google-psat/cli 0.12.0 → 0.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ /*! For license information please see amp-story-player-v0.js.LICENSE.txt */
2
+ !function(){function t(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var i=Array.isArray;function e(t,i){for(var e=0;e<t.length;e++)if(i(t[e],e,t))return e;return-1}function n(t){return"string"==typeof t}function r(t,i){(null==i||i>t.length)&&(i=t.length);for(var e=0,n=new Array(i);e<i;e++)n[e]=t[e];return n}function s(t,i){var e="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(e)return(e=e.call(t)).next.bind(e);if(Array.isArray(t)||(e=function(t,i){if(t){if("string"==typeof t)return r(t,i);var e=Object.prototype.toString.call(t).slice(8,-1);return"Object"===e&&t.constructor&&(e=t.constructor.name),"Map"===e||"Set"===e?Array.from(t):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?r(t,i):void 0}}(t))||i&&t&&"number"==typeof t.length){e&&(t=e);var n=0;return function(){return n>=t.length?{done:!0}:{done:!1,value:t[n++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}function o(t){return(o="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)}var a=Object.prototype;function h(t){var i=Object.create(null);return t&&Object.assign(i,t),i}function l(t){return 1==(null==t?void 0:t.nodeType)}a.hasOwnProperty,a.toString;var u="​​​";function c(t){return l(t)?t.tagName.toLowerCase()+(t.id?"#".concat(t.id):""):t}function f(t,i){var e,n,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"Assertion failed";if(i)return i;t&&-1==r.indexOf(t)&&(r+=t);for(var s=3,o=r.split("%s"),a=o.shift(),h=[a];o.length;){var l=arguments[s++],u=o.shift();a+=c(l)+u,h.push(l,u.trim())}var f=new Error(a);throw f.messageArray=function(t,i){for(var e=[],n=0,r=0;r<t.length;r++){var s=t[r];i(s)?e.push(s):(n<r&&(t[n]=s),n++)}return n<t.length&&(t.length=n),e}(h,(function(t){return""!==t})),null===(e=(n=self).__AMP_REPORT_ERROR)||void 0===e||e.call(n,f),f}function p(t,e,n,r,s){return i(s)?t(n,s.concat([e])):t(n,"".concat(s||r,": %s"),e),e}function d(t){var i=Object.getOwnPropertyDescriptor(t,"message");if(null!=i&&i.writable)return t;var e=t.message,n=t.stack,r=new Error(e);for(var s in t)r[s]=t[s];return r.stack=n,r}function m(t){for(var i,e=null,n="",r=s(arguments,!0);!(i=r()).done;){var o=i.value;o instanceof Error&&!e?e=d(o):(n&&(n+=" "),n+=o)}return e?n&&(e.message=n+": "+e.message):e=new Error(n),e}function v(t){var i=m.apply(null,arguments);return i.expected=!0,i}function g(t,i,e){var n=0,r=null;function s(s){r=null,n=t.setTimeout(o,e),i.apply(null,s)}function o(){n=0,r&&s(r)}return function(){for(var t=arguments.length,i=new Array(t),e=0;e<t;e++)i[e]=arguments[e];n?r=i:s(i)}}var y=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function b(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return i}}function w(t){var i,e=h();if(!t)return e;for(;i=y.exec(t);){var n=b(i[1],i[1]),r=i[2]?b(i[2].replace(/\+/g," "),i[2]):"";e[n]=r}return e}function x(t){var i=(t||self).location;return w(i.originalHash||i.hash)}var E=function(t){return self.AMP_CONFIG?self.AMP_CONFIG[t]:null},S=("string"==typeof E("cdnProxyRegex")?new RegExp(E("cdnProxyRegex")):E("cdnProxyRegex"))||/^https:\/\/([a-zA-Z0-9_-]+\.)?cdn\.ampproject\.org$/,_=E("cdnUrl")||function(){if(!self.document||!self.document.head)return null;if(self.location&&S.test(self.location.origin))return null;var t=self.document.head.querySelector('meta[name="'.concat("runtime-host",'"]'));return t&&t.getAttribute("content")||null}()||"https://cdn.ampproject.org",R="";function A(t){var i=t||self;return i.__AMP_MODE?i.__AMP_MODE:i.__AMP_MODE=function(t){return{localDev:!1,development:P(t,x(t)),esm:!1,test:!1,rtvVersion:k(t),ssrReady:!1}}(i)}function k(t){var i;return R||(R=(null===(i=t.AMP_CONFIG)||void 0===i?void 0:i.v)||"01".concat("2410292120000")),R}function P(t,i){var e=i||x(t);return["1","actions","amp","amp4ads","amp4email"].includes(e.development)||!!t.AMP_DEV_MODE}var C=function(){},M=function(){return"01".concat("2410292120000")},O=function(t,i){return i.reduce((function(t,i){return"".concat(t,"&s[]=").concat(j(i))}),"https://log.amp.dev/?v=".concat(M(),"&id=").concat(encodeURIComponent(t)))},j=function(t){return encodeURIComponent(String(c(t)))},T=function(t){return parseInt(x(t).log,10)},L=function(){function e(t,i){var e=this,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"";this.win=t,this.tt=i,this.nt=this.rt(),this.it=n,this.et=null,this.ft=function(t){var i=!1,e=null,n=t;return function(){if(!i){for(var t=arguments.length,r=new Array(t),s=0;s<t;s++)r[s]=arguments[s];e=n.apply(self,r),i=!0,n=null}return e}}((function(){t.fetch("".concat(_,"/rtv/").concat(M(),"/log-messages.simple.json")).then((function(t){return t.json()}),C).then((function(t){t&&(e.et=t)}))})),this.ot=this.assert.bind(this)}var r=e.prototype;return r.rt=function(){var t,i=this.win;return null!==(t=i.console)&&void 0!==t&&t.log&&0!=T(i)?this.ut():0},r.ut=function(t){return this.tt(T(t),A().development)},r.st=function(i,e,r){var s,o;if(e>this.nt)return!1;var a=this.win.console,h=null!==(s=(o={},t(o,1,a.error),t(o,3,a.info),t(o,2,a.warn),o)[e])&&void 0!==s?s:a.log,l=this.ct(r),u="[".concat(i,"]");return n(l[0])?l[0]=u+" "+l[0]:l.unshift(u),h.apply(a,l),!0},r.fine=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];this.st(t,4,e)},r.info=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];this.st(t,3,e)},r.warn=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];this.st(t,2,e)},r.error=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];if(!this.st(t,1,e)){var r,s,o=this.createError.apply(this,e);o.name=t||o.name,null===(r=(s=self).__AMP_REPORT_ERROR)||void 0===r||r.call(s,o)}},r.expectedError=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),n=1;n<i;n++)e[n-1]=arguments[n];var r,s;this.st(t,1,e)||null===(r=(s=self).__AMP_REPORT_ERROR)||void 0===r||r.call(s,this.createExpectedError.apply(this,e))},r.createError=function(t){return this.ht(m.apply(null,arguments))},r.createExpectedError=function(t){return this.ht(v.apply(null,arguments))},r.ht=function(t){return t=d(t),this.it?t.message?-1==t.message.indexOf(this.it)&&(t.message+=this.it):t.message=this.it:t.message.indexOf(u)>=0&&(t.message=t.message.replace(u,"")),t},r.ct=function(t){return i(t[0])?this.lt(t[0]):t},r.lt=function(t){var i,e=t.shift();return A(this.win).development&&this.ft(),null!==(i=this.et)&&void 0!==i&&i[e]?[this.et[e]].concat(t):["More info at ".concat(O(e,t))]},r.assert=function(t,e,n){return i(e)?this.assert.apply(this,[t].concat(this.lt(e))):f.apply(null,[this.it].concat(Array.prototype.slice.call(arguments)))},r.assertElement=function(t,i){return function(t,i,e){return p(t,i,l(i),"Element expected",e)}(this.ot,t,i)},r.assertString=function(t,i){return function(t,i,e){return p(t,i,n(i),"String expected",e)}(this.ot,t,i)},r.assertNumber=function(t,i){return function(t,i,e){return p(t,i,"number"==typeof i,"Number expected",e)}(this.ot,t,i)},r.assertArray=function(t,e){return function(t,e,n){return p(t,e,i(e),"Array expected",n)}(this.ot,t,e)},r.assertBoolean=function(t,i){return function(t,i,e){return p(t,i,!!i===i,"Boolean expected",e)}(this.ot,t,i)},e}();self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var q=self.__AMP_LOG,I=null;function D(){I=L,z(),function(){if(q.user||(q.user=U(u)),void q.user.win)return q.userForEmbed||(q.userForEmbed=U("​​​​"));q.user}()}function Y(t,i){if(!I)throw new Error("failed to call initLogConstructor");return new I(self,t,i)}function U(t){return Y((function(t,i){return i||t>=1?4:2}),t)}function z(){return q.dev||(q.dev=Y((function(t){return t>=3?4:t>=2?3:0})))}var H,F=function(){function t(t,i){this.t=t,this.ri=i,this.si=this.t.document,this.ei=!1,this.oi=!1,this.ai=null}var i=t.prototype;return i.buildCallback=function(){this.ei||(this.hi(),this.ei=!0)},i.layoutCallback=function(){this.oi||(this.oi=!0)},i.hi=function(){this.ai=this.si.createElement("main");var t=this.ri.attachShadow({mode:"open"}),i=this.si.createElement("style");i.textContent="amp-story-entry-point{position:relative;display:block}\n/*# sourceURL=/css/amp-story-entry-point.css*/",t.appendChild(i),t.appendChild(this.ai)},i.getElement=function(){return this.ri},t}();function N(){return H||(H=Promise.resolve(void 0))}var X=function(){var t=this;this.promise=new Promise((function(i,e){t.resolve=i,t.reject=e}))};function W(t,i){var e=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);i&&(n=n.filter((function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable}))),e.push.apply(e,n)}return e}function B(i){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?W(Object(n),!0).forEach((function(e){t(i,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(i,Object.getOwnPropertyDescriptors(n)):W(Object(n)).forEach((function(t){Object.defineProperty(i,t,Object.getOwnPropertyDescriptor(n,t))}))}return i}var G="ase art bmp blp cd5 cit cpt cr2 cut dds dib djvu egt exif gif gpl grf icns ico iff jng jpeg jpg jfif jp2 jps lbm max miff mng msp nitf ota pbm pc1 pc2 pc3 pcf pcx pdn pgm PI1 PI2 PI3 pict pct pnm pns ppm psb psd pdd psp px pxm pxr qfx raw rle sct sgi rgb int bw tga tiff tif vtf xbm xcf xpm 3dv amf ai awg cgm cdr cmx dxf e2d egt eps fs gbr odg svg stl vrml x3d sxd v2d vnd wmf emf art xar png webp jxr hdp wdp cur ecw iff lbm liff nrrd pam pcx pgf sgi rgb rgba bw int inta sid ras sun tga".split(" "),Z="### #gf $on $tf 0b 8m 8u 12u 15u 64c 075 75 085 85 91 091 096 96 abf acfm acs afm afn afs all amfm apf asf aspf atm auf b30 bco bdf bepf bez bfn bmap bmf bx bzr cbtf cct cef cff cfn cga ch4 cha chm chr chx claf collection compositefont dfont dus dzk eft eot etx euf f00 f06 f08 f09 f3f f10 f11 f12 f13 f16 fd fdb ff ffil flf fli fn3 fnb fnn fnt fnta fo1 fo2 fog fon font fonts fot frf frs ftm fxr fyi gdr gf gft glf glif glyphs gsf gxf hbf ice intellifont lepf lft lwfn mcf mcf mfd mfm mft mgf mmm mrf mtf mvec nlq ntf odttf ofm okf otf pcf pcf pfa pfb pfm pft phf pk pkt prs pss qbf qfn r8? scr sfd sff sfi sfl sfn sfo sfp sfs sif snf spd spritefont sui suit svg sxs t1c t2 tb1 tb2 tdf tfm tmf tpf ttc tte ttf type ufm ufo usl usp us? vf vf1 vf3 vfb vfm vfont vlw vmf vnf w30 wfn wnf woff woff2 xfc xfn xfr xft zfi zsu _v".split(" "),$="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function V(t,i){if(i=i.split(":")[0],!(t=+t))return!1;switch(i){case"http":case"ws":return 80!==t;case"https":case"wss":return 443!==t;case"ftp":return 21!==t;case"gopher":return 70!==t;case"file":return!1}return 0!==t}var J=Object.prototype.hasOwnProperty;function K(t){try{return decodeURIComponent(t.replace(/\+/g," "))}catch(t){return null}}var Q={stringify:function(t,i){i=i||"";var e,n=[];for(r in"string"!=typeof i&&(i="?"),t)if(J.call(t,r)){(e=t[r])||null!=e&&!isNaN(e)||(e="");var r=encodeURIComponent(r);e=encodeURIComponent(e),null!==r&&null!==e&&n.push(r+"="+e)}return n.length?i+n.join("&"):""},parse:function(t){for(var i,e=/([^=?&]+)=?([^&]*)/g,n={};i=e.exec(t);){var r=K(i[1]);i=K(i[2]),null===r||null===i||r in n||(n[r]=i)}return n}},tt=/^[\x00-\x20\u00a0\u1680\u2000-\u200a\u2028\u2029\u202f\u205f\u3000\ufeff]+/,it=/[\n\r\t]/g,et=/^[A-Za-z][A-Za-z0-9+-.]*:\/\//,nt=/:\d+$/,rt=/^([a-z][a-z0-9.+-]*:)?(\/\/)?([\\/]+)?([\S\s]*)/i,st=/^[a-zA-Z]:/;function ot(t){return(t||"").toString().replace(tt,"")}var at=[["#","hash"],["?","query"],function(t,i){return ut(i.protocol)?t.replace(/\\/g,"/"):t},["/","pathname"],["@","auth",1],[NaN,"host",void 0,1,1],[/:(\d*)$/,"port",void 0,1],[NaN,"hostname",void 0,1,1]],ht={hash:1,query:1};function lt(t){var i=("undefined"!=typeof window?window:void 0!==$?$:"undefined"!=typeof self?self:{}).location||{};t=t||i,i={};var e,n=o(t);if("blob:"===t.protocol)i=new ft(unescape(t.pathname),{});else if("string"===n)for(e in i=new ft(t,{}),ht)delete i[e];else if("object"===n){for(e in t)e in ht||(i[e]=t[e]);void 0===i.slashes&&(i.slashes=et.test(t.href))}return i}function ut(t){return"file:"===t||"ftp:"===t||"http:"===t||"https:"===t||"ws:"===t||"wss:"===t}function ct(t,i){t=(t=ot(t)).replace(it,""),i=i||{};var e=(t=rt.exec(t))[1]?t[1].toLowerCase():"",n=!!t[2],r=!!t[3],s=0;return n?r?(r=t[2]+t[3]+t[4],s=t[2].length+t[3].length):(r=t[2]+t[4],s=t[2].length):r?(r=t[3]+t[4],s=t[3].length):r=t[4],"file:"===e?2<=s&&(r=r.slice(2)):ut(e)?r=t[4]:e?n&&(r=r.slice(2)):2<=s&&ut(i.protocol)&&(r=t[4]),{protocol:e,slashes:n||ut(e),slashesCount:s,rest:r}}function ft(t,i,e){if(t=(t=ot(t)).replace(it,""),!(this instanceof ft))return new ft(t,i,e);var n=at.slice(),r=o(i),s=0;"object"!==r&&"string"!==r&&(e=i,i=null),e&&"function"!=typeof e&&(e=Q.parse);var a=ct(t||"",i=lt(i));for(r=!a.protocol&&!a.slashes,this.slashes=a.slashes||r&&i.slashes,this.protocol=a.protocol||i.protocol||"",t=a.rest,("file:"===a.protocol&&(2!==a.slashesCount||st.test(t))||!a.slashes&&(a.protocol||2>a.slashesCount||!ut(this.protocol)))&&(n[3]=[/(.*)/,"pathname"]);s<n.length;s++)if("function"==typeof(a=n[s]))t=a(t,this);else{var h=a[0],l=a[1];h!=h?this[l]=t:"string"==typeof h?~(h="@"===h?t.lastIndexOf(h):t.indexOf(h))&&("number"==typeof a[2]?(this[l]=t.slice(0,h),t=t.slice(h+a[2])):(this[l]=t.slice(h),t=t.slice(0,h))):(h=h.exec(t))&&(this[l]=h[1],t=t.slice(0,h.index)),this[l]=this[l]||r&&a[3]&&i[l]||"",a[4]&&(this[l]=this[l].toLowerCase())}if(e&&(this.query=e(this.query)),r&&i.slashes&&"/"!==this.pathname.charAt(0)&&(""!==this.pathname||""!==i.pathname)){if(t=this.pathname,i=i.pathname,""!==t){for(e=(i=(i||"/").split("/").slice(0,-1).concat(t.split("/")))[(t=i.length)-1],n=!1,s=0;t--;)"."===i[t]?i.splice(t,1):".."===i[t]?(i.splice(t,1),s++):s&&(0===t&&(n=!0),i.splice(t,1),s--);n&&i.unshift(""),"."!==e&&".."!==e||i.push(""),i=i.join("/")}this.pathname=i}"/"!==this.pathname.charAt(0)&&ut(this.protocol)&&(this.pathname="/"+this.pathname),V(this.port,this.protocol)||(this.host=this.hostname,this.port=""),this.username=this.password="",this.auth&&(~(h=this.auth.indexOf(":"))?(this.username=this.auth.slice(0,h),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=this.auth.slice(h+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(this.auth)),this.auth=this.password?this.username+":"+this.password:this.username),this.origin="file:"!==this.protocol&&ut(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString()}ft.prototype={set:function(t,i,e){switch(t){case"query":"string"==typeof i&&i.length&&(i=(e||Q.parse)(i)),this[t]=i;break;case"port":this[t]=i,V(i,this.protocol)?i&&(this.host=this.hostname+":"+i):(this.host=this.hostname,this[t]="");break;case"hostname":this[t]=i,this.port&&(i+=":"+this.port),this.host=i;break;case"host":this[t]=i,nt.test(i)?(i=i.split(":"),this.port=i.pop(),this.hostname=i.join(":")):(this.hostname=i,this.port="");break;case"protocol":this.protocol=i.toLowerCase(),this.slashes=!e;break;case"pathname":case"hash":i?(e="pathname"===t?"/":"#",this[t]=i.charAt(0)!==e?e+i:i):this[t]=i;break;case"username":case"password":this[t]=encodeURIComponent(i);break;case"auth":~(t=i.indexOf(":"))?(this.username=i.slice(0,t),this.username=encodeURIComponent(decodeURIComponent(this.username)),this.password=i.slice(t+1),this.password=encodeURIComponent(decodeURIComponent(this.password))):this.username=encodeURIComponent(decodeURIComponent(i))}for(i=0;i<at.length;i++)(t=at[i])[4]&&(this[t[1]]=this[t[1]].toLowerCase());return this.auth=this.password?this.username+":"+this.password:this.username,this.origin="file:"!==this.protocol&&ut(this.protocol)&&this.host?this.protocol+"//"+this.host:"null",this.href=this.toString(),this},toString:function(t){t&&"function"==typeof t||(t=Q.stringify);var i=this.host,e=this.protocol;return e&&":"!==e.charAt(e.length-1)&&(e+=":"),e+=this.protocol&&this.slashes||ut(this.protocol)?"//":"",this.username?(e+=this.username,this.password&&(e+=":"+this.password),e+="@"):this.password?(e+=":"+this.password,e+="@"):"file:"!==this.protocol&&ut(this.protocol)&&!i&&"/"!==this.pathname&&(e+="@"),(":"===i[i.length-1]||nt.test(this.hostname)&&!this.port)&&(i+=":"),e+=i+this.pathname,(t="object"===o(this.query)?t(this.query):this.query)&&(e+="?"!==t.charAt(0)?"?"+t:t),this.hash&&(e+=this.hash),e}},ft.extractProtocol=ct,ft.location=lt,ft.trimLeft=ot,ft.qs=Q;var pt=ft,dt=/^xn--/,mt=/[^\0-\x7E]/,vt=/[\x2E\u3002\uFF0E\uFF61]/g,gt={overflow:"Overflow: input needs wider integers to process","not-basic":"Illegal input >= 0x80 (not a basic code point)","invalid-input":"Invalid input"},yt=Math.floor,bt=String.fromCharCode;function wt(t){throw new RangeError(gt[t])}function xt(t,i){var e=t.split("@"),n="";1<e.length&&(n=e[0]+"@",t=e[1]),e=[];for(var r=(t=(t=t.replace(vt,".")).split(".")).length;r--;)e[r]=i(t[r]);return n+e.join(".")}function Et(t,i,e){var n=0;for(t=e?yt(t/700):t>>1,t+=yt(t/i);455<t;n+=36)t=yt(t/35);return yt(n+36*t/(t+38))}var St=function(t){return xt(t,(function(t){return dt.test(t)?function(t){var i=[],e=t.length,n=0,r=128,s=72,o=t.lastIndexOf("-");0>o&&(o=0);for(var a=0;a<o;++a)128<=t.charCodeAt(a)&&wt("not-basic"),i.push(t.charCodeAt(a));for(o=0<o?o+1:0;o<e;){a=n;for(var h=1,l=36;;l+=36){o>=e&&wt("invalid-input");var u=t.charCodeAt(o++);(36<=(u=10>u-48?u-22:26>u-65?u-65:26>u-97?u-97:36)||u>yt((2147483647-n)/h))&&wt("overflow"),n+=u*h;var c=l<=s?1:l>=s+26?26:l-s;if(u<c)break;h>yt(2147483647/(u=36-c))&&wt("overflow"),h*=u}s=Et(n-a,u=i.length+1,0==a),yt(n/u)>2147483647-r&&wt("overflow"),r+=yt(n/u),n%=u,i.splice(n++,0,r)}return String.fromCodePoint.apply(String,i)}(t.slice(4).toLowerCase()):t}))},_t=/[A-Za-z\u00c0-\u00d6\u00d8-\u00f6\u00f8-\u02b8\u0300-\u0590\u0800-\u1fff\u200e\u2c00-\ufb1c\ufe00-\ufe6f\ufefd-\uffff]/,Rt=/[\u0591-\u06ef\u06fa-\u07ff\u200f\ufb1d-\ufdff\ufe70-\ufefc]/;function At(t){return(t="undefined"!=typeof window?function(t){return t=new TextEncoder("utf-8").encode(t),window.crypto.subtle.digest("SHA-256",t).then((function(t){var i=[];t=new DataView(t);for(var e=0;e<t.byteLength;e+=4){var n=("00000000"+t.getUint32(e).toString(16)).slice(-8);i.push(n)}return i.join("")}))}(t):void 0).then((function(t){return function(t){var i=[];t.match(/.{1,2}/g).forEach((function(t,e){i[e]=parseInt(t,16)}));var e=i.length%5,n=Math.floor(i.length/5);if(t=[],0!=e){for(var r=0;r<5-e;r++)i+="\0";n+=1}for(r=0;r<n;r++)t.push("abcdefghijklmnopqrstuvwxyz234567".charAt(i[5*r]>>3)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt((7&i[5*r])<<2|i[5*r+1]>>6)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt((63&i[5*r+1])>>1)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt((1&i[5*r+1])<<4|i[5*r+2]>>4)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt((15&i[5*r+2])<<1|i[5*r+3]>>7)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt((127&i[5*r+3])>>2)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt((3&i[5*r+3])<<3|i[5*r+4]>>5)),t.push("abcdefghijklmnopqrstuvwxyz234567".charAt(31&i[5*r+4]));for(n=0,1==e?n=6:2==e?n=4:3==e?n=3:4==e&&(n=1),e=0;e<n;e++)t.pop();for(e=0;e<n;e++)t.push("=");return t.join("")}("ffffffffff"+t+"000000").substr(8,Math.ceil(4*t.length/5))}))}function kt(t){return"--"==t.slice(2,4)&&"xn"!=t.slice(0,2)}var Pt="amp-viewer-messaging",Ct="channelOpen",Mt="__AMPHTML__";function Ot(t){if("string"!=typeof t)return t;if("{"!=t.charAt(0))return null;try{return JSON.parse(t)}catch(t){return null}}var jt=function(){function t(t,i,e){this.win_=t,this.origin_=i,this.target_=e}var i=t.prototype;return i.addEventListener=function(t,i){var e=this;this.win_.addEventListener("message",(function(t){t.origin==e.origin_&&t.source==e.target_&&i(t)}))},i.postMessage=function(t){var i="null"===this.origin_?"*":this.origin_;this.target_.postMessage(t,i)},i.start=function(){},t}(),Tt=function(){function t(t,i,e,n,r){this.win_=t,this.port_=i,this.isWebview_=!!e,this.token_=n||null,this.verifyToken_=!!r,this.requestIdCounter_=0,this.waitingForResponse_={},this.messageHandlers_={},this.defaultHandler_=null,this.port_.addEventListener("message",this.handleMessage_.bind(this)),this.port_.start()}t.initiateHandshakeWithDocument=function(i,e){return new Promise((function(n){var r=setInterval((function(){var s=new MessageChannel,o={app:Mt,name:"handshake-poll"};i.postMessage(o,"*",[s.port2]);var a=s.port1;a.addEventListener("message",(function i(s){var o=Ot(s.data);if(o&&o.app===Mt&&o.name===Ct){clearInterval(r),a.removeEventListener("message",i);var h=new t(null,a,!1,e,!0);h.sendResponse_(o.requestid,Ct,null),n(h)}})),a.start()}),1e3)}))},t.waitForHandshakeFromDocument=function(i,e,n,r,s){return new Promise((function(o){i.addEventListener("message",(function a(h){var l=Ot(h.data);if(l&&(h.origin==n||s&&s.test(h.origin))&&(!h.source||h.source==e)&&l.app===Mt&&l.name===Ct){i.removeEventListener("message",a);var u=new t(null,new jt(i,h.origin,e),!1,r,!0);u.sendResponse_(l.requestid,Ct,null),o(u)}}))}))};var i=t.prototype;return i.registerHandler=function(t,i){this.messageHandlers_[t]=i},i.unregisterHandler=function(t){delete this.messageHandlers_[t]},i.setDefaultHandler=function(t){this.defaultHandler_=t},i.handleMessage_=function(t){var i=Ot(t.data);i&&i.app===Mt&&(this.token_&&this.verifyToken_&&i.messagingToken!==this.token_?this.logError_(Pt+": handleMessage_ error: ","invalid token"):"q"===i.type?this.handleRequest_(i):"s"===i.type&&this.handleResponse_(i))},i.sendRequest=function(t,i,e){var n=this,r=++this.requestIdCounter_,s=void 0;return e&&(s=new Promise((function(t,i){n.waitingForResponse_[r]={resolve:t,reject:i}}))),this.sendMessage_({app:Mt,requestid:r,type:"q",name:t,data:i,rsvp:e}),s},i.sendResponse_=function(t,i,e){this.sendMessage_({app:Mt,requestid:t,type:"s",name:i,data:e})},i.sendResponseError_=function(t,i,e){var n=this.errorToString_(e);this.logError_(Pt+": sendResponseError_, message name: "+i,n),this.sendMessage_({app:Mt,requestid:t,type:"s",name:i,data:null,error:n})},i.sendMessage_=function(t){var i=Object.assign(t,{});this.token_&&!this.verifyToken_&&(i.messagingToken=this.token_),this.port_.postMessage(this.isWebview_?JSON.stringify(i):i)},i.handleRequest_=function(t){var i=this,e=this.messageHandlers_[t.name];if(e||(e=this.defaultHandler_),!e){var n=new Error("Cannot handle request because no default handler is set!");throw n.args=t.name,n}var r=e(t.name,t.data,!!t.rsvp);if(t.rsvp){var s=t.requestid;if(!r)throw this.sendResponseError_(s,t.name,new Error("no response")),new Error("expected response but none given: "+t.name);r.then((function(e){i.sendResponse_(s,t.name,e)}),(function(e){i.sendResponseError_(s,t.name,e)}))}},i.handleResponse_=function(t){var i=t.requestid,e=this.waitingForResponse_[i];e&&(delete this.waitingForResponse_[i],t.error?(this.logError_(Pt+": handleResponse_ error: ",t.error),e.reject(new Error("Request ".concat(t.name," failed: ").concat(t.error)))):e.resolve(t.data))},i.logError_=function(t,i){if(this.win_){var e="amp-messaging-error-logger: "+t;e+=" data: "+this.errorToString_(i),this.win_.viewerState=e}},i.errorToString_=function(t){return t?t.message?t.message:String(t):"unknown error"},t}();function Lt(t,i){return t}var qt,It="visible",Dt="inactive";function Yt(t,i,e){var n=t.hasAttribute(i),r=void 0!==e?e:!n;return r!==n&&(r?t.setAttribute(i,""):t.removeAttribute(i)),r}var Ut,zt=["Webkit","webkit","Moz","moz","ms","O","o"];function Ht(t,i,e,n,r){var s=function(t,i,e){if(i.startsWith("--"))return i;qt||(qt=h());var n=qt[i];if(!n||e){if(n=i,void 0===t[i]){var r=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(i),s=function(t,i){for(var e=0;e<zt.length;e++){var n=zt[e]+i;if(void 0!==t[n])return n}return""}(t,r);void 0!==t[s]&&(n=s)}e||(qt[i]=n)}return n}(t.style,i,r);if(s){var o,a=n?e+n:e;t.style.setProperty((o=s.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()})),zt.some((function(t){return o.startsWith(t+"-")}))?"-".concat(o):o),a)}}function Ft(t,i){for(var e in i)Ht(t,e,i[e])}function Nt(t,i){for(var e=0;e<i.length;e++)Ht(t,i[e],null)}function Xt(t,i,e,n){var r={detail:e};if(Object.assign(r,n),"function"==typeof t.CustomEvent)return new t.CustomEvent(i,r);var s=t.document.createEvent("CustomEvent");return s.initCustomEvent(i,!!r.bubbles,!!r.cancelable,e),s}var Wt,Bt,Gt=function(){function t(t,i,e){this.t=t,this.ri=i,this.ui=e,this.fi=null,this.li()}var i=t.prototype;return i.li=function(){this.t.IntersectionObserver&&this.t===this.t.parent?this.ci():this.pi()},i.ci=function(){var t=this,i=new this.t.IntersectionObserver((function(e){e.forEach((function(e){e.isIntersecting&&(t.ui(),i.unobserve(t.ri))}))}));i.observe(this.ri)},i.pi=function(){this.fi=g(this.t,this.mi.bind(this),500),this.t.addEventListener("scroll",this.fi),this.mi(this.ri)},i.mi=function(){var t=this.ri.getBoundingClientRect().top;this.t.innerHeight>t&&(this.ui(),this.t.removeEventListener("scroll",this.fi))},t}(),Zt=function(){function t(t){this.t=t,this.vi={startY:0,lastDelta:0,touchStartTimeMs:null,touchEndTimeMs:null,touchMoveTimeMs:null},this.di={startY:0,isRunning:!1,acceleration:1,speedLimit:.3,startTimeMs:null,maxTimeBetweenSwipesMs:250,moveTimeThresholdMs:100,durationMs:null,meetsDeltaYThreshold:!1,deltaYThresholdPx:5,deltaY:null,offsetThresholdPx:30,offsetPx:null,multiplier:1}}var i=t.prototype;return i.onTouchStart=function(t,i){this.vi.startY=i,this.vi.touchStartTimeMs=t,this.di.startY=this.t.scrollY,this.di.isRunning&&this.vi.touchEndTimeMs-this.vi.touchStartTimeMs<this.di.maxTimeBetweenSwipesMs?this.di.multiplier+=this.di.acceleration:this.di.multiplier=1,this.di.isRunning=!1},i.onTouchMove=function(t,i){this.di.acceleration=Math.abs(this.di.deltaY/(t-this.vi.touchMoveTimeMs)),this.vi.touchMoveTimeMs=t,g(this.t,this.yi.bind(this,i),50)()},i.yi=function(t){this.di.deltaY=t-this.vi.startY,this.di.meetsDeltaYThreshold=Math.abs(this.di.deltaY)>this.di.deltaYThresholdPx,this.di.meetsDeltaYThreshold&&this.t.scrollBy(0,-this.di.deltaY)},i.onTouchEnd=function(t){var i=this;if(this.vi.touchEndTimeMs=t,this.di.meetsDeltaYThreshold){var e=this.vi.touchEndTimeMs-this.vi.touchMoveTimeMs;this.di.offsetPx=this.gi(),e<this.di.moveTimeThresholdMs&&Math.abs(this.di.offsetPx)>this.di.offsetThresholdPx&&(this.di.durationMs=1.2*this.t.innerHeight,this.di.isRunning=!0,requestAnimationFrame((function(t){i.di.startTimeMs=t,i.di.startY=i.t.scrollY,i.bi(t)}))),this.di.multiplier=1,this.vi.startY=0,this.di.deltaY=0}},i.gi=function(){var t=this.t.innerHeight*this.di.speedLimit,i=Math.pow(this.di.acceleration,2)*this.t.innerHeight;return(i=Math.min(t,i))*(this.di.deltaY>0?-this.di.multiplier:this.di.multiplier)},i.bi=function(t){var i=t-this.di.startTimeMs;if(!(i>this.di.durationMs)){var e=this.wi(i/this.di.durationMs)*this.di.offsetPx,n=this.di.startY+e;this.di.isRunning?(this.t.scroll(0,n),requestAnimationFrame(this.bi.bind(this))):cancelAnimationFrame(requestAnimationFrame(this.bi.bind(this)))}},i.wi=function(t){return 1- --t*t*t*t},t}(),$t=function(){function t(t){this.zt=t,this.It=0,this.Ct=0,this.Ot=h()}var i=t.prototype;return i.has=function(t){return!!this.Ot[t]},i.get=function(t){var i=this.Ot[t];if(i)return i.access=++this.Ct,i.payload},i.put=function(t,i){this.has(t)||this.It++,this.Ot[t]={payload:i,access:this.Ct},this.qt()},i.qt=function(){if(!(this.It<=this.zt)){var t,i=this.Ot,e=this.Ct+1;for(var n in i){var r=i[n].access;r<e&&(e=r,t=n)}void 0!==t&&(delete i[t],this.It--)}},t}();function Vt(t,i){return Wt||(Wt=self.document.createElement("a"),Bt=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new $t(100))),Jt(Wt,t,i?null:Bt)}function Jt(t,i,e){if(e&&e.has(i))return e.get(i);t.href=i,t.protocol||(t.href=t.href);var n,r={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:null};"/"!==r.pathname[0]&&(r.pathname="/"+r.pathname),("http:"==r.protocol&&80==r.port||"https:"==r.protocol&&443==r.port)&&(r.port="",r.host=r.hostname),n=t.origin&&"null"!=t.origin?t.origin:"data:"!=r.protocol&&r.host?r.protocol+"//"+r.host:r.href,r.origin=n;var s=r;return e&&e.put(i,s),s}function Kt(t){var e,n,r,s=[];for(var o in t){var a=t[o];if(null!=a){a=i(r=a)?r:[r];for(var h=0;h<a.length;h++)s.push((e=o,n=a[h],"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(n))))}}return s.join("&")}function Qt(t){var i=t.indexOf("#");return-1==i?t:t.substring(0,i)}function ti(t){var i=t.indexOf("#");return-1==i?"":t.substring(i)}function ii(t){return S.test(function(t){return"string"==typeof t?Vt(t):t}(t).origin)}function ei(t){var i=t.indexOf("?");if(-1==i)return t;var e=ti(t);return t.substring(0,i)+e}var ni,ri,si,oi,ai="i-amphtml-story-player-loading",hi="i-amphtml-story-player-loaded",li="i-amphtml-story-player-error",ui=["cdn.ampproject.org","www.bing-amp.com"],ci=["allow-top-navigation"],fi="amp-story-player-hide-button",pi="PAGE_ATTACHMENT_STATE",di="UI_STATE",mi="MUTED_STATE",vi="CURRENT_PAGE_ID",gi="i-amphtml-story-player-no-navigation-transition",yi="amp-story-player",bi=function(){function t(t,i){return this.t=t,this.ri=i,this.si=t.document,this.xi=this.si.createElement("a"),this.ki=[],this.ai=null,this.Si=0,this.Ai=0,this.ji=null,this.Ii=null,this.Ri=null,this.vi={startX:0,startY:0,lastX:0,isSwipeX:null},this.Ei=null,this.Ci=new X,this.Oi(),this.Mi=new Zt(t),this.Pi=!0,this.Ti=null,this.Ui=null,this.zi=null,this.qi=!1,this.ri}var i=t.prototype;return i.Oi=function(){this.ri.buildPlayer=this.buildPlayer.bind(this),this.ri.layoutPlayer=this.layoutPlayer.bind(this),this.ri.getElement=this.getElement.bind(this),this.ri.getStories=this.getStories.bind(this),this.ri.load=this.load.bind(this),this.ri.show=this.show.bind(this),this.ri.add=this.add.bind(this),this.ri.play=this.play.bind(this),this.ri.pause=this.pause.bind(this),this.ri.go=this.go.bind(this),this.ri.mute=this.mute.bind(this),this.ri.unmute=this.unmute.bind(this),this.ri.getStoryState=this.getStoryState.bind(this),this.ri.rewind=this.rewind.bind(this)},i.load=function(){if(!this.ri.isConnected)throw new Error("[".concat(yi,"] element must be connected to the DOM before calling load()."));if(this.ri.ei)throw new Error("[".concat(yi,"] calling load() on an already loaded element."));this.buildPlayer(),this.layoutPlayer()},i._i=function(t){t.idx=this.ki.length,t.distance=t.idx-this.Si,t.connectedDeferred=new X,this.ki.push(t)},i.add=function(t){if(!(t.length<=0)){if(!Array.isArray(t)||!t.every((function(t){return t&&t.href})))throw new Error('"stories" parameter has the wrong structure');for(var i=this.ki.length,e=0;e<t.length;e++){var n=t[e];this._i(n),this.Fi(n)}this.Di(i)}},i.play=function(){this.ri.oi||this.layoutPlayer(),this.Ni(!1)},i.pause=function(){this.Ni(!0)},i.Ni=function(t){this.Pi=!t;var i=this.ki[this.Si];this.Yi(i,t?"paused":It)},i.getElement=function(){return this.ri},i.getStories=function(){return this.ki},i.buildPlayer=function(){this.ri.ei||(this.Li(),this.hi(),this.Zi(),this.$i(),this.Hi(),this.Xi(this.ki.length-this.Si-1),this.Gi(),this.Ji(),this.Vi(),this.Bi(),this.Ki(),this.Wi(),this.ri.ei=!0)},i.Li=function(){var t,i=this;((t=this.ri.querySelectorAll("a"))?Array.prototype.slice.call(t):[]).forEach((function(t){var e=t.querySelector("img[data-amp-story-player-poster-img]"),n=e&&e.getAttribute("src"),r={href:t.href,title:t.textContent&&t.textContent.trim()||null,posterImage:t.getAttribute("data-poster-portrait-src")||n};i._i(r)}))},i.Wi=function(){this.ri.dispatchEvent(Xt(this.t,"ready",{})),this.ri.isReady=!0},i.Zi=function(){var t=this;this.ki.forEach((function(i){t.Fi(i)}))},i.hi=function(){this.ai=this.si.createElement("div"),this.ai.classList.add("i-amphtml-story-player-main-container");var t=this.si.createElement("div");t.classList.add("i-amphtml-fill-content","i-amphtml-story-player-shadow-root-intermediary"),this.ri.appendChild(t);var i=this.ri.attachShadow?t.attachShadow({mode:"open"}):t,e=this.si.createElement("style");e.textContent=':host{all:initial;color:initial}.story-player-iframe{height:100%;width:100%;-ms-flex:0 0 100%;flex:0 0 100%;border:0;opacity:0;transition:opacity 500ms ease;position:absolute}.i-amphtml-story-player-main-container{height:100%;position:relative;overflow:hidden;transform-style:preserve-3d}.i-amphtml-story-player-loaded .story-player-iframe{opacity:1;transition:transform 200ms cubic-bezier(0.4,0,0.2,1)}.i-amphtml-story-player-no-navigation-transition .story-player-iframe{transition-duration:0.01s}.i-amphtml-story-player-main-container .story-player-iframe[i-amphtml-iframe-position="0"],.i-amphtml-story-player-main-container iframe:first-of-type{transform:translateZ(1px)}.i-amphtml-story-player-main-container .story-player-iframe[i-amphtml-iframe-position="1"],.i-amphtml-story-player-main-container iframe:nth-of-type(2),.i-amphtml-story-player-main-container iframe:nth-of-type(3){transform:translate3d(100%,0,0)}.i-amphtml-story-player-main-container .story-player-iframe[i-amphtml-iframe-position="-1"]{transform:translate3d(-100%,0,0)}.amp-story-player-exit-control-button{position:absolute;height:48px;width:48px;background-repeat:no-repeat;background-position:50%;margin-top:7px;background-size:28px;border:0px;background-color:transparent;outline:transparent;cursor:pointer;z-index:1}.amp-story-player-close-button{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="%23FFF"><path fill="none" d="M0 0h24v24H0z"/><path d="M19 6.41 17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>\')}.amp-story-player-back-button{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="%23FFF"><path fill="none" d="M0 0h24v24H0z"/><path d="M20 11H7.83l5.59-5.59L12 4l-8 8 8 8 1.41-1.41L7.83 13H20z"/></svg>\')}.amp-story-player-hide-button{display:none}.i-amphtml-story-player-panel{--i-amphtml-story-player-panel-ratio:69/116;--i-amphtml-story-player-panel-responsive-margin:max(74px,calc(var(--i-amphtml-story-player-height)*0.0825));--i-amphtml-story-player-panel-height:calc(var(--i-amphtml-story-player-height) - var(--i-amphtml-story-player-panel-responsive-margin)*2);--i-amphtml-story-player-panel-width:calc(var(--i-amphtml-story-player-panel-height)*var(--i-amphtml-story-player-panel-ratio));--i-amphtml-story-player-panel-button-margin:max(10px,calc(50vw - 145px - var(--i-amphtml-story-player-panel-width)/2))}.i-amphtml-story-player-panel.i-amphtml-story-player-panel-medium{--i-amphtml-story-player-panel-responsive-margin:0px;--i-amphtml-story-player-panel-width:calc(var(--i-amphtml-story-player-height)*var(--i-amphtml-story-player-panel-ratio))}.i-amphtml-story-player-panel.i-amphtml-story-player-panel-small{--i-amphtml-story-player-panel-ratio:36/53}.i-amphtml-story-player-panel-next,.i-amphtml-story-player-panel-prev{position:absolute;top:50%;transform:translateY(-50%);width:48px;height:48px;z-index:1;background-color:transparent;border:none;background-position:50%;background-repeat:no-repeat;cursor:pointer;transition:opacity 150ms}.i-amphtml-story-player-panel-next[disabled],.i-amphtml-story-player-panel-prev[disabled]{opacity:.1;cursor:initial}.i-amphtml-story-player-full-bleed-story .i-amphtml-story-player-panel-next,.i-amphtml-story-player-full-bleed-story .i-amphtml-story-player-panel-prev,:not(.i-amphtml-story-player-panel)>.i-amphtml-story-player-panel-next,:not(.i-amphtml-story-player-panel)>.i-amphtml-story-player-panel-prev{opacity:0;pointer-events:none}.i-amphtml-story-player-panel-next,.i-amphtml-story-player-panel-prev{background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="48" height="48" fill="none"><path stroke="%23fff" stroke-linecap="round" stroke-width="1.9" d="M17 29.2V18.8c0-1.2 1.4-2 2.5-1.3l7.5 5.2c1 .6 1 2 0 2.6l-7.5 5.2c-1 .7-2.5 0-2.5-1.3Z"/><rect width="1.8" height="15.6" x="30.2" y="16.2" fill="%23fff" rx=".9"/></svg>\')!important}.i-amphtml-story-player-panel-prev{margin-inline-start:calc(var(--i-amphtml-story-player-panel-button-margin));transform:translateY(-50%) rotate(180deg)}.i-amphtml-story-player-panel-next{margin-inline-end:var(--i-amphtml-story-player-panel-button-margin);right:0}[dir=rtl].i-amphtml-story-player-panel-prev{right:0}[dir=rtl].i-amphtml-story-player-panel-next{left:0;transform:translateY(-50%) rotate(180deg)}\n/*# sourceURL=/css/amp-story-player-shadow.css*/',i.appendChild(e),i.insertBefore(this.ai,i.firstElementChild)},i.$i=function(){var t=this,i=this.ri.getAttribute("exit-control");if("back-button"===(e=i)||"close-button"===e){var e,n=this.si.createElement("button");this.ai.appendChild(n);var r="back-button"===i;n.classList.add(r?"amp-story-player-back-button":"amp-story-player-close-button"),n.classList.add("amp-story-player-exit-control-button"),n.addEventListener("click",(function(){t.ri.dispatchEvent(Xt(t.t,r?"amp-story-player-back":"amp-story-player-close",{}))}))}},i.Hi=function(){if(this.ji)return this.ji;var t=this.ri.getAttribute("amp-cache");t&&!ui.includes(t)&&console.error("[".concat(yi,"]"),"Unsupported cache specified, use one of following: ".concat(ui));var i,e,n,r=this.ri.querySelector("script");if(!r)return null;if("SCRIPT"!=(i=r).tagName||"APPLICATION/JSON"!=(null===(e=i.getAttribute("type"))||void 0===e?void 0:e.toUpperCase()))throw new Error('<script> child must have type="application/json"');try{this.ji=(n=r.textContent,JSON.parse(n))}catch(t){console.error("[".concat(yi,"] "),t)}return this.ji},i.Fi=function(t){var i=this.si.createElement("iframe");t.posterImage&&Ht(i,"backgroundImage",t.posterImage),i.classList.add("story-player-iframe"),i.setAttribute("allow","autoplay; web-share"),function(t){if(t.sandbox&&t.sandbox.supports){for(var i=["allow-top-navigation-by-user-activation","allow-popups-to-escape-sandbox"],e=0;e<i.length;e++){var n=i[e];if(!t.sandbox.supports(n))return void z().info("3p-frame","Iframe doesn't support %s",n)}t.sandbox=i.join(" ")+" "+["allow-forms","allow-modals","allow-pointer-lock","allow-popups","allow-same-origin","allow-scripts"].join(" ")}}(i),this.Qi(i),this.tr(i),t.iframe=i},i.Qi=function(t){if(t.sandbox&&t.sandbox.supports&&!(t.sandbox.length<=0))for(var i=0;i<ci.length;i++){var e=ci[i];if(!t.sandbox.supports(e))throw new Error("Iframe doesn't support: ".concat(e));t.sandbox.add(e)}},i.ir=function(t){var i=this,e=t.iframe;t.messagingPromise=new Promise((function(n){i.nr(t,e).then((function(e){e.setDefaultHandler((function(){return N()})),e.registerHandler("touchstart",(function(t,e){i.rr(e)})),e.registerHandler("touchmove",(function(t,e){i.sr(e)})),e.registerHandler("touchend",(function(t,e){i.er(e)})),e.registerHandler("selectDocument",(function(t,e){i.ar(e)})),e.registerHandler("storyContentLoaded",(function(){t.storyContentLoaded=!0,i.hr(t)})),e.sendRequest("onDocumentState",{state:pi},!1),e.sendRequest("onDocumentState",{state:vi},!1),e.sendRequest("onDocumentState",{state:mi}),e.sendRequest("onDocumentState",{state:di}),e.registerHandler("documentStateUpdate",(function(t,n){i.ur(n,e)})),i.ji&&i.ji.controls&&(i.lr(t.idx),e.sendRequest("customDocumentUI",{controls:i.ji.controls},!1)),n(e)}),(function(t){console.error("[".concat(yi,"]"),t)}))}))},i.lr=function(t){if(t===this.ki.length-1){var i=e(this.ji.controls,(function(t){return"skip-next"===t.name||"skip-to-next"===t.name}));i>=0&&(this.ji.controls[i].state="disabled")}},i.nr=function(t,i){var e=this;return this.cr(t.href).then((function(t){return Tt.waitForHandshakeFromDocument(e.t,i.contentWindow,e.pr(t).origin,null,S)}))},i.tr=function(t){var i=this;this.ai.classList.add(ai),t.onload=function(){i.ai.classList.remove(ai),i.ai.classList.add(hi),i.ri.classList.add(hi)},t.onerror=function(){i.ai.classList.remove(ai),i.ai.classList.add(li),i.ri.classList.add(li)}},i.layoutPlayer=function(){var t=this;if(!this.ri.oi){if(new Gt(this.t,this.ri,(function(){return t.Ci.resolve()})),this.t.ResizeObserver)new this.t.ResizeObserver((function(i){var e=i[0].contentRect,n=e.height,r=e.width;t.mr(n,r)})).observe(this.ri);else{var i=this.ri.getBoundingClientRect(),e=i.height,n=i.width;this.mr(e,n)}this.Di(),this.ri.oi=!0}},i.Ki=function(){var t=this;this.Ui=this.si.createElement("button"),this.Ui.classList.add("i-amphtml-story-player-panel-prev"),this.Ui.addEventListener("click",(function(){return t.vr()})),this.Ui.setAttribute("aria-label","previous story"),this.ai.appendChild(this.Ui),this.zi=this.si.createElement("button"),this.zi.classList.add("i-amphtml-story-player-panel-next"),this.zi.addEventListener("click",(function(){return t.dr()})),this.zi.setAttribute("aria-label","next story"),this.ai.appendChild(this.zi),this.yr()},i.yr=function(){Yt(this.Ui,"disabled",this.gr(this.Si-1)&&!this.Ri),Yt(this.zi,"disabled",this.gr(this.Si+1)&&!this.Ri)},i.mr=function(t,i){var e=i/t>.775;this.ai.classList.toggle("i-amphtml-story-player-panel",e),e&&(Ft(this.ai,{"--i-amphtml-story-player-height":"".concat(t,"px")}),this.ai.classList.toggle("i-amphtml-story-player-panel-medium",t<756),this.ai.classList.toggle("i-amphtml-story-player-panel-small",t<538))},i.br=function(){var t=this.ji.behavior.endpoint;return t?(t=t.replace(/\${offset}/,this.ki.length.toString()),fetch(t,{method:"GET",headers:{Accept:"application/json"}}).then((function(t){return t.json()})).catch((function(t){console.error("[".concat(yi,"]"),t)}))):(this.Ii=!1,N())},i.show=function(t){var i=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},r=this.wr(t),s=N();return r.idx!==this.Si&&(this.Si=r.idx,s=this.Di(),!1===n.animate&&(this.ai.classList.toggle(gi,!0),function(t,i,e){var n=e,r=function(t,i,e,n){var r=t,s=e,o=function(t){try{return s(t)}catch(t){var i,e;throw null===(i=(e=self).__AMP_REPORT_ERROR)||void 0===i||i.call(e,t),t}},a=function(){if(void 0!==Ut)return Ut;Ut=!1;try{var t={get capture(){return Ut=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Ut}(),h=!1;return r.addEventListener(i,o,a?n:h),function(){null==r||r.removeEventListener(i,o,a?n:h),s=null,r=null,o=null}}(t,"transitionend",(function(t){try{n(t)}finally{n=null,r()}}),void 0)}(r.iframe,0,(function(){i.ai.classList.remove(gi)}))),this.kr()),null!=e?s.then((function(){return i.Sr(e)})):s},i.mute=function(){var t=this.ki[this.Si];this.Ar(t,!0)},i.unmute=function(){var t=this.ki[this.Si];this.Ar(t,!1)},i.getStoryState=function(t){"page-attachment"===t&&this.jr()},i.Ir=function(t){var i=Xt(this.t,"navigation",t);this.ri.dispatchEvent(i)},i.kr=function(){var t=this,i=this.Si,e=this.ki.length-this.Si-1,n={index:i,remaining:e};this.yr(),this.Rr().then((function(i){return t.Er(i)})),this.Ir(n),this.Xi(e)},i.Rr=function(){var t=this.ki[this.Si];return new Promise((function(i){t.messagingPromise.then((function(t){t.sendRequest("getDocumentState",{state:di},!0).then((function(t){return i(t.value)}))}))}))},i.Er=function(t){var i=2===t||0===t;this.ai.classList.toggle("i-amphtml-story-player-full-bleed-story",i)},i.Xi=function(t){var i=this;this.ji&&this.ji.behavior&&this.Cr()&&t<=2&&this.br().then((function(t){t&&i.add(t)})).catch((function(t){console.error("[".concat(yi,"]"),t)}))},i.Or=function(t){return t&&t.on&&t.action},i.Cr=function(){if(null!==this.Ii)return this.Ii;var t,i=this.ji.behavior;return this.Ii=this.Or(i)&&"end"===(t=i).on&&"fetch"===t.action&&t.endpoint,this.Ii},i.dr=function(){!this.Ri&&this.gr(this.Si+1)||(this.Ri&&this.gr(this.Si+1)?this.go(1):(this.Si++,this.Di(),this.kr()))},i.vr=function(){!this.Ri&&this.gr(this.Si-1)||(this.Ri&&this.gr(this.Si-1)?this.go(-1):(this.Si--,this.Di(),this.kr()))},i.go=function(t){var i=this,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};if(0!==t||0!==e){if(!this.Ri&&this.gr(this.Si+t))throw new Error("Out of Story range.");var r=this.Si+t,s=t>0?this.ki[r%this.ki.length]:this.ki[(r%this.ki.length+this.ki.length)%this.ki.length],o=N();this.Si!==s.idx&&(o=this.show(s.href,null,n)),o.then((function(){i.Mr(e)}))}},i.Pr=function(t){var i=0===t.distance?0:t.idx>this.Si?1:-1;requestAnimationFrame((function(){var e=t.iframe;Nt(e,["transform","transition"]),e.setAttribute("i-amphtml-iframe-position",i)}))},i.hr=function(t){var i=this;t.messagingPromise.then((function(e){e.sendRequest("getDocumentState",{state:"DESKTOP_ASPECT_RATIO"},!0).then((function(e){t.desktopAspectRatio=e.value,i.Tr()}))}))},i.Tr=function(){this.ki[this.Si].desktopAspectRatio&&Ft(this.ai,{"--i-amphtml-story-player-panel-ratio":this.ki[this.Si].desktopAspectRatio})},i.Ur=function(t){var i=this;return this.ki[this.Si].storyContentLoaded?(this.Tr(),N()):0!==t.distance?this.Ei.promise:(this.Ei,this.Ei=new X,t.messagingPromise.then((function(e){return e.registerHandler("storyContentLoaded",(function(){t.storyContentLoaded=!0,i.Ei.resolve(),i.hr(t)}))})),N())},i.Di=function(){for(var t=this,i=arguments.length>0&&void 0!==arguments[0]?arguments[0]:this.Si,e=[],n=function(n){var r=t.ki[(n+i)%t.ki.length],s=r.distance;if(r.distance=Math.abs(t.Si-r.idx),s<=1&&r.distance>1&&t.zr(r),r.distance<=1&&!r.iframe.isConnected&&t.qr(r),r.distance>1)return"continue";e.push(t.Ur(r).then((function(){return t.cr(r.href)})).then((function(i){t._r(i,r.iframe.src)||t.Fr(r,i)})).then((function(){return t.Ci.promise})).then((function(){0===r.distance&&t.Pi&&t.Yi(r,It),0===s&&1===r.distance&&t.Yi(r,Dt)})).then((function(){t.Pr(r),0===r.distance&&r.iframe.addEventListener("animationend",(function(){!function(t){try{t.focus()}catch(t){}}(r.iframe)}))})).catch((function(t){t.includes("amp-story-player-dev")||console.error("[".concat(yi,"]"),t)})))},r=0;r<this.ki.length;r++)n(r);return Promise.all(e)},i.qr=function(t){this.ai.appendChild(t.iframe),this.ir(t),t.connectedDeferred.resolve()},i.zr=function(t){t.storyContentLoaded=!1,t.connectedDeferred=new X,t.iframe.setAttribute("src",""),t.iframe.remove()},i.Fr=function(t,i){var e=t.iframe,n=this.pr(i,"prerender").href;e.setAttribute("src",n),t.title&&e.setAttribute("title",t.title)},i._r=function(t,i){return!(i.length<=0)&&Qt(ei(i))===Qt(ei(t))},i.cr=function(t){var i=this.ri.getAttribute("amp-cache");if(!i||!ui.includes(i))return Promise.resolve(t);if(ii(t)){var e=Vt(t);return e.pathname.startsWith("/c/")&&(e.pathname="/v/"+e.pathname.substr(3)),Promise.resolve(e.toString())}return function(t,i){var e=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null,n=new pt(i),r=function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;return function(t){return G.some((function(i){return!!t.endsWith(".".concat(i))}))}(t)?"/i":function(t){return Z.some((function(i){return!!t.endsWith(".".concat(i))}))}(t)?"/r":"viewer"===i?"/v":"/c"}(n.pathname,e);return r+="https:"===n.protocol?"/s/":"/",i.endsWith("/")||(n.pathname=n.pathname.replace(/\/$/,"")),function(t){if(kt(t=new pt(t).hostname))var i=!1;else i=St(t),i=63>=t.length&&!(_t.test(i)&&Rt.test(i))&&-1!=t.indexOf(".");return i?63<(i=function(t){return xt(t,(function(t){return mt.test(t)?"xn--"+function(t){for(var i,e=[],n=(t=function(t){for(var i=[],e=0,n=t.length;e<n;){var r=t.charCodeAt(e++);if(55296<=r&&56319>=r&&e<n){var s=t.charCodeAt(e++);56320==(64512&s)?i.push(((1023&r)<<10)+(1023&s)+65536):(i.push(r),e--)}else i.push(r)}return i}(t)).length,r=128,o=0,a=72,h=s(t,!0);!(i=h()).done;){var l=i.value;128>l&&e.push(bt(l))}var u=l=e.length;for(l&&e.push("-");u<n;){for(var c,f=2147483647,p=s(t,!0);!(c=p()).done;){var d=c.value;d>=r&&d<f&&(f=d)}var m=u+1;f-r>yt((2147483647-o)/m)&&wt("overflow"),o+=(f-r)*m,r=f;for(var v,g=s(t,!0);!(v=g()).done;){var y=v.value;if(y<r&&2147483647<++o&&wt("overflow"),y==r){var b=o;for(f=36;;f+=36){var w=f<=a?1:f>=a+26?26:f-a;if(b<w)break;var x=b-w,E=36-w;w+=x%E,(b=e).push.call(b,bt(w+22+75*(26>w)-0)),b=yt(x/E)}e.push(bt(b+22+75*(26>b)-0)),a=Et(o,m,u==l),o=0,++u}}++o,++r}return e.join("")}(t):t}))}(i=(i=(i=St(t)).split("-").join("--")).split(".").join("-")).toLowerCase()).length?At(t):(kt(i)&&(i="0-".concat(i,"-0")),Promise.resolve(i)):At(t)}(n.toString()).then((function(e){var s=new pt(i);return s.protocol="https",e=e+"."+t,s.host=e,s.hostname=e,s.pathname=r+n.hostname+n.pathname,s.toString()}))}(i,t,"viewer").then((function(t){return t}))},i.pr=function(t){var i={visibilityState:arguments.length>1&&void 0!==arguments[1]?arguments[1]:Dt,origin:this.t.origin,showStoryUrlInfo:"0",storyPlayer:"v0",cap:"swipe"};"auto"===this.Ti&&(i.attribution="auto");var e=B(B({},w(ti(t))),i),n=Qt(t);ii(t)&&(n=function(t){return function(t,i){if(!i)return t;var e=t.split("#",2),n=e[0].split("?",2);return n[0]+(n[1]?"?".concat(n[1],"&").concat(i):"?".concat(i))+(e[1]?"#".concat(e[1]):"")}(t,Kt({amp_js_v:"0.1"}))}(n));var r=n+"#"+Kt(e);return Jt(this.xi,r)},i.Yi=function(t,i){t.messagingPromise.then((function(t){return t.sendRequest("visibilitychange",{state:i},!0)}))},i.Dr=function(t,i,e){t.messagingPromise.then((function(t){t.sendRequest("setDocumentState",{state:i,value:e})}))},i.Ar=function(t,i){this.Dr(t,mi,i)},i.jr=function(){var t=this;this.ki[this.Si].messagingPromise.then((function(i){i.sendRequest("getDocumentState",{state:pi},!0).then((function(i){return t.Nr(i.value)}))}))},i.Sr=function(t){this.ki[this.Si].messagingPromise.then((function(i){return i.sendRequest("selectPage",{id:t})}))},i.wr=function(t){var i=t?e(this.ki,(function(i){return i.href===t})):this.Si;if(!this.ki[i])throw new Error("Story URL not found in the player: ".concat(t));return this.ki[i]},i.rewind=function(t){var i=this.wr(t);this.Yr(i).then((function(){return i.messagingPromise})).then((function(t){return t.sendRequest("rewind",{})}))},i.Yr=function(t){return t.iframe.isConnected?N():t.connectedDeferred.promise},i.Mr=function(t){0!==t&&this.Lr(t)},i.Lr=function(t){this.ki[this.Si].messagingPromise.then((function(i){return i.sendRequest("selectPage",{delta:t})}))},i.ur=function(t,i){switch(t.state){case pi:this.Zr(t.value);break;case vi:this.$r(t.value,i);break;case mi:this.Hr(t.value);break;case di:this.Er(t.value);break;case"AMP_STORY_PLAYER_EVENT":this.Xr(t.value);break;case"AMP_STORY_COPY_URL":this.Gr(t.value,i)}},i.Xr=function(t){switch(t){case"amp-story-player-skip-next":case"amp-story-player-skip-to-next":this.dr();break;default:this.ri.dispatchEvent(Xt(this.t,t,{}))}},i.Gr=function(t,i){var e,n,r,s,o;e=this.t,n=t,r=function(){i.sendRequest("copyComplete",{success:!0,url:t},!1)},s=function(){i.sendRequest("copyComplete",{success:!1},!1)},null!==(o=e.navigator)&&void 0!==o&&o.clipboard?e.navigator.clipboard.writeText(n).then(r,s):e.document.queryCommandSupported("copy")&&function(t,i){var e,n,r,s=!1,o=t.document,a=o.createElement("textarea");Ft(a,{position:"fixed",top:0,left:0,width:"50px",height:"50px",padding:0,border:"none",outline:"none",background:"transparent"}),a.value=i,a.readOnly=!0,a.contentEditable="true",o.body.appendChild(a),null===(e=t.getSelection())||void 0===e||e.removeAllRanges(),a.focus(),a.setSelectionRange(0,i.length);try{s=o.execCommand("copy")}catch(t){}return null===(r=(n=a).parentElement)||void 0===r||r.removeChild(n),s}(e,n)?r():s()},i.Hr=function(t){this.ri.dispatchEvent(Xt(this.t,"amp-story-muted-state",{muted:t}))},i.$r=function(t,i){var e=this;i.sendRequest("getDocumentState",{state:"STORY_PROGRESS"},!0).then((function(i){e.ri.dispatchEvent(Xt(e.t,"storyNavigation",{pageId:t,progress:i.value}))}))},i.Zr=function(t){this.Jr(!t),this.qi=t,this.Nr(t)},i.Jr=function(t){var i=this.ai.querySelector("button.amp-story-player-exit-control-button");i&&(t?i.classList.remove(fi):i.classList.add(fi))},i.Nr=function(t){this.ri.dispatchEvent(Xt(this.t,t?"page-attachment-open":"page-attachment-close",{}))},i.ar=function(t){this.Vr(t),t.next?this.dr():t.previous&&this.vr()},i.Vr=function(t){var i,e;this.Ri||!t.next&&!t.previous||(t.next?(i=this.Si+1===this.ki.length,e="noNextStory"):(i=0===this.Si,e="noPreviousStory"),i&&this.ri.dispatchEvent(Xt(this.t,e,{})))},i.rr=function(t){var i=this.Br(t);i&&(this.vi.startX=i.screenX,this.vi.startY=i.screenY,this.Mi&&this.Mi.onTouchStart(t.timeStamp,i.clientY),this.ri.dispatchEvent(Xt(this.t,"amp-story-player-touchstart",{touches:t.touches})))},i.sr=function(t){var i=this.Br(t);if(i)if(this.ri.dispatchEvent(Xt(this.t,"amp-story-player-touchmove",{touches:t.touches,isNavigationalSwipe:this.vi.isSwipeX})),!1!==this.vi.isSwipeX){var e=i.screenX,n=i.screenY;this.vi.lastX=e,(null!==this.vi.isSwipeX||(this.vi.isSwipeX=Math.abs(this.vi.startX-e)>Math.abs(this.vi.startY-n),this.vi.isSwipeX))&&this.Kr({deltaX:e-this.vi.startX,last:!1})}else this.Mi&&this.Mi.onTouchMove(t.timeStamp,i.clientY)},i.er=function(t){this.ri.dispatchEvent(Xt(this.t,"amp-story-player-touchend",{touches:t.touches,isNavigationalSwipe:this.vi.isSwipeX})),!0===this.vi.isSwipeX?this.Kr({deltaX:this.vi.lastX-this.vi.startX,last:!0}):this.Mi&&this.Mi.onTouchEnd(t.timeStamp),this.vi.startX=0,this.vi.startY=0,this.vi.lastX=0,this.vi.isSwipeX=null,this.Ai=0},i.Kr=function(t){if(!(this.ki.length<=1||this.qi)){var i=t.deltaX;if(!0===t.last){var e=Math.abs(i);return 1===this.Ai&&(e>50&&(this.Wr()||this.Ri)?this.dr():this.Qr()),void(2===this.Ai&&(e>50&&(this.Wr()||this.Ri)?this.vr():this.Qr()))}this.ts(i)}},i.Qr=function(){var t=this.ki[this.Si].iframe;requestAnimationFrame((function(){Nt(Lt(t),["transform","transition"])}));var i=this.Wr();i&&requestAnimationFrame((function(){Nt(Lt(i.iframe),["transform","transition"])}))},i.Wr=function(){var t=1===this.Ai?this.Si+1:this.Si-1;return this.gr(t)?null:this.ki[t]},i.gr=function(t){return t>=this.ki.length||t<0},i.Gi=function(){if(this.ji){var t=this.ji.behavior;t&&"boolean"==typeof t.autoplay&&(this.Pi=t.autoplay)}},i.Ji=function(){if(this.ji){var t=this.ji.display;t&&"auto"===t.attribution&&(this.Ti="auto")}},i.Vi=function(){if(this.ji){var t=this.ji.behavior;t&&!1===t.pageScroll&&(this.Mi=null)}},i.Bi=function(){if(null!==this.Ri)return this.Ri;if(!this.ji)return this.Ri=!1,!1;var t,i=this.ji.behavior;return this.Ri=this.Or(i)&&"end"===(t=i).on&&"circular-wrapping"===t.action,this.Ri},i.ts=function(t){var i;t<0?(this.Ai=1,i="translate3d(calc(100% + ".concat(t,"px), 0, 0)")):(this.Ai=2,i="translate3d(calc(".concat(t,"px - 100%), 0, 0)"));var e=this.ki[this.Si].iframe,n="translate3d(".concat(t,"px, 0, 0)");requestAnimationFrame((function(){Ft(Lt(e),{transform:n,transition:"none"})}));var r=this.Wr();r&&requestAnimationFrame((function(){Ft(Lt(r.iframe),{transform:i,transition:"none"})}))},i.Br=function(t){var i=t.touches;if(!i||i.length<1)return null;var e=i[0],n=e.clientX,r=e.clientY;return{screenX:e.screenX,screenY:e.screenY,clientX:n,clientY:r}},t}(),wi=function(){function t(t){this.t=t}var i=t.prototype;return i.ns=function(t){var i=this;new Gt(this.t,t,(function(){return t.layoutPlayer()})),this.t.addEventListener("scroll",(function e(){t.layoutPlayer(),i.t.removeEventListener("scroll",e)}))},i.loadPlayers=function(){var t=this.t.document.getElementsByTagName("amp-story-player");D();for(var i=0;i<t.length;i++){var e=t[i],n=new bi(this.t,e);n.buildPlayer(),this.ns(n)}},i.loadEntryPoints=function(){var t=this.t.document.getElementsByTagName("amp-story-entry-point");D();for(var i=0;i<t.length;i++){var e=t[i],n=new F(this.t,e);n.buildCallback(),this.ns(n)}},t}();ni=self.document,ri=function(t){return"loading"!=t.readyState&&"uninitialized"!=t.readyState},si=function(){new wi(self).loadPlayers()},(oi=ri(ni))?si():ni.addEventListener("readystatechange",(function t(){ri(ni)&&(oi||(oi=!0,si()),ni.removeEventListener("readystatechange",t))})),globalThis.AmpStoryPlayer=bi}();
@@ -0,0 +1 @@
1
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see amp-video-0.1.js.LICENSE.txt */
2
+ (self.AMP=self.AMP||[]).push({m:0,v:"2410292120000",n:"amp-video",ev:"0.1",l:!0,f:function(t,e){!function(){function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function n(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i;function r(){return i||(i=Promise.resolve(void 0))}var o=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function a(t){return new Promise((function(e){e(t())}))}function s(t,e){return(s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t})(t,e)}function u(t){return(u=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)})(t)}function c(t){return(c="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 l(t){return t?Array.prototype.slice.call(t):[]}var h=Array.isArray;function f(t){return h(t)?t:[t]}var d=Object.prototype,v=d.hasOwnProperty,p=d.toString;function m(t){var e=Object.create(null);return t&&Object.assign(e,t),e}function y(t){return"number"==typeof t&&isFinite(t)}function b(t,e,n,i,r,o,a,s,u,c,l){return t}function g(t){return JSON.parse(t)}function A(t){return(t.ownerDocument||t).defaultView}var M,w=/(\0)|^(-)$|([\x01-\x1f\x7f]|^-?[0-9])|([\x80-\uffff0-9a-zA-Z_-]+)|[^]/g;function S(t,e,n,i,r){return r||(e?"�":i?t.slice(0,-1)+"\\"+t.slice(-1).charCodeAt(0).toString(16)+" ":"\\"+t)}function E(t){return void 0!==M?M:M=function(t){try{var e=t.ownerDocument,n=e.createElement("div"),i=e.createElement("div");return n.appendChild(i),n.querySelector(":scope div")===i}catch(t){return!1}}(t)}function _(t,e){return t.replace(/^|,/g,"$&".concat(e," "))}function D(t){b(/^[\w-]+$/.test(t))}function P(t,e){var n=t.classList,i="i-amphtml-scoped";n.add(i);var r=_(e,".".concat(i)),o=t.querySelectorAll(r);return n.remove(i),o}function C(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return!!n&&n.call(t,e)}function k(t,e){for(var n=t.firstElementChild;n;n=n.nextElementSibling)if(e(n))return n;return null}function O(t,e){return D(e),n=t,i="> ".concat(e),E(n)?n.querySelectorAll(_(i,":scope")):P(n,i);var n,i}var x,I,R={bubbles:!0,cancelable:!0};function q(t){var e;null===(e=t.parentElement)||void 0===e||e.removeChild(t)}function j(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:null;if(n){var i=n.nextSibling;t.insertBefore(e,i)}else!function(t,e){t.insertBefore(e,t.firstChild)}(t,e)}function T(t,e){for(var n in e)t.setAttribute(n,e[n]);return t}function L(t,e,n,i){var r=n||{};b(t.ownerDocument);var o=i||R,a=o.bubbles,s=o.cancelable,u=new MessageEvent(e,{data:r,bubbles:a,cancelable:s});t.dispatchEvent(u)}function F(t,e){t.classList.add("i-amphtml-fill-content"),e&&t.classList.add("i-amphtml-replaced-content")}function N(t,e,i,r){for(var o,a=n(f(t),!0);!(o=a()).done;){var s=o.value,u=e.getAttribute(s);null!==u?i.setAttribute(s,u):r&&i.removeAttribute(s)}}function V(t){var e=t.ownerDocument||t;return x&&x.ownerDocument===e||(x=e.createElement("div")),z}function z(t){return function(t,e){if(b(1===e.length),b(Array.isArray(e)||(i=e,v.call(i,"raw"))),self.trustedTypes&&self.trustedTypes.createPolicy){var n=self.trustedTypes.createPolicy("static-template#createNode",{createHTML:function(t){return e[0]}});t.innerHTML=n.createHTML("ignored")}else t.innerHTML=e[0];var i,r=t.firstElementChild;return b(r),b(!r.nextElementSibling),t.removeChild(r),r}(x,t)}function U(t){var e=Object.getOwnPropertyDescriptor(t,"message");if(null!=e&&e.writable)return t;var n=t.message,i=t.stack,r=new Error(n);for(var o in t)r[o]=t[o];return r.stack=i,r}function W(t){for(var e,i=null,r="",o=n(arguments,!0);!(e=o()).done;){var a=e.value;a instanceof Error&&!i?i=U(a):(r&&(r+=" "),r+=a)}return i?r&&(i.message=r+": "+i.message):i=new Error(r),i}function Y(t){var e,n;null===(e=(n=self).__AMP_REPORT_ERROR)||void 0===e||e.call(n,t)}function Z(t){try{for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];return t.apply(null,n)}catch(t){!function(t){var e=W.apply(null,arguments);setTimeout((function(){throw Y(e),e}))}(t)}}function B(t){var e=W.apply(null,arguments);return e.expected=!0,e}var G=["Webkit","webkit","Moz","moz","ms","O","o"],H={getPropertyPriority:function(){return""},getPropertyValue:function(){return""}};function X(t){var e=t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}));return G.some((function(t){return e.startsWith(t+"-")}))?"-".concat(e):e}function $(t,e,n){if(e.startsWith("--"))return e;I||(I=m());var i=I[e];if(!i||n){if(i=e,void 0===t[e]){var r=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e),o=function(t,e){for(var n=0;n<G.length;n++){var i=G[n]+e;if(void 0!==t[i])return i}return""}(t,r);void 0!==t[o]&&(i=o)}n||(I[e]=i)}return i}function J(t,e,n,i,r){var o=$(t.style,e,r);if(o){var a=i?n+i:n;t.style.setProperty(X(o),a)}}function Q(t,e){for(var n in e)J(t,n,e[n])}function K(t){return null==t.__AMP_AUTOPLAY&&(t.__AMP_AUTOPLAY=function(t){var e,n=t.document.createElement("video");return n.setAttribute("muted",""),n.setAttribute("playsinline",""),n.setAttribute("webkit-playsinline",""),n.setAttribute("height","0"),n.setAttribute("width","0"),n.muted=!0,n.playsInline=!0,n.playsinline=!0,n.webkitPlaysinline=!0,Q(n,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),e=n,a((function(){return e.play()})).catch((function(){})),Promise.resolve(!n.paused)}(t)),t.__AMP_AUTOPLAY}function tt(t){return t.querySelector("video, iframe")}function et(t,e){var n=a((function(){return t.play(!!e)}));return n.catch((function(t){!function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];Y(B.apply(null,n))}("TRYPLAY",t)})),n}var nt=/vertical/,it=new WeakMap,rt=new WeakMap,ot=new WeakMap;function at(t){var e=it.get(t);return e||(e=new t.ResizeObserver(st),it.set(t,e)),e}function st(t){for(var e=new Set,n=t.length-1;n>=0;n--){var i=t[n],r=i.target;if(!e.has(r)){e.add(r);var o=rt.get(r);if(o){ot.set(r,i);for(var a=0;a<o.length;a++){var s=o[a],u=s.callback;ut(s.type,u,i)}}}}}function ut(t,e,n){if(0==t){var i=n.contentRect,r=i.height;Z(e,{width:i.width,height:r})}else if(1==t){var o,a=n.borderBoxSize;if(a)o=a.length>0?a[0]:{inlineSize:0,blockSize:0};else{var s,u,c=n.target,l=A(c),h=nt.test(function(t,e){return t.getComputedStyle(e)||H}(l,c).writingMode),f=c,d=f.offsetHeight,v=f.offsetWidth;h?(u=v,s=d):(s=v,u=d),o={inlineSize:s,blockSize:u}}Z(e,o)}}var ct=function(){function t(t){this.ri=t,this.oy=!1,this.uy=!1,this.sy=this.sy.bind(this)}var e=t.prototype;return e.updatePlaying=function(t){t!==this.oy&&(this.oy=t,t?(this.uy=!1,function(t,e,n){var i=t.ownerDocument.defaultView;if(i){var r=rt.get(t);if(r||(r=[],rt.set(t,r),at(i).observe(t)),!r.some((function(t){return t.callback===n&&1===t.type}))){r.push({type:1,callback:n});var o=ot.get(t);o&&setTimeout((function(){return ut(1,n,o)}))}}}(this.ri,0,this.sy)):function(t,e){!function(t,e,n){var i=rt.get(t);if(i&&(function(t){for(var e=[],i=0,r=0;r<t.length;r++){var o=t[r];(a=o).callback===n&&1===a.type?e.push(o):(i<r&&(t[i]=o),i++)}var a;i<t.length&&(t.length=i)}(i),0==i.length)){rt.delete(t),ot.delete(t);var r=t.ownerDocument.defaultView;r&&at(r).unobserve(t)}}(t,0,e)}(this.ri,this.sy))},e.sy=function(t){var e=t.blockSize,n=t.inlineSize>0&&e>0;if(n!==this.uy){this.uy=n;var i=this.ri;n||i.pause()}},t}();function lt(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function ht(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,i)}return n}function ft(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?ht(Object(n),!0).forEach((function(e){lt(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):ht(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var dt=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function vt(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return e}}function pt(t){var e,n=m();if(!t)return n;for(;e=dt.exec(t);){var i=vt(e[1],e[1]),r=e[2]?vt(e[2].replace(/\+/g," "),e[2]):"";n[i]=r}return n}function mt(t){var e=(t||self).location;return pt(e.originalHash||e.hash)}function yt(t){var e=!1,n=null,i=t;return function(){if(!e){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];n=i.apply(self,r),e=!0,i=null}return n}}var bt="";function gt(t){var e;return bt||(bt=(null===(e=t.AMP_CONFIG)||void 0===e?void 0:e.v)||"01".concat("2410292120000")),bt}function At(t,e){var n=e||mt(t);return["1","actions","amp","amp4ads","amp4email"].includes(n.development)||!!t.AMP_DEV_MODE}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var Mt=self.__AMP_LOG;function wt(t,e){throw new Error("failed to call initLogConstructor")}function St(t){return Mt.user||(Mt.user=Et()),function(t,e){return e&&e.ownerDocument.defaultView!=t}(Mt.user.win,t)?Mt.userForEmbed||(Mt.userForEmbed=Et()):Mt.user}function Et(t){return wt()}function _t(){return Mt.dev||(Mt.dev=wt())}function Dt(t,e,n,i,r,o,a,s,u,c,l){return t}function Pt(t,e,n,i,r,o,a,s,u,c,l){return St().assert(t,e,n,i,r,o,a,s,u,c,l)}function Ct(t,e){return Rt(t=function(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}(t),e)}function kt(t,e){return Rt(It(xt(t)),e)}function Ot(t,e){var n=It(xt(t));return jt(n,e)?Rt(n,e):null}function xt(t){return t.nodeType?(e=A(t),Ct(e,"ampdoc")).getAmpDoc(t):t;var e}function It(t){var e=xt(t);return e.isSingleDoc()?e.win:e}function Rt(t,e){Dt(jt(t,e));var n=qt(t)[e];return n.obj||(Dt(n.ctor),Dt(n.context),n.obj=new n.ctor(n.context),Dt(n.obj),n.context=null,n.resolve&&n.resolve(n.obj)),n.obj}function qt(t){var e=t.__AMP_SERVICES;return e||(e=t.__AMP_SERVICES={}),e}function jt(t,e){var n=t.__AMP_SERVICES&&t.__AMP_SERVICES[e];return!(!n||!n.ctor)}var Tt="__AMP__EXPERIMENT_TOGGLES";function Lt(t,e){var i=function(t){var e,i,r,o,a;if(t[Tt])return t[Tt];t[Tt]=m();var s=t[Tt];b(s);var u=ft(ft({},null!==(e=t.AMP_CONFIG)&&void 0!==e?e:{}),null!==(i=t.AMP_EXP)&&void 0!==i?i:g((null===(r=t.__AMP_EXP)||void 0===r?void 0:r.textContent)||"{}"));for(var c in u){var l=u[c];"number"==typeof l&&l>=0&&l<=1&&(s[c]=Math.random()<l)}var f=null===(o=t.AMP_CONFIG)||void 0===o?void 0:o["allow-doc-opt-in"];if(h(f)&&f.length){var d=t.document.head.querySelector('meta[name="amp-experiments-opt-in"]');if(d)for(var v,p,y=n((null===(v=d.getAttribute("content"))||void 0===v?void 0:v.split(","))||[],!0);!(p=y()).done;){var A=p.value;f.includes(A)&&(s[A]=!0)}}Object.assign(s,function(t){var e,i="";try{var r;"localStorage"in t&&(i=null!==(r=t.localStorage.getItem("amp-experiment-toggles"))&&void 0!==r?r:"")}catch(t){_t().warn("EXPERIMENTS","Failed to retrieve experiments from localStorage.")}for(var o,a=(null===(e=i)||void 0===e?void 0:e.split(/\s*,\s*/g))||[],s=m(),u=n(a,!0);!(o=u()).done;){var c=o.value;c&&("-"==c[0]?s[c.substr(1)]=!1:s[c]=!0)}return s}(t));var M=null===(a=t.AMP_CONFIG)||void 0===a?void 0:a["allow-url-opt-in"];if(h(M)&&M.length)for(var w,S=pt(t.location.originalHash||t.location.hash),E=n(M,!0);!(w=E()).done;){var _=w.value,D=S["e-".concat(_)];"1"==D&&(s[_]=!0),"0"==D&&(s[_]=!1)}return s}(t);return!!i[e]}var Ft,Nt,Vt,zt=function(t){return Ot(t,"action")},Ut=function(t){return Ct(t,"extensions")},Wt=function(t){return Ct(t,"performance")},Yt=function(t){return Ct(t,"platform")},Zt=function(t){return Rt(t,"timer")},Bt=function(t){return Ot(t,"url")},Gt=function(t){return kt(t,"viewport")};function Ht(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=n.needsRootBounds,r=n.rootMargin,o=n.threshold,a=function(t){return t.parent&&t.parent!=t}(e)&&(i||r)?e.document:void 0;return new e.IntersectionObserver(t,{threshold:o,root:a,rootMargin:r})}function Xt(t){var e,n=null===(e=Ft)||void 0===e?void 0:e.get(t);if(!n){var i=function(t){Ft||(Ft=new WeakMap,Nt=new WeakMap),b(Nt);var e=Nt.get(t);return e||(e=Ht((function(t){for(var n=new Set,i=t.length-1;i>=0;i--){var r,o=t[i].target;n.has(o)||(n.add(o),b(e),e.unobserve(o),b(Ft),null===(r=Ft.get(o))||void 0===r||r.resolve(t[i]),Ft.delete(o))}}),t,{needsRootBounds:!0}),Nt.set(t,e)),e}(A(t));b(Ft),i.observe(t),n=new o,Ft.set(t,n)}return n.promise}function $t(t,e,n,i){var r=t,o=n,a=function(t){try{return o(t)}catch(t){var e,n;throw null===(e=(n=self).__AMP_REPORT_ERROR)||void 0===e||e.call(n,t),t}},s=function(){if(void 0!==Vt)return Vt;Vt=!1;try{var t={get capture(){return Vt=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return Vt}(),u=!(null==i||!i.capture);return r.addEventListener(e,a,s?i:u),function(){null==r||r.removeEventListener(e,a,s?i:u),o=null,r=null,a=null}}function Jt(t,e,n,i){var r={detail:n};if(Object.assign(r,i),"function"==typeof t.CustomEvent)return new t.CustomEvent(e,r);var o=t.document.createEvent("CustomEvent");return o.initCustomEvent(e,!!r.bubbles,!!r.cancelable,n),o}function Qt(t,e,n,i){return $t(t,e,n,i)}function Kt(t,e,n,i){var r=n,o=$t(t,e,(function(t){try{r(t)}finally{r=null,o()}}),i);return o}var te=['<button aria-label="Unmute video" class="i-amphtml-video-mask i-amphtml-fill-content" tabindex=0></button>'],ee=["<i-amphtml-video-icon class=amp-video-eq><div class=amp-video-eq-col><div class=amp-video-eq-filler></div><div class=amp-video-eq-filler></div></div></i-amphtml-video-icon>"];function ne(t,e,n){if(e[n])return e[n];var i=t.querySelector("style[".concat(n,"], link[").concat(n,"]"));return i?(e[n]=i,i):null}var ie=function(){function t(){this.vt=null}var e=t.prototype;return e.add=function(t){var e=this;return this.vt||(this.vt=[]),this.vt.push(t),function(){e.remove(t)}},e.remove=function(t){var e,n,i;this.vt&&(n=t,-1!=(i=(e=this.vt).indexOf(n))&&e.splice(i,1))},e.removeAll=function(){this.vt&&(this.vt.length=0)},e.fire=function(t){if(this.vt)for(var e,i=n(this.vt.slice(),!0);!(e=i()).done;)(0,e.value)(t)},e.getHandlerCount=function(){var t,e;return null!==(t=null===(e=this.vt)||void 0===e?void 0:e.length)&&void 0!==t?t:0},t}(),re=function(){function t(){this.hy=!1,this.ly=new ie}var e=t.prototype;return e.onSessionEnd=function(t){this.ly.add(t)},e.beginSession=function(){this.hy=!0},e.endSession=function(){this.hy&&this.ly.fire(),this.hy=!1},e.isSessionActive=function(){return this.hy},t}(),oe={title:"",artist:"",album:"",artwork:[{src:""}]},ae="registered",se="load",ue="loadedmetadata",ce="play",le="playing",he="pause",fe="ended",de="muted",ve="unmuted",pe="reloaded",me="ad_start",ye="ad_end",be="playing_manual",ge="paused",Ae="video-play",Me="user-interacted";function we(t){t.signals().signal(Me)}var Se="video-manager",Ee=function(){function t(t){var e=this;this.ampdoc=t,this.installAutoplayStyles=yt((function(){return function(t){!function(t){var e=t.getHeadNode();!function(t,e,n,i){var r=t.__AMP_CSS_SM;r||(r=t.__AMP_CSS_SM=m());var o="amp-extension=".concat(i);if(o){var a=ne(t,r,o);if(a)return"STYLE"==a.tagName&&a.textContent!==e&&(a.textContent=e),a}var s=(t.ownerDocument||t).createElement("style");s.textContent=e,s.setAttribute("amp-extension",i),j(t,s,ne(t,r,"amp-runtime")),o&&(r[o]=s)}(e,function(t,e){var n=t.__AMP_CSS_TR;return n?n(e):e}(e,".i-amphtml-video-mask{display:block;z-index:1;-webkit-appearance:none;appearance:none;background:transparent;border:none}.amp-video-eq{display:none}.i-amphtml-video-interface:not(amp-video) .amp-video-eq,amp-story .amp-video-eq,amp-video[controls] .amp-video-eq{display:-ms-flexbox;display:flex}[noaudio] .amp-video-eq{display:none!important}.amp-video-eq{pointer-events:none!important;-ms-flex-align:end;align-items:flex-end;bottom:7px;height:12px;opacity:0.8;overflow:hidden;position:absolute;right:7px;width:20px;z-index:1}.amp-video-eq-col{-ms-flex:1;flex:1;height:100%;margin-right:1px;position:relative}.amp-video-eq-col div{animation-name:amp-video-eq-animation;animation-timing-function:linear;animation-iteration-count:infinite;animation-direction:alternate;background-color:#fafafa;height:100%;position:absolute;width:100%;will-change:transform;animation-play-state:paused}.amp-video-eq-play .amp-video-eq-col div{animation-play-state:running}.amp-video-eq-1-1{animation-duration:0.3s;transform:translateY(60%)}.amp-video-eq-1-2{animation-duration:0.45s;transform:translateY(60%)}.amp-video-eq-2-1{animation-duration:0.5s;transform:translateY(30%)}.amp-video-eq-2-2{animation-duration:0.4s;transform:translateY(30%)}.amp-video-eq-3-1{animation-duration:0.3s;transform:translateY(70%)}.amp-video-eq-3-2{animation-duration:0.35s;transform:translateY(70%)}.amp-video-eq-4-1{animation-duration:0.4s;transform:translateY(50%)}.amp-video-eq-4-2{animation-duration:0.25s;transform:translateY(50%)}@keyframes amp-video-eq-animation{0%{transform:translateY(100%)}to{transform:translateY(0)}}\n/*# sourceURL=/css/video-autoplay.css*/"),0,"amp-video-autoplay")}(t)}(e.ampdoc)})),this.vy=null,this.my=null,this.py=null,this.Xo=Zt(t.win),this.yy=zt(t.getHeadNode()),this.by=function(){return e.gy()},this.wy=yt((function(){return new Pe(e.ampdoc,e)})),this.Xo.delay(this.by,1e3)}var e=t.prototype;return e.dispose=function(){if(this.wy().dispose(),this.my.disconnect(),this.my=null,this.vy)for(var t=0;t<this.vy.length;t++)this.vy[t].dispose()},e.gy=function(){for(var t=0;t<this.vy.length;t++){var e=this.vy[t];e.getPlayingState()!==ge&&(Ie(e,"video-seconds-played"),this.xy(e))}this.Xo.delay(this.by,1e3)},e.xy=function(t){var e="timeUpdate",n=t.video.getCurrentTime(),i=t.video.getDuration();if(y(n)&&y(i)&&i>0){var r=n/i,o=Jt(this.ampdoc.win,"".concat(Se,".").concat(e),{time:n,percent:r});this.yy.trigger(t.video.element,e,o,1)}},e.register=function(t){var e=this;Dt(t);var n=t;if(this.Oy(t),t.supportsPlatform()&&!this.jy(t)){this.my||(this.my=Ht((function(t){return t.forEach((function(t){var n=t.isIntersecting,i=t.target;e.ky(i).updateVisibility(n)}))}),this.ampdoc.win,{threshold:.5})),this.my.observe(n.element),Qt(n.element,pe,(function(){return i.videoLoaded()})),this.vy=this.vy||[];var i=new De(this,t);this.vy.push(i);var r=i.video.element;L(r,ae),function(t){t.classList.add("i-amphtml-media-component")}(r),t.signals().signal(ae),r.classList.add("i-amphtml-video-interface")}},e.Oy=function(t){n("play",(function(){return et(t,!1)})),n("pause",(function(){return t.pause()})),n("mute",(function(){return t.mute()})),n("unmute",(function(){return t.unmute()}));var e=function(){return t.fullscreenEnter()};function n(e,n){t.registerAction(e,(function(){we(t),n()}),1)}n("fullscreenenter",e),n("fullscreen",e)},e.jy=function(t){if(_e(this.py,t))return this.py;for(var e=0;this.vy&&e<this.vy.length;e++){var n=this.vy[e];if(_e(n,t))return this.py=n,n}return null},e.ky=function(t){return Dt(this.jy(t))},e.registerForAutoFullscreen=function(t){this.wy().register(t)},e.Sy=function(){return this.wy()},e.getVideoStateProperty=function(t,e){var n=this.ampdoc.getRootNode(),i=St().assertElement(n.getElementById(t),'Could not find an element with id="'.concat(t,'" for VIDEO_STATE')),o=this.ky(i);return(o?o.getAnalyticsDetails():r()).then((function(t){return t?t[e]:""}))},e.getPlayingState=function(t){return this.ky(t).getPlayingState()},e.isMuted=function(t){return this.ky(t).isMuted()},e.userInteracted=function(t){return this.ky(t).userInteracted()},e.isRollingAd=function(t){return this.ky(t).isRollingAd()},e.pauseOtherVideos=function(t){this.vy.forEach((function(e){e.isPlaybackManaged()&&e!==t&&e.getPlayingState()==be&&e.video.pause()}))},t}(),_e=function(t,e){return!!t&&(t.video===e||t.video.element===e)},De=function(){function t(t,e){var n=this;this.Py=t,this.vu=t.ampdoc,this.video=e,this.qy=!0,this.Ty=!1,this.oy=!1,this.Cy=!1,this.Du=!1,this.My=new re,this.My.onSessionEnd((function(){return Ie(n,"video-session")})),this.Iy=new re,this.Iy.onSessionEnd((function(){return Ie(n,"video-session-visible")})),this.Ny=yt((function(){return new xe(n.vu.win,n)})),this.Ry=!1,this.Ey=!1,this.Ay=null,this.G=!1,this.Fy=!1,this.hasAutoplay=e.element.hasAttribute("autoplay"),this.hasAutoplay&&this.Py.installAutoplayStyles(),this.Zp=oe,this._y=function(){et(n.video,!1)},this.Yy=function(){n.video.pause()},Qt(e.element,se,(function(){return n.videoLoaded()})),Qt(e.element,he,(function(){return n.Uy()})),Qt(e.element,ce,(function(){n.Fy=!0,Ie(n,Ae)})),Qt(e.element,le,(function(){return n.zy()})),Qt(e.element,de,(function(){return n.G=!0})),Qt(e.element,ve,(function(){n.G=!1,n.Py.pauseOtherVideos(n)})),Qt(e.element,"amp:video:tick",(function(t){var e=t.data,i=e.eventType;i&&n.Ly(i,e.vars)})),Qt(e.element,fe,(function(){n.Cy=!1,Ie(n,"video-ended")})),Qt(e.element,me,(function(){n.Cy=!0,Ie(n,"video-ad-start")})),Qt(e.element,ye,(function(){n.Cy=!1,Ie(n,"video-ad-end")})),e.signals().whenSignal(ae).then((function(){return n.Wy()})),this.Vy=yt((function(){var t="firstPlay",e=Jt(n.vu.win,t,{}),i=n.video.element;zt(i).trigger(i,t,e,1)})),this.By()}var e=t.prototype;return e.dispose=function(){this.Ny().stop()},e.Ly=function(t,e){var n=lt({},"__amp:eventType",t);Object.keys(e).forEach((function(t){n["custom_".concat(t)]=e[t]})),Ie(this,"video-hosted-custom",n)},e.By=function(){var t=this;this.video.signals().whenSignal("playback-delegated").then((function(){t.qy=!1,t.oy&&t.video.pause()}))},e.isMuted=function(){return this.G},e.isPlaybackManaged=function(){return this.qy},e.Wy=function(){this.Dy()&&this.Py.registerForAutoFullscreen(this),this.hasAutoplay&&this.Jy()},e.Dy=function(){var t=this.video.element;return!(this.video.preimplementsAutoFullscreen()||!t.hasAttribute("rotate-to-fullscreen"))&&Pt(this.video.isInteractive(),"Only interactive videos are allowed to enter fullscreen on rotate. Set the `controls` attribute on %s to enable.",t)},e.zy=function(){this.oy=!0,this.getPlayingState()==be&&(this.Vy(),this.Py.pauseOtherVideos(this));var t,e,n,i,r,o=this.video,a=o.element;o.preimplementsMediaSessionAPI()||a.classList.contains("i-amphtml-disable-mediasession")||(function(t,e){var n=Bt(t);if(e&&e.artwork){var i=e.artwork;Dt(h(i)),i.forEach((function(t){if(t){var e=(i=t,"[object Object]"===p.call(i)?t.src:t);Pt(n.isProtocolValid(e))}var i}))}}(a,this.Zp),t=this.vu.win,e=this.Zp,n=this._y,i=this.Yy,"mediaSession"in(r=t.navigator)&&t.MediaMetadata&&(r.mediaSession.metadata=new t.MediaMetadata(oe),r.mediaSession.metadata=new t.MediaMetadata(e),r.mediaSession.setActionHandler("play",n),r.mediaSession.setActionHandler("pause",i))),this.My.beginSession(),this.Du&&this.Iy.beginSession(),this.Fy||Ie(this,Ae)},e.Uy=function(){Ie(this,"video-pause"),this.oy=!1,this.Ey?this.Ey=!1:this.My.endSession()},e.videoLoaded=function(){this.Ty=!0,this.Ay=tt(this.video.element),this.Gy(),this.Ny().start(),this.Du&&this.Ky()},e.Gy=function(){if(!this.video.preimplementsMediaSessionAPI()){this.video.getMetadata()&&(this.Zp=m(this.video.getMetadata()));var t=this.vu.win.document;if(!this.Zp.artwork||0==this.Zp.artwork.length){var e=function(t){var e=t.querySelector('script[type="application/ld+json"]');if(e){var n=function(t){try{return g(t)}catch(t){return null}}(e.textContent);if(n&&n.image)return"string"==typeof n.image?n.image:n.image["@list"]&&"string"==typeof n.image["@list"][0]?n.image["@list"][0]:"string"==typeof n.image.url?n.image.url:"string"==typeof n.image[0]?n.image[0]:void 0}}(t)||function(t){var e=t.querySelector('meta[property="og:image"]');return e?e.getAttribute("content"):void 0}(t)||function(t){var e=t.querySelector('link[rel="shortcut icon"]')||t.querySelector('link[rel="icon"]');return e?e.getAttribute("href"):void 0}(t);e&&(this.Zp.artwork=[{src:e}])}if(!this.Zp.title){var n=this.video.element.getAttribute("title")||this.video.element.getAttribute("aria-label")||this.Ay.getAttribute("title")||this.Ay.getAttribute("aria-label")||t.title;n&&(this.Zp.title=n)}}},e.Hy=function(){this.Ty&&this.Ky()},e.Ky=function(){var t=this;this.vu.isVisible()&&K(this.vu.win).then((function(e){t.hasAutoplay&&!t.userInteracted()&&e?t.Qy():t.Zy()}))},e.Jy=function(){var t=this;this.video.isInteractive()&&this.video.hideControls(),K(this.vu.win).then((function(e){e||!t.video.isInteractive()?(t.video.mute(),t.$y()):t.video.showControls()}))},e.$y=function(){var t=this,e=this.video,n=this.video,i=n.element;if(n.win,!i.hasAttribute("noaudio")&&!i.signals().get(Me)){var r=function(t,e){for(var n=V(e)(ee),i=n.firstElementChild,r=0;r<4;r++){for(var o=i.cloneNode(!0),a=o.children,s=0;s<a.length;s++)a[s].classList.add("amp-video-eq-".concat(r+1,"-").concat(s+1));n.appendChild(o)}return q(i),n}(0,i),o=[r],a=[Qt(i,he,(function(){return c(!1)})),Qt(i,le,(function(){return c(!0)})),Qt(i,me,(function(){u(!1),e.showControls()})),Qt(i,ye,(function(){u(!0),e.hideControls()})),Qt(i,ve,(function(){return we(e)}))];if(e.isInteractive()){e.hideControls();var s=function(t,e){var n=V(t)(te);return e&&e.title&&n.setAttribute("aria-label",e.title),n}(i,this.Zp);o.push(s),a.push(Qt(s,"click",(function(){return we(e)})))}e.mutateElementSkipRemeasure((function(){o.forEach((function(t){i.appendChild(t)}))})),this.Cy&&u(!1),e.signals().whenSignal(Me).then((function(){t.Vy(),e.isInteractive()&&e.showControls(),e.unmute(),a.forEach((function(t){t()})),e.mutateElementSkipRemeasure((function(){o.forEach((function(t){q(t)}))}))}))}function u(t){e.mutateElementSkipRemeasure((function(){o.forEach((function(e){!function(t,e){void 0===e&&(e=t.hasAttribute("hidden")),e?t.removeAttribute("hidden"):t.setAttribute("hidden","")}(e,t)}))}))}function c(t){e.mutateElementSkipRemeasure((function(){return r.classList.toggle("amp-video-eq-play",t)}))}},e.Qy=function(){this.qy&&(this.Du?(this.Iy.beginSession(),et(this.video,!0),this.Ry=!0):(this.oy&&this.Iy.endSession(),this.video.pause(),this.Ey=!0))},e.Zy=function(){this.Du?this.Iy.beginSession():this.oy&&this.Iy.endSession()},e.updateVisibility=function(t){var e=this.Du;this.Du=t,t!=e&&this.Hy()},e.getPlayingState=function(){return this.oy?this.oy&&this.Ry&&!this.userInteracted()?"playing_auto":be:ge},e.isRollingAd=function(){return this.Cy},e.userInteracted=function(){return null!=this.video.signals().get(Me)},e.getAnalyticsDetails=function(){var t=this,e=this.video;return Promise.all([K(this.vu.win),Xt(e.element)]).then((function(n){var i=n[0],r=n[1].boundingClientRect,o=r.height,a=r.width,s=t.hasAutoplay&&i,u=e.getPlayedRanges(),c=u.reduce((function(t,e){return t+e[1]-e[0]}),0);return{autoplay:s,currentTime:e.getCurrentTime(),duration:e.getDuration(),height:o,id:e.element.id,muted:t.G,playedTotal:c,playedRangesJson:JSON.stringify(u),state:t.getPlayingState(),width:a}}))},t}(),Pe=function(){function t(t,e){var n=this;this.Py=e,this.vu=t,this.Xy=null,this.nb=null,this.vy=[],this.tb=[],this.ib=function(){return n.rb()},this.eb=function(t){return n.ob(t)==be},this.ub=function(t,e){return n.ab(t,e)},this.sb(),this.cb()}var e=t.prototype;return e.dispose=function(){this.tb.forEach((function(t){return t()})),this.tb.length=0},e.register=function(t){var e=t.video,n=e.element;this.fb(n)&&(this.vy.push(e),Qt(n,he,this.ib),Qt(n,le,this.ib),Qt(n,fe,this.ib),e.signals().whenSignal(Me).then(this.ib),this.rb())},e.cb=function(){var t=this,e=this.vu.getRootNode(),n=function(){return t.hb()};this.tb.push(Qt(e,"webkitfullscreenchange",n),Qt(e,"mozfullscreenchange",n),Qt(e,"fullscreenchange",n),Qt(e,"MSFullscreenChange",n))},e.isInLandscape=function(){return(t=this.vu.win).screen&&"orientation"in t.screen?t.screen.orientation.type.startsWith("landscape"):90==Math.abs(t.orientation);var t},e.fb=function(t){if("video"==tt(t).tagName.toLowerCase())return!0;var e=Yt(this.vu.win);return!e.isIos()&&!e.isSafari()||function(t){return!!{"amp-dailymotion":!0,"amp-ima-video":!0}[t.tagName.toLowerCase()]}(t)},e.hb=function(){this.Xy=null},e.sb=function(){var t=this,e=this.vu.win,n=e.screen;if(n&&"orientation"in n){var i=n.orientation;this.tb.push(Qt(i,"change",(function(){return t.lb()})))}this.tb.push(Qt(e,"orientationchange",(function(){return t.lb()})))},e.lb=function(){this.isInLandscape()?null!=this.nb&&this.vb(this.nb):this.Xy&&this.mb(this.Xy)},e.vb=function(t){var e=Yt(this.vu.win);this.Xy=t,e.isAndroid()&&e.isChrome()?t.fullscreenEnter():this.pb(t).then((function(){return t.fullscreenEnter()}))},e.mb=function(t){this.Xy=null,this.pb(t,"center").then((function(){return t.fullscreenExit()}))},e.pb=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=t.element,i=this.yb();return this.bb().then((function(){return Xt(n)})).then((function(t){var o=t.boundingClientRect,a=o.bottom,s=o.top,u=i.getSize().height;if(s>=0&&a<=u)return r();var c=e||(a>u?"bottom":"top");return i.animateScrollIntoView(n,c)}))},e.yb=function(){return Gt(this.vu)},e.bb=function(){return Zt(this.vu.win).promise(330)},e.rb=function(){var t=this;if(this.isInLandscape())return Promise.resolve(this.nb);this.nb=null;var e=this.vy.filter(this.eb).map((function(t){return Xt(t.element)}));return Promise.all(e).then((function(e){var n=e.sort(t.ub)[0];return n&&n.intersectionRatio>.5?n.target.getImpl().then((function(e){return t.nb=e})):t.nb}))},e.ab=function(t,e){var n=t.boundingClientRect,i=t.intersectionRatio,r=e.boundingClientRect,o=i-e.intersectionRatio;if(Math.abs(o)>.1)return o;var a=Gt(this.vu),s=Ce(a,n),u=Ce(a,r);return s<u||s>u?s-u:n.top-r.top},e.ob=function(t){return this.Py.getPlayingState(t)},t}();function Ce(t,e){var n=e.top+e.height/2,i=t.getSize().height/2;return Math.abs(n-i)}function ke(t){return 10*t*5}var Oe=function(t){return!!t&&!isNaN(t)&&t>1},xe=function(){function t(t,e){this.Xo=Zt(t),this.gb=e,this.tb=null,this.wb=0,this.xb=0}var e=t.prototype;return e.start=function(){var t=this,e=this.gb.video.element;this.stop(),this.tb=this.tb||[],this.Ob()?this.jb(this.xb):this.tb.push(Kt(e,ue,(function(){t.Ob()&&t.jb(t.xb)}))),this.tb.push(Qt(e,fe,(function(){t.Ob()&&t.kb(100)})))},e.stop=function(){if(this.tb){for(;this.tb.length>0;)this.tb.pop()();this.xb++}},e.Ob=function(){var t=this.gb.video,e=t.getDuration();if(!Oe(e))return!1;if(ke(e)<250){var n=Math.ceil(5);this.Sb("This video is too short for `video-percentage-played`. Reports may be innacurate. For best results, use videos over",n,"seconds long.",t.element)}return!0},e.Sb=function(){for(var t=arguments.length,e=new Array(t),n=0;n<t;n++)e[n]=arguments[n];St().warn.apply(St(),[Se].concat(e))},e.jb=function(t){var e,n=this;if(t==this.xb){var i=this.gb,r=this.Xo,o=i.video,a=function(){return n.jb(t)};if(i.getPlayingState()!=ge){var s=o.getDuration();if(Oe(s)){var u=(e=ke(s),b(!0),Math.min(Math.max(e,250),4e3)),c=o.getCurrentTime()/s*100,l=5*Math.floor(c/5);Dt(y(l)),this.kb(l),r.delay(a,u)}else r.delay(a,500)}else r.delay(a,500)}},e.kb=function(t){t<=0||this.wb!=t&&(this.wb=t,this.Pb(t))},e.Pb=function(t){Ie(this.gb,"video-percentage-played",{normalizedPercentage:t.toString()})},t}();function Ie(t,e,n){var i=t.video;t.getAnalyticsDetails().then((function(t){n&&Object.assign(t,n),L(i.element,e,t)}))}var Re,qe=function(){function t(t,e){this.win=t,this.Be=e}return t.make=function(e,n){if(e.WeakRef)return new e.WeakRef(n);if(!n.id){var i=e.__AMP_WEAKREF_ID=(e.__AMP_WEAKREF_ID||0)+1;n.id="weakref-id-"+i}return new t(e,n.id)},t.prototype.deref=function(){return this.win.document.getElementById(this.Be)||void 0},t}(),je="amp-video",Te={"slow-2g":50,"2g":50,"3g":1e3,"4g":2500,"5g":5e3},Le="i-amphtml-is-video-fully-loaded-override-for-testing",Fe=function(){function t(t){this.win=t,this.Xq="",this.Qq=this.lM(),this.vM=[]}var e=t.prototype;return e.manage=function(t){var e=this;Lt(this.win,"flexible-bitrate")&&(t.changedSources||(function(t,e){Qt(t,"waiting",(function(){if(!(t.readyState<1||Ve(t)>.99)){var n=null,i=Kt(t,"playing",(function(){clearTimeout(n)}));n=setTimeout((function(){i(),e()}),100)}}))}(t,(function(){return e.dM(t)})),Qt(t,"downgrade",(function(){return e.dM(t)})),t.changedSources=function(){e.pM(t)},this.vM.push(qe.make(this.win,t))))},e.dM=function(t){var e=function(t){return Dt(Ne(t,(function(e){return e.src==t.currentSrc})))}(t),n=e.mM-1;n>=this.Qq||(this.Qq=n,this.bM(t,e.mM),this.yM())},e.gM=function(){var t=this.win.navigator.connection;return t&&t.effectiveType?t.effectiveType:"4g"},e.lM=function(){return this.Xq!=this.gM()&&(this.Xq=this.gM(),this.Qq=Te[this.Xq]||Te["4g"]),this.Qq},e.pM=function(t){var e=this,n=l(O(t,"source"));n.forEach((function(t){if(!t.mM){var e=t.getAttribute("data-bitrate");t.mM=e?parseInt(e,10):Number.POSITIVE_INFINITY}}));var i=!1;return n.sort((function(t,n){var r=e.wM(n)-e.wM(t);return r<0&&(i=!0),r})),i&&n.forEach((function(e){t.appendChild(e)})),i},e.wM=function(t){var e=t.mM;return e>this.lM()&&(e*=-1),e},e.jM=function(t,e){return!!Ne(t,(function(t){return t.mM<e}))},e.bM=function(t,e){if(this.jM(t,e)){var n=t.currentTime;t.pause(),this.pM(t)?(t.load(),Kt(t,"loadedmetadata",(function(){t.currentTime=n,et(t),_t().fine(je,"Playing at lower bitrate %s",t.currentSrc)}))):et(t)}else _t().fine(je,"No lower bitrate available")},e.yM=function(){for(var t=this.vM.length-1;t>=0;t--){var e=this.vM[t].deref();e?e.paused&&!((n=e).hasAttribute(Le)?"true"===n.getAttribute(Le):Ve(n)>.8)&&this.pM(e)&&e.load():this.vM.splice(t,1)}var n},t}();function Ne(t,e){return k(t,(function(t){return"SOURCE"==t.tagName&&e(t)}))}function Ve(t){if(!t.duration)return 0;for(var e=0,n=0;n<t.buffered.length;n++)e+=t.buffered.end(n)-t.buffered.start(n);return e/t.duration}function ze(t,e){if(!!e!==e&&null!=e)if(Array.isArray(e))e.forEach((function(e){ze(t,e)}));else{var n=e;t.appendChild(n.nodeType?n:self.document.createTextNode(String(e)))}}function Ue(t,e){for(var n=arguments.length,i=new Array(n>2?n-2:0),r=2;r<n;r++)i[r-2]=arguments[r];if("string"!=typeof t)return t(ft(ft({},e),{},{children:i}));var o=null==e?void 0:e.xmlns;o&&delete e.xmlns;var a=o?self.document.createElementNS(o,t):self.document.createElement(t);return ze(a,i),e&&Object.keys(e).forEach((function(t){!function(t,e,n){if(!1!==n&&null!=n)if("function"!=typeof n||"o"!==e[0]||"n"!==e[1])t.setAttribute(e,!0===n?"":String(n));else{var i=e.toLowerCase().substring(2);t.addEventListener(i,n)}}(a,t,e[t])})),a}var We,Ye,Ze=function(){function t(t){this.zt=t,this.It=0,this.Ct=0,this.Ot=m()}var e=t.prototype;return e.has=function(t){return!!this.Ot[t]},e.get=function(t){var e=this.Ot[t];if(e)return e.access=++this.Ct,e.payload},e.put=function(t,e){this.has(t)||this.It++,this.Ot[t]={payload:e,access:this.Ct},this.qt()},e.qt=function(){if(!(this.It<=this.zt)){var t,e=this.Ot,n=this.Ct+1;for(var i in e){var r=e[i].access;r<n&&(n=r,t=i)}void 0!==t&&(delete e[t],this.It--)}},t}(),Be=function(t){return"string"==typeof t?Ge(t):t};function Ge(t,e){return We||(We=self.document.createElement("a"),Ye=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new Ze(100))),function(t,e,n){if(n&&n.has(e))return n.get(e);t.href=e,t.protocol||(t.href=t.href);var i,r={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:null};"/"!==r.pathname[0]&&(r.pathname="/"+r.pathname),("http:"==r.protocol&&80==r.port||"https:"==r.protocol&&443==r.port)&&(r.port="",r.host=r.hostname),i=t.origin&&"null"!=t.origin?t.origin:"data:"!=r.protocol&&r.host?r.protocol+"//"+r.host:r.href,r.origin=i;var o=r;return n&&n.put(e,o),o}(We,t,e?null:Ye)}function He(t,e){return function(t,e){if(!e)return t;var n=t.split("#",2),i=n[0].split("?",2);return i[0]+(i[1]?"?".concat(i[1],"&").concat(e):"?".concat(e))+(n[1]?"#".concat(n[1]):"")}(t,function(t){var e,n,i=[];for(var r in t){var o=t[r];if(null!=o){o=f(o);for(var a=0;a<o.length;a++)i.push((e=r,n=o[a],"".concat(encodeURIComponent(e),"=").concat(encodeURIComponent(n))))}}return i.join("&")}(e))}var Xe=["h264","vp09"];function $e(t,e){var n=e.win;if(function(t,e){return t===e.document.querySelector("amp-story-page:first-of-type amp-video")}(t,n)){var i=n.document.getElementById("amp-google-video-cache-response");try{var r=JSON.parse(i.textContent);if(r.sources)return Promise.resolve(r)}catch(t){}}var a=kt(n.document,"documentInfo").get(),s=a.canonicalUrl,u=a.sourceUrl;!function(t,e){if(t.hasAttribute("src")){var n=e.document.createElement("source"),i=t.getAttribute("src");n.setAttribute("src",i);var r=t.getAttribute("type");r&&n.setAttribute("type",r),t.removeAttribute("src"),t.removeAttribute("type"),t.querySelectorAll("source").forEach(q),t.insertBefore(n,t.firstChild)}}(t,n);var c,h,f=(c=function(t){for(var e,n=l(t.querySelectorAll("source[src]")),i=0;i<n.length;i++)if(C(n[i],'[type*="video/mp4"]'))return n[i].getAttribute("src");return null===(e=n[0])||void 0===e?void 0:e.getAttribute("src")}(t),h=Be(h=u),"function"==typeof URL?new URL(c,h.href).toString():function(t,e){e=Be(e);var n=Ge(t=t.replace(/\\/g,"/"));return t.toLowerCase().startsWith(n.protocol)?n.href:t.startsWith("//")?e.protocol+t:t.startsWith("/")?e.origin+t:e.origin+e.pathname.replace(/\/[^/]*$/,"/")+t}(c,h));return function(t,e){return Ut(e.win).installExtensionForDoc(e,"amp-cache-url").then((function(){return function(t){return function(t,e){var n=function(t,e){var n=qt(t)[e];return n?n.promise?n.promise:(Rt(t,e),n.promise=Promise.resolve(n.obj)):null}(t,e);if(n)return n;var i,r,a,s,u=qt(t);return u[e]=(r=(i=new o).promise,a=i.reject,s=i.resolve,r.catch((function(){})),{obj:null,promise:r,resolve:s,reject:a,context:null,ctor:null}),u[e].promise}(It(t),"cache-url")}(t)}))}(t,e).then((function(t){return t.createCacheUrl(f)})).then((function(t){var e,i=He(t.replace(/\/[ic]\//,"/mbv/"),{amp_video_host_url:s,amp_video_require_acao_header:1});return(e=n,Ct(e,"xhr")).fetch(i,{prerenderSafe:!0}).then((function(t){return t.json()}))}))}var Je=["<i-amphtml-poster></i-amphtml-poster>"],Qe="amp-video",Ke=["aria-describedby","aria-label","aria-labelledby","controls","crossorigin","disableremoteplayback","controlsList","title"],tn={high:2e3,medium:720,low:400},en=["loop","poster","preload"],nn=Ke.concat(en),rn=function(t){!function(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&&s(t,e)}(o,t);var e,n,i=(e=o,n=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch(t){return!1}}(),function(){var t,i=u(e);if(n){var r=u(this).constructor;t=Reflect.construct(i,arguments,r)}else t=i.apply(this,arguments);return function(t,e){if(e&&("object"===c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(this,t)});function o(t){var e;return(e=i.call(this,t)).DA=null,e.G=!1,e.Zp=oe,e.tb=[],e.kM=null,e.OM=null,e.Eb=new ct(e.element),e.xM=!1,e}o.prerenderAllowed=function(t){if(t.getAttribute("poster")||t.hasAttribute("cache"))return!0;var e=l(O(t,"source"));e.push(t);for(var n=0;n<e.length;n++)if(on(e[n],t))return!0;return!1};var a=o.prototype;return a.preconnectCallback=function(t){var e=this;this.SM().forEach((function(n){var i;(i=e.win,Ct(i,"preconnect")).url(e.getAmpDoc(),n,t)}))},a.SM=function(){var t=this.element.getAttribute("src");if(t)return[t];var e=[];return l(O(this.element,"source")).forEach((function(t){var n=t.getAttribute("src");n&&e.push(n);var i=t.getAttribute("amp-orig-src");i&&e.push(i)})),e},a.isLayoutSupported=function(t){return function(t){return"fixed"==t||"fixed-height"==t||"responsive"==t||"fill"==t||"flex-item"==t||"fluid"==t||"intrinsic"==t}(t)},a.buildCallback=function(){var t=this.element;this.qM(),this.DA=t.ownerDocument.createElement("video");var e,n,i,o=t.getAttribute("poster");!o&&(i=self,i.__AMP_MODE?i.__AMP_MODE:i.__AMP_MODE=function(t){return{localDev:!1,development:At(t,mt(t)),esm:!1,test:!1,rtvVersion:gt(t),ssrReady:!1}}(i)).development&&console.error('No "poster" attribute has been provided for amp-video.'),this.DA.setAttribute("playsinline",""),this.DA.setAttribute("webkit-playsinline",""),this.DA.setAttribute("preload","none"),this.EM(),N(Ke,this.element,this.DA,!0),this.MM(),F(this.DA,!0),e=this.element,n=this.DA,e.hasAttribute("object-fit")&&J(n,"object-fit",e.getAttribute("object-fit")),e.hasAttribute("object-position")&&J(n,"object-position",e.getAttribute("object-position")),t.appendChild(this.DA);var a,s,u,c=t.getAttribute("artist"),l=t.getAttribute("title"),h=t.getAttribute("album"),f=t.getAttribute("artwork");if(this.Zp={title:l||"",artist:c||"",album:h||"",artwork:[{src:f||o||""}]},this.OM=!!this.element.querySelector("source[data-bitrate]")||this.element.hasAttribute("cache")||this._M(),s=Ee,function(t,e,n,i){var r=qt(t),o=r[n];o||(o=r[n]={obj:null,promise:null,resolve:null,reject:null,context:null,ctor:null,sharedInstance:!1}),o.ctor||(o.ctor=i,o.context=e,o.sharedInstance=!1,o.resolve&&Rt(t,n))}(It(u=xt(t)),u,"video-manager",s),(a=t,kt(a,"video-manager")).register(this),this.element.hasAttribute("cache"))return this.PM(),function(t,e){var n,i=arguments.length>2&&void 0!==arguments[2]?arguments[2]:Number.POSITIVE_INFINITY,o=e.win;if(Yt(o).isBot())return r();t.hasAttribute("crossorigin")||t.setAttribute("crossorigin","");var a=t.getAttribute("src"),s=null===(n=t.querySelector("source[src]"))||void 0===n?void 0:n.getAttribute("src");return a||s?(Wt(e.win).addEnabledExperiment("video-cache"),$e(t,e).then((function(e){(function(t,e,n){e.sort((function(t,e){var n,i,r=null===(n=t.codec)||void 0===n?void 0:n.split(".")[0],o=null===(i=e.codec)||void 0===i?void 0:i.split(".")[0],a=Xe.indexOf(r),s=Xe.indexOf(o);if(a>s)return 1;if(a<s)return-1;var u=t.bitrate_kbps,c=e.bitrate_kbps;return u>c?1:u<c?-1:0})).forEach((function(e){if(!(e.bitrate_kbps>n)){var i=e.type;e.codec&&"h264"!==e.codec&&(i+="; codecs="+e.codec);var r,o,a=(r=t.ownerDocument,o={src:e.url,type:i,"data-bitrate":e.bitrate_kbps,"i-amphtml-video-cached-source":""},T(r.createElement("source"),o));t.insertBefore(a,t.firstChild)}}))})(t,e.sources,i),Lt(o,"story-video-cache-apply-audio")&&function(t,e){!1===e&&t.setAttribute("noaudio","")}(t,e.has_audio),function(t,e){if(e&&e.src&&e.srclang&&!t.querySelector("track")){var n=Ue("track",{src:e.src,srclang:e.srclang,kind:"captions"}),i=Ue("amp-story-captions",{id:e.src,"style-preset":"default",layout:"container","auto-append":!0});t.setAttribute("captions-id",e.src),t.appendChild(n),t.appendChild(i)}}(t,e.captions)})).catch((function(){}))):(St().error("AMP-VIDEO","Video cache not properly configured"),r())}(this.element,this.getAmpDoc(),this.RM())},a.EM=function(){var t=this.element.getAttribute("alt"),e=this.element.hasAttribute("title"),n=this.element.hasAttribute("aria-label");!t||e||n||this.element.setAttribute("aria-label",t)},a.detachedCallback=function(){this.AM(!1)},a.qM=function(){var t=this.element;(function(t){return!!function(t,e){return t.closest?t.closest(e):function(t,e){var n;for(n=t;n&&void 0!==n;n=n.parentElement)if(e(n))return n;return null}(t,(function(t){return C(t,e)}))}(t,"amp-story")})(t)&&["i-amphtml-disable-mediasession","i-amphtml-poolbound"].forEach((function(e){t.classList.add(e)}))},a.mutatedAttributesCallback=function(t){if(this.DA){var e=this.element;if(t.src&&(this.TM().assertHttpsUrl(e.getAttribute("src"),e),N(["src"],this.element,this.DA)),N(nn.filter((function(e){return void 0!==t[e]})),this.element,this.DA,!0),t.src&&L(e,pe),t.artwork||t.poster){var n=e.getAttribute("artwork"),i=e.getAttribute("poster");this.Zp.artwork=[{src:n||i||""}]}if(t.album){var r=e.getAttribute("album");this.Zp.album=r||""}if(t.title){var o=e.getAttribute("title");this.Zp.title=o||""}if(t.artist){var a=e.getAttribute("artist");this.Zp.artist=a||""}}},a.layoutCallback=function(){var t,e=this;if(this.DA=this.DA,!this.IM())return this.toggleFallback(!0),r();N(en,this.element,this.DA,!0),this.NM(),this.YM((function(){return e.zM()})),this.UM(),"prerender"==this.getAmpDoc().getVisibilityState()||"preview"==this.getAmpDoc().getVisibilityState()?(this.element.hasAttribute("preload")||this.DA.setAttribute("preload","auto"),t=this.getAmpDoc().whenFirstVisible().then((function(){return e.CM(),Zt(e.win).promise(1).then((function(){if(!e.LM())return e.loadPromise(e.DA)}))}))):this.CM();var n=this.loadPromise(this.DA).then(null,(function(e){if(t)return t;throw e})).then((function(){return e.WM()}));return"none"!==this.element.getAttribute("preload")?this.LM()?t:n:void 0},a.DM=function(t){var e=this;if(this.DA.error&&this.DA.error.code==MediaError.MEDIA_ERR_DECODE&&(St().error(Qe,"Decode error in ".concat(this.DA.currentSrc),this.element),!this.DA.src)){var n=0,i=k(this.DA,(function(t){return"SOURCE"==t.tagName&&(n++,t.src==e.DA.currentSrc)}));0!=n&&(q(i),t.stopImmediatePropagation(),this.DA.load(),this.play(!1))}},a.PM=function(){this.FM().forEach((function(t){t.setAttribute("src",t.getAttribute("amp-orig-src")),t.removeAttribute("amp-orig-src")}))},a.UM=function(){var t=this;Dt(this.DA);var e=l(O(this.element,"source"));if(this.element.hasAttribute("src")&&on(this.element)){var n=this.element.getAttribute("src"),i=this.element.getAttribute("type"),r=this.VM(n,i),o=this.element.getAttribute("amp-orig-src");r.setAttribute("amp-orig-src",o),this.element.removeAttribute("src"),this.element.removeAttribute("type"),e.unshift(r)}e.forEach((function(e){if(on(e,t.element)){e.remove();var n=Object.keys(tn),i=e.getAttribute("type"),r=e.getAttribute("amp-orig-src"),o=t.RM();n.forEach((function(a,s){if(!(o<tn[a])){var u=He(e.src,{amp_video_quality:a}),c=t.VM(u,i,{"data-bitrate":tn[a],"i-amphtml-video-cached-source":""});s===n.length-1&&c.setAttribute("amp-orig-src",r),t.DA.appendChild(c)}}))}else e.hasAttribute("i-amphtml-video-cached-source")&&t.DA.appendChild(e)})),this.DA.changedSources&&this.DA.changedSources()},a.CM=function(){var t=this;Dt(this.DA);var e=l(O(this.element,"source")),n=this.element,i=this.TM();n.hasAttribute("src")&&!on(n)&&(i.assertHttpsUrl(n.getAttribute("src"),n),N(["src"],this.element,this.DA)),e.forEach((function(e){Dt(!on(e,n)),i.assertHttpsUrl(e.getAttribute("src"),e),t.DA.appendChild(e)})),l(this.DA.querySelectorAll("[amp-orig-src]")).forEach((function(e){var n=e.getAttribute("amp-orig-src"),i=e.getAttribute("type"),r=t.VM(n,i);j(t.DA,r,e)})),l(O(n,"track")).forEach((function(e){t.DA.appendChild(e)})),this.$M(),this.DA.changedSources&&this.DA.changedSources()},a.VM=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},i=this.element;this.TM().assertHttpsUrl(t,i);var r=i.ownerDocument.createElement("source");return r.setAttribute("src",t),e&&r.setAttribute("type",e),T(r,n),r},a.FM=function(){var t=this.element,e=l(O(t,"source")),n=[];e.push(t);for(var i=0;i<e.length;i++)on(e[i])&&n.push(e[i]);return n},a._M=function(){return!!this.FM().length},a.RM=function(){return this.LM()&&Lt(this.win,"amp-story-first-page-max-bitrate")&&C(this.element,"amp-story-page:first-of-type amp-video")?(Wt(this.win).addEnabledExperiment("amp-story-first-page-max-bitrate"),1e3):Number.POSITIVE_INFINITY},a.MM=function(){var t=this,e=this.DA;e.addEventListener("error",(function(e){return t.DM(e)})),this.tb.push(this.forwardEvents([fe,ue,"loadeddata",he,le,ce],e)),this.tb.push(Qt(e,"volumechange",(function(){var e=t.DA.muted;t.G!=e&&(t.G=e,L(t.element,t.G?de:ve))}))),["play","pause","ended"].forEach((function(n){t.tb.push(Qt(e,n,(function(){return t.AM("play"==n)})))}))},a.JM=function(){for(this.AM(!1);this.tb.length;)this.tb.pop().call()},a.resetOnDomChange=function(){var t,e,n,i,r,o=this;this.DA=(r=this.element,D("video"),function(t,e){if(E(t))return t.querySelector(_(e,":scope"));var n=P(t,e)[0];return void 0===n?null:n}(r,"> ".concat("video"))),this.JM(),this.MM(),this.OM&&(t=this.win,Re||(Lt(t,"flexible-bitrate")&&Wt(t).addEnabledExperiment("flexible-bitrate"),Re=new Fe(t))).manage(this.DA),this.DA.readyState>=1?this.WM():((e=this.DA,i=new Promise((function(t){n=Kt(e,"loadedmetadata",t,void 0)})),i.then(n,n),i).then((function(){return o.WM()})),this.$M())},a.$M=function(){var t=this,e=this.element.getAttribute("captions-id");if(e){var n=this.win.document.querySelector("amp-story-captions#".concat(String(e).replace(w,S)));if(n){var i=this.getAmpDoc();Ut(i.win).installExtensionForDoc(i,"amp-story-captions","0.1"),this.xM=!0,n.getImpl().then((function(e){e.setVideoElement&&e.setVideoElement(t.DA)}))}}},a.WM=function(){L(this.element,se),this.BM()},a.pauseCallback=function(){this.DA&&this.DA.pause()},a.AM=function(t){this.LM()||this.Eb.updatePlaying(t)},a.IM=function(){return!!this.DA.play},a.supportsPlatform=function(){return this.IM()},a.isInteractive=function(){return this.element.hasAttribute("controls")},a.play=function(t){et(this.DA)},a.NM=function(){if(Yt(this.win).isAndroid()){var t=this.element;if(!t.querySelector("i-amphtml-poster")){var e=t.getAttribute("poster");if(e){var n,i=V(t)(Je);n=i.style,b(!0),b(!n.display),n.display="block",Q(i,{"background-image":"url(".concat(e,")"),"background-size":"cover","background-position":"center"}),i.classList.add("i-amphtml-android-poster-bug"),F(i),t.appendChild(i)}}}},a.pause=function(){this.DA.pause()},a.mute=function(){this.LM()||(this.DA.muted=!0)},a.unmute=function(){this.LM()||(this.DA.muted=!1)},a.LM=function(){return this.element.classList.contains("i-amphtml-poolbound")},a.showControls=function(){this.DA.controls=!0},a.hideControls=function(){this.DA.controls=!1},a.fullscreenEnter=function(){var t,e;(e=(t=this.DA).requestFullscreen||t.requestFullScreen||t.webkitRequestFullscreen||t.webkitEnterFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen)&&e.call(t)},a.fullscreenExit=function(){!function(t){var e=t.cancelFullScreen||t.exitFullscreen||t.webkitExitFullscreen||t.webkitCancelFullScreen||t.mozCancelFullScreen||t.msExitFullscreen;if(e)e.call(t);else{var n=t.ownerDocument;if(n){var i=n.cancelFullScreen||n.exitFullscreen||n.webkitExitFullscreen||n.webkitCancelFullScreen||n.mozCancelFullScreen||n.msExitFullscreen;i&&i.call(n)}}}(this.DA)},a.isFullscreen=function(){return function(t){var e=t.webkitDisplayingFullscreen;if(void 0!==e)return e;var n=t.ownerDocument;return!!n&&(n.fullscreenElement||n.webkitFullscreenElement||n.mozFullScreenElement||n.webkitCurrentFullScreenElement)==t}(this.DA)},a.getMetadata=function(){return this.Zp},a.preimplementsMediaSessionAPI=function(){return!1},a.preimplementsAutoFullscreen=function(){return!1},a.getCurrentTime=function(){return this.DA.currentTime},a.getDuration=function(){return this.DA.duration},a.getPlayedRanges=function(){for(var t=this.DA.played,e=t.length,n=[],i=0;i<e;i++)n.push([t.start(i),t.end(i)]);return n},a.firstLayoutCompleted=function(){this.zM()||this.togglePlaceholder(!1)},a.BM=function(){var t=this.element.querySelector("i-amphtml-poster");t&&q(t)},a.TM=function(){return Bt(this.element)},a.zM=function(){var t=this.getPlaceholder();return!(!t||!t.classList.contains("i-amphtml-blurry-placeholder")||(function(t,e){var n=t.style;for(var i in e)n.setProperty(X($(n,i)),String(e[i]),"important")}(t,{opacity:0}),0))},a.YM=function(t){var e=this.DA.getAttribute("poster");if(e){var n=new Image;n.onload=t,n.src=e}},a.seekTo=function(t){this.DA.currentTime=t},a.toggleCaptions=function(t){var e=this;l(this.DA.textTracks).forEach((function(n){n.mode=t?e.xM?"hidden":"showing":"disabled"}))},o}(t.BaseElement);function on(t,e){var n=t.getAttribute("src");return!!t.hasAttribute("amp-orig-src")&&Bt(e||t).isProxyOrigin(n)}t.registerElement(Qe,rn)}()}});
@@ -0,0 +1 @@
1
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */
@@ -0,0 +1,2 @@
1
+ /*! For license information please see amp-viewer-integration-0.1.js.LICENSE.txt */
2
+ (self.AMP=self.AMP||[]).push({m:0,v:"2410292120000",n:"amp-viewer-integration",ev:"0.1",l:!0,p:"high",f:function(t,e){!function(){function e(t,e){(null==e||e>t.length)&&(e=t.length);for(var n=0,i=new Array(e);n<e;n++)i[n]=t[n];return i}function n(t,n){var i="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(i)return(i=i.call(t)).next.bind(i);if(Array.isArray(t)||(i=function(t,n){if(t){if("string"==typeof t)return e(t,n);var i=Object.prototype.toString.call(t).slice(8,-1);return"Object"===i&&t.constructor&&(i=t.constructor.name),"Map"===i||"Set"===i?Array.from(t):"Arguments"===i||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(i)?e(t,n):void 0}}(t))||n&&t&&"number"==typeof t.length){i&&(t=i);var r=0;return function(){return r>=t.length?{done:!0}:{done:!1,value:t[r++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}var i;function r(){return i||(i=Promise.resolve(void 0))}var o=function(){var t=this;this.promise=new Promise((function(e,n){t.resolve=e,t.reject=n}))};function s(t,e){var n=t.length-e.length;return n>=0&&t.indexOf(e,n)==n}Array.isArray;var a=Object.prototype;function u(t){var e=Object.create(null);return t&&Object.assign(e,t),e}function h(t,e,n,i,r,o,s,a,u,h,c){return t}a.hasOwnProperty,a.toString;var c=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function l(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(t)}catch(t){return e}}function f(t){var e=Object.getOwnPropertyDescriptor(t,"message");if(null!=e&&e.writable)return t;var n=t.message,i=t.stack,r=new Error(n);for(var o in t)r[o]=t[o];return r.stack=i,r}function d(t){for(var e,i=null,r="",o=n(arguments,!0);!(e=o()).done;){var s=e.value;s instanceof Error&&!i?i=f(s):(r&&(r+=" "),r+=s)}return i?r&&(i.message=r+": "+i.message):i=new Error(r),i}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null};var v=self.__AMP_LOG;function p(t,e){throw new Error("failed to call initLogConstructor")}function m(t){return v.user||(v.user=g()),function(t,e){return e&&e.ownerDocument.defaultView!=t}(v.user.win,t)?v.userForEmbed||(v.userForEmbed=g()):v.user}function g(t){return p()}function I(){return v.dev||(v.dev=p())}function y(t,e,n,i,r,o,s,a,u,h,c){return t}function w(t,e,n,i,r,o,s,a,u,h,c){return m().assert(t,e,n,i,r,o,s,a,u,h,c)}function b(t,e){return A(t=function(t){return t.__AMP_TOP||(t.__AMP_TOP=t)}(t),e)}function _(t,e){return A(E(x(t)),e)}function x(t){return t.nodeType?(n=t,e=(n.ownerDocument||n).defaultView,b(e,"ampdoc")).getAmpDoc(t):t;var e,n}function E(t){var e=x(t);return e.isSingleDoc()?e.win:e}function A(t,e){y(S(t,e));var n=function(t){var e=t.__AMP_SERVICES;return e||(e=t.__AMP_SERVICES={}),e}(t)[e];return n.obj||(y(n.ctor),y(n.context),n.obj=new n.ctor(n.context),y(n.obj),n.context=null,n.resolve&&n.resolve(n.obj)),n.obj}function S(t,e){var n=t.__AMP_SERVICES&&t.__AMP_SERVICES[e];return!(!n||!n.ctor)}var C,k=function(t){return b(t,"platform")},M=function(t){return _(t,"viewer")},P=function(t){return _(t,"viewport")},T=["Webkit","webkit","Moz","moz","ms","O","o"],O={getPropertyPriority:function(){return""},getPropertyValue:function(){return""}};function R(t){var e=t.replace(/[A-Z]/g,(function(t){return"-"+t.toLowerCase()}));return T.some((function(t){return e.startsWith(t+"-")}))?"-".concat(e):e}function N(t,e,n){if(H(e))return e;C||(C=u());var i=C[e];if(!i||n){if(i=e,void 0===t[e]){var r=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e),o=function(t,e){for(var n=0;n<T.length;n++){var i=T[n]+e;if(void 0!==t[i])return i}return""}(t,r);void 0!==t[o]&&(i=o)}n||(C[e]=i)}return i}function L(t,e){var n=t.style;for(var i in e)n.setProperty(R(N(n,i)),String(e[i]),"important")}function q(t,e,n,i,r){var o=N(t.style,e,r);if(o){var s=i?n+i:n;t.style.setProperty(R(o),s)}}function F(t,e,n){var i=N(t.style,e,n);if(i)return H(i)?t.style.getPropertyValue(i):t.style[i]}function V(t,e){for(var n in e)q(t,n,e[n])}function D(t,e){var n=t.style;h(""!==e&&"none"!==e),h(!n.display),n.display=e}function U(t,e){return t.getComputedStyle(e)||O}function j(t,e){for(var n=0;n<e.length;n++)q(t,e[n],null)}function H(t){return t.startsWith("--")}var X=function(){function t(){}return t.solveYValueFromXValue=function(e,n,i,r,o,s,a,u,h){return t.Qd(t.Zd(e,n,r,s,u),i,o,a,h)},t.Zd=function(e,n,i,r,o){var s=1e-6,a=(e-n)/(o-n);if(a<=0)return 0;if(a>=1)return 1;for(var u=0,h=1,c=0,l=0;l<8;l++){c=t.tm(a,n,i,r,o);var f=(t.tm(a+s,n,i,r,o)-c)/s;if(Math.abs(c-e)<s)return a;if(Math.abs(f)<s)break;c<e?u=a:h=a,a-=(c-e)/f}for(var d=0;Math.abs(c-e)>s&&d<8;d++)c<e?(u=a,a=(a+h)/2):(h=a,a=(a+u)/2),c=t.tm(a,n,i,r,o);return a},t.tm=function(e,n,i,r,o){if(0==e)return n;if(1==e)return o;var s=t.im(n,i,e),a=t.im(i,r,e),u=t.im(r,o,e);return s=t.im(s,a,e),a=t.im(a,u,e),t.im(s,a,e)},t.Qd=function(e,n,i,r,o){if(0==e)return n;if(1==e)return o;var s=t.im(n,i,e),a=t.im(i,r,e),u=t.im(r,o,e);return s=t.im(s,a,e),a=t.im(a,u,e),t.im(s,a,e)},t.im=function(t,e,n){return t+n*(e-t)},t}(),Q={LINEAR:function(t){return t},EASE:function(t){return X.solveYValueFromXValue(t,0,0,.25,.1,.25,1,1,1)},EASE_IN:function(t){return X.solveYValueFromXValue(t,0,0,.42,0,1,1,1,1)},EASE_OUT:function(t){return X.solveYValueFromXValue(t,0,0,0,0,.58,1,1,1)},EASE_IN_OUT:function(t){return X.solveYValueFromXValue(t,0,0,.42,0,.58,1,1,1)}},z={linear:Q.LINEAR,ease:Q.EASE,"ease-in":Q.EASE_IN,"ease-out":Q.EASE_OUT,"ease-in-out":Q.EASE_IN_OUT};function G(t){if(!t)return null;if("string"==typeof t){if(-1!=t.indexOf("cubic-bezier")){var e=t.match(/cubic-bezier\((.+)\)/);if(e){var n=e[1].split(",").map(parseFloat);if(4==n.length){for(var i=0;i<4;i++)if(isNaN(n[i]))return null;return r=n[0],o=n[1],s=n[2],a=n[3],function(t){return X.solveYValueFromXValue(t,0,0,r,o,s,a,1,1)}}}return null}return z[t]}var r,o,s,a;return t}var Y="Animation",K=function(){},Z=function(){function t(t,e){this.nm=t,this.Gc=e||b(self,"vsync"),this.rm=null,this.sm=[]}t.animate=function(e,n,i,r){return new t(e).setCurve(r).add(0,n,1).start(i)};var e=t.prototype;return e.setCurve=function(t){return t&&(this.rm=G(t)),this},e.add=function(t,e,n,i){return this.sm.push({delay:t,func:e,duration:n,curve:G(i)}),this},e.start=function(t){return new B(this.Gc,this.nm,this.sm,this.rm,t)},t}(),B=function(){function t(t,e,n,i,r){this.Gc=t,this.nm=e,this.sm=[];for(var s=0;s<n.length;s++){var a=n[s];this.sm.push({delay:a.delay,func:a.func,duration:a.duration,curve:a.curve||i,started:!1,completed:!1})}this.om=r,this.ka=Date.now(),this.es=!0,this.Ke={};var u=new o;this.um=u.promise,this.Fe=u.resolve,this.hm=u.reject,this.am=this.Gc.createAnimTask(this.nm,{mutate:this.fm.bind(this)}),this.Gc.canAnimate(this.nm)?this.am(this.Ke):(I().warn(Y,"cannot animate"),this.lm(!1,0))}var e=t.prototype;return e.then=function(t,e){return t||e?this.um.then(t,e):this.um},e.thenAlways=function(t){var e=t||K;return this.then(e,e)},e.halt=function(t){this.lm(!1,t||0)},e.lm=function(t,e){if(this.es){if(this.es=!1,0!=e){this.sm.length>1&&this.sm.sort((function(t,e){return t.delay+t.duration-(e.delay+e.duration)}));try{if(e>0)for(var n=0;n<this.sm.length;n++)this.sm[n].func(1,!0);else for(var i=this.sm.length-1;i>=0;i--)this.sm[i].func(0,!1)}catch(e){I().error(Y,"completion failed: "+e,e),t=!1}}t?this.Fe():this.hm()}},e.fm=function(t){if(this.es){for(var e=Date.now(),n=Math.min((e-this.ka)/this.om,1),i=0;i<this.sm.length;i++){var r=this.sm[i];!r.started&&n>=r.delay&&(r.started=!0)}for(var o=0;o<this.sm.length;o++){var s=this.sm[o];s.started&&!s.completed&&this.vm(s,n)}1==n?this.lm(!0,0):this.Gc.canAnimate(this.nm)?this.am(this.Ke):(I().warn(Y,"cancel animation"),this.lm(!1,0))}},e.vm=function(t,e){var n,i;if(t.duration>0){if(i=n=Math.min((e-t.delay)/t.duration,1),t.curve&&1!=i)try{i=t.curve(n)}catch(t){return I().error(Y,"step curve failed: "+t,t),void this.lm(!1,0)}}else n=1,i=1;1==n&&(t.completed=!0);try{t.func(i,t.completed)}catch(t){return I().error(Y,"step mutate failed: "+t,t),void this.lm(!1,0)}},t}(),W=function(){function t(t,e,n){var i=this;this.Xo=A(t,"timer"),this.Jo=e,this.Qo=n||0,this.Zo=-1,this.rs=0,this.es=!1,this.us=function(){i.os()}}var e=t.prototype;return e.isPending=function(){return-1!=this.Zo},e.schedule=function(t){var e=t||this.Qo;this.es&&e<10&&(e=10);var n=Date.now()+e;return(!this.isPending()||n-this.rs<-10)&&(this.cancel(),this.rs=n,this.Zo=this.Xo.delay(this.us,e),!0)},e.os=function(){this.Zo=-1,this.rs=0,this.es=!0,this.Jo(),this.es=!1},e.cancel=function(){this.isPending()&&(this.Xo.cancel(this.Zo),this.Zo=-1)},t}(),J="FixedLayer",$="i-amphtml-lightbox",tt="i-amphtml-lightbox-element";function et(t){return-1!==t.tagName.indexOf("LIGHTBOX")}var nt,it=function(){function t(t,e,n,i,r){var o=this;this.ampdoc=t,this.Gc=e,this.tI=n,this.ym=i,this.nI=i,this.iI=r&&t.isSingleDoc(),this.rI=null,this.eI=0,this.Qt=[],this.sI=new W(t.win,(function(){return o.update()})),this.oI=null,this.uI=[],this.hI=[]}var e=t.prototype;return e.enterLightbox=function(t,e){var n=this,i=this.aI();i&&i.setLightboxMode(!0),t&&e&&e.then((function(){return n.fI(t,!0)}))},e.leaveLightbox=function(){var t=this.aI();t&&t.setLightboxMode(!1);var e=function(t){for(var e=[],n=0,i=0;i<t.length;i++){var r=t[i];r.lightboxed?e.push(r):(n<i&&(t[n]=r),n++)}return n<t.length&&(t.length=n),e}(this.Qt);this.cI(e),this.Qt.length||this.vI()},e.setup=function(){if(!M(this.ampdoc).isEmbedded())return!1;var t=this.ampdoc.getRootNode(),e=t.styleSheets;if(!e)return!0;this.uI.length=0,this.hI.length=0;for(var n=0;n<e.length;n++){var i=e[n];if(!i)return I().error(J,"Aborting setup due to null stylesheet."),!0;var r=i.disabled,o=i.ownerNode;r||!o||"STYLE"!=o.tagName||o.hasAttribute("amp-boilerplate")||o.hasAttribute("amp-runtime")||o.hasAttribute("amp-extension")||this.lI(i.cssRules)}this.fI(t),this.Qt.length>0&&this.observeHiddenMutations();var s=k(this.ampdoc.win);return this.Qt.length>0&&!this.iI&&s.isIos()&&m().warn(J,"Please test this page inside of an AMP Viewer such as Google's because the fixed or sticky positioning might have slightly different layout."),!0},e.fI=function(t,e){this.dI(t,e),this.pI(),this.update()},e.observeHiddenMutations=function(){this.mI()},e.vI=function(){this.sI.cancel();var t=this.oI;t&&(t(),this.oI=null)},e.mI=function(){var t=this;if(!this.oI){var e=this.ampdoc.getRootNode(),n=function(t){return e="hidden-observer",S(n=E(x(t)),e)?A(n,e):null;var e,n}(e.documentElement||e);this.oI=n.add((function(){t.sI.isPending()||t.sI.schedule(16)}))}},e.updatePaddingTop=function(t,e){this.ym=t,e||(this.nI=t),this.update()},e.transformMutate=function(t){t?this.Qt.forEach((function(e){e.fixedNow&&e.top&&(q(e.element,"transition","none"),e.transform&&"none"!=e.transform?q(e.element,"transform",e.transform+" "+t):q(e.element,"transform",t))})):this.Qt.forEach((function(t){t.fixedNow&&t.top&&V(t.element,{transform:"",transition:""})}))},e.addElement=function(t,e){return this.yI(t,"*","fixed",e)?(this.pI(),this.observeHiddenMutations(),this.update()):r()},e.removeElement=function(t){var e=this.gI(t);this.cI(e)},e.cI=function(t){var e=this;t.length>0&&this.rI&&this.Gc.mutate((function(){for(var n=0;n<t.length;n++){var i=t[n];"fixed"==i.position&&e.rI.returnFrom(i)}}))},e.isDeclaredFixed=function(t){return!!t.__AMP_DECLFIXED},e.isDeclaredSticky=function(t){return!!t.__AMP_DECLSTICKY},e.update=function(){var t=this;if(this.Qt.filter((function(e){return!t.ampdoc.contains(e.element)})).forEach((function(e){return t.gI(e.element)})),0==this.Qt.length)return r();this.sI.cancel();var e=!1;return this.Gc.runPromise({measure:function(n){for(var i=t.Qt,r=[],o=t.ampdoc.win,a=0;a<i.length;a++)L(i[a].element,{top:"",bottom:"-9999vh",transition:"none"});for(var u=0;u<i.length;u++)r.push(U(o,i[u].element).top);for(var h=0;h<i.length;h++)q(i[h].element,"bottom","");for(var c=0;c<i.length;c++){var l=i[c],f=l.element,d=l.forceTransfer,v=U(o,f),p=f.offsetHeight,m=f.offsetTop,g=f.offsetWidth,I=v.bottom,y=v.display,w=void 0===y?"":y,b=v.position,_=void 0===b?"":b,x=v.zIndex,E=parseFloat(v.opacity),A=v[N(v,"transform")],S=v.top,C="fixed"===_&&(d||g>0&&p>0),k=s(_,"sticky");if("none"!==w&&(C||k)){"auto"!==S&&r[c]===S||(S=C&&m===t.nI+t.tI?"0px":"");var M=!1;C&&(M=!0===d||!1!==d&&E>0&&p<300&&!(!S&&!I)),M&&(e=!0),n[l.id]={fixed:C,sticky:k,transferrable:M,top:S,zIndex:x,transform:A}}else n[l.id]={fixed:!1,sticky:!1,transferrable:!1,top:"",zIndex:""}}},mutate:function(n){e&&t.iI&&t.aI().update();for(var i=t.Qt,r=0;r<i.length;r++){var o=i[r],s=n[o.id];q(o.element,"transition","none"),q(o.element,"transition",""),s&&t.wI(o,r,s)}}},{}).catch((function(t){I().error(J,"Failed to mutate fixed elements:",t)}))},e.dI=function(t,e){try{this.bI(t,e)}catch(t){I().error(J,"Failed to setup fixed elements:",t)}},e.bI=function(t,e){for(var n=0;n<this.uI.length;n++)for(var i=this.uI[n],r=t.querySelectorAll(i),o=0;o<r.length&&!(this.Qt.length>10);o++)this.yI(r[o],i,"fixed",void 0,e);for(var s=0;s<this.hI.length;s++)for(var a=this.hI[s],u=t.querySelectorAll(a),h=0;h<u.length;h++)this.yI(u[h],a,"sticky",void 0,e)},e.xI=function(t){t.hasAttribute("style")&&(F(t,"top")||F(t,"bottom"))&&m().error(J,"Inline styles with `top`, `bottom` and other CSS rules are not supported yet for fixed or sticky elements (#14186). Unexpected behavior may occur.",t)},e.yI=function(t,e,n,i,r){if(i||this.xI(t),et(t))return!1;var o=function(t,e){var n;for(n=t;n&&void 0!==n;n=n.parentElement)if(e(n))return n;return null}(t,et);if(!r&&o)return!1;for(var s=this.Qt,a=[],u=0;u<s.length;u++){var h=s[u].element;if(h===t)break;if(h.contains(t))return!1;t.contains(h)&&a.push(h)}for(var c=0;c<a.length;c++)this.removeElement(a[c]);for(var l=null,f=0;f<s.length;f++){var d=s[f];if(d.element==t&&d.position==n){l=d;break}}var v="fixed"==n;if(l)l.selectors.includes(e)||l.selectors.push(e);else{var p="F"+this.eI++;t.setAttribute("i-amphtml-fixedid",p),v?t.__AMP_DECLFIXED=!0:t.__AMP_DECLSTICKY=!0,l={id:p,element:t,position:n,selectors:[e],fixedNow:!1,stickyNow:!1,lightboxed:!!o},s.push(l)}return l.forceTransfer=!!v&&i,!0},e.gI=function(t){for(var e=[],n=0;n<this.Qt.length;n++){var i=this.Qt[n];i.element===t&&(i.lightboxed||this.Gc.mutate((function(){q(t,"top","")})),this.Qt.splice(n,1),e.push(i))}return this.Qt.length||this.vI(),e},e.pI=function(){this.Qt.sort((function(t,e){return(n=t.element)===(i=e.element)?0:n.compareDocumentPosition(i)&(Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS)?1:-1;var n,i}))},e.wI=function(t,e,n){var i=t.element,r=t.fixedNow;t.fixedNow=n.fixed,t.stickyNow=n.sticky,t.top=n.fixed||n.sticky?n.top:"",t.transform=n.transform,!r||n.fixed&&n.transferrable||!this.rI||this.rI.returnFrom(t),n.top&&(n.fixed||n.sticky)&&!t.lightboxed&&(n.fixed||!this.iI?q(i,"top","calc(".concat(n.top," + ").concat(this.ym,"px)")):this.nI===this.ym?q(i,"top",n.top):q(i,"top","calc(".concat(n.top," - ").concat(this.nI,"px)"))),this.iI&&n.fixed&&n.transferrable&&this.aI().transferTo(t,e,n)},e.aI=function(){if(!this.iI||this.rI)return this.rI;var t=this.ampdoc.win.document;return this.rI=new rt(t,this.Gc),this.rI},e.lI=function(t){for(var e=0;e<t.length;e++){var n=t[e];if(4!=n.type&&12!=n.type){if(1==n.type){var i=n.selectorText,r=n.style.position;if("*"===i||!r)continue;"fixed"===r?this.uI.push(i):s(r,"sticky")&&this.hI.push(i)}}else this.lI(n.cssRules)}},e.animateFixedElements=function(t,e,n,i,o){var s=this;return this.updatePaddingTop(t,o),n<=0?r():Z.animate(this.ampdoc.getRootNode(),(function(n){var i=function(n){return e-t+(t-e)*n}(n);s.transformMutate("translateY(".concat(i,"px)"))}),n,i).thenAlways((function(){s.transformMutate(null)}))},t}(),rt=function(){function t(t,e){var n;this.si=t,this.Gc=e,this.kI=t.body.cloneNode(!1),this.kI.removeAttribute("style"),V(this.kI,("display"in(n={position:"absolute",top:0,left:0,height:0,width:0,pointerEvents:"none",overflow:"hidden",animation:"none",background:"none",border:"none",borderImage:"none",boxSizing:"border-box",boxShadow:"none",float:"none",margin:0,opacity:1,outline:"none",padding:"none",transform:"none",transition:"none"})&&function(t){for(var e=arguments.length,n=new Array(e>1?e-1:0),i=1;i<e;i++)n[i-1]=arguments[i];var r=d.apply(null,n);r.name=t||r.name,function(t){var e,n;null===(e=(n=self).__AMP_REPORT_ERROR)||void 0===e||e.call(n,t)}(r)}("STYLE","`display` style detected. You must use toggle instead."),n)),D(this.kI,"block"),t.documentElement.appendChild(this.kI)}var e=t.prototype;return e.getRoot=function(){return this.kI},e.setLightboxMode=function(t){var e=this;this.Gc.mutate((function(){var n=e.getRoot();t?n.setAttribute($,""):n.removeAttribute($)}))},e.update=function(){for(var t=this.si.body,e=this.kI,n=t.attributes,i=e.attributes,r=0;r<n.length;r++){var o=n[r];"style"!==o.name&&i.setNamedItem(o.cloneNode(!1))}for(var s=0;s<i.length;s++){var a=i[s].name;"style"===a||a===$||t.hasAttribute(a)||(e.removeAttribute(a),s--)}},e.transferTo=function(t,e,n){var i=this,r=t.element;if(r.parentElement!=this.kI){if(I().fine(J,"transfer to fixed:",t.id,t.element),m().warn(J,"In order to improve scrolling performance in Safari, we now move the element to a fixed positioning layer:",t.element),!t.placeholder){q(r,"pointer-events","initial");var o=t.placeholder=this.si.createElement("i-amphtml-fpa");!function(t,e){void 0===e&&(e=t.hasAttribute("hidden")),e?t.removeAttribute("hidden"):t.setAttribute("hidden","")}(o,!1),o.setAttribute("i-amphtml-fixedid",t.id)}q(r,"zIndex","calc(".concat(1e4+e," + ").concat(n.zIndex||0,")")),t.lightboxed&&r.classList.add(tt),r.parentElement.replaceChild(t.placeholder,r),this.kI.appendChild(r),t.selectors.some((function(t){return i.EI(r,t)}))||(m().warn(J,"Failed to move the element to the fixed position layer. This is most likely due to the compound CSS selector:",t.element),this.returnFrom(t))}},e.returnFrom=function(t){if(t.placeholder&&this.si.contains(t.placeholder)){var e=t.element,n=t.placeholder;I().fine(J,"return from fixed:",t.id,e),t.lightboxed&&e.classList.remove(tt),this.si.contains(e)?(q(t.element,"zIndex",""),n.parentElement.replaceChild(e,n)):n.parentElement.removeChild(n)}},e.EI=function(t,e){try{return function(t,e){var n=t.matches||t.webkitMatchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector;return!!n&&n.call(t,e)}(t,e)}catch(t){return I().error(J,"Failed to test query match:",t),!1}},t}();function ot(t,e,n,i){var r=t,o=n,s=function(t){try{return o(t)}catch(t){var e,n;throw null===(e=(n=self).__AMP_REPORT_ERROR)||void 0===e||e.call(n,t),t}},a=function(){if(void 0!==nt)return nt;nt=!1;try{var t={get capture(){return nt=!0,!1}};self.addEventListener("test-options",null,t),self.removeEventListener("test-options",null,t)}catch(t){}return nt}(),u=!(null==i||!i.capture);return r.addEventListener(e,s,a?i:u),function(){null==r||r.removeEventListener(e,s,a?i:u),o=null,r=null,s=null}}function st(t,e,n,i){return ot(t,e,n,i)}function at(t){return t.data}function ut(t,e,n,i){var r=n,o=ot(t,e,(function(t){try{r(t)}finally{r=null,o()}}),i);return o}var ht=function(){function t(t,e){this.win=t,this.H=e,this.SI()}var e=t.prototype;return e.SI=function(){st(this.win.document,"focusin",this.AI.bind(this),{capture:!1})},e.AI=function(t){t.defaultPrevented||this.H.sendRequest(t.type,{focusTargetRect:t.target.getBoundingClientRect()},!1)},t}();function ct(t){return"loading"!=t.readyState&&"uninitialized"!=t.readyState}function lt(t,e,n){return 0==e&&0==n||0==t.width&&0==t.height?t:{left:i=t.left+e,top:r=t.top+n,width:o=t.width,height:s=t.height,bottom:r+s,right:i+o,x:i,y:r};var i,r,o,s}var ft=function(){function t(t){this.II=t,this._I=[],this.dr=0}var e=t.prototype;return e.push=function(t){this._I[this.dr]=t,this.dr=(this.dr+1)%this.II},e.get=function(t){return this._I.length>=this.II&&(t=(this.dr+t)%this.II),this._I[t]},e.size=function(){return this._I.length},t}();function dt(t){return t.node.wholeText[t.offset]}var vt=/[,.\s\u2022()]/;function pt(t){return"’"==t||"‘"==t?"'":"“"==t||"”"==t?'"':t.toLowerCase()}function mt(t){for(var e=[],n=0;n<t.length;n++){var i=t[n];vt.test(i)||e.push(pt(i))}return e.join("")}var gt=function(){function t(t,e){this.MI=t,this.OI=e,this.matches=[],this.CI={},this.TI=t.length-1;for(var n=0;n<t.length;n++){var i=t[n];this.CI[i]=t.length-1-n}}return t.prototype.update=function(){if(this.TI>0)this.TI--;else{for(var t=this.OI,e=this.MI,n=t.size(),i=0;i<e.length;i++){var r=pt(dt(t.get(n-1-i).pos));if(e[e.length-1-i]!=r){var o=this.CI[r];return null==o&&(o=e.length),(o-=i)<1&&(o=1),void(this.TI=o-1)}}var s=t.get(n-1),a=s.pos;this.matches.push({start:t.get(n-e.length),end:{pos:{node:a.node,offset:a.offset+1},idx:s.idx+1}})}},t}();function It(t,e,n,i){for(var r=n;r<i.length;r++){var o=i[r];if(t.node!=o.start.node)return;if(o.start.node=e,o.start.offset-=t.offset,t.node!=o.end.node)return;o.end.node=e,o.end.offset-=t.offset}}function yt(t,e,n,i,r,o){for(;;){if(e.node==n.node){var s=wt(t,e.node,e.offset,n.offset,o);return void(s&&It(n,s,r+1,i))}var a=bt(t,e.node);if(wt(t,e.node,e.offset,e.node.wholeText.length,o),!a)break;e={node:a,offset:0}}}function wt(t,e,n,i,r){if(n>=i)return null;var o=t.document,s=e.parentNode,a=e.wholeText;n>0&&s.insertBefore(o.createTextNode(a.substring(0,n)),e);var u=o.createElement("span");u.appendChild(o.createTextNode(a.substring(n,i))),s.insertBefore(u,e),r.push(u);var h=null;return i<a.length&&(h=o.createTextNode(a.substring(i)),s.insertBefore(h,e)),s.removeChild(e),h}function bt(t,e){for(var n=!0,i=e;;){if(null==i)return null;if(n){var r=i.nextSibling;r?(i=r,n=!1):i=i.parentNode}else{if(i instanceof t.Text)return i;i.firstChild?i=i.firstChild:n=!0}}}var _t=function(){function t(e,n){if(this.t=e,this.NI=n,this.RI=-1,this.UI=null,n instanceof e.Text)this.RI=0;else if(n instanceof e.Element){if("none"==U(e,n).display)return;var i=n.firstChild;null!=i&&(this.UI=new t(e,i))}}var e=t.prototype;return e.next=function(){if(this.RI>=0)return this.jI();for(;null!=this.UI;){var e=this.UI.next();if(null!=e)return e;var n=this.UI.NI.nextSibling;this.UI=null!=n?new t(this.t,n):null}return null},e.jI=function(){var t=this.NI.wholeText;if(this.RI<t.length){var e=this.RI;return this.RI++,{node:this.NI,offset:e}}return null},t}(),xt=function(){function t(t,e){var n=this;this.vu=t,this.yh=M(t),this.Th=P(this.vu),this.qI=null;var i,r=k(this.vu.win);"fragmentDirective"in document&&r.isChrome()&&r.getMajorVersion()>=93?t.whenFirstVisible().then((function(){return n.zI(e)})):(i=t.win.document,new Promise((function(t){!function(t,e){!function(t,e,n){var i=e(t);i?n(t):t.addEventListener("readystatechange",(function r(){e(t)&&(i||(i=!0,n(t)),t.removeEventListener("readystatechange",r))}))}(t,ct,e)}(i,t)}))).then((function(){n.LI(e)}))}var e=t.prototype;return e.zI=function(t){var e=t.sentences;if(null!=e&&e.length){var n=e.map((function(t){return"text="+encodeURIComponent(t)})).join("&");this.YI(n)}},e.YI=function(t){var e=this.vu.win.location.hash;e?this.vu.win.location.replace(e+":~:"+t):this.vu.win.location.replace("#:~:"+t)},e.FI=function(t,e){var n={state:t};for(var i in e)n[i]=e[i];this.yh.sendMessage("highlightState",n)},e.KI=function(t){var e=this.vu.win,n=function(t,e,n){if(n=function(t){for(var e=[],n=0;n<t.length;n++){var i=mt(t[n]);i&&e.push(i)}return e}(n),n.length<=0)return null;for(var i=new _t(t,e),r=new ft(n.map((function(t){return t.length})).reduce((function(t,e){return Math.max(t,e)}))),o=[new gt(n[0],r)],s=-1;;){s++;var a=i.next();if(null==a)return null;if(!vt.test(dt(a))){r.push({pos:a,idx:s});for(var u=0;u<o.length;u++)o[u].update();if(0!=o[o.length-1].matches.length){if(o.length==n.length)break;o.push(new gt(n[o.length],r))}}}var h=[];t:for(var c=n.length-1;c>=0;c--){var l=o[c].matches;if(0!=h.length){for(var f=h[h.length-1],d=l.length-1;d>=0;d--){var v=l[d];if(f.start.idx>=v.end.idx){h.push(v);continue t}}y(!1)}else h.push(l[l.length-1])}for(var p=[],m=h.length-1;m>=0;m--){var g=h[m];p.push({start:g.start.pos,end:g.end.pos})}return p}(e,this.vu.getBody(),t.sentences);if(n){var i=function(t,e){e=function(t){for(var e=[],n=null,i=0;i<t.length;i++){var r=t[i];n&&n.end.node==r.start.node&&n.end.offset==r.start.offset?n.end=r.end:(n=r,e.push(r))}return e}(e);for(var n=[],i=0;i<e.length;i++){var r=e[i];yt(t,r.start,r.end,e,i,n)}return n}(e,n);i&&0!=i.length&&(this.qI=i)}},e.onVisibleOnce=function(t){var e,n,i,r=this;e=!1,n=null,i=t,t=function(){if(!e){for(var t=arguments.length,r=new Array(t),o=0;o<t;o++)r[o]=arguments[o];n=i.apply(self,r),e=!0,i=null}return n},this.vu.onVisibilityChanged((function(){"visible"==r.vu.getVisibilityState()&&t()}))},e.LI=function(t){var e=this;if(this.vu.win.document.querySelector('script[id="amp-access"]'))this.FI("has_amp_access");else if(this.KI(t),this.qI){var n=this.XI();if(this.FI("found",{scroll:n}),!t.skipRendering){for(var i=0;i<this.qI.length;i++)V(this.qI[i],{backgroundColor:"#fcff00",color:"#000"});var r=this.vu.getVisibilityState();t.skipScrollAnimation?"visible"==r?this.DI(n):(this.Th.setScrollTop(n),this.onVisibleOnce((function(){e.DI(e.XI())}))):"visible"==r?this.VI(n):(this.HI(n),this.onVisibleOnce((function(){e.VI(e.XI())}))),ut(this.vu.getBody(),"click",this.JI.bind(this))}}else this.FI("not_found")},e.XI=function(){var t=this.qI;if(!t)return 0;for(var e=this.Th,n=Number.MAX_VALUE,i=0,r=e.getPaddingTop(),o=0;o<t.length;o++){var s=lt(e.getLayoutRect(t[o]),0,-r),a=s.bottom,u=s.top;n=Math.min(n,u),i=Math.max(i,a)}if(n>=i)return 0;var h=(i+n-(e.getHeight()-r))/2;return h>n-80&&(h=n-80),h>0?h:0},e.DI=function(t){this.FI("auto_scroll"),this.Th.setScrollTop(t),this.FI("shown")},e.HI=function(t){var e=Math.max(0,t-500);this.Th.setScrollTop(e)},e.BI=function(t){var e=this.XI(),n=this.Th.getScrollTop();if(n==e&&n==t)return null;var i={};return n!=e&&(this.Th.setScrollTop(e),i.nd=n-e),n!=t&&(i.od=n-t),i},e.VI=function(t){var e=this;this.HI(t);var n=this.vu.win.document.createElement("div");D(n,"block"),V(n,{position:"absolute",top:Math.floor(t)+"px",height:"1px",left:"0",width:"1px","pointer-events":"none"});var i=this.vu.getBody();i.appendChild(n),this.FI("auto_scroll"),this.Th.animateScrollIntoView(n).then((function(){i.removeChild(n),e.FI("shown",e.BI(t))}))},e.setupMessaging=function(t){t.registerHandler("highlightDismiss",this.JI.bind(this))},e.JI=function(){if(this.qI)for(var t=0;t<this.qI.length;t++)j(this.qI[t],["backgroundColor","color"])},t}(),Et=["key","code","location","ctrlKey","shiftKey","altKey","metaKey","repeat","isComposing","charCode","keyCode","which"],At=function(){function t(t,e){this.win=t,this.H=e,this.GI()}var e=t.prototype;return e.GI=function(){var t=this.WI.bind(this);st(this.win,"keydown",t),st(this.win,"keypress",t),st(this.win,"keyup",t)},e.WI=function(t){(function(t){if(t.defaultPrevented)return!0;if("Escape"==t.key)return!1;switch(t.target.nodeName){case"INPUT":return"checkbox"!=t.target.type||" "==t.key;case"TEXTAREA":case"BUTTON":case"SELECT":case"OPTION":return!0}return t.target.hasAttribute&&t.target.hasAttribute("contenteditable")})(t)||this.AI(t)},e.AI=function(t){this.H.sendRequest(t.type,function(t){var e={};return Et.forEach((function(n){void 0!==t[n]&&(e[n]=t[n])})),e}(t),!1)},t}(),St="amp-viewer-messaging",Ct="channelOpen",kt="__AMPHTML__";function Mt(t){if("string"!=typeof t)return t;if("{"!=t.charAt(0))return null;try{return JSON.parse(t)}catch(t){return null}}var Pt,Tt,Ot=function(){function t(t,e,n){this.t=t,this.i=e,this.h=n}var e=t.prototype;return e.addEventListener=function(t,e){var n=this;this.t.addEventListener("message",(function(t){t.origin==n.i&&t.source==n.h&&e(t)}))},e.postMessage=function(t){var e="null"===this.i?"*":this.i;this.h.postMessage(t,e)},e.start=function(){},t}(),Rt=function(){function t(t,e,n,i,r){this.t=t,this.o=e,this.u=!!n,this.l=i||null,this.v=!!r,this.p=0,this.g={},this.m={},this.q=null,this.o.addEventListener("message",this._.bind(this)),this.o.start()}t.initiateHandshakeWithDocument=function(e,n){return new Promise((function(i){var r=setInterval((function(){var o=new MessageChannel,s={app:kt,name:"handshake-poll"};e.postMessage(s,"*",[o.port2]);var a=o.port1;a.addEventListener("message",(function e(o){var s=Mt(o.data);if(s&&s.app===kt&&s.name===Ct){clearInterval(r),a.removeEventListener("message",e);var u=new t(null,a,!1,n,!0);u.M(s.requestid,Ct,null),i(u)}})),a.start()}),1e3)}))},t.waitForHandshakeFromDocument=function(e,n,i,r,o){return new Promise((function(s){e.addEventListener("message",(function a(u){var h=Mt(u.data);if(h&&(u.origin==i||o&&o.test(u.origin))&&(!u.source||u.source==n)&&h.app===kt&&h.name===Ct){e.removeEventListener("message",a);var c=new t(null,new Ot(e,u.origin,n),!1,r,!0);c.M(h.requestid,Ct,null),s(c)}}))}))};var e=t.prototype;return e.registerHandler=function(t,e){this.m[t]=e},e.unregisterHandler=function(t){delete this.m[t]},e.setDefaultHandler=function(t){this.q=t},e._=function(t){var e=Mt(t.data);e&&e.app===kt&&(this.l&&this.v&&e.messagingToken!==this.l?this.O(St+": handleMessage_ error: ","invalid token"):"q"===e.type?this.P(e):"s"===e.type&&this.R(e))},e.sendRequest=function(t,e,n){var i=this,r=++this.p,o=void 0;return n&&(o=new Promise((function(t,e){i.g[r]={resolve:t,reject:e}}))),this.S({app:kt,requestid:r,type:"q",name:t,data:e,rsvp:n}),o},e.M=function(t,e,n){this.S({app:kt,requestid:t,type:"s",name:e,data:n})},e.k=function(t,e,n){var i=this.j(n);this.O(St+": sendResponseError_, message name: "+e,i),this.S({app:kt,requestid:t,type:"s",name:e,data:null,error:i})},e.S=function(t){var e=Object.assign(t,{});this.l&&!this.v&&(e.messagingToken=this.l),this.o.postMessage(this.u?JSON.stringify(e):e)},e.P=function(t){var e=this,n=this.m[t.name];if(n||(n=this.q),!n){var i=new Error("Cannot handle request because no default handler is set!");throw i.args=t.name,i}var r=n(t.name,t.data,!!t.rsvp);if(t.rsvp){var o=t.requestid;if(!r)throw this.k(o,t.name,new Error("no response")),new Error("expected response but none given: "+t.name);r.then((function(n){e.M(o,t.name,n)}),(function(n){e.k(o,t.name,n)}))}},e.R=function(t){var e=t.requestid,n=this.g[e];n&&(delete this.g[e],t.error?(this.O(St+": handleResponse_ error: ",t.error),n.reject(new Error("Request ".concat(t.name," failed: ").concat(t.error)))):n.resolve(t.data))},e.O=function(t,e){if(this.t){var n="amp-messaging-error-logger: "+t;n+=" data: "+this.j(e),this.t.viewerState=n}},e.j=function(t){return t?t.message?t.message:String(t):"unknown error"},t}(),Nt=["altKey","charCode","ctrlKey","detail","eventPhase","key","layerX","layerY","metaKey","pageX","pageY","returnValue","shiftKey","timeStamp","type","which"],Lt=["clientX","clientY","force","identifier","pageX","pageY","radiusX","radiusY","screenX","screenY"],qt=function(){function t(t,e){this.win=t,this.H=e,this.ZI=!1,this.$I=[],e.registerHandler("scrollLock",this.QI.bind(this)),this.E_()}var e=t.prototype;return e.E_=function(){var t=this.WI.bind(this),e=this.win.document,n={capture:!1,passive:!this.ZI};this.$I.push(st(e,"touchstart",t,n),st(e,"touchend",t,n),st(e,"touchmove",t,n))},e.rg=function(){this.$I.forEach((function(t){return t()})),this.$I.length=0},e.WI=function(t){switch(t.type){case"touchstart":case"touchend":case"touchmove":this.I_(t);break;default:return}},e.I_=function(t){if(null!=t&&t.shouldViewerCancelPropagation)t.stopImmediatePropagation();else{if(t&&t.type){var e=this.__(t);this.H.sendRequest(t.type,e,!1)}this.ZI&&t.cancelable&&t.preventDefault()}},e.__=function(t){var e=this.M_(t,Nt);return t.touches&&(e.touches=this.O_(t.touches)),t.changedTouches&&(e.changedTouches=this.O_(t.changedTouches)),e},e.O_=function(t){for(var e=[],n=0;n<t.length;n++)e.push(this.M_(t[n],Lt));return e},e.M_=function(t,e){for(var n={},i=0;i<e.length;i++){var r=e[i];void 0!==t[r]&&(n[r]=t[r])}return n},e.QI=function(t,e,n){return this.ZI=!!e,this.rg(),this.E_(),n?Promise.resolve({}):void 0},t}(),Ft=function(){function t(t){this.zt=t,this.It=0,this.Ct=0,this.Ot=u()}var e=t.prototype;return e.has=function(t){return!!this.Ot[t]},e.get=function(t){var e=this.Ot[t];if(e)return e.access=++this.Ct,e.payload},e.put=function(t,e){this.has(t)||this.It++,this.Ot[t]={payload:e,access:this.Ct},this.qt()},e.qt=function(){if(!(this.It<=this.zt)){var t,e=this.Ot,n=this.Ct+1;for(var i in e){var r=e[i].access;r<n&&(n=r,t=i)}void 0!==t&&(delete e[t],this.It--)}},t}(),Vt=self.AMP.config.urls,Dt=new Set(["c","v","a","ad"]),Ut=function(t){return"string"==typeof t?function(t){return Pt||(Pt=self.document.createElement("a"),Tt=self.__AMP_URL_CACHE||(self.__AMP_URL_CACHE=new Ft(100))),function(t,e,n){if(n&&n.has(e))return n.get(e);t.href=e,t.protocol||(t.href=t.href);var i,r={href:t.href,protocol:t.protocol,host:t.host,hostname:t.hostname,port:"0"==t.port?"":t.port,pathname:t.pathname,search:t.search,hash:t.hash,origin:null};"/"!==r.pathname[0]&&(r.pathname="/"+r.pathname),("http:"==r.protocol&&80==r.port||"https:"==r.protocol&&443==r.port)&&(r.port="",r.host=r.hostname),i=t.origin&&"null"!=t.origin?t.origin:"data:"!=r.protocol&&r.host?r.protocol+"//"+r.host:r.href,r.origin=i;var o=r;return n&&n.put(e,o),o}(Pt,t,Tt)}(t):t},jt="amp-viewer-integration";new(function(){function t(t){this.win=t,this.C_=!1,this.P_=!1,this.N_=null}var e=t.prototype;return e.init=function(){var t=this;I().fine(jt,"handshake init()");var e=x(this.win.document),n=M(e);this.C_="1"==n.getParam("webview"),this.P_=n.hasCapability("handshakepoll");var i,o=n.getParam("messagingToken"),s=n.getParam("origin")||"";if(!this.C_&&!s)return r();if(P(e).createFixedLayer(it),this.C_||this.P_){var a=(i=this.win).parent&&i.parent!=i?this.win.parent:null;return this.R_(a,s).then((function(i){return t.U_(n,e,s,new Rt(t.win,i,t.C_,o))}))}var h=function(t){var e=function(t){var e,n=u();if(!t)return n;for(;e=c.exec(t);){var i=l(e[1],e[1]),r=e[2]?l(e[2].replace(/\+/g," "),e[2]):"";n[i]=r}return n}(t.win.location.hash).highlight;if(!e||e.length>102400)return null;var n,i=(n=e,JSON.parse(n)),r=i.s;if(!(r instanceof Array)||r.length>15)return null;for(var o=0,s=0;s<r.length;s++){var a=r[s];if("string"!=typeof a||!a)return null;if((o+=a.length)>1500)return null}var h=!1;i.n&&(h=!0);var f=!1;return i.na&&(f=!0),{sentences:r,skipScrollAnimation:f,skipRendering:h}}(e);h&&(this.N_=new xt(e,h));var f=new Ot(this.win,s,this.win.parent);return this.U_(n,e,s,new Rt(this.win,f,this.C_,o))},e.R_=function(t,e){var n=this;return new Promise((function(i){var r=st(n.win,"message",(function(o){I().fine(jt,"AMPDOC got a pre-handshake message:",o.type,at(o));var s=Mt(at(o));if(s&&o.origin===e&&o.source===t&&"__AMPHTML__"==s.app&&"handshake-poll"==s.name){if(n.C_&&(!o.ports||!o.ports.length))throw new Error("Did not receive communication port from the Viewer!");var a=o.ports&&o.ports.length>0?o.ports[0]:new Ot(n.win,e,n.win.parent);i(a),r()}}))}))},e.U_=function(t,e,n,i){var r=this;I().fine(jt,"Send a handshake request");var o=e.getUrl(),s=function(t){if(!function(t){return Vt.cdnProxyRegex.test(Ut(t).origin)}(t=Ut(t)))return t.href;var e=t.pathname.split("/"),n=e[1];w(Dt.has(n),"Unknown path prefix in url %s",t.href);var i=e[2],r="s"==i?"https://"+decodeURIComponent(e[3]):"http://"+decodeURIComponent(i);return w(r.indexOf(".")>0,"Expected a . in origin %s",r),e.splice(1,"s"==i?3:2),r+e.join("/")+function(t){if(!t||"?"==t)return"";var e=new RegExp("[?&]".concat("(amp_(js[^&=]*|gsa|r|kit)|usqp)","\\b[^&]*"),"g"),n=t.replace(e,"").replace(/^[?&]/,"");return n?"?"+n:""}(t.search)+(t.hash||"")}(o);return i.sendRequest("channelOpen",{url:o,sourceUrl:s},!0).then((function(){I().fine(jt,"Channel has been opened!"),r.Am(i,t,n)}))},e.Am=function(t,e,n){t.setDefaultHandler((function(t,n,i){return e.receiveMessage(t,n,i)})),e.setMessageDeliverer(t.sendRequest.bind(t),n),ut(this.win,"unload",this.j_.bind(this,t)),(e.hasCapability("swipe")||e.hasCapability("touch"))&&this.q_(t),e.hasCapability("keyboard")&&this.z_(t),e.hasCapability("focus-rect")&&this.L_(t),null!=this.N_&&this.N_.setupMessaging(t)},e.j_=function(t){return t.sendRequest("unloaded",{},!0)},e.L_=function(t){new ht(this.win,t)},e.q_=function(t){new qt(this.win,t)},e.z_=function(t){new At(this.win,t)},t}())(t.win).init()}()}});
@@ -0,0 +1 @@
1
+ /*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */