@bentoproject/dailymotion
Advanced tools
Comparing version 1.2204121632.0 to 1.2204122000.0
; | ||
var n=Object.create,r=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return r(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||r(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=e(o,a))||i.enumerable});return n}(i(r(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function l(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function f(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?l(Object(e),!0).forEach((function(r){c(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)e=u[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}!function(n,e){for(var t in i(n),e)r(n,t,{get:e[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return mn}});var s=Array.isArray;function d(n){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function p(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function b(n,r){if(n){if("string"==typeof n)return p(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?p(n,r):void 0}}function m(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=b(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}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 y=Object.prototype;function g(n){var r=Object.create(null);return n&&Object.assign(r,n),r}y.hasOwnProperty,y.toString;var j,w=function(){var n=this;this.promise=new Promise((function(r,e){n.resolve=r,n.reject=e}))};function h(n){return new Promise((function(r){r(n())}))}function O(n){var r=Object.getOwnPropertyDescriptor(n,"message");if(null!=r&&r.writable)return n;var e=n.message,t=n.stack,o=new Error(e);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var r,e=null,t="",o=m(arguments,!0);!(r=o()).done;){var u=r.value;u instanceof Error&&!e?e=O(u):(t&&(t+=" "),t+=u)}return e?t&&(e.message=t+": "+e.message):e=new Error(t),e}function q(n){var r,e;null===(r=(e=self).__AMP_REPORT_ERROR)||void 0===r||r.call(e,n)}function I(n){var r=S.apply(null,arguments);return r.expected=!0,r}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,r,e,t,o){var u=function(n,r,e){if(r.startsWith("--"))return r;j||(j=g());var t=j[r];if(!t||e){if(t=r,void 0===n[r]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(r),u=function(n,r){for(var e=0;e<k.length;e++){var t=k[e]+r;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}e||(j[r]=t)}return t}(n.style,r,o);if(u){var i,a=t?e+t:e;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function E(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var r,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,r){for(var e in r)C(n,e,r[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),r=e,h((function(){return r.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var P=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function A(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return r}}var M={bubbles:!0,cancelable:!0};function R(n,r,e,t){var o=e||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||M,a=i.bubbles,c=i.cancelable;u.initEvent(r,a,c),n.dispatchEvent(u)}function N(n,r){return function(n,r,e){if(!r)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(r):"?".concat(r))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var r,e,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((r=u,e=i[a],"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(r))}function T(n,r){return JSON.stringify({"command":n,"parameters":r})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("./@bentoproject/core")),L=a(require("./@bentoproject/core")),z=a(require("./@bentoproject/core"));function F(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,u=[],i=!0,a=!1;try{for(e=e.call(n);!(i=(t=e.next()).done)&&(u.push(t.value),!r||u.length!==r);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}}(n,r)||b(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(n){var r=function(n,r){if("object"!==d(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var t=e.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(r)?r:String(r)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("./@bentoproject/core")),W=a(require("./@bentoproject/core")),J=a(require("./@bentoproject/core")),Y=a(require("./@bentoproject/core")),_=a(require("./@bentoproject/core")),H=a(require("./@bentoproject/core")),Z=a(require("./@bentoproject/core")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var r=n.querySelector('script[type="application/ld+json"]');if(r){var e=function(n,r){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function K(n){var r=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return r?r.getAttribute("href"):void 0}function Q(n){var r=n.displayIcon,e=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,r&&V.createElement("div",{class:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(en,null)),e&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,rn,en=(X=!1,nn=null,rn=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{class:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];nn=rn.apply(self,r),X=!0,rn=null}return nn}),tn=(0,J.forwardRef)((function(n,r){var e,t="class",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,b=n.mediasession,m=void 0===b||b,y=n.noaudio,g=void 0!==y&&y,j=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,E=n.style,P=n[t],A=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));e=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var M=(0,_.useAmpContext)().playable,R=(0,_.useLoading)(s),N="unload"!==R,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],rn=X[1],en=F((0,W.useState)(!u),2),tn=en[0],on=en[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new w}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,r){if(n!==ln.current){ln.current=n;var e=fn.current;e&&e(n,r)}}),[fn]),sn=(0,Y.useValueRef)(j),dn=(0,W.useCallback)((function(n){J(n);var r=sn.current;r&&r(n)}),[sn]);(0,W.useLayoutEffect)((function(){N||dn(!1)}),[N,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(r=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];q(I.apply(null,e))}("TRYPLAY",n)})),r;var n,r}))}),[cn]),bn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),mn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,r=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=r&&vn(r>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return m&&z&&nn&&function(n,r,e,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(r),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,bn),function(){}}),[m,z,nn,pn,bn]),(0,W.useEffect)((function(){M||bn()}),[M,bn]),(0,W.useImperativeHandle)(r,(function(){return{get readyState(){return ln.current},play:pn,pause:bn,requestFullscreen:mn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,bn,mn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,class:P,style:E,size:!0,layout:!0,paint:!0},N&&V.createElement(a,f(f({},A),{},{ref:an,loading:R,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){m&&cn.promise.then((function(){var n,r,e,t;rn((n=an.current,f({"title":(r=A).title||r["aria-label"]||document.title,"artist":r.artist||"","album":r.album||"","artwork":[{"src":r.artwork||r.poster||G(document)||(e=document,t=e.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},class:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:bn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,r,e){n&&n.contentWindow&&r.then((function(){n.contentWindow.postMessage(e(),"*")}))}var cn=(0,z.forwardRef)((function(n,r){var e=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,b=n.onMessage,m=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,j=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new w}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(r,(function(){return{get currentTime(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.currentTime)&&void 0!==n?n:NaN},get duration(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[m,I,C,S.promise,o]);var E=function(n){var r=(0,L.useRef)(null);return r.current=n,r}(b);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",r),function(){return n.removeEventListener("message",r)}}function r(n){E.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||E.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,E]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:e,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==j||j(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,r){return U.createElement(tn,f(f({ref:r},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("./@bentoproject/core")),vn=a(require("./@bentoproject/core")),sn=a(require("./@bentoproject/core")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function bn(n){var r=n.currentTarget,e=function(n){var r,e=g();if(!n)return e;for(;r=P.exec(n);){var t=A(r[1],r[1]),o=r[2]?A(r[2].replace(/\+/g," "),r[2]):"";e[t]=o}return e}(n.data),t=null==e?void 0:e.event;"pause"===t?R(r,"pause"):"play"===t?R(r,"playing"):"end"===t?(R(r,"pause"),R(r,"end")):"apiready"===t&&R(r,"canplay")}function mn(n,r){var e=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return N("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(r),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||e&&E(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,e,t,o,u,i,a,c,l)}),[s,e,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:e,controls:!0,ref:r},d),{},{src:p,makeMethodMessage:pn,onMessage:bn}))}var yn=(0,sn.forwardRef)(mn);yn.displayName="BentoDailymotion"; | ||
var n=Object.create,r=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return r(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||r(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=e(o,a))||i.enumerable});return n}(i(r(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function l(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function f(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?l(Object(e),!0).forEach((function(r){c(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)e=u[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}!function(n,e){for(var t in i(n),e)r(n,t,{get:e[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return mn}});var s=Array.isArray;function d(n){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function p(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function b(n,r){if(n){if("string"==typeof n)return p(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?p(n,r):void 0}}function m(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=b(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}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 y=Object.prototype;function g(n){var r=Object.create(null);return n&&Object.assign(r,n),r}y.hasOwnProperty,y.toString;var j,w=function(){var n=this;this.promise=new Promise((function(r,e){n.resolve=r,n.reject=e}))};function h(n){return new Promise((function(r){r(n())}))}function O(n){var r=Object.getOwnPropertyDescriptor(n,"message");if(null!=r&&r.writable)return n;var e=n.message,t=n.stack,o=new Error(e);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var r,e=null,t="",o=m(arguments,!0);!(r=o()).done;){var u=r.value;u instanceof Error&&!e?e=O(u):(t&&(t+=" "),t+=u)}return e?t&&(e.message=t+": "+e.message):e=new Error(t),e}function q(n){var r,e;null===(r=(e=self).__AMP_REPORT_ERROR)||void 0===r||r.call(e,n)}function I(n){var r=S.apply(null,arguments);return r.expected=!0,r}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,r,e,t,o){var u=function(n,r,e){if(r.startsWith("--"))return r;j||(j=g());var t=j[r];if(!t||e){if(t=r,void 0===n[r]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(r),u=function(n,r){for(var e=0;e<k.length;e++){var t=k[e]+r;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}e||(j[r]=t)}return t}(n.style,r,o);if(u){var i,a=t?e+t:e;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function E(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var r,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,r){for(var e in r)C(n,e,r[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),r=e,h((function(){return r.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var P=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function A(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return r}}var M={bubbles:!0,cancelable:!0};function R(n,r,e,t){var o=e||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||M,a=i.bubbles,c=i.cancelable;u.initEvent(r,a,c),n.dispatchEvent(u)}function N(n,r){return function(n,r,e){if(!r)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(r):"?".concat(r))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var r,e,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((r=u,e=i[a],"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(r))}function T(n,r){return JSON.stringify({"command":n,"parameters":r})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("@bentoproject/core")),L=a(require("@bentoproject/core")),z=a(require("@bentoproject/core"));function F(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,u=[],i=!0,a=!1;try{for(e=e.call(n);!(i=(t=e.next()).done)&&(u.push(t.value),!r||u.length!==r);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}}(n,r)||b(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(n){var r=function(n,r){if("object"!==d(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var t=e.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(r)?r:String(r)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("@bentoproject/core")),W=a(require("@bentoproject/core")),J=a(require("@bentoproject/core")),Y=a(require("@bentoproject/core")),_=a(require("@bentoproject/core")),H=a(require("@bentoproject/core")),Z=a(require("@bentoproject/core")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var r=n.querySelector('script[type="application/ld+json"]');if(r){var e=function(n,r){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function K(n){var r=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return r?r.getAttribute("href"):void 0}function Q(n){var r=n.displayIcon,e=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,r&&V.createElement("div",{class:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(en,null)),e&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,rn,en=(X=!1,nn=null,rn=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{class:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];nn=rn.apply(self,r),X=!0,rn=null}return nn}),tn=(0,J.forwardRef)((function(n,r){var e,t="class",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,b=n.mediasession,m=void 0===b||b,y=n.noaudio,g=void 0!==y&&y,j=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,E=n.style,P=n[t],A=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));e=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var M=(0,_.useAmpContext)().playable,R=(0,_.useLoading)(s),N="unload"!==R,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],rn=X[1],en=F((0,W.useState)(!u),2),tn=en[0],on=en[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new w}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,r){if(n!==ln.current){ln.current=n;var e=fn.current;e&&e(n,r)}}),[fn]),sn=(0,Y.useValueRef)(j),dn=(0,W.useCallback)((function(n){J(n);var r=sn.current;r&&r(n)}),[sn]);(0,W.useLayoutEffect)((function(){N||dn(!1)}),[N,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(r=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];q(I.apply(null,e))}("TRYPLAY",n)})),r;var n,r}))}),[cn]),bn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),mn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,r=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=r&&vn(r>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return m&&z&&nn&&function(n,r,e,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(r),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,bn),function(){}}),[m,z,nn,pn,bn]),(0,W.useEffect)((function(){M||bn()}),[M,bn]),(0,W.useImperativeHandle)(r,(function(){return{get readyState(){return ln.current},play:pn,pause:bn,requestFullscreen:mn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,bn,mn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,class:P,style:E,size:!0,layout:!0,paint:!0},N&&V.createElement(a,f(f({},A),{},{ref:an,loading:R,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){m&&cn.promise.then((function(){var n,r,e,t;rn((n=an.current,f({"title":(r=A).title||r["aria-label"]||document.title,"artist":r.artist||"","album":r.album||"","artwork":[{"src":r.artwork||r.poster||G(document)||(e=document,t=e.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},class:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:bn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,r,e){n&&n.contentWindow&&r.then((function(){n.contentWindow.postMessage(e(),"*")}))}var cn=(0,z.forwardRef)((function(n,r){var e=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,b=n.onMessage,m=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,j=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new w}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(r,(function(){return{get currentTime(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.currentTime)&&void 0!==n?n:NaN},get duration(){var n,r;return null!==(n=null==m||null===(r=m.current)||void 0===r?void 0:r.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[m,I,C,S.promise,o]);var E=function(n){var r=(0,L.useRef)(null);return r.current=n,r}(b);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",r),function(){return n.removeEventListener("message",r)}}function r(n){E.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||E.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,E]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:e,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==j||j(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,r){return U.createElement(tn,f(f({ref:r},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("@bentoproject/core")),vn=a(require("@bentoproject/core")),sn=a(require("@bentoproject/core")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function bn(n){var r=n.currentTarget,e=function(n){var r,e=g();if(!n)return e;for(;r=P.exec(n);){var t=A(r[1],r[1]),o=r[2]?A(r[2].replace(/\+/g," "),r[2]):"";e[t]=o}return e}(n.data),t=null==e?void 0:e.event;"pause"===t?R(r,"pause"):"play"===t?R(r,"playing"):"end"===t?(R(r,"pause"),R(r,"end")):"apiready"===t&&R(r,"canplay")}function mn(n,r){var e=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return N("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(r),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||e&&E(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,e,t,o,u,i,a,c,l)}),[s,e,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:e,controls:!0,ref:r},d),{},{src:p,makeMethodMessage:pn,onMessage:bn}))}var yn=(0,sn.forwardRef)(mn);yn.displayName="BentoDailymotion"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.js.map |
@@ -573,5 +573,5 @@ var __create = Object.create; | ||
// src/bento/components/bento-video/1.0/video-iframe.js | ||
var Preact2 = __toModule(require("./@bentoproject/core")); | ||
var import_preact2 = __toModule(require("./@bentoproject/core")); | ||
var import_compat2 = __toModule(require("./@bentoproject/core")); | ||
var Preact2 = __toModule(require("@bentoproject/core")); | ||
var import_preact2 = __toModule(require("@bentoproject/core")); | ||
var import_compat2 = __toModule(require("@bentoproject/core")); | ||
@@ -622,11 +622,11 @@ // src/bento/components/bento-video/1.0/autoplay.jss.js | ||
// src/bento/components/bento-video/1.0/component.js | ||
var Preact = __toModule(require("./@bentoproject/core")); | ||
var import_preact = __toModule(require("./@bentoproject/core")); | ||
var import_compat = __toModule(require("./@bentoproject/core")); | ||
var import_component3 = __toModule(require("./@bentoproject/core")); | ||
var import_context2 = __toModule(require("./@bentoproject/core")); | ||
var Preact = __toModule(require("@bentoproject/core")); | ||
var import_preact = __toModule(require("@bentoproject/core")); | ||
var import_compat = __toModule(require("@bentoproject/core")); | ||
var import_component3 = __toModule(require("@bentoproject/core")); | ||
var import_context2 = __toModule(require("@bentoproject/core")); | ||
// src/preact/utils.js | ||
var import__ = __toModule(require("./@bentoproject/core")); | ||
var import_context = __toModule(require("./@bentoproject/core")); | ||
var import__ = __toModule(require("@bentoproject/core")); | ||
var import_context = __toModule(require("@bentoproject/core")); | ||
function useResourcesNotify() { | ||
@@ -1126,5 +1126,5 @@ var _useAmpContext = (0, import_context.useAmpContext)(), notify = _useAmpContext.notify; | ||
// src/bento/components/bento-dailymotion/1.0/component.js | ||
var Preact3 = __toModule(require("./@bentoproject/core")); | ||
var import_preact3 = __toModule(require("./@bentoproject/core")); | ||
var import_compat3 = __toModule(require("./@bentoproject/core")); | ||
var Preact3 = __toModule(require("@bentoproject/core")); | ||
var import_preact3 = __toModule(require("@bentoproject/core")); | ||
var import_compat3 = __toModule(require("@bentoproject/core")); | ||
var _excluded2 = ["autoplay", "endscreenEnable", "info", "mute", "sharingEnable", "start", "uiHighlight", "uiLogo", "videoId"]; | ||
@@ -1131,0 +1131,0 @@ function _extends4() { |
@@ -462,5 +462,5 @@ // src/core/mode/minified.js | ||
createElement as createElement2 | ||
} from "./@bentoproject/core"; | ||
import { useCallback as useCallback3, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2 } from "./@bentoproject/core"; | ||
import { forwardRef as forwardRef2 } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useCallback as useCallback3, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2 } from "@bentoproject/core"; | ||
import { forwardRef as forwardRef2 } from "@bentoproject/core"; | ||
@@ -518,11 +518,11 @@ // src/bento/components/bento-video/1.0/autoplay.jss.js | ||
createElement | ||
} from "./@bentoproject/core"; | ||
import { useCallback as useCallback2, useEffect, useImperativeHandle, useLayoutEffect as useLayoutEffect2, useMemo, useRef, useState } from "./@bentoproject/core"; | ||
import { forwardRef } from "./@bentoproject/core"; | ||
import { ContainWrapper, useValueRef } from "./@bentoproject/core"; | ||
import { useAmpContext as useAmpContext2, useLoading } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useCallback as useCallback2, useEffect, useImperativeHandle, useLayoutEffect as useLayoutEffect2, useMemo, useRef, useState } from "@bentoproject/core"; | ||
import { forwardRef } from "@bentoproject/core"; | ||
import { ContainWrapper, useValueRef } from "@bentoproject/core"; | ||
import { useAmpContext as useAmpContext2, useLoading } from "@bentoproject/core"; | ||
// src/preact/utils.js | ||
import { useCallback, useLayoutEffect } from "./@bentoproject/core"; | ||
import { useAmpContext } from "./@bentoproject/core"; | ||
import { useCallback, useLayoutEffect } from "@bentoproject/core"; | ||
import { useAmpContext } from "@bentoproject/core"; | ||
function useResourcesNotify() { | ||
@@ -1043,5 +1043,5 @@ const { | ||
createElement as createElement3 | ||
} from "./@bentoproject/core"; | ||
import { useMemo as useMemo3 } from "./@bentoproject/core"; | ||
import { forwardRef as forwardRef3 } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useMemo as useMemo3 } from "@bentoproject/core"; | ||
import { forwardRef as forwardRef3 } from "@bentoproject/core"; | ||
var _excluded2 = ["autoplay", "endscreenEnable", "info", "mute", "sharingEnable", "start", "uiHighlight", "uiLogo", "videoId"]; | ||
@@ -1048,0 +1048,0 @@ function _extends4() { |
; | ||
function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function t(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?n(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}var{isArray:r}=Array,{hasOwnProperty:a,toString:i}=Object.prototype;function l(e){const n=Object.create(null);return e&&Object.assign(n,e),n}var u,c=class{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}};function s(e){return new Promise((n=>{n(e())}))}function f(e){const n=Object.getOwnPropertyDescriptor(e,"message");if(null!=n&&n.writable)return e;const{message:t,stack:o}=e,r=new Error(t);for(const n in e)r[n]=e[n];return r.stack=o,r}function d(e){let n=null,t="";for(const e of arguments)e instanceof Error&&!n?n=f(e):(t&&(t+=" "),t+=e);return n?t&&(n.message=t+": "+n.message):n=new Error(t),n}function p(e){const n=d.apply(null,arguments);return n.expected=!0,n}function m(e,...n){var t,o,r;t=p.apply(null,n),null===(o=(r=self).__AMP_REPORT_ERROR)||void 0===o||o.call(r,t)}var y=["Webkit","webkit","Moz","moz","ms","O","o"];function b(e,n,t,o,r){const a=function(e,n,t){if(n.startsWith("--"))return n;u||(u=l());let o=u[n];if(!o||t){if(o=n,void 0===e[n]){const t=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(n),r=function(e,n){for(let t=0;t<y.length;t++){const o=y[t]+n;if(void 0!==e[o])return o}return""}(e,t);void 0!==e[r]&&(o=r)}t||(u[n]=o)}return o}(e.style,n,r);if(!a)return;const i=o?t+o:t;e.style.setProperty(function(e){const n=e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()));return y.some((e=>n.startsWith(e+"-")))?`-${n}`:n}(a),i)}function v(e){return null==e.__AMP_AUTOPLAY&&(e.__AMP_AUTOPLAY=function(e){const n=e.document.createElement("video");var t;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,function(e,n){for(const t in n)b(e,t,n[t])}(n,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),t=n,s((()=>t.play())).catch((()=>{})),Promise.resolve(!n.paused)}(e)),e.__AMP_AUTOPLAY}var g=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function w(e,n=""){try{return decodeURIComponent(e)}catch(e){return n}}var h={bubbles:!0,cancelable:!0};function j(e,n,t,o){const r=t||{};e.ownerDocument;const a=e.ownerDocument.createEvent("Event");a.data=r;const{bubbles:i,cancelable:l}=o||h;a.initEvent(n,i,l),e.dispatchEvent(a)}function O(e,n){return JSON.stringify({"command":e,"parameters":n})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);import{createElement as k}from"./@bentoproject/core";import{useCallback as S,useImperativeHandle as C,useLayoutEffect as E,useMemo as I,useRef as M}from"./@bentoproject/core";import{forwardRef as P}from"./@bentoproject/core";function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){var n=function(e,n){if("object"!==R(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==R(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===R(n)?n:String(n)}import{Fragment as L,createElement as N}from"./@bentoproject/core";import{useCallback as $,useEffect as q,useImperativeHandle as F,useLayoutEffect as T,useMemo as U,useRef as A,useState as V}from"./@bentoproject/core";import{forwardRef as z}from"./@bentoproject/core";import{ContainWrapper as H,useValueRef as J}from"./@bentoproject/core";import{useAmpContext as W,useLoading as B}from"./@bentoproject/core";import{useCallback as D,useLayoutEffect as Z}from"./@bentoproject/core";import{useAmpContext as G}from"./@bentoproject/core";var K={"title":"","artist":"","album":"","artwork":[{"src":""}]};function Q(e){const n=e.querySelector('script[type="application/ld+json"]');if(!n)return;const t=function(e,n){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null}}(n.textContent);return t&&t.image?"string"==typeof t.image?t.image:t.image["@list"]&&"string"==typeof t.image["@list"][0]?t.image["@list"][0]:"string"==typeof t.image.url?t.image.url:"string"==typeof t.image[0]?t.image[0]:void 0:void 0}function X(e){const n=e.querySelector('meta[property="og:image"]');return n?n.getAttribute("content"):void 0}function Y(e){const n=e.querySelector('link[rel="shortcut icon"]')||e.querySelector('link[rel="icon"]');return n?n.getAttribute("href"):void 0}function _({displayIcon:e,displayOverlay:n,metadata:t,onOverlayClick:o,pause:r,play:a,playing:i,wrapperRef:l}){const{playable:u}=W();return q((()=>{if(!u)return void r();const e=new IntersectionObserver((e=>{e[e.length-1].isIntersecting?a().catch((()=>{})):r()}),{threshold:.5});return e.observe(l.current),()=>{e.disconnect()}}),[l,a,r,u]),N(L,null,e&&N("div",{class:"eq-9e7199f"+(i?" eq-playing-9e7199f":"")},N(ee,null)),n&&N("button",{"aria-label":t&&t.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var ee=function(e){let n=!1,t=null,o=()=>[1,2,3,4].map((e=>N("div",{class:"eq-col-9e7199f",key:e})));return(...e)=>(n||(t=o.apply(self,e),n=!0,o=null),t)}(),ne=z((function(e,n){let r="class",{autoplay:a=!1,component:i="video",controls:l=!1,loading:u,loop:f=!1,mediasession:d=!0,noaudio:p=!1,onPlayingState:y,onReadyState:b,poster:v,sources:g,src:w,style:h,[r]:j}=e,O=o(e,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(x));!function(){const{notify:e}=G();Z((()=>{e&&e()}))}();const{playable:k}=W(),S=B(u),C="unload"!==S,[E,I]=V(a),[M,P]=V(!1),[R,L]=V(null),[z,D]=V(!a),ee=A(null),ne=A(null),te=U((()=>new c),[]),oe=A("loading"),re=J(b),ae=$(((e,n)=>{if(e!==oe.current){oe.current=e;const t=re.current;t&&t(e,n)}}),[re]),ie=J(y),le=$((e=>{P(e);const n=ie.current;n&&n(e)}),[ie]);T((()=>{C||le(!1)}),[C,le]);const ue=$((()=>te.promise.then((()=>function(e,n){const t=s((()=>e.play(!1)));return t.catch((e=>{m(0,e)})),t}(ne.current)))),[te]),ce=$((()=>{te.promise.then((()=>{var e;return null===(e=ne.current)||void 0===e?void 0:e.pause()}))}),[te]),se=$((()=>te.promise.then((()=>ne.current.requestFullscreen()))),[te]),fe=$((()=>{I(!1),D(!0)}),[]);return T((()=>{var e;const n=null===(e=ne.current)||void 0===e?void 0:e.readyState;null!=n&&ae(n>0?"complete":"loading")}),[ae]),T((()=>(d&&M&&R&&function(e,n,t,o){const{navigator:r}=e;"mediaSession"in r&&e.MediaMetadata&&(r.mediaSession.metadata=new e.MediaMetadata(K),r.mediaSession.metadata=new e.MediaMetadata(n),r.mediaSession.setActionHandler("play",t),r.mediaSession.setActionHandler("pause",o))}(window,R,ue,ce),()=>{})),[d,M,R,ue,ce]),q((()=>{k||ce()}),[k,ce]),F(n,(()=>({get readyState(){return oe.current},play:ue,pause:ce,requestFullscreen:se,get currentTime(){return ne.current?ne.current.currentTime:0},get duration(){return ne.current?ne.current.duration:NaN},get autoplay(){return a},get controls(){return l},get loop(){return f},userInteracted:fe,mute:()=>I(!0),unmute:()=>{z&&I(!1)}})),[ue,ce,se,fe,z,a,l,f]),N(H,{contentRef:ee,class:j,style:h,size:!0,layout:!0,paint:!0},C&&N(i,t(t({},O),{},{ref:ne,loading:S,muted:E,loop:f,controls:l&&(!a||z),onCanPlay:()=>{te.resolve(),ae("complete")},onLoadedMetadata:()=>{d&&te.promise.then((()=>{var e,n;L((e=ne.current,t({"title":(n=O).title||n["aria-label"]||document.title,"artist":n.artist||"","album":n.album||"","artwork":[{"src":n.artwork||n.poster||Q(document)||X(document)||Y(document)||""}]},e&&e.getMetadata?e.getMetadata():Object.create(null))))})),ae("complete")},onPlaying:()=>le(!0),onPause:()=>le(!1),onEnded:()=>le(!1),onError:e=>{ae("error",e),te.reject(e)},class:"fill-stretch-fc551a7",src:w,poster:v}),g),a&&!z&&N(_,{metadata:R,playing:M,displayIcon:!p&&E,wrapperRef:ee,play:ue,pause:ce,displayOverlay:l,onOverlayClick:fe}))}));ne.displayName="VideoWrapper";var te=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],oe=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function re(e,n,t){e&&e.contentWindow&&n.then((()=>{e.contentWindow.postMessage(t(),"*")}))}var ae=P((function(e,n){let{loading:r,unloadOnPause:a=!1,sandbox:i=oe,muted:l=!1,controls:u=!1,origin:s,onCanPlay:f,onMessage:d,playerStateRef:p,makeMethodMessage:m,makeFullscreenMessage:y,onIframeLoad:b}=e,v=o(e,te);const g=M(null),w=I((()=>new c),[]),h=M(m),j=S((e=>{re(null==g?void 0:g.current,w.promise,(()=>h.current(e)))}),[w.promise]),O=M(y),P=S((()=>re(null==g?void 0:g.current,w.promise,O.current)),[w.promise]);C(n,(()=>({get currentTime(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:NaN},get duration(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.duration)&&void 0!==e?e:NaN},requestFullscreen:()=>{if(!O.current)return w.promise.then((()=>{g.current.requestFullscreen()}));P()},play:()=>j("play"),pause:()=>{if(a){const e=g.current;e&&(e.src=e.src)}else j("pause")}})),[p,j,P,w.promise,a]);const R=function(e){const n=M(null);return n.current=e,n}(d);return E((()=>{if(!g.current)return;function e(e){R.current&&(s&&!s.test(e.origin)||e.source!=g.current.contentWindow||R.current({currentTarget:g.current,target:g.current,data:e.data}))}const{defaultView:n}=g.current.ownerDocument;return n.addEventListener("message",e),()=>n.removeEventListener("message",e)}),[s,R]),E((()=>{j(l?"mute":"unmute")}),[l,j]),E((()=>{j(u?"showControls":"hideControls")}),[u,j]),k("iframe",t(t({},v),{},{ref:g,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:r,onCanPlay:()=>{f&&w.promise.then(f),w.resolve()},onLoad:e=>{null==b||b(e)}}))}));ae.displayName="VideoIframeInternal";var ie=P((function(e,n){return k(ne,t(t({ref:n},e),{},{component:ae}))}));ie.displayName="VideoIframe";import{createElement as le}from"./@bentoproject/core";import{useMemo as ue}from"./@bentoproject/core";import{forwardRef as ce}from"./@bentoproject/core";var se=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function fe(e){switch(e){case"mute":return O("muted",[!0]);case"unmute":return O("muted",[!1]);case"showControls":return O("controls",[!0]);case"hideControls":return O("controls",[!1]);default:return O(e)}}function de({currentTarget:e,data:n}){const t=function(e){const n=l();if(!e)return n;let t;for(;t=g.exec(e);){const e=w(t[1],t[1]),o=t[2]?w(t[2].replace(/\+/g," "),t[2]):"";n[e]=o}return n}(n),o=null==t?void 0:t.event;"pause"===o?j(e,"pause"):"play"===o?j(e,"playing"):"end"===o?(j(e,"pause"),j(e,"end")):"apiready"===o&&j(e,"canplay")}function pe(e,n){let{autoplay:a,endscreenEnable:i,info:l,mute:u,sharingEnable:c,start:s,uiHighlight:f,uiLogo:d,videoId:p}=e,m=o(e,se);const y=ue((()=>function(e,n,o=!1,a=!0,i=!0,l=!1,u=!0,c,s,f=!0,d){return function(e,n,t){if(!n)return e;const o=e.split("#",2),r=o[0].split("?",2);let a=r[0]+(r[1]?`?${r[1]}&${n}`:`?${n}`);return a+=o[1]?`#${o[1]}`:"",a}(`https://www.dailymotion.com/embed/video/${encodeURIComponent(n)}?api=1&html=1&app=amp`,function(e){const n=[];for(const i in e){let l=e[i];if(null!=l){l=r(a=l)?a:[a];for(let e=0;e<l.length;e++)n.push((t=i,o=l[e],`${encodeURIComponent(t)}=${encodeURIComponent(o)}`))}}var t,o,a;return n.join("&")}(t({"endscreen-enable":a?void 0:a,"info":i?void 0:i,"mute":l||o&&v(e)?1:void 0,"sharing-enable":u?void 0:u,"start":c,"ui-highlight":s,"ui-logo":f?void 0:f},d)))}(window,p,a,i,l,u,c,s,f,d)),[p,a,i,l,u,c,s,f,d]);return le(ie,t(t({autoplay:a,controls:!0,ref:n},m),{},{src:y,makeMethodMessage:fe,onMessage:de}))}var me=ce(pe);me.displayName="BentoDailymotion";export{me as BentoDailymotion,pe as BentoDailymotionWithRef}; | ||
function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function t(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?n(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}var{isArray:r}=Array,{hasOwnProperty:a,toString:i}=Object.prototype;function l(e){const n=Object.create(null);return e&&Object.assign(n,e),n}var u,c=class{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}};function s(e){return new Promise((n=>{n(e())}))}function f(e){const n=Object.getOwnPropertyDescriptor(e,"message");if(null!=n&&n.writable)return e;const{message:t,stack:o}=e,r=new Error(t);for(const n in e)r[n]=e[n];return r.stack=o,r}function d(e){let n=null,t="";for(const e of arguments)e instanceof Error&&!n?n=f(e):(t&&(t+=" "),t+=e);return n?t&&(n.message=t+": "+n.message):n=new Error(t),n}function p(e){const n=d.apply(null,arguments);return n.expected=!0,n}function m(e,...n){var t,o,r;t=p.apply(null,n),null===(o=(r=self).__AMP_REPORT_ERROR)||void 0===o||o.call(r,t)}var y=["Webkit","webkit","Moz","moz","ms","O","o"];function b(e,n,t,o,r){const a=function(e,n,t){if(n.startsWith("--"))return n;u||(u=l());let o=u[n];if(!o||t){if(o=n,void 0===e[n]){const t=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(n),r=function(e,n){for(let t=0;t<y.length;t++){const o=y[t]+n;if(void 0!==e[o])return o}return""}(e,t);void 0!==e[r]&&(o=r)}t||(u[n]=o)}return o}(e.style,n,r);if(!a)return;const i=o?t+o:t;e.style.setProperty(function(e){const n=e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()));return y.some((e=>n.startsWith(e+"-")))?`-${n}`:n}(a),i)}function v(e){return null==e.__AMP_AUTOPLAY&&(e.__AMP_AUTOPLAY=function(e){const n=e.document.createElement("video");var t;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,function(e,n){for(const t in n)b(e,t,n[t])}(n,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),t=n,s((()=>t.play())).catch((()=>{})),Promise.resolve(!n.paused)}(e)),e.__AMP_AUTOPLAY}var g=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function w(e,n=""){try{return decodeURIComponent(e)}catch(e){return n}}var h={bubbles:!0,cancelable:!0};function j(e,n,t,o){const r=t||{};e.ownerDocument;const a=e.ownerDocument.createEvent("Event");a.data=r;const{bubbles:i,cancelable:l}=o||h;a.initEvent(n,i,l),e.dispatchEvent(a)}function O(e,n){return JSON.stringify({"command":e,"parameters":n})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);import{createElement as k}from"@bentoproject/core";import{useCallback as S,useImperativeHandle as C,useLayoutEffect as E,useMemo as I,useRef as M}from"@bentoproject/core";import{forwardRef as P}from"@bentoproject/core";function R(e){return(R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function x(e){var n=function(e,n){if("object"!==R(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==R(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===R(n)?n:String(n)}import{Fragment as L,createElement as N}from"@bentoproject/core";import{useCallback as $,useEffect as q,useImperativeHandle as F,useLayoutEffect as T,useMemo as U,useRef as A,useState as V}from"@bentoproject/core";import{forwardRef as z}from"@bentoproject/core";import{ContainWrapper as H,useValueRef as J}from"@bentoproject/core";import{useAmpContext as W,useLoading as B}from"@bentoproject/core";import{useCallback as D,useLayoutEffect as Z}from"@bentoproject/core";import{useAmpContext as G}from"@bentoproject/core";var K={"title":"","artist":"","album":"","artwork":[{"src":""}]};function Q(e){const n=e.querySelector('script[type="application/ld+json"]');if(!n)return;const t=function(e,n){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null}}(n.textContent);return t&&t.image?"string"==typeof t.image?t.image:t.image["@list"]&&"string"==typeof t.image["@list"][0]?t.image["@list"][0]:"string"==typeof t.image.url?t.image.url:"string"==typeof t.image[0]?t.image[0]:void 0:void 0}function X(e){const n=e.querySelector('meta[property="og:image"]');return n?n.getAttribute("content"):void 0}function Y(e){const n=e.querySelector('link[rel="shortcut icon"]')||e.querySelector('link[rel="icon"]');return n?n.getAttribute("href"):void 0}function _({displayIcon:e,displayOverlay:n,metadata:t,onOverlayClick:o,pause:r,play:a,playing:i,wrapperRef:l}){const{playable:u}=W();return q((()=>{if(!u)return void r();const e=new IntersectionObserver((e=>{e[e.length-1].isIntersecting?a().catch((()=>{})):r()}),{threshold:.5});return e.observe(l.current),()=>{e.disconnect()}}),[l,a,r,u]),N(L,null,e&&N("div",{class:"eq-9e7199f"+(i?" eq-playing-9e7199f":"")},N(ee,null)),n&&N("button",{"aria-label":t&&t.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var ee=function(e){let n=!1,t=null,o=()=>[1,2,3,4].map((e=>N("div",{class:"eq-col-9e7199f",key:e})));return(...e)=>(n||(t=o.apply(self,e),n=!0,o=null),t)}(),ne=z((function(e,n){let r="class",{autoplay:a=!1,component:i="video",controls:l=!1,loading:u,loop:f=!1,mediasession:d=!0,noaudio:p=!1,onPlayingState:y,onReadyState:b,poster:v,sources:g,src:w,style:h,[r]:j}=e,O=o(e,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(x));!function(){const{notify:e}=G();Z((()=>{e&&e()}))}();const{playable:k}=W(),S=B(u),C="unload"!==S,[E,I]=V(a),[M,P]=V(!1),[R,L]=V(null),[z,D]=V(!a),ee=A(null),ne=A(null),te=U((()=>new c),[]),oe=A("loading"),re=J(b),ae=$(((e,n)=>{if(e!==oe.current){oe.current=e;const t=re.current;t&&t(e,n)}}),[re]),ie=J(y),le=$((e=>{P(e);const n=ie.current;n&&n(e)}),[ie]);T((()=>{C||le(!1)}),[C,le]);const ue=$((()=>te.promise.then((()=>function(e,n){const t=s((()=>e.play(!1)));return t.catch((e=>{m(0,e)})),t}(ne.current)))),[te]),ce=$((()=>{te.promise.then((()=>{var e;return null===(e=ne.current)||void 0===e?void 0:e.pause()}))}),[te]),se=$((()=>te.promise.then((()=>ne.current.requestFullscreen()))),[te]),fe=$((()=>{I(!1),D(!0)}),[]);return T((()=>{var e;const n=null===(e=ne.current)||void 0===e?void 0:e.readyState;null!=n&&ae(n>0?"complete":"loading")}),[ae]),T((()=>(d&&M&&R&&function(e,n,t,o){const{navigator:r}=e;"mediaSession"in r&&e.MediaMetadata&&(r.mediaSession.metadata=new e.MediaMetadata(K),r.mediaSession.metadata=new e.MediaMetadata(n),r.mediaSession.setActionHandler("play",t),r.mediaSession.setActionHandler("pause",o))}(window,R,ue,ce),()=>{})),[d,M,R,ue,ce]),q((()=>{k||ce()}),[k,ce]),F(n,(()=>({get readyState(){return oe.current},play:ue,pause:ce,requestFullscreen:se,get currentTime(){return ne.current?ne.current.currentTime:0},get duration(){return ne.current?ne.current.duration:NaN},get autoplay(){return a},get controls(){return l},get loop(){return f},userInteracted:fe,mute:()=>I(!0),unmute:()=>{z&&I(!1)}})),[ue,ce,se,fe,z,a,l,f]),N(H,{contentRef:ee,class:j,style:h,size:!0,layout:!0,paint:!0},C&&N(i,t(t({},O),{},{ref:ne,loading:S,muted:E,loop:f,controls:l&&(!a||z),onCanPlay:()=>{te.resolve(),ae("complete")},onLoadedMetadata:()=>{d&&te.promise.then((()=>{var e,n;L((e=ne.current,t({"title":(n=O).title||n["aria-label"]||document.title,"artist":n.artist||"","album":n.album||"","artwork":[{"src":n.artwork||n.poster||Q(document)||X(document)||Y(document)||""}]},e&&e.getMetadata?e.getMetadata():Object.create(null))))})),ae("complete")},onPlaying:()=>le(!0),onPause:()=>le(!1),onEnded:()=>le(!1),onError:e=>{ae("error",e),te.reject(e)},class:"fill-stretch-fc551a7",src:w,poster:v}),g),a&&!z&&N(_,{metadata:R,playing:M,displayIcon:!p&&E,wrapperRef:ee,play:ue,pause:ce,displayOverlay:l,onOverlayClick:fe}))}));ne.displayName="VideoWrapper";var te=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],oe=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function re(e,n,t){e&&e.contentWindow&&n.then((()=>{e.contentWindow.postMessage(t(),"*")}))}var ae=P((function(e,n){let{loading:r,unloadOnPause:a=!1,sandbox:i=oe,muted:l=!1,controls:u=!1,origin:s,onCanPlay:f,onMessage:d,playerStateRef:p,makeMethodMessage:m,makeFullscreenMessage:y,onIframeLoad:b}=e,v=o(e,te);const g=M(null),w=I((()=>new c),[]),h=M(m),j=S((e=>{re(null==g?void 0:g.current,w.promise,(()=>h.current(e)))}),[w.promise]),O=M(y),P=S((()=>re(null==g?void 0:g.current,w.promise,O.current)),[w.promise]);C(n,(()=>({get currentTime(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:NaN},get duration(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.duration)&&void 0!==e?e:NaN},requestFullscreen:()=>{if(!O.current)return w.promise.then((()=>{g.current.requestFullscreen()}));P()},play:()=>j("play"),pause:()=>{if(a){const e=g.current;e&&(e.src=e.src)}else j("pause")}})),[p,j,P,w.promise,a]);const R=function(e){const n=M(null);return n.current=e,n}(d);return E((()=>{if(!g.current)return;function e(e){R.current&&(s&&!s.test(e.origin)||e.source!=g.current.contentWindow||R.current({currentTarget:g.current,target:g.current,data:e.data}))}const{defaultView:n}=g.current.ownerDocument;return n.addEventListener("message",e),()=>n.removeEventListener("message",e)}),[s,R]),E((()=>{j(l?"mute":"unmute")}),[l,j]),E((()=>{j(u?"showControls":"hideControls")}),[u,j]),k("iframe",t(t({},v),{},{ref:g,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:r,onCanPlay:()=>{f&&w.promise.then(f),w.resolve()},onLoad:e=>{null==b||b(e)}}))}));ae.displayName="VideoIframeInternal";var ie=P((function(e,n){return k(ne,t(t({ref:n},e),{},{component:ae}))}));ie.displayName="VideoIframe";import{createElement as le}from"@bentoproject/core";import{useMemo as ue}from"@bentoproject/core";import{forwardRef as ce}from"@bentoproject/core";var se=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function fe(e){switch(e){case"mute":return O("muted",[!0]);case"unmute":return O("muted",[!1]);case"showControls":return O("controls",[!0]);case"hideControls":return O("controls",[!1]);default:return O(e)}}function de({currentTarget:e,data:n}){const t=function(e){const n=l();if(!e)return n;let t;for(;t=g.exec(e);){const e=w(t[1],t[1]),o=t[2]?w(t[2].replace(/\+/g," "),t[2]):"";n[e]=o}return n}(n),o=null==t?void 0:t.event;"pause"===o?j(e,"pause"):"play"===o?j(e,"playing"):"end"===o?(j(e,"pause"),j(e,"end")):"apiready"===o&&j(e,"canplay")}function pe(e,n){let{autoplay:a,endscreenEnable:i,info:l,mute:u,sharingEnable:c,start:s,uiHighlight:f,uiLogo:d,videoId:p}=e,m=o(e,se);const y=ue((()=>function(e,n,o=!1,a=!0,i=!0,l=!1,u=!0,c,s,f=!0,d){return function(e,n,t){if(!n)return e;const o=e.split("#",2),r=o[0].split("?",2);let a=r[0]+(r[1]?`?${r[1]}&${n}`:`?${n}`);return a+=o[1]?`#${o[1]}`:"",a}(`https://www.dailymotion.com/embed/video/${encodeURIComponent(n)}?api=1&html=1&app=amp`,function(e){const n=[];for(const i in e){let l=e[i];if(null!=l){l=r(a=l)?a:[a];for(let e=0;e<l.length;e++)n.push((t=i,o=l[e],`${encodeURIComponent(t)}=${encodeURIComponent(o)}`))}}var t,o,a;return n.join("&")}(t({"endscreen-enable":a?void 0:a,"info":i?void 0:i,"mute":l||o&&v(e)?1:void 0,"sharing-enable":u?void 0:u,"start":c,"ui-highlight":s,"ui-logo":f?void 0:f},d)))}(window,p,a,i,l,u,c,s,f,d)),[p,a,i,l,u,c,s,f,d]);return le(ie,t(t({autoplay:a,controls:!0,ref:n},m),{},{src:y,makeMethodMessage:fe,onMessage:de}))}var me=ce(pe);me.displayName="BentoDailymotion";export{me as BentoDailymotion,pe as BentoDailymotionWithRef}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-preact.module.js.map |
; | ||
var n=Object.create,r=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return r(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||r(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=e(o,a))||i.enumerable});return n}(i(r(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function l(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function f(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?l(Object(e),!0).forEach((function(r){c(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)e=u[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}!function(n,e){for(var t in i(n),e)r(n,t,{get:e[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return bn}});var s=Array.isArray;function d(n){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function p(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function m(n,r){if(n){if("string"==typeof n)return p(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?p(n,r):void 0}}function b(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=m(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}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 y=Object.prototype;function g(n){var r=Object.create(null);return n&&Object.assign(r,n),r}y.hasOwnProperty,y.toString;var w,j=function(){var n=this;this.promise=new Promise((function(r,e){n.resolve=r,n.reject=e}))};function h(n){return new Promise((function(r){r(n())}))}function O(n){var r=Object.getOwnPropertyDescriptor(n,"message");if(null!=r&&r.writable)return n;var e=n.message,t=n.stack,o=new Error(e);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var r,e=null,t="",o=b(arguments,!0);!(r=o()).done;){var u=r.value;u instanceof Error&&!e?e=O(u):(t&&(t+=" "),t+=u)}return e?t&&(e.message=t+": "+e.message):e=new Error(t),e}function q(n){var r,e;null===(r=(e=self).__AMP_REPORT_ERROR)||void 0===r||r.call(e,n)}function I(n){var r=S.apply(null,arguments);return r.expected=!0,r}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,r,e,t,o){var u=function(n,r,e){if(r.startsWith("--"))return r;w||(w=g());var t=w[r];if(!t||e){if(t=r,void 0===n[r]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(r),u=function(n,r){for(var e=0;e<k.length;e++){var t=k[e]+r;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}e||(w[r]=t)}return t}(n.style,r,o);if(u){var i,a=t?e+t:e;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function N(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var r,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,r){for(var e in r)C(n,e,r[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),r=e,h((function(){return r.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var E=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function P(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return r}}var A={bubbles:!0,cancelable:!0};function M(n,r,e,t){var o=e||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||A,a=i.bubbles,c=i.cancelable;u.initEvent(r,a,c),n.dispatchEvent(u)}function R(n,r){return function(n,r,e){if(!r)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(r):"?".concat(r))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var r,e,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((r=u,e=i[a],"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(r))}function T(n,r){return JSON.stringify({"command":n,"parameters":r})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("./@bentoproject/core")),L=a(require("./@bentoproject/core")),z=a(require("react"));function F(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,u=[],i=!0,a=!1;try{for(e=e.call(n);!(i=(t=e.next()).done)&&(u.push(t.value),!r||u.length!==r);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}}(n,r)||m(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(n){var r=function(n,r){if("object"!==d(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var t=e.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(r)?r:String(r)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("./@bentoproject/core")),W=a(require("./@bentoproject/core")),J=a(require("react")),Y=a(require("./@bentoproject/core")),_=a(require("./@bentoproject/core")),H=a(require("./@bentoproject/core")),Z=a(require("./@bentoproject/core")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var r=n.querySelector('script[type="application/ld+json"]');if(r){var e=function(n,r){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function K(n){var r=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return r?r.getAttribute("href"):void 0}function Q(n){var r=n.displayIcon,e=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,r&&V.createElement("div",{className:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(en,null)),e&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabIndex:"0",className:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,rn,en=(X=!1,nn=null,rn=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{className:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];nn=rn.apply(self,r),X=!0,rn=null}return nn}),tn=(0,J.forwardRef)((function(n,r){var e,t="className",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,m=n.mediasession,b=void 0===m||m,y=n.noaudio,g=void 0!==y&&y,w=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,N=n.style,E=n[t],P=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));e=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var A=(0,_.useAmpContext)().playable,M=(0,_.useLoading)(s),R="unload"!==M,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],rn=X[1],en=F((0,W.useState)(!u),2),tn=en[0],on=en[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new j}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,r){if(n!==ln.current){ln.current=n;var e=fn.current;e&&e(n,r)}}),[fn]),sn=(0,Y.useValueRef)(w),dn=(0,W.useCallback)((function(n){J(n);var r=sn.current;r&&r(n)}),[sn]);(0,W.useLayoutEffect)((function(){R||dn(!1)}),[R,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(r=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];q(I.apply(null,e))}("TRYPLAY",n)})),r;var n,r}))}),[cn]),mn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),bn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,r=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=r&&vn(r>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return b&&z&&nn&&function(n,r,e,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(r),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,mn),function(){}}),[b,z,nn,pn,mn]),(0,W.useEffect)((function(){A||mn()}),[A,mn]),(0,W.useImperativeHandle)(r,(function(){return{get readyState(){return ln.current},play:pn,pause:mn,requestFullscreen:bn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,mn,bn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,className:E,style:N,size:!0,layout:!0,paint:!0},R&&V.createElement(a,f(f({},P),{},{ref:an,loading:M,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){b&&cn.promise.then((function(){var n,r,e,t;rn((n=an.current,f({"title":(r=P).title||r["aria-label"]||document.title,"artist":r.artist||"","album":r.album||"","artwork":[{"src":r.artwork||r.poster||G(document)||(e=document,t=e.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},className:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:mn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,r,e){n&&n.contentWindow&&r.then((function(){n.contentWindow.postMessage(e(),"*")}))}var cn=(0,z.forwardRef)((function(n,r){var e=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,m=n.onMessage,b=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,w=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new j}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(r,(function(){return{get currentTime(){var n,r;return null!==(n=null==b||null===(r=b.current)||void 0===r?void 0:r.currentTime)&&void 0!==n?n:NaN},get duration(){var n,r;return null!==(n=null==b||null===(r=b.current)||void 0===r?void 0:r.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[b,I,C,S.promise,o]);var N=function(n){var r=(0,L.useRef)(null);return r.current=n,r}(m);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",r),function(){return n.removeEventListener("message",r)}}function r(n){N.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||N.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,N]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:e,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==w||w(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,r){return U.createElement(tn,f(f({ref:r},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("./@bentoproject/core")),vn=a(require("./@bentoproject/core")),sn=a(require("react")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function mn(n){var r=n.currentTarget,e=function(n){var r,e=g();if(!n)return e;for(;r=E.exec(n);){var t=P(r[1],r[1]),o=r[2]?P(r[2].replace(/\+/g," "),r[2]):"";e[t]=o}return e}(n.data),t=null==e?void 0:e.event;"pause"===t?M(r,"pause"):"play"===t?M(r,"playing"):"end"===t?(M(r,"pause"),M(r,"end")):"apiready"===t&&M(r,"canplay")}function bn(n,r){var e=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return R("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(r),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||e&&N(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,e,t,o,u,i,a,c,l)}),[s,e,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:e,controls:!0,ref:r},d),{},{src:p,makeMethodMessage:pn,onMessage:mn}))}var yn=(0,sn.forwardRef)(bn);yn.displayName="BentoDailymotion"; | ||
var n=Object.create,r=Object.defineProperty,e=Object.getOwnPropertyDescriptor,t=Object.getOwnPropertyNames,o=Object.getPrototypeOf,u=Object.prototype.hasOwnProperty,i=function(n){return r(n,"__esModule",{value:!0})},a=function(a){return function(n,o,i){if(o&&"object"==typeof o||"function"==typeof o)for(var a,c=t(o),l=0,f=c.length;l<f;l++)a=c[l],u.call(n,a)||"default"===a||r(n,a,{get:function(n){return o[n]}.bind(null,a),enumerable:!(i=e(o,a))||i.enumerable});return n}(i(r(null!=a?n(o(a)):{},"default",a&&a.__esModule&&"default"in a?{get:function(){return a.default},enumerable:!0}:{value:a,enumerable:!0})),a)};function c(n,r,e){return r in n?Object.defineProperty(n,r,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[r]=e,n}function l(n,r){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var t=Object.getOwnPropertySymbols(n);r&&(t=t.filter((function(r){return Object.getOwnPropertyDescriptor(n,r).enumerable}))),e.push.apply(e,t)}return e}function f(n){for(var r=1;r<arguments.length;r++){var e=null!=arguments[r]?arguments[r]:{};r%2?l(Object(e),!0).forEach((function(r){c(n,r,e[r])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):l(Object(e)).forEach((function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(e,r))}))}return n}function v(n,r){if(null==n)return{};var e,t,o={},u=Object.keys(n);for(t=0;t<u.length;t++)e=u[t],r.indexOf(e)>=0||(o[e]=n[e]);return o}!function(n,e){for(var t in i(n),e)r(n,t,{get:e[t],enumerable:!0})}(exports,{BentoDailymotion:function(){return yn},BentoDailymotionWithRef:function(){return bn}});var s=Array.isArray;function d(n){return(d="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function p(n,r){(null==r||r>n.length)&&(r=n.length);for(var e=0,t=new Array(r);e<r;e++)t[e]=n[e];return t}function m(n,r){if(n){if("string"==typeof n)return p(n,r);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?p(n,r):void 0}}function b(n,r){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=m(n))||r&&n&&"number"==typeof n.length){e&&(n=e);var t=0;return function(){return t>=n.length?{done:!0}:{done:!1,value:n[t++]}}}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 y=Object.prototype;function g(n){var r=Object.create(null);return n&&Object.assign(r,n),r}y.hasOwnProperty,y.toString;var w,j=function(){var n=this;this.promise=new Promise((function(r,e){n.resolve=r,n.reject=e}))};function h(n){return new Promise((function(r){r(n())}))}function O(n){var r=Object.getOwnPropertyDescriptor(n,"message");if(null!=r&&r.writable)return n;var e=n.message,t=n.stack,o=new Error(e);for(var u in n)o[u]=n[u];return o.stack=t,o}function S(n){for(var r,e=null,t="",o=b(arguments,!0);!(r=o()).done;){var u=r.value;u instanceof Error&&!e?e=O(u):(t&&(t+=" "),t+=u)}return e?t&&(e.message=t+": "+e.message):e=new Error(t),e}function q(n){var r,e;null===(r=(e=self).__AMP_REPORT_ERROR)||void 0===r||r.call(e,n)}function I(n){var r=S.apply(null,arguments);return r.expected=!0,r}var k=["Webkit","webkit","Moz","moz","ms","O","o"];function C(n,r,e,t,o){var u=function(n,r,e){if(r.startsWith("--"))return r;w||(w=g());var t=w[r];if(!t||e){if(t=r,void 0===n[r]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(r),u=function(n,r){for(var e=0;e<k.length;e++){var t=k[e]+r;if(void 0!==n[t])return t}return""}(n,o);void 0!==n[u]&&(t=u)}e||(w[r]=t)}return t}(n.style,r,o);if(u){var i,a=t?e+t:e;n.style.setProperty((i=u.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),k.some((function(n){return i.startsWith(n+"-")}))?"-".concat(i):i),a)}}function N(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var r,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,r){for(var e in r)C(n,e,r[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),r=e,h((function(){return r.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var E=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function P(n){var r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return r}}var A={bubbles:!0,cancelable:!0};function M(n,r,e,t){var o=e||{};n.ownerDocument;var u=n.ownerDocument.createEvent("Event");u.data=o;var i=t||A,a=i.bubbles,c=i.cancelable;u.initEvent(r,a,c),n.dispatchEvent(u)}function R(n,r){return function(n,r,e){if(!r)return n;var t=n.split("#",2),o=t[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(r):"?".concat(r))+(t[1]?"#".concat(t[1]):"")}(n,function(n){var r,e,t,o=[];for(var u in n){var i=n[u];if(null!=i){i=s(t=i)?t:[t];for(var a=0;a<i.length;a++)o.push((r=u,e=i[a],"".concat(encodeURIComponent(r),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(r))}function T(n,r){return JSON.stringify({"command":n,"parameters":r})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);var x,U=a(require("@bentoproject/core")),L=a(require("@bentoproject/core")),z=a(require("react"));function F(n,r){return function(n){if(Array.isArray(n))return n}(n)||function(n,r){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var t,o,u=[],i=!0,a=!1;try{for(e=e.call(n);!(i=(t=e.next()).done)&&(u.push(t.value),!r||u.length!==r);i=!0);}catch(n){a=!0,o=n}finally{try{i||null==e.return||e.return()}finally{if(a)throw o}}return u}}(n,r)||m(n,r)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function B(n){var r=function(n,r){if("object"!==d(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var t=e.call(n,"string");if("object"!==d(t))return t;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===d(r)?r:String(r)}var D=(c(x={},"auto",0),c(x,"lazy",1),c(x,"eager",2),c(x,"unload",3),"loading"),V=a(require("@bentoproject/core")),W=a(require("@bentoproject/core")),J=a(require("react")),Y=a(require("@bentoproject/core")),_=a(require("@bentoproject/core")),H=a(require("@bentoproject/core")),Z=a(require("@bentoproject/core")),$={"title":"","artist":"","album":"","artwork":[{"src":""}]};function G(n){var r=n.querySelector('script[type="application/ld+json"]');if(r){var e=function(n,r){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(r.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function K(n){var r=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return r?r.getAttribute("href"):void 0}function Q(n){var r=n.displayIcon,e=n.displayOverlay,t=n.metadata,o=n.onOverlayClick,u=n.pause,i=n.play,a=n.playing,c=n.wrapperRef,l=(0,_.useAmpContext)().playable;return(0,W.useEffect)((function(){if(l){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?i().catch((function(){})):u()}),{threshold:.5});return n.observe(c.current),function(){n.disconnect()}}u()}),[c,i,u,l]),V.createElement(V.Fragment,null,r&&V.createElement("div",{className:"eq-9e7199f"+(a?" eq-playing-9e7199f":"")},V.createElement(en,null)),e&&V.createElement("button",{"aria-label":t&&t.title||"Unmute video",tabIndex:"0",className:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var X,nn,rn,en=(X=!1,nn=null,rn=function(){return[1,2,3,4].map((function(n){return V.createElement("div",{className:"eq-col-9e7199f",key:n})}))},function(){if(!X){for(var n=arguments.length,r=new Array(n),e=0;e<n;e++)r[e]=arguments[e];nn=rn.apply(self,r),X=!0,rn=null}return nn}),tn=(0,J.forwardRef)((function(n,r){var e,t="className",o=n.autoplay,u=void 0!==o&&o,i=n.component,a=void 0===i?"video":i,c=n.controls,l=void 0!==c&&c,s=n.loading,d=n.loop,p=void 0!==d&&d,m=n.mediasession,b=void 0===m||m,y=n.noaudio,g=void 0!==y&&y,w=n.onPlayingState,O=n.onReadyState,S=n.poster,k=n.sources,C=n.src,N=n.style,E=n[t],P=v(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",t].map(B));e=(0,Z.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var A=(0,_.useAmpContext)().playable,M=(0,_.useLoading)(s),R="unload"!==M,T=F((0,W.useState)(u),2),x=T[0],U=T[1],L=F((0,W.useState)(!1),2),z=L[0],J=L[1],X=F((0,W.useState)(null),2),nn=X[0],rn=X[1],en=F((0,W.useState)(!u),2),tn=en[0],on=en[1],un=(0,W.useRef)(null),an=(0,W.useRef)(null),cn=(0,W.useMemo)((function(){return new j}),[]),ln=(0,W.useRef)(D),fn=(0,Y.useValueRef)(O),vn=(0,W.useCallback)((function(n,r){if(n!==ln.current){ln.current=n;var e=fn.current;e&&e(n,r)}}),[fn]),sn=(0,Y.useValueRef)(w),dn=(0,W.useCallback)((function(n){J(n);var r=sn.current;r&&r(n)}),[sn]);(0,W.useLayoutEffect)((function(){R||dn(!1)}),[R,dn]);var pn=(0,W.useCallback)((function(){return cn.promise.then((function(){return n=an.current,(r=h((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var r=arguments.length,e=new Array(r>1?r-1:0),t=1;t<r;t++)e[t-1]=arguments[t];q(I.apply(null,e))}("TRYPLAY",n)})),r;var n,r}))}),[cn]),mn=(0,W.useCallback)((function(){cn.promise.then((function(){var n;return null===(n=an.current)||void 0===n?void 0:n.pause()}))}),[cn]),bn=(0,W.useCallback)((function(){return cn.promise.then((function(){return an.current.requestFullscreen()}))}),[cn]),yn=(0,W.useCallback)((function(){U(!1),on(!0)}),[]);return(0,W.useLayoutEffect)((function(){var n,r=null===(n=an.current)||void 0===n?void 0:n.readyState;null!=r&&vn(r>0?"complete":D)}),[vn]),(0,W.useLayoutEffect)((function(){return b&&z&&nn&&function(n,r,e,t){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata($),o.mediaSession.metadata=new n.MediaMetadata(r),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",t))}(window,nn,pn,mn),function(){}}),[b,z,nn,pn,mn]),(0,W.useEffect)((function(){A||mn()}),[A,mn]),(0,W.useImperativeHandle)(r,(function(){return{get readyState(){return ln.current},play:pn,pause:mn,requestFullscreen:bn,get currentTime(){return an.current?an.current.currentTime:0},get duration(){return an.current?an.current.duration:NaN},get autoplay(){return u},get controls(){return l},get loop(){return p},userInteracted:yn,mute:function(){return U(!0)},unmute:function(){tn&&U(!1)}}}),[pn,mn,bn,yn,tn,u,l,p]),V.createElement(Y.ContainWrapper,{contentRef:un,className:E,style:N,size:!0,layout:!0,paint:!0},R&&V.createElement(a,f(f({},P),{},{ref:an,loading:M,muted:x,loop:p,controls:l&&(!u||tn),onCanPlay:function(){cn.resolve(),vn("complete")},onLoadedMetadata:function(){b&&cn.promise.then((function(){var n,r,e,t;rn((n=an.current,f({"title":(r=P).title||r["aria-label"]||document.title,"artist":r.artist||"","album":r.album||"","artwork":[{"src":r.artwork||r.poster||G(document)||(e=document,t=e.querySelector('meta[property="og:image"]'),t?t.getAttribute("content"):void 0)||K(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),vn("complete")},onPlaying:function(){return dn(!0)},onPause:function(){return dn(!1)},onEnded:function(){return dn(!1)},onError:function(n){vn("error",n),cn.reject(n)},className:"fill-stretch-fc551a7",src:C,poster:S}),k),u&&!tn&&V.createElement(Q,{metadata:nn,playing:z,displayIcon:!g&&x,wrapperRef:un,play:pn,pause:mn,displayOverlay:l,onOverlayClick:yn}))}));tn.displayName="VideoWrapper";var on=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],un=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function an(n,r,e){n&&n.contentWindow&&r.then((function(){n.contentWindow.postMessage(e(),"*")}))}var cn=(0,z.forwardRef)((function(n,r){var e=n.loading,t=n.unloadOnPause,o=void 0!==t&&t,u=n.sandbox,i=void 0===u?un:u,a=n.muted,c=void 0!==a&&a,l=n.controls,s=void 0!==l&&l,d=n.origin,p=n.onCanPlay,m=n.onMessage,b=n.playerStateRef,y=n.makeMethodMessage,g=n.makeFullscreenMessage,w=n.onIframeLoad,h=v(n,on),O=(0,L.useRef)(null),S=(0,L.useMemo)((function(){return new j}),[]),q=(0,L.useRef)(y),I=(0,L.useCallback)((function(n){an(null==O?void 0:O.current,S.promise,(function(){return q.current(n)}))}),[S.promise]),k=(0,L.useRef)(g),C=(0,L.useCallback)((function(){return an(null==O?void 0:O.current,S.promise,k.current)}),[S.promise]);(0,L.useImperativeHandle)(r,(function(){return{get currentTime(){var n,r;return null!==(n=null==b||null===(r=b.current)||void 0===r?void 0:r.currentTime)&&void 0!==n?n:NaN},get duration(){var n,r;return null!==(n=null==b||null===(r=b.current)||void 0===r?void 0:r.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!k.current)return S.promise.then((function(){O.current.requestFullscreen()}));C()},play:function(){return I("play")},pause:function(){if(o){var n=O.current;n&&(n.src=n.src)}else I("pause")}}}),[b,I,C,S.promise,o]);var N=function(n){var r=(0,L.useRef)(null);return r.current=n,r}(m);return(0,L.useLayoutEffect)((function(){if(O.current){var n=O.current.ownerDocument.defaultView;return n.addEventListener("message",r),function(){return n.removeEventListener("message",r)}}function r(n){N.current&&(d&&!d.test(n.origin)||n.source!=O.current.contentWindow||N.current({currentTarget:O.current,target:O.current,data:n.data}))}}),[d,N]),(0,L.useLayoutEffect)((function(){I(c?"mute":"unmute")}),[c,I]),(0,L.useLayoutEffect)((function(){I(s?"showControls":"hideControls")}),[s,I]),U.createElement("iframe",f(f({},h),{},{ref:O,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:e,onCanPlay:function(){p&&S.promise.then(p),S.resolve()},onLoad:function(n){null==w||w(n)}}))}));cn.displayName="VideoIframeInternal";var ln=(0,z.forwardRef)((function(n,r){return U.createElement(tn,f(f({ref:r},n),{},{component:cn}))}));ln.displayName="VideoIframe";var fn=a(require("@bentoproject/core")),vn=a(require("@bentoproject/core")),sn=a(require("react")),dn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pn(n){switch(n){case"mute":return T("muted",[!0]);case"unmute":return T("muted",[!1]);case"showControls":return T("controls",[!0]);case"hideControls":return T("controls",[!1]);default:return T(n)}}function mn(n){var r=n.currentTarget,e=function(n){var r,e=g();if(!n)return e;for(;r=E.exec(n);){var t=P(r[1],r[1]),o=r[2]?P(r[2].replace(/\+/g," "),r[2]):"";e[t]=o}return e}(n.data),t=null==e?void 0:e.event;"pause"===t?M(r,"pause"):"play"===t?M(r,"playing"):"end"===t?(M(r,"pause"),M(r,"end")):"apiready"===t&&M(r,"canplay")}function bn(n,r){var e=n.autoplay,t=n.endscreenEnable,o=n.info,u=n.mute,i=n.sharingEnable,a=n.start,c=n.uiHighlight,l=n.uiLogo,s=n.videoId,d=v(n,dn),p=(0,vn.useMemo)((function(){return function(n,r){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],t=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],u=arguments.length>5&&void 0!==arguments[5]&&arguments[5],i=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],a=arguments.length>7?arguments[7]:void 0,c=arguments.length>8?arguments[8]:void 0,l=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],v=arguments.length>10?arguments[10]:void 0;return R("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(r),"?api=1&html=1&app=amp"),f({"endscreen-enable":t?void 0:t,"info":o?void 0:o,"mute":u||e&&N(n)?1:void 0,"sharing-enable":i?void 0:i,"start":a,"ui-highlight":c,"ui-logo":l?void 0:l},v))}(window,s,e,t,o,u,i,a,c,l)}),[s,e,t,o,u,i,a,c,l]);return fn.createElement(ln,f(f({autoplay:e,controls:!0,ref:r},d),{},{src:p,makeMethodMessage:pn,onMessage:mn}))}var yn=(0,sn.forwardRef)(bn);yn.displayName="BentoDailymotion"; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.js.map |
@@ -573,4 +573,4 @@ var __create = Object.create; | ||
// src/bento/components/bento-video/1.0/video-iframe.js | ||
var Preact2 = __toModule(require("./@bentoproject/core")); | ||
var import_preact2 = __toModule(require("./@bentoproject/core")); | ||
var Preact2 = __toModule(require("@bentoproject/core")); | ||
var import_preact2 = __toModule(require("@bentoproject/core")); | ||
var import_compat2 = __toModule(require("react")); | ||
@@ -622,11 +622,11 @@ | ||
// src/bento/components/bento-video/1.0/component.js | ||
var Preact = __toModule(require("./@bentoproject/core")); | ||
var import_preact = __toModule(require("./@bentoproject/core")); | ||
var Preact = __toModule(require("@bentoproject/core")); | ||
var import_preact = __toModule(require("@bentoproject/core")); | ||
var import_compat = __toModule(require("react")); | ||
var import_component3 = __toModule(require("./@bentoproject/core")); | ||
var import_context2 = __toModule(require("./@bentoproject/core")); | ||
var import_component3 = __toModule(require("@bentoproject/core")); | ||
var import_context2 = __toModule(require("@bentoproject/core")); | ||
// src/preact/utils.js | ||
var import__ = __toModule(require("./@bentoproject/core")); | ||
var import_context = __toModule(require("./@bentoproject/core")); | ||
var import__ = __toModule(require("@bentoproject/core")); | ||
var import_context = __toModule(require("@bentoproject/core")); | ||
function useResourcesNotify() { | ||
@@ -1123,4 +1123,4 @@ var _useAmpContext = (0, import_context.useAmpContext)(), notify = _useAmpContext.notify; | ||
// src/bento/components/bento-dailymotion/1.0/component.js | ||
var Preact3 = __toModule(require("./@bentoproject/core")); | ||
var import_preact3 = __toModule(require("./@bentoproject/core")); | ||
var Preact3 = __toModule(require("@bentoproject/core")); | ||
var import_preact3 = __toModule(require("@bentoproject/core")); | ||
var import_compat3 = __toModule(require("react")); | ||
@@ -1127,0 +1127,0 @@ var _excluded2 = ["autoplay", "endscreenEnable", "info", "mute", "sharingEnable", "start", "uiHighlight", "uiLogo", "videoId"]; |
@@ -462,4 +462,4 @@ // src/core/mode/minified.js | ||
createElement as createElement2 | ||
} from "./@bentoproject/core"; | ||
import { useCallback as useCallback3, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2 } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useCallback as useCallback3, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2 } from "@bentoproject/core"; | ||
import { forwardRef as forwardRef2 } from "react"; | ||
@@ -518,11 +518,11 @@ | ||
createElement | ||
} from "./@bentoproject/core"; | ||
import { useCallback as useCallback2, useEffect, useImperativeHandle, useLayoutEffect as useLayoutEffect2, useMemo, useRef, useState } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useCallback as useCallback2, useEffect, useImperativeHandle, useLayoutEffect as useLayoutEffect2, useMemo, useRef, useState } from "@bentoproject/core"; | ||
import { forwardRef } from "react"; | ||
import { ContainWrapper, useValueRef } from "./@bentoproject/core"; | ||
import { useAmpContext as useAmpContext2, useLoading } from "./@bentoproject/core"; | ||
import { ContainWrapper, useValueRef } from "@bentoproject/core"; | ||
import { useAmpContext as useAmpContext2, useLoading } from "@bentoproject/core"; | ||
// src/preact/utils.js | ||
import { useCallback, useLayoutEffect } from "./@bentoproject/core"; | ||
import { useAmpContext } from "./@bentoproject/core"; | ||
import { useCallback, useLayoutEffect } from "@bentoproject/core"; | ||
import { useAmpContext } from "@bentoproject/core"; | ||
function useResourcesNotify() { | ||
@@ -1040,4 +1040,4 @@ const { | ||
createElement as createElement3 | ||
} from "./@bentoproject/core"; | ||
import { useMemo as useMemo3 } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useMemo as useMemo3 } from "@bentoproject/core"; | ||
import { forwardRef as forwardRef3 } from "react"; | ||
@@ -1044,0 +1044,0 @@ var _excluded2 = ["autoplay", "endscreenEnable", "info", "mute", "sharingEnable", "start", "uiHighlight", "uiLogo", "videoId"]; |
; | ||
function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function t(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?n(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}var{isArray:r}=Array,{hasOwnProperty:a,toString:i}=Object.prototype;function l(e){const n=Object.create(null);return e&&Object.assign(n,e),n}var u,c=class{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}};function s(e){return new Promise((n=>{n(e())}))}function f(e){const n=Object.getOwnPropertyDescriptor(e,"message");if(null!=n&&n.writable)return e;const{message:t,stack:o}=e,r=new Error(t);for(const n in e)r[n]=e[n];return r.stack=o,r}function d(e){let n=null,t="";for(const e of arguments)e instanceof Error&&!n?n=f(e):(t&&(t+=" "),t+=e);return n?t&&(n.message=t+": "+n.message):n=new Error(t),n}function p(e){const n=d.apply(null,arguments);return n.expected=!0,n}function m(e,...n){var t,o,r;t=p.apply(null,n),null===(o=(r=self).__AMP_REPORT_ERROR)||void 0===o||o.call(r,t)}var y=["Webkit","webkit","Moz","moz","ms","O","o"];function v(e,n,t,o,r){const a=function(e,n,t){if(n.startsWith("--"))return n;u||(u=l());let o=u[n];if(!o||t){if(o=n,void 0===e[n]){const t=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(n),r=function(e,n){for(let t=0;t<y.length;t++){const o=y[t]+n;if(void 0!==e[o])return o}return""}(e,t);void 0!==e[r]&&(o=r)}t||(u[n]=o)}return o}(e.style,n,r);if(!a)return;const i=o?t+o:t;e.style.setProperty(function(e){const n=e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()));return y.some((e=>n.startsWith(e+"-")))?`-${n}`:n}(a),i)}function b(e){return null==e.__AMP_AUTOPLAY&&(e.__AMP_AUTOPLAY=function(e){const n=e.document.createElement("video");var t;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,function(e,n){for(const t in n)v(e,t,n[t])}(n,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),t=n,s((()=>t.play())).catch((()=>{})),Promise.resolve(!n.paused)}(e)),e.__AMP_AUTOPLAY}var g=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function w(e,n=""){try{return decodeURIComponent(e)}catch(e){return n}}var h={bubbles:!0,cancelable:!0};function j(e,n,t,o){const r=t||{};e.ownerDocument;const a=e.ownerDocument.createEvent("Event");a.data=r;const{bubbles:i,cancelable:l}=o||h;a.initEvent(n,i,l),e.dispatchEvent(a)}function O(e,n){return JSON.stringify({"command":e,"parameters":n})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);import{createElement as k}from"./@bentoproject/core";import{useCallback as S,useImperativeHandle as C,useLayoutEffect as I,useMemo as E,useRef as M}from"./@bentoproject/core";import{forwardRef as P}from"react";function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e){var n=function(e,n){if("object"!==N(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==N(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===N(n)?n:String(n)}import{Fragment as x,createElement as L}from"./@bentoproject/core";import{useCallback as $,useEffect as q,useImperativeHandle as F,useLayoutEffect as T,useMemo as U,useRef as A,useState as V}from"./@bentoproject/core";import{forwardRef as z}from"react";import{ContainWrapper as H,useValueRef as J}from"./@bentoproject/core";import{useAmpContext as W,useLoading as B}from"./@bentoproject/core";import{useCallback as D,useLayoutEffect as Z}from"./@bentoproject/core";import{useAmpContext as G}from"./@bentoproject/core";var K={"title":"","artist":"","album":"","artwork":[{"src":""}]};function Q(e){const n=e.querySelector('script[type="application/ld+json"]');if(!n)return;const t=function(e,n){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null}}(n.textContent);return t&&t.image?"string"==typeof t.image?t.image:t.image["@list"]&&"string"==typeof t.image["@list"][0]?t.image["@list"][0]:"string"==typeof t.image.url?t.image.url:"string"==typeof t.image[0]?t.image[0]:void 0:void 0}function X(e){const n=e.querySelector('meta[property="og:image"]');return n?n.getAttribute("content"):void 0}function Y(e){const n=e.querySelector('link[rel="shortcut icon"]')||e.querySelector('link[rel="icon"]');return n?n.getAttribute("href"):void 0}function _({displayIcon:e,displayOverlay:n,metadata:t,onOverlayClick:o,pause:r,play:a,playing:i,wrapperRef:l}){const{playable:u}=W();return q((()=>{if(!u)return void r();const e=new IntersectionObserver((e=>{e[e.length-1].isIntersecting?a().catch((()=>{})):r()}),{threshold:.5});return e.observe(l.current),()=>{e.disconnect()}}),[l,a,r,u]),L(x,null,e&&L("div",{className:"eq-9e7199f"+(i?" eq-playing-9e7199f":"")},L(ee,null)),n&&L("button",{"aria-label":t&&t.title||"Unmute video",tabIndex:"0",className:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var ee=function(e){let n=!1,t=null,o=()=>[1,2,3,4].map((e=>L("div",{className:"eq-col-9e7199f",key:e})));return(...e)=>(n||(t=o.apply(self,e),n=!0,o=null),t)}(),ne=z((function(e,n){let r="className",{autoplay:a=!1,component:i="video",controls:l=!1,loading:u,loop:f=!1,mediasession:d=!0,noaudio:p=!1,onPlayingState:y,onReadyState:v,poster:b,sources:g,src:w,style:h,[r]:j}=e,O=o(e,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(R));!function(){const{notify:e}=G();Z((()=>{e&&e()}))}();const{playable:k}=W(),S=B(u),C="unload"!==S,[I,E]=V(a),[M,P]=V(!1),[N,x]=V(null),[z,D]=V(!a),ee=A(null),ne=A(null),te=U((()=>new c),[]),oe=A("loading"),re=J(v),ae=$(((e,n)=>{if(e!==oe.current){oe.current=e;const t=re.current;t&&t(e,n)}}),[re]),ie=J(y),le=$((e=>{P(e);const n=ie.current;n&&n(e)}),[ie]);T((()=>{C||le(!1)}),[C,le]);const ue=$((()=>te.promise.then((()=>function(e,n){const t=s((()=>e.play(!1)));return t.catch((e=>{m(0,e)})),t}(ne.current)))),[te]),ce=$((()=>{te.promise.then((()=>{var e;return null===(e=ne.current)||void 0===e?void 0:e.pause()}))}),[te]),se=$((()=>te.promise.then((()=>ne.current.requestFullscreen()))),[te]),fe=$((()=>{E(!1),D(!0)}),[]);return T((()=>{var e;const n=null===(e=ne.current)||void 0===e?void 0:e.readyState;null!=n&&ae(n>0?"complete":"loading")}),[ae]),T((()=>(d&&M&&N&&function(e,n,t,o){const{navigator:r}=e;"mediaSession"in r&&e.MediaMetadata&&(r.mediaSession.metadata=new e.MediaMetadata(K),r.mediaSession.metadata=new e.MediaMetadata(n),r.mediaSession.setActionHandler("play",t),r.mediaSession.setActionHandler("pause",o))}(window,N,ue,ce),()=>{})),[d,M,N,ue,ce]),q((()=>{k||ce()}),[k,ce]),F(n,(()=>({get readyState(){return oe.current},play:ue,pause:ce,requestFullscreen:se,get currentTime(){return ne.current?ne.current.currentTime:0},get duration(){return ne.current?ne.current.duration:NaN},get autoplay(){return a},get controls(){return l},get loop(){return f},userInteracted:fe,mute:()=>E(!0),unmute:()=>{z&&E(!1)}})),[ue,ce,se,fe,z,a,l,f]),L(H,{contentRef:ee,className:j,style:h,size:!0,layout:!0,paint:!0},C&&L(i,t(t({},O),{},{ref:ne,loading:S,muted:I,loop:f,controls:l&&(!a||z),onCanPlay:()=>{te.resolve(),ae("complete")},onLoadedMetadata:()=>{d&&te.promise.then((()=>{var e,n;x((e=ne.current,t({"title":(n=O).title||n["aria-label"]||document.title,"artist":n.artist||"","album":n.album||"","artwork":[{"src":n.artwork||n.poster||Q(document)||X(document)||Y(document)||""}]},e&&e.getMetadata?e.getMetadata():Object.create(null))))})),ae("complete")},onPlaying:()=>le(!0),onPause:()=>le(!1),onEnded:()=>le(!1),onError:e=>{ae("error",e),te.reject(e)},className:"fill-stretch-fc551a7",src:w,poster:b}),g),a&&!z&&L(_,{metadata:N,playing:M,displayIcon:!p&&I,wrapperRef:ee,play:ue,pause:ce,displayOverlay:l,onOverlayClick:fe}))}));ne.displayName="VideoWrapper";var te=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],oe=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function re(e,n,t){e&&e.contentWindow&&n.then((()=>{e.contentWindow.postMessage(t(),"*")}))}var ae=P((function(e,n){let{loading:r,unloadOnPause:a=!1,sandbox:i=oe,muted:l=!1,controls:u=!1,origin:s,onCanPlay:f,onMessage:d,playerStateRef:p,makeMethodMessage:m,makeFullscreenMessage:y,onIframeLoad:v}=e,b=o(e,te);const g=M(null),w=E((()=>new c),[]),h=M(m),j=S((e=>{re(null==g?void 0:g.current,w.promise,(()=>h.current(e)))}),[w.promise]),O=M(y),P=S((()=>re(null==g?void 0:g.current,w.promise,O.current)),[w.promise]);C(n,(()=>({get currentTime(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:NaN},get duration(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.duration)&&void 0!==e?e:NaN},requestFullscreen:()=>{if(!O.current)return w.promise.then((()=>{g.current.requestFullscreen()}));P()},play:()=>j("play"),pause:()=>{if(a){const e=g.current;e&&(e.src=e.src)}else j("pause")}})),[p,j,P,w.promise,a]);const N=function(e){const n=M(null);return n.current=e,n}(d);return I((()=>{if(!g.current)return;function e(e){N.current&&(s&&!s.test(e.origin)||e.source!=g.current.contentWindow||N.current({currentTarget:g.current,target:g.current,data:e.data}))}const{defaultView:n}=g.current.ownerDocument;return n.addEventListener("message",e),()=>n.removeEventListener("message",e)}),[s,N]),I((()=>{j(l?"mute":"unmute")}),[l,j]),I((()=>{j(u?"showControls":"hideControls")}),[u,j]),k("iframe",t(t({},b),{},{ref:g,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:r,onCanPlay:()=>{f&&w.promise.then(f),w.resolve()},onLoad:e=>{null==v||v(e)}}))}));ae.displayName="VideoIframeInternal";var ie=P((function(e,n){return k(ne,t(t({ref:n},e),{},{component:ae}))}));ie.displayName="VideoIframe";import{createElement as le}from"./@bentoproject/core";import{useMemo as ue}from"./@bentoproject/core";import{forwardRef as ce}from"react";var se=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function fe(e){switch(e){case"mute":return O("muted",[!0]);case"unmute":return O("muted",[!1]);case"showControls":return O("controls",[!0]);case"hideControls":return O("controls",[!1]);default:return O(e)}}function de({currentTarget:e,data:n}){const t=function(e){const n=l();if(!e)return n;let t;for(;t=g.exec(e);){const e=w(t[1],t[1]),o=t[2]?w(t[2].replace(/\+/g," "),t[2]):"";n[e]=o}return n}(n),o=null==t?void 0:t.event;"pause"===o?j(e,"pause"):"play"===o?j(e,"playing"):"end"===o?(j(e,"pause"),j(e,"end")):"apiready"===o&&j(e,"canplay")}function pe(e,n){let{autoplay:a,endscreenEnable:i,info:l,mute:u,sharingEnable:c,start:s,uiHighlight:f,uiLogo:d,videoId:p}=e,m=o(e,se);const y=ue((()=>function(e,n,o=!1,a=!0,i=!0,l=!1,u=!0,c,s,f=!0,d){return function(e,n,t){if(!n)return e;const o=e.split("#",2),r=o[0].split("?",2);let a=r[0]+(r[1]?`?${r[1]}&${n}`:`?${n}`);return a+=o[1]?`#${o[1]}`:"",a}(`https://www.dailymotion.com/embed/video/${encodeURIComponent(n)}?api=1&html=1&app=amp`,function(e){const n=[];for(const i in e){let l=e[i];if(null!=l){l=r(a=l)?a:[a];for(let e=0;e<l.length;e++)n.push((t=i,o=l[e],`${encodeURIComponent(t)}=${encodeURIComponent(o)}`))}}var t,o,a;return n.join("&")}(t({"endscreen-enable":a?void 0:a,"info":i?void 0:i,"mute":l||o&&b(e)?1:void 0,"sharing-enable":u?void 0:u,"start":c,"ui-highlight":s,"ui-logo":f?void 0:f},d)))}(window,p,a,i,l,u,c,s,f,d)),[p,a,i,l,u,c,s,f,d]);return le(ie,t(t({autoplay:a,controls:!0,ref:n},m),{},{src:y,makeMethodMessage:fe,onMessage:de}))}var me=ce(pe);me.displayName="BentoDailymotion";export{me as BentoDailymotion,pe as BentoDailymotionWithRef}; | ||
function e(e,n,t){return n in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function n(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);n&&(o=o.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,o)}return t}function t(t){for(var o=1;o<arguments.length;o++){var r=null!=arguments[o]?arguments[o]:{};o%2?n(Object(r),!0).forEach((function(n){e(t,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(r,e))}))}return t}function o(e,n){if(null==e)return{};var t,o,r={},a=Object.keys(e);for(o=0;o<a.length;o++)t=a[o],n.indexOf(t)>=0||(r[t]=e[t]);return r}var{isArray:r}=Array,{hasOwnProperty:a,toString:i}=Object.prototype;function l(e){const n=Object.create(null);return e&&Object.assign(n,e),n}var u,c=class{constructor(){this.promise=new Promise(((e,n)=>{this.resolve=e,this.reject=n}))}};function s(e){return new Promise((n=>{n(e())}))}function f(e){const n=Object.getOwnPropertyDescriptor(e,"message");if(null!=n&&n.writable)return e;const{message:t,stack:o}=e,r=new Error(t);for(const n in e)r[n]=e[n];return r.stack=o,r}function d(e){let n=null,t="";for(const e of arguments)e instanceof Error&&!n?n=f(e):(t&&(t+=" "),t+=e);return n?t&&(n.message=t+": "+n.message):n=new Error(t),n}function p(e){const n=d.apply(null,arguments);return n.expected=!0,n}function m(e,...n){var t,o,r;t=p.apply(null,n),null===(o=(r=self).__AMP_REPORT_ERROR)||void 0===o||o.call(r,t)}var y=["Webkit","webkit","Moz","moz","ms","O","o"];function v(e,n,t,o,r){const a=function(e,n,t){if(n.startsWith("--"))return n;u||(u=l());let o=u[n];if(!o||t){if(o=n,void 0===e[n]){const t=function(e){return e.charAt(0).toUpperCase()+e.slice(1)}(n),r=function(e,n){for(let t=0;t<y.length;t++){const o=y[t]+n;if(void 0!==e[o])return o}return""}(e,t);void 0!==e[r]&&(o=r)}t||(u[n]=o)}return o}(e.style,n,r);if(!a)return;const i=o?t+o:t;e.style.setProperty(function(e){const n=e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase()));return y.some((e=>n.startsWith(e+"-")))?`-${n}`:n}(a),i)}function b(e){return null==e.__AMP_AUTOPLAY&&(e.__AMP_AUTOPLAY=function(e){const n=e.document.createElement("video");var t;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,function(e,n){for(const t in n)v(e,t,n[t])}(n,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),t=n,s((()=>t.play())).catch((()=>{})),Promise.resolve(!n.paused)}(e)),e.__AMP_AUTOPLAY}var g=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function w(e,n=""){try{return decodeURIComponent(e)}catch(e){return n}}var h={bubbles:!0,cancelable:!0};function j(e,n,t,o){const r=t||{};e.ownerDocument;const a=e.ownerDocument.createEvent("Event");a.data=r;const{bubbles:i,cancelable:l}=o||h;a.initEvent(n,i,l),e.dispatchEvent(a)}function O(e,n){return JSON.stringify({"command":e,"parameters":n})}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG,new Set(["c","v","a","ad"]);import{createElement as k}from"@bentoproject/core";import{useCallback as S,useImperativeHandle as C,useLayoutEffect as I,useMemo as E,useRef as M}from"@bentoproject/core";import{forwardRef as P}from"react";function N(e){return(N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e})(e)}function R(e){var n=function(e,n){if("object"!==N(e)||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var o=t.call(e,"string");if("object"!==N(o))return o;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"===N(n)?n:String(n)}import{Fragment as x,createElement as L}from"@bentoproject/core";import{useCallback as $,useEffect as q,useImperativeHandle as F,useLayoutEffect as T,useMemo as U,useRef as A,useState as V}from"@bentoproject/core";import{forwardRef as z}from"react";import{ContainWrapper as H,useValueRef as J}from"@bentoproject/core";import{useAmpContext as W,useLoading as B}from"@bentoproject/core";import{useCallback as D,useLayoutEffect as Z}from"@bentoproject/core";import{useAmpContext as G}from"@bentoproject/core";var K={"title":"","artist":"","album":"","artwork":[{"src":""}]};function Q(e){const n=e.querySelector('script[type="application/ld+json"]');if(!n)return;const t=function(e,n){try{return function(e){return JSON.parse(e)}(e)}catch(e){return null}}(n.textContent);return t&&t.image?"string"==typeof t.image?t.image:t.image["@list"]&&"string"==typeof t.image["@list"][0]?t.image["@list"][0]:"string"==typeof t.image.url?t.image.url:"string"==typeof t.image[0]?t.image[0]:void 0:void 0}function X(e){const n=e.querySelector('meta[property="og:image"]');return n?n.getAttribute("content"):void 0}function Y(e){const n=e.querySelector('link[rel="shortcut icon"]')||e.querySelector('link[rel="icon"]');return n?n.getAttribute("href"):void 0}function _({displayIcon:e,displayOverlay:n,metadata:t,onOverlayClick:o,pause:r,play:a,playing:i,wrapperRef:l}){const{playable:u}=W();return q((()=>{if(!u)return void r();const e=new IntersectionObserver((e=>{e[e.length-1].isIntersecting?a().catch((()=>{})):r()}),{threshold:.5});return e.observe(l.current),()=>{e.disconnect()}}),[l,a,r,u]),L(x,null,e&&L("div",{className:"eq-9e7199f"+(i?" eq-playing-9e7199f":"")},L(ee,null)),n&&L("button",{"aria-label":t&&t.title||"Unmute video",tabIndex:"0",className:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var ee=function(e){let n=!1,t=null,o=()=>[1,2,3,4].map((e=>L("div",{className:"eq-col-9e7199f",key:e})));return(...e)=>(n||(t=o.apply(self,e),n=!0,o=null),t)}(),ne=z((function(e,n){let r="className",{autoplay:a=!1,component:i="video",controls:l=!1,loading:u,loop:f=!1,mediasession:d=!0,noaudio:p=!1,onPlayingState:y,onReadyState:v,poster:b,sources:g,src:w,style:h,[r]:j}=e,O=o(e,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(R));!function(){const{notify:e}=G();Z((()=>{e&&e()}))}();const{playable:k}=W(),S=B(u),C="unload"!==S,[I,E]=V(a),[M,P]=V(!1),[N,x]=V(null),[z,D]=V(!a),ee=A(null),ne=A(null),te=U((()=>new c),[]),oe=A("loading"),re=J(v),ae=$(((e,n)=>{if(e!==oe.current){oe.current=e;const t=re.current;t&&t(e,n)}}),[re]),ie=J(y),le=$((e=>{P(e);const n=ie.current;n&&n(e)}),[ie]);T((()=>{C||le(!1)}),[C,le]);const ue=$((()=>te.promise.then((()=>function(e,n){const t=s((()=>e.play(!1)));return t.catch((e=>{m(0,e)})),t}(ne.current)))),[te]),ce=$((()=>{te.promise.then((()=>{var e;return null===(e=ne.current)||void 0===e?void 0:e.pause()}))}),[te]),se=$((()=>te.promise.then((()=>ne.current.requestFullscreen()))),[te]),fe=$((()=>{E(!1),D(!0)}),[]);return T((()=>{var e;const n=null===(e=ne.current)||void 0===e?void 0:e.readyState;null!=n&&ae(n>0?"complete":"loading")}),[ae]),T((()=>(d&&M&&N&&function(e,n,t,o){const{navigator:r}=e;"mediaSession"in r&&e.MediaMetadata&&(r.mediaSession.metadata=new e.MediaMetadata(K),r.mediaSession.metadata=new e.MediaMetadata(n),r.mediaSession.setActionHandler("play",t),r.mediaSession.setActionHandler("pause",o))}(window,N,ue,ce),()=>{})),[d,M,N,ue,ce]),q((()=>{k||ce()}),[k,ce]),F(n,(()=>({get readyState(){return oe.current},play:ue,pause:ce,requestFullscreen:se,get currentTime(){return ne.current?ne.current.currentTime:0},get duration(){return ne.current?ne.current.duration:NaN},get autoplay(){return a},get controls(){return l},get loop(){return f},userInteracted:fe,mute:()=>E(!0),unmute:()=>{z&&E(!1)}})),[ue,ce,se,fe,z,a,l,f]),L(H,{contentRef:ee,className:j,style:h,size:!0,layout:!0,paint:!0},C&&L(i,t(t({},O),{},{ref:ne,loading:S,muted:I,loop:f,controls:l&&(!a||z),onCanPlay:()=>{te.resolve(),ae("complete")},onLoadedMetadata:()=>{d&&te.promise.then((()=>{var e,n;x((e=ne.current,t({"title":(n=O).title||n["aria-label"]||document.title,"artist":n.artist||"","album":n.album||"","artwork":[{"src":n.artwork||n.poster||Q(document)||X(document)||Y(document)||""}]},e&&e.getMetadata?e.getMetadata():Object.create(null))))})),ae("complete")},onPlaying:()=>le(!0),onPause:()=>le(!1),onEnded:()=>le(!1),onError:e=>{ae("error",e),te.reject(e)},className:"fill-stretch-fc551a7",src:w,poster:b}),g),a&&!z&&L(_,{metadata:N,playing:M,displayIcon:!p&&I,wrapperRef:ee,play:ue,pause:ce,displayOverlay:l,onOverlayClick:fe}))}));ne.displayName="VideoWrapper";var te=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],oe=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function re(e,n,t){e&&e.contentWindow&&n.then((()=>{e.contentWindow.postMessage(t(),"*")}))}var ae=P((function(e,n){let{loading:r,unloadOnPause:a=!1,sandbox:i=oe,muted:l=!1,controls:u=!1,origin:s,onCanPlay:f,onMessage:d,playerStateRef:p,makeMethodMessage:m,makeFullscreenMessage:y,onIframeLoad:v}=e,b=o(e,te);const g=M(null),w=E((()=>new c),[]),h=M(m),j=S((e=>{re(null==g?void 0:g.current,w.promise,(()=>h.current(e)))}),[w.promise]),O=M(y),P=S((()=>re(null==g?void 0:g.current,w.promise,O.current)),[w.promise]);C(n,(()=>({get currentTime(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.currentTime)&&void 0!==e?e:NaN},get duration(){var e,n;return null!==(e=null==p||null===(n=p.current)||void 0===n?void 0:n.duration)&&void 0!==e?e:NaN},requestFullscreen:()=>{if(!O.current)return w.promise.then((()=>{g.current.requestFullscreen()}));P()},play:()=>j("play"),pause:()=>{if(a){const e=g.current;e&&(e.src=e.src)}else j("pause")}})),[p,j,P,w.promise,a]);const N=function(e){const n=M(null);return n.current=e,n}(d);return I((()=>{if(!g.current)return;function e(e){N.current&&(s&&!s.test(e.origin)||e.source!=g.current.contentWindow||N.current({currentTarget:g.current,target:g.current,data:e.data}))}const{defaultView:n}=g.current.ownerDocument;return n.addEventListener("message",e),()=>n.removeEventListener("message",e)}),[s,N]),I((()=>{j(l?"mute":"unmute")}),[l,j]),I((()=>{j(u?"showControls":"hideControls")}),[u,j]),k("iframe",t(t({},b),{},{ref:g,allowfullscreen:!0,frameborder:"0",sandbox:i,loading:r,onCanPlay:()=>{f&&w.promise.then(f),w.resolve()},onLoad:e=>{null==v||v(e)}}))}));ae.displayName="VideoIframeInternal";var ie=P((function(e,n){return k(ne,t(t({ref:n},e),{},{component:ae}))}));ie.displayName="VideoIframe";import{createElement as le}from"@bentoproject/core";import{useMemo as ue}from"@bentoproject/core";import{forwardRef as ce}from"react";var se=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function fe(e){switch(e){case"mute":return O("muted",[!0]);case"unmute":return O("muted",[!1]);case"showControls":return O("controls",[!0]);case"hideControls":return O("controls",[!1]);default:return O(e)}}function de({currentTarget:e,data:n}){const t=function(e){const n=l();if(!e)return n;let t;for(;t=g.exec(e);){const e=w(t[1],t[1]),o=t[2]?w(t[2].replace(/\+/g," "),t[2]):"";n[e]=o}return n}(n),o=null==t?void 0:t.event;"pause"===o?j(e,"pause"):"play"===o?j(e,"playing"):"end"===o?(j(e,"pause"),j(e,"end")):"apiready"===o&&j(e,"canplay")}function pe(e,n){let{autoplay:a,endscreenEnable:i,info:l,mute:u,sharingEnable:c,start:s,uiHighlight:f,uiLogo:d,videoId:p}=e,m=o(e,se);const y=ue((()=>function(e,n,o=!1,a=!0,i=!0,l=!1,u=!0,c,s,f=!0,d){return function(e,n,t){if(!n)return e;const o=e.split("#",2),r=o[0].split("?",2);let a=r[0]+(r[1]?`?${r[1]}&${n}`:`?${n}`);return a+=o[1]?`#${o[1]}`:"",a}(`https://www.dailymotion.com/embed/video/${encodeURIComponent(n)}?api=1&html=1&app=amp`,function(e){const n=[];for(const i in e){let l=e[i];if(null!=l){l=r(a=l)?a:[a];for(let e=0;e<l.length;e++)n.push((t=i,o=l[e],`${encodeURIComponent(t)}=${encodeURIComponent(o)}`))}}var t,o,a;return n.join("&")}(t({"endscreen-enable":a?void 0:a,"info":i?void 0:i,"mute":l||o&&b(e)?1:void 0,"sharing-enable":u?void 0:u,"start":c,"ui-highlight":s,"ui-logo":f?void 0:f},d)))}(window,p,a,i,l,u,c,s,f,d)),[p,a,i,l,u,c,s,f,d]);return le(ie,t(t({autoplay:a,controls:!0,ref:n},m),{},{src:y,makeMethodMessage:fe,onMessage:de}))}var me=ce(pe);me.displayName="BentoDailymotion";export{me as BentoDailymotion,pe as BentoDailymotionWithRef}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=component-react.module.js.map |
; | ||
var n=Object.create,t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,a=function(n){return t(n,"__esModule",{value:!0})},u=function(u){return function(n,o,a){if(o&&"object"==typeof o||"function"==typeof o)for(var u,l=r(o),c=0,f=l.length;c<f;c++)u=l[c],i.call(n,u)||"default"===u||t(n,u,{get:function(n){return o[n]}.bind(null,u),enumerable:!(a=e(o,u))||a.enumerable});return n}(a(t(null!=u?n(o(u)):{},"default",u&&u.__esModule&&"default"in u?{get:function(){return u.default},enumerable:!0}:{value:u,enumerable:!0})),u)};function l(n,t){return(l=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&l(n,t)}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function s(n){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function d(n,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n)}function v(n){var t=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(n){return!1}}();return function(){var e,r=f(n);if(t){var o=f(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return d(this,e)}}!function(n,e){for(var r in a(n),e)t(n,r,{get:e[r],enumerable:!0})}(exports,{defineElement:function(){return xn}});var p,b=u(require("./@bentoproject/core"));function m(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function y(n,t){if(n){if("string"==typeof n)return m(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(n,t):void 0}}function h(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var r,o,i=[],a=!0,u=!1;try{for(e=e.call(n);!(a=(r=e.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(n){u=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}}(n,t)||y(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(n,t){if(null==n)return{};var e,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)e=i[r],t.indexOf(e)>=0||(o[e]=n[e]);return o}function w(n){var t=function(n,t){if("object"!==s(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var r=e.call(n,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===s(t)?t:String(t)}function j(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function O(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function q(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?O(Object(e),!0).forEach((function(t){j(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var k=(j(p={},"auto",0),j(p,"lazy",1),j(p,"eager",2),j(p,"unload",3),"loading");function S(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=y(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[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 x=function(){var n=this;this.promise=new Promise((function(t,e){n.resolve=t,n.reject=e}))};function I(n){return new Promise((function(t){t(n())}))}var E,P=Array.isArray,R=Object.prototype;function C(n){var t=Object.create(null);return n&&Object.assign(t,n),t}function A(n){var t=Object.getOwnPropertyDescriptor(n,"message");if(null!=t&&t.writable)return n;var e=n.message,r=n.stack,o=new Error(e);for(var i in n)o[i]=n[i];return o.stack=r,o}function M(n){for(var t,e=null,r="",o=S(arguments,!0);!(t=o()).done;){var i=t.value;i instanceof Error&&!e?e=A(i):(r&&(r+=" "),r+=i)}return e?r&&(e.message=r+": "+e.message):e=new Error(r),e}function T(n){var t,e;null===(t=(e=self).__AMP_REPORT_ERROR)||void 0===t||t.call(e,n)}function N(n){var t=M.apply(null,arguments);return t.expected=!0,t}R.hasOwnProperty,R.toString;var U=["Webkit","webkit","Moz","moz","ms","O","o"];function z(n,t,e,r,o){var i=function(n,t,e){if(t.startsWith("--"))return t;E||(E=C());var r=E[t];if(!r||e){if(r=t,void 0===n[t]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(t),i=function(n,t){for(var e=0;e<U.length;e++){var r=U[e]+t;if(void 0!==n[r])return r}return""}(n,o);void 0!==n[i]&&(r=i)}e||(E[t]=r)}return r}(n.style,t,o);if(i){var a,u=r?e+r:e;n.style.setProperty((a=i.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),U.some((function(n){return a.startsWith(n+"-")}))?"-".concat(a):a),u)}}function L(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var t,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,t){for(var e in t)z(n,e,t[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),t=e,I((function(){return t.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var F=u(require("./@bentoproject/core")),Y=u(require("./@bentoproject/core")),B=u(require("./@bentoproject/core")),V=u(require("./@bentoproject/core")),D=u(require("./@bentoproject/core")),H=u(require("./@bentoproject/core")),J=u(require("./@bentoproject/core")),W={bubbles:!0,cancelable:!0};function _(n,t,e,r){var o=e||{};n.ownerDocument;var i=n.ownerDocument.createEvent("Event");i.data=o;var a=r||W,u=a.bubbles,l=a.cancelable;i.initEvent(t,u,l),n.dispatchEvent(i)}var Z=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function $(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return t}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var G={"title":"","artist":"","album":"","artwork":[{"src":""}]};function K(n){var t=n.querySelector('script[type="application/ld+json"]');if(t){var e=function(n,t){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(t.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function Q(n){var t=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return t?t.getAttribute("href"):void 0}function X(n){var t=n.displayIcon,e=n.displayOverlay,r=n.metadata,o=n.onOverlayClick,i=n.pause,a=n.play,u=n.playing,l=n.wrapperRef,c=(0,D.useAmpContext)().playable;return(0,Y.useEffect)((function(){if(c){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?a().catch((function(){})):i()}),{threshold:.5});return n.observe(l.current),function(){n.disconnect()}}i()}),[l,a,i,c]),F.createElement(F.Fragment,null,t&&F.createElement("div",{class:"eq-9e7199f"+(u?" eq-playing-9e7199f":"")},F.createElement(rn,null)),e&&F.createElement("button",{"aria-label":r&&r.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var nn,tn,en,rn=(nn=!1,tn=null,en=function(){return[1,2,3,4].map((function(n){return F.createElement("div",{class:"eq-col-9e7199f",key:n})}))},function(){if(!nn){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];tn=en.apply(self,t),nn=!0,en=null}return tn}),on=(0,B.forwardRef)((function(n,t){var e,r="class",o=n.autoplay,i=void 0!==o&&o,a=n.component,u=void 0===a?"video":a,l=n.controls,c=void 0!==l&&l,f=n.loading,s=n.loop,d=void 0!==s&&s,v=n.mediasession,p=void 0===v||v,b=n.noaudio,m=void 0!==b&&b,y=n.onPlayingState,j=n.onReadyState,O=n.poster,S=n.sources,E=n.src,P=n.style,R=n[r],C=g(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(w));e=(0,J.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var A=(0,D.useAmpContext)().playable,M=(0,D.useLoading)(f),U="unload"!==M,z=h((0,Y.useState)(i),2),L=z[0],B=z[1],W=h((0,Y.useState)(!1),2),_=W[0],Z=W[1],$=h((0,Y.useState)(null),2),nn=$[0],tn=$[1],en=h((0,Y.useState)(!i),2),rn=en[0],on=en[1],an=(0,Y.useRef)(null),un=(0,Y.useRef)(null),ln=(0,Y.useMemo)((function(){return new x}),[]),cn=(0,Y.useRef)(k),fn=(0,V.useValueRef)(j),sn=(0,Y.useCallback)((function(n,t){if(n!==cn.current){cn.current=n;var e=fn.current;e&&e(n,t)}}),[fn]),dn=(0,V.useValueRef)(y),vn=(0,Y.useCallback)((function(n){Z(n);var t=dn.current;t&&t(n)}),[dn]);(0,Y.useLayoutEffect)((function(){U||vn(!1)}),[U,vn]);var pn=(0,Y.useCallback)((function(){return ln.promise.then((function(){return n=un.current,(t=I((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];T(N.apply(null,e))}("TRYPLAY",n)})),t;var n,t}))}),[ln]),bn=(0,Y.useCallback)((function(){ln.promise.then((function(){var n;return null===(n=un.current)||void 0===n?void 0:n.pause()}))}),[ln]),mn=(0,Y.useCallback)((function(){return ln.promise.then((function(){return un.current.requestFullscreen()}))}),[ln]),yn=(0,Y.useCallback)((function(){B(!1),on(!0)}),[]);return(0,Y.useLayoutEffect)((function(){var n,t=null===(n=un.current)||void 0===n?void 0:n.readyState;null!=t&&sn(t>0?"complete":k)}),[sn]),(0,Y.useLayoutEffect)((function(){return p&&_&&nn&&function(n,t,e,r){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata(G),o.mediaSession.metadata=new n.MediaMetadata(t),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",r))}(window,nn,pn,bn),function(){}}),[p,_,nn,pn,bn]),(0,Y.useEffect)((function(){A||bn()}),[A,bn]),(0,Y.useImperativeHandle)(t,(function(){return{get readyState(){return cn.current},play:pn,pause:bn,requestFullscreen:mn,get currentTime(){return un.current?un.current.currentTime:0},get duration(){return un.current?un.current.duration:NaN},get autoplay(){return i},get controls(){return c},get loop(){return d},userInteracted:yn,mute:function(){return B(!0)},unmute:function(){rn&&B(!1)}}}),[pn,bn,mn,yn,rn,i,c,d]),F.createElement(V.ContainWrapper,{contentRef:an,class:R,style:P,size:!0,layout:!0,paint:!0},U&&F.createElement(u,q(q({},C),{},{ref:un,loading:M,muted:L,loop:d,controls:c&&(!i||rn),onCanPlay:function(){ln.resolve(),sn("complete")},onLoadedMetadata:function(){p&&ln.promise.then((function(){var n,t,e,r;tn((n=un.current,q({"title":(t=C).title||t["aria-label"]||document.title,"artist":t.artist||"","album":t.album||"","artwork":[{"src":t.artwork||t.poster||K(document)||(e=document,r=e.querySelector('meta[property="og:image"]'),r?r.getAttribute("content"):void 0)||Q(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),sn("complete")},onPlaying:function(){return vn(!0)},onPause:function(){return vn(!1)},onEnded:function(){return vn(!1)},onError:function(n){sn("error",n),ln.reject(n)},class:"fill-stretch-fc551a7",src:E,poster:O}),S),i&&!rn&&F.createElement(X,{metadata:nn,playing:_,displayIcon:!m&&L,wrapperRef:an,play:pn,pause:bn,displayOverlay:c,onOverlayClick:yn}))}));on.displayName="VideoWrapper";var an=function(n){c(e,b.PreactBaseElement);var t=v(e);function e(){return t.apply(this,arguments)}return e}();function un(n,t){return function(n,t,e){if(!t)return n;var r=n.split("#",2),o=r[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(t):"?".concat(t))+(r[1]?"#".concat(r[1]):"")}(n,function(n){var t,e,r,o=[];for(var i in n){var a=n[i];if(null!=a){a=P(r=a)?r:[r];for(var u=0;u<a.length;u++)o.push((t=i,e=a[u],"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(t))}function ln(n,t){return JSON.stringify({"command":n,"parameters":t})}an.Component=on,an.loadable=!0,an.layoutSizeDefined=!0,an.staticProps,an.props={"album":{attr:"album"},"alt":{attr:"alt"},"artist":{attr:"artist"},"artwork":{attr:"artwork"},"attribution":{attr:"attribution"},"autoplay":{attr:"autoplay",type:"boolean"},"controls":{attr:"controls",type:"boolean"},"controlslist":{attr:"controlslist"},"crossorigin":{attr:"crossorigin"},"disableremoteplayback":{attr:"disableremoteplayback"},"loop":{attr:"loop",type:"boolean"},"noaudio":{attr:"noaudio",type:"boolean"},"poster":{attr:"poster"},"sources":{selector:"source",single:!1,clone:!0},"src":{attr:"src"},"title":{attr:"title"},"dock":{attr:"dock",media:!0},"rotate-to-fullscreen":{attr:"rotate-to-fullscreen",type:"boolean",media:!0}},an.shadowCss='.fill-stretch-fc551a7{width:100%;height:100%;position:relative}.fill-content-overlay-fc551a7{top:0;left:0;right:0;bottom:0;position:absolute}.autoplay-mask-button-9e7199f{width:100%;border:none;display:block;-webkit-appearance:none;appearance:none;background:transparent}.eq-9e7199f{right:7px;width:20px;bottom:7px;height:12px;display:-ms-flexbox;display:flex;opacity:0.8;z-index:1;overflow:hidden;position:absolute;-ms-flex-align:end;align-items:flex-end;pointer-events:none!important}.eq-playing-9e7199f>div:after,.eq-playing-9e7199f>div:before{animation-play-state:running}.eq-col-9e7199f{-ms-flex:1;flex:1;height:100%;position:relative;margin-right:1px}.eq-col-9e7199f:after,.eq-col-9e7199f:before{width:100%;height:100%;content:"";position:absolute;animation:keyframes-eq-animation-9e7199f 0s linear infinite alternate;will-change:transform;background-color:#fafafa;animation-play-state:paused}.eq-col-9e7199f:nth-child(4):before{animation-duration:0.4s}.eq-col-9e7199f:nth-child(4):after{animation-duration:0.25s}.eq-col-9e7199f:nth-child(3):before{animation-duration:0.3s}.eq-col-9e7199f:nth-child(3):after{animation-duration:0.35s}.eq-col-9e7199f:nth-child(2):before{animation-duration:0.5s}.eq-col-9e7199f:nth-child(2):after{animation-duration:0.4s}.eq-col-9e7199f:first-child:before{animation-duration:0.3s}.eq-col-9e7199f:first-child:after{animation-duration:0.45s}@keyframes keyframes-eq-animation-9e7199f{0%{transform:translateY(100%)}to{transform:translateY(0)}}',an.usesShadowDom=!0,new Set(["c","v","a","ad"]);var cn=u(require("./@bentoproject/core")),fn=u(require("./@bentoproject/core")),sn=u(require("./@bentoproject/core")),dn=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],vn=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function pn(n,t,e){n&&n.contentWindow&&t.then((function(){n.contentWindow.postMessage(e(),"*")}))}var bn=(0,sn.forwardRef)((function(n,t){var e=n.loading,r=n.unloadOnPause,o=void 0!==r&&r,i=n.sandbox,a=void 0===i?vn:i,u=n.muted,l=void 0!==u&&u,c=n.controls,f=void 0!==c&&c,s=n.origin,d=n.onCanPlay,v=n.onMessage,p=n.playerStateRef,b=n.makeMethodMessage,m=n.makeFullscreenMessage,y=n.onIframeLoad,h=g(n,dn),w=(0,fn.useRef)(null),j=(0,fn.useMemo)((function(){return new x}),[]),O=(0,fn.useRef)(b),k=(0,fn.useCallback)((function(n){pn(null==w?void 0:w.current,j.promise,(function(){return O.current(n)}))}),[j.promise]),S=(0,fn.useRef)(m),I=(0,fn.useCallback)((function(){return pn(null==w?void 0:w.current,j.promise,S.current)}),[j.promise]);(0,fn.useImperativeHandle)(t,(function(){return{get currentTime(){var n,t;return null!==(n=null==p||null===(t=p.current)||void 0===t?void 0:t.currentTime)&&void 0!==n?n:NaN},get duration(){var n,t;return null!==(n=null==p||null===(t=p.current)||void 0===t?void 0:t.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!S.current)return j.promise.then((function(){w.current.requestFullscreen()}));I()},play:function(){return k("play")},pause:function(){if(o){var n=w.current;n&&(n.src=n.src)}else k("pause")}}}),[p,k,I,j.promise,o]);var E=function(n){var t=(0,fn.useRef)(null);return t.current=n,t}(v);return(0,fn.useLayoutEffect)((function(){if(w.current){var n=w.current.ownerDocument.defaultView;return n.addEventListener("message",t),function(){return n.removeEventListener("message",t)}}function t(n){E.current&&(s&&!s.test(n.origin)||n.source!=w.current.contentWindow||E.current({currentTarget:w.current,target:w.current,data:n.data}))}}),[s,E]),(0,fn.useLayoutEffect)((function(){k(l?"mute":"unmute")}),[l,k]),(0,fn.useLayoutEffect)((function(){k(f?"showControls":"hideControls")}),[f,k]),cn.createElement("iframe",q(q({},h),{},{ref:w,allowfullscreen:!0,frameborder:"0",sandbox:a,loading:e,onCanPlay:function(){d&&j.promise.then(d),j.resolve()},onLoad:function(n){null==y||y(n)}}))}));bn.displayName="VideoIframeInternal";var mn=(0,sn.forwardRef)((function(n,t){return cn.createElement(on,q(q({ref:t},n),{},{component:bn}))}));mn.displayName="VideoIframe";var yn=u(require("./@bentoproject/core")),hn=u(require("./@bentoproject/core")),gn=u(require("./@bentoproject/core")),wn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function jn(n){switch(n){case"mute":return ln("muted",[!0]);case"unmute":return ln("muted",[!1]);case"showControls":return ln("controls",[!0]);case"hideControls":return ln("controls",[!1]);default:return ln(n)}}function On(n){var t=n.currentTarget,e=function(n){var t,e=C();if(!n)return e;for(;t=Z.exec(n);){var r=$(t[1],t[1]),o=t[2]?$(t[2].replace(/\+/g," "),t[2]):"";e[r]=o}return e}(n.data),r=null==e?void 0:e.event;"pause"===r?_(t,"pause"):"play"===r?_(t,"playing"):"end"===r?(_(t,"pause"),_(t,"end")):"apiready"===r&&_(t,"canplay")}var qn=(0,gn.forwardRef)((function(n,t){var e=n.autoplay,r=n.endscreenEnable,o=n.info,i=n.mute,a=n.sharingEnable,u=n.start,l=n.uiHighlight,c=n.uiLogo,f=n.videoId,s=g(n,wn),d=(0,hn.useMemo)((function(){return function(n,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],u=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],f=arguments.length>10?arguments[10]:void 0;return un("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(t),"?api=1&html=1&app=amp"),q({"endscreen-enable":r?void 0:r,"info":o?void 0:o,"mute":i||e&&L(n)?1:void 0,"sharing-enable":a?void 0:a,"start":u,"ui-highlight":l,"ui-logo":c?void 0:c},f))}(window,f,e,r,o,i,a,u,l,c)}),[f,e,r,o,i,a,u,l,c]);return yn.createElement(mn,q(q({autoplay:e,controls:!0,ref:t},s),{},{src:d,makeMethodMessage:jn,onMessage:On}))}));qn.displayName="BentoDailymotion";var kn=function(n){c(e,an);var t=v(e);function e(){return t.apply(this,arguments)}return e}();kn.Component=qn,kn.props={"autoplay":{attr:"autoplay",type:"boolean"},"videoId":{attr:"data-videoid"},"start":{attr:"data-start"},"uiHighlight":{attr:"data-ui-highlight"},"implicitParams":{attrPrefix:"data-param-"}},kn.layoutSizeDefined=!0,kn.usesShadowDom=!0;var Sn=u(require("./@bentoproject/core"));function xn(n){(0,Sn.defineBentoElement)("bento-dailymotion",kn,n)} | ||
var n=Object.create,t=Object.defineProperty,e=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,o=Object.getPrototypeOf,i=Object.prototype.hasOwnProperty,a=function(n){return t(n,"__esModule",{value:!0})},u=function(u){return function(n,o,a){if(o&&"object"==typeof o||"function"==typeof o)for(var u,l=r(o),c=0,f=l.length;c<f;c++)u=l[c],i.call(n,u)||"default"===u||t(n,u,{get:function(n){return o[n]}.bind(null,u),enumerable:!(a=e(o,u))||a.enumerable});return n}(a(t(null!=u?n(o(u)):{},"default",u&&u.__esModule&&"default"in u?{get:function(){return u.default},enumerable:!0}:{value:u,enumerable:!0})),u)};function l(n,t){return(l=Object.setPrototypeOf||function(n,t){return n.__proto__=t,n})(n,t)}function c(n,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");n.prototype=Object.create(t&&t.prototype,{constructor:{value:n,writable:!0,configurable:!0}}),t&&l(n,t)}function f(n){return(f=Object.setPrototypeOf?Object.getPrototypeOf:function(n){return n.__proto__||Object.getPrototypeOf(n)})(n)}function s(n){return(s="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(n){return typeof n}:function(n){return n&&"function"==typeof Symbol&&n.constructor===Symbol&&n!==Symbol.prototype?"symbol":typeof n})(n)}function d(n,t){if(t&&("object"===s(t)||"function"==typeof t))return t;if(void 0!==t)throw new TypeError("Derived constructors may only return object or undefined");return function(n){if(void 0===n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return n}(n)}function v(n){var t=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(n){return!1}}();return function(){var e,r=f(n);if(t){var o=f(this).constructor;e=Reflect.construct(r,arguments,o)}else e=r.apply(this,arguments);return d(this,e)}}!function(n,e){for(var r in a(n),e)t(n,r,{get:e[r],enumerable:!0})}(exports,{defineElement:function(){return xn}});var p,b=u(require("@bentoproject/core"));function m(n,t){(null==t||t>n.length)&&(t=n.length);for(var e=0,r=new Array(t);e<t;e++)r[e]=n[e];return r}function y(n,t){if(n){if("string"==typeof n)return m(n,t);var e=Object.prototype.toString.call(n).slice(8,-1);return"Object"===e&&n.constructor&&(e=n.constructor.name),"Map"===e||"Set"===e?Array.from(n):"Arguments"===e||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(e)?m(n,t):void 0}}function h(n,t){return function(n){if(Array.isArray(n))return n}(n)||function(n,t){var e=null==n?null:"undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(null!=e){var r,o,i=[],a=!0,u=!1;try{for(e=e.call(n);!(a=(r=e.next()).done)&&(i.push(r.value),!t||i.length!==t);a=!0);}catch(n){u=!0,o=n}finally{try{a||null==e.return||e.return()}finally{if(u)throw o}}return i}}(n,t)||y(n,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function g(n,t){if(null==n)return{};var e,r,o={},i=Object.keys(n);for(r=0;r<i.length;r++)e=i[r],t.indexOf(e)>=0||(o[e]=n[e]);return o}function w(n){var t=function(n,t){if("object"!==s(n)||null===n)return n;var e=n[Symbol.toPrimitive];if(void 0!==e){var r=e.call(n,"string");if("object"!==s(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(n)}(n);return"symbol"===s(t)?t:String(t)}function j(n,t,e){return t in n?Object.defineProperty(n,t,{value:e,enumerable:!0,configurable:!0,writable:!0}):n[t]=e,n}function O(n,t){var e=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable}))),e.push.apply(e,r)}return e}function q(n){for(var t=1;t<arguments.length;t++){var e=null!=arguments[t]?arguments[t]:{};t%2?O(Object(e),!0).forEach((function(t){j(n,t,e[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(e)):O(Object(e)).forEach((function(t){Object.defineProperty(n,t,Object.getOwnPropertyDescriptor(e,t))}))}return n}var k=(j(p={},"auto",0),j(p,"lazy",1),j(p,"eager",2),j(p,"unload",3),"loading");function S(n,t){var e="undefined"!=typeof Symbol&&n[Symbol.iterator]||n["@@iterator"];if(e)return(e=e.call(n)).next.bind(e);if(Array.isArray(n)||(e=y(n))||t&&n&&"number"==typeof n.length){e&&(n=e);var r=0;return function(){return r>=n.length?{done:!0}:{done:!1,value:n[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 x=function(){var n=this;this.promise=new Promise((function(t,e){n.resolve=t,n.reject=e}))};function I(n){return new Promise((function(t){t(n())}))}var E,P=Array.isArray,R=Object.prototype;function C(n){var t=Object.create(null);return n&&Object.assign(t,n),t}function A(n){var t=Object.getOwnPropertyDescriptor(n,"message");if(null!=t&&t.writable)return n;var e=n.message,r=n.stack,o=new Error(e);for(var i in n)o[i]=n[i];return o.stack=r,o}function M(n){for(var t,e=null,r="",o=S(arguments,!0);!(t=o()).done;){var i=t.value;i instanceof Error&&!e?e=A(i):(r&&(r+=" "),r+=i)}return e?r&&(e.message=r+": "+e.message):e=new Error(r),e}function T(n){var t,e;null===(t=(e=self).__AMP_REPORT_ERROR)||void 0===t||t.call(e,n)}function N(n){var t=M.apply(null,arguments);return t.expected=!0,t}R.hasOwnProperty,R.toString;var U=["Webkit","webkit","Moz","moz","ms","O","o"];function z(n,t,e,r,o){var i=function(n,t,e){if(t.startsWith("--"))return t;E||(E=C());var r=E[t];if(!r||e){if(r=t,void 0===n[t]){var o=function(n){return n.charAt(0).toUpperCase()+n.slice(1)}(t),i=function(n,t){for(var e=0;e<U.length;e++){var r=U[e]+t;if(void 0!==n[r])return r}return""}(n,o);void 0!==n[i]&&(r=i)}e||(E[t]=r)}return r}(n.style,t,o);if(i){var a,u=r?e+r:e;n.style.setProperty((a=i.replace(/[A-Z]/g,(function(n){return"-"+n.toLowerCase()})),U.some((function(n){return a.startsWith(n+"-")}))?"-".concat(a):a),u)}}function L(n){return null==n.__AMP_AUTOPLAY&&(n.__AMP_AUTOPLAY=function(n){var t,e=n.document.createElement("video");return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(n,t){for(var e in t)z(n,e,t[e])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),t=e,I((function(){return t.play()})).catch((function(){})),Promise.resolve(!e.paused)}(n)),n.__AMP_AUTOPLAY}var F=u(require("@bentoproject/core")),Y=u(require("@bentoproject/core")),B=u(require("@bentoproject/core")),V=u(require("@bentoproject/core")),D=u(require("@bentoproject/core")),H=u(require("@bentoproject/core")),J=u(require("@bentoproject/core")),W={bubbles:!0,cancelable:!0};function _(n,t,e,r){var o=e||{};n.ownerDocument;var i=n.ownerDocument.createEvent("Event");i.data=o;var a=r||W,u=a.bubbles,l=a.cancelable;i.initEvent(t,u,l),n.dispatchEvent(i)}var Z=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function $(n){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";try{return decodeURIComponent(n)}catch(n){return t}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var G={"title":"","artist":"","album":"","artwork":[{"src":""}]};function K(n){var t=n.querySelector('script[type="application/ld+json"]');if(t){var e=function(n,t){try{return function(n){return JSON.parse(n)}(n)}catch(n){return null}}(t.textContent);if(e&&e.image)return"string"==typeof e.image?e.image:e.image["@list"]&&"string"==typeof e.image["@list"][0]?e.image["@list"][0]:"string"==typeof e.image.url?e.image.url:"string"==typeof e.image[0]?e.image[0]:void 0}}function Q(n){var t=n.querySelector('link[rel="shortcut icon"]')||n.querySelector('link[rel="icon"]');return t?t.getAttribute("href"):void 0}function X(n){var t=n.displayIcon,e=n.displayOverlay,r=n.metadata,o=n.onOverlayClick,i=n.pause,a=n.play,u=n.playing,l=n.wrapperRef,c=(0,D.useAmpContext)().playable;return(0,Y.useEffect)((function(){if(c){var n=new IntersectionObserver((function(n){n[n.length-1].isIntersecting?a().catch((function(){})):i()}),{threshold:.5});return n.observe(l.current),function(){n.disconnect()}}i()}),[l,a,i,c]),F.createElement(F.Fragment,null,t&&F.createElement("div",{class:"eq-9e7199f"+(u?" eq-playing-9e7199f":"")},F.createElement(rn,null)),e&&F.createElement("button",{"aria-label":r&&r.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var nn,tn,en,rn=(nn=!1,tn=null,en=function(){return[1,2,3,4].map((function(n){return F.createElement("div",{class:"eq-col-9e7199f",key:n})}))},function(){if(!nn){for(var n=arguments.length,t=new Array(n),e=0;e<n;e++)t[e]=arguments[e];tn=en.apply(self,t),nn=!0,en=null}return tn}),on=(0,B.forwardRef)((function(n,t){var e,r="class",o=n.autoplay,i=void 0!==o&&o,a=n.component,u=void 0===a?"video":a,l=n.controls,c=void 0!==l&&l,f=n.loading,s=n.loop,d=void 0!==s&&s,v=n.mediasession,p=void 0===v||v,b=n.noaudio,m=void 0!==b&&b,y=n.onPlayingState,j=n.onReadyState,O=n.poster,S=n.sources,E=n.src,P=n.style,R=n[r],C=g(n,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(w));e=(0,J.useAmpContext)().notify,(0,H.useLayoutEffect)((function(){e&&e()}));var A=(0,D.useAmpContext)().playable,M=(0,D.useLoading)(f),U="unload"!==M,z=h((0,Y.useState)(i),2),L=z[0],B=z[1],W=h((0,Y.useState)(!1),2),_=W[0],Z=W[1],$=h((0,Y.useState)(null),2),nn=$[0],tn=$[1],en=h((0,Y.useState)(!i),2),rn=en[0],on=en[1],an=(0,Y.useRef)(null),un=(0,Y.useRef)(null),ln=(0,Y.useMemo)((function(){return new x}),[]),cn=(0,Y.useRef)(k),fn=(0,V.useValueRef)(j),sn=(0,Y.useCallback)((function(n,t){if(n!==cn.current){cn.current=n;var e=fn.current;e&&e(n,t)}}),[fn]),dn=(0,V.useValueRef)(y),vn=(0,Y.useCallback)((function(n){Z(n);var t=dn.current;t&&t(n)}),[dn]);(0,Y.useLayoutEffect)((function(){U||vn(!1)}),[U,vn]);var pn=(0,Y.useCallback)((function(){return ln.promise.then((function(){return n=un.current,(t=I((function(){return n.play(!1)}))).catch((function(n){!function(n){for(var t=arguments.length,e=new Array(t>1?t-1:0),r=1;r<t;r++)e[r-1]=arguments[r];T(N.apply(null,e))}("TRYPLAY",n)})),t;var n,t}))}),[ln]),bn=(0,Y.useCallback)((function(){ln.promise.then((function(){var n;return null===(n=un.current)||void 0===n?void 0:n.pause()}))}),[ln]),mn=(0,Y.useCallback)((function(){return ln.promise.then((function(){return un.current.requestFullscreen()}))}),[ln]),yn=(0,Y.useCallback)((function(){B(!1),on(!0)}),[]);return(0,Y.useLayoutEffect)((function(){var n,t=null===(n=un.current)||void 0===n?void 0:n.readyState;null!=t&&sn(t>0?"complete":k)}),[sn]),(0,Y.useLayoutEffect)((function(){return p&&_&&nn&&function(n,t,e,r){var o=n.navigator;"mediaSession"in o&&n.MediaMetadata&&(o.mediaSession.metadata=new n.MediaMetadata(G),o.mediaSession.metadata=new n.MediaMetadata(t),o.mediaSession.setActionHandler("play",e),o.mediaSession.setActionHandler("pause",r))}(window,nn,pn,bn),function(){}}),[p,_,nn,pn,bn]),(0,Y.useEffect)((function(){A||bn()}),[A,bn]),(0,Y.useImperativeHandle)(t,(function(){return{get readyState(){return cn.current},play:pn,pause:bn,requestFullscreen:mn,get currentTime(){return un.current?un.current.currentTime:0},get duration(){return un.current?un.current.duration:NaN},get autoplay(){return i},get controls(){return c},get loop(){return d},userInteracted:yn,mute:function(){return B(!0)},unmute:function(){rn&&B(!1)}}}),[pn,bn,mn,yn,rn,i,c,d]),F.createElement(V.ContainWrapper,{contentRef:an,class:R,style:P,size:!0,layout:!0,paint:!0},U&&F.createElement(u,q(q({},C),{},{ref:un,loading:M,muted:L,loop:d,controls:c&&(!i||rn),onCanPlay:function(){ln.resolve(),sn("complete")},onLoadedMetadata:function(){p&&ln.promise.then((function(){var n,t,e,r;tn((n=un.current,q({"title":(t=C).title||t["aria-label"]||document.title,"artist":t.artist||"","album":t.album||"","artwork":[{"src":t.artwork||t.poster||K(document)||(e=document,r=e.querySelector('meta[property="og:image"]'),r?r.getAttribute("content"):void 0)||Q(document)||""}]},n&&n.getMetadata?n.getMetadata():Object.create(null))))})),sn("complete")},onPlaying:function(){return vn(!0)},onPause:function(){return vn(!1)},onEnded:function(){return vn(!1)},onError:function(n){sn("error",n),ln.reject(n)},class:"fill-stretch-fc551a7",src:E,poster:O}),S),i&&!rn&&F.createElement(X,{metadata:nn,playing:_,displayIcon:!m&&L,wrapperRef:an,play:pn,pause:bn,displayOverlay:c,onOverlayClick:yn}))}));on.displayName="VideoWrapper";var an=function(n){c(e,b.PreactBaseElement);var t=v(e);function e(){return t.apply(this,arguments)}return e}();function un(n,t){return function(n,t,e){if(!t)return n;var r=n.split("#",2),o=r[0].split("?",2);return o[0]+(o[1]?"?".concat(o[1],"&").concat(t):"?".concat(t))+(r[1]?"#".concat(r[1]):"")}(n,function(n){var t,e,r,o=[];for(var i in n){var a=n[i];if(null!=a){a=P(r=a)?r:[r];for(var u=0;u<a.length;u++)o.push((t=i,e=a[u],"".concat(encodeURIComponent(t),"=").concat(encodeURIComponent(e))))}}return o.join("&")}(t))}function ln(n,t){return JSON.stringify({"command":n,"parameters":t})}an.Component=on,an.loadable=!0,an.layoutSizeDefined=!0,an.staticProps,an.props={"album":{attr:"album"},"alt":{attr:"alt"},"artist":{attr:"artist"},"artwork":{attr:"artwork"},"attribution":{attr:"attribution"},"autoplay":{attr:"autoplay",type:"boolean"},"controls":{attr:"controls",type:"boolean"},"controlslist":{attr:"controlslist"},"crossorigin":{attr:"crossorigin"},"disableremoteplayback":{attr:"disableremoteplayback"},"loop":{attr:"loop",type:"boolean"},"noaudio":{attr:"noaudio",type:"boolean"},"poster":{attr:"poster"},"sources":{selector:"source",single:!1,clone:!0},"src":{attr:"src"},"title":{attr:"title"},"dock":{attr:"dock",media:!0},"rotate-to-fullscreen":{attr:"rotate-to-fullscreen",type:"boolean",media:!0}},an.shadowCss='.fill-stretch-fc551a7{width:100%;height:100%;position:relative}.fill-content-overlay-fc551a7{top:0;left:0;right:0;bottom:0;position:absolute}.autoplay-mask-button-9e7199f{width:100%;border:none;display:block;-webkit-appearance:none;appearance:none;background:transparent}.eq-9e7199f{right:7px;width:20px;bottom:7px;height:12px;display:-ms-flexbox;display:flex;opacity:0.8;z-index:1;overflow:hidden;position:absolute;-ms-flex-align:end;align-items:flex-end;pointer-events:none!important}.eq-playing-9e7199f>div:after,.eq-playing-9e7199f>div:before{animation-play-state:running}.eq-col-9e7199f{-ms-flex:1;flex:1;height:100%;position:relative;margin-right:1px}.eq-col-9e7199f:after,.eq-col-9e7199f:before{width:100%;height:100%;content:"";position:absolute;animation:keyframes-eq-animation-9e7199f 0s linear infinite alternate;will-change:transform;background-color:#fafafa;animation-play-state:paused}.eq-col-9e7199f:nth-child(4):before{animation-duration:0.4s}.eq-col-9e7199f:nth-child(4):after{animation-duration:0.25s}.eq-col-9e7199f:nth-child(3):before{animation-duration:0.3s}.eq-col-9e7199f:nth-child(3):after{animation-duration:0.35s}.eq-col-9e7199f:nth-child(2):before{animation-duration:0.5s}.eq-col-9e7199f:nth-child(2):after{animation-duration:0.4s}.eq-col-9e7199f:first-child:before{animation-duration:0.3s}.eq-col-9e7199f:first-child:after{animation-duration:0.45s}@keyframes keyframes-eq-animation-9e7199f{0%{transform:translateY(100%)}to{transform:translateY(0)}}',an.usesShadowDom=!0,new Set(["c","v","a","ad"]);var cn=u(require("@bentoproject/core")),fn=u(require("@bentoproject/core")),sn=u(require("@bentoproject/core")),dn=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],vn=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function pn(n,t,e){n&&n.contentWindow&&t.then((function(){n.contentWindow.postMessage(e(),"*")}))}var bn=(0,sn.forwardRef)((function(n,t){var e=n.loading,r=n.unloadOnPause,o=void 0!==r&&r,i=n.sandbox,a=void 0===i?vn:i,u=n.muted,l=void 0!==u&&u,c=n.controls,f=void 0!==c&&c,s=n.origin,d=n.onCanPlay,v=n.onMessage,p=n.playerStateRef,b=n.makeMethodMessage,m=n.makeFullscreenMessage,y=n.onIframeLoad,h=g(n,dn),w=(0,fn.useRef)(null),j=(0,fn.useMemo)((function(){return new x}),[]),O=(0,fn.useRef)(b),k=(0,fn.useCallback)((function(n){pn(null==w?void 0:w.current,j.promise,(function(){return O.current(n)}))}),[j.promise]),S=(0,fn.useRef)(m),I=(0,fn.useCallback)((function(){return pn(null==w?void 0:w.current,j.promise,S.current)}),[j.promise]);(0,fn.useImperativeHandle)(t,(function(){return{get currentTime(){var n,t;return null!==(n=null==p||null===(t=p.current)||void 0===t?void 0:t.currentTime)&&void 0!==n?n:NaN},get duration(){var n,t;return null!==(n=null==p||null===(t=p.current)||void 0===t?void 0:t.duration)&&void 0!==n?n:NaN},requestFullscreen:function(){if(!S.current)return j.promise.then((function(){w.current.requestFullscreen()}));I()},play:function(){return k("play")},pause:function(){if(o){var n=w.current;n&&(n.src=n.src)}else k("pause")}}}),[p,k,I,j.promise,o]);var E=function(n){var t=(0,fn.useRef)(null);return t.current=n,t}(v);return(0,fn.useLayoutEffect)((function(){if(w.current){var n=w.current.ownerDocument.defaultView;return n.addEventListener("message",t),function(){return n.removeEventListener("message",t)}}function t(n){E.current&&(s&&!s.test(n.origin)||n.source!=w.current.contentWindow||E.current({currentTarget:w.current,target:w.current,data:n.data}))}}),[s,E]),(0,fn.useLayoutEffect)((function(){k(l?"mute":"unmute")}),[l,k]),(0,fn.useLayoutEffect)((function(){k(f?"showControls":"hideControls")}),[f,k]),cn.createElement("iframe",q(q({},h),{},{ref:w,allowfullscreen:!0,frameborder:"0",sandbox:a,loading:e,onCanPlay:function(){d&&j.promise.then(d),j.resolve()},onLoad:function(n){null==y||y(n)}}))}));bn.displayName="VideoIframeInternal";var mn=(0,sn.forwardRef)((function(n,t){return cn.createElement(on,q(q({ref:t},n),{},{component:bn}))}));mn.displayName="VideoIframe";var yn=u(require("@bentoproject/core")),hn=u(require("@bentoproject/core")),gn=u(require("@bentoproject/core")),wn=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function jn(n){switch(n){case"mute":return ln("muted",[!0]);case"unmute":return ln("muted",[!1]);case"showControls":return ln("controls",[!0]);case"hideControls":return ln("controls",[!1]);default:return ln(n)}}function On(n){var t=n.currentTarget,e=function(n){var t,e=C();if(!n)return e;for(;t=Z.exec(n);){var r=$(t[1],t[1]),o=t[2]?$(t[2].replace(/\+/g," "),t[2]):"";e[r]=o}return e}(n.data),r=null==e?void 0:e.event;"pause"===r?_(t,"pause"):"play"===r?_(t,"playing"):"end"===r?(_(t,"pause"),_(t,"end")):"apiready"===r&&_(t,"canplay")}var qn=(0,gn.forwardRef)((function(n,t){var e=n.autoplay,r=n.endscreenEnable,o=n.info,i=n.mute,a=n.sharingEnable,u=n.start,l=n.uiHighlight,c=n.uiLogo,f=n.videoId,s=g(n,wn),d=(0,hn.useMemo)((function(){return function(n,t){var e=arguments.length>2&&void 0!==arguments[2]&&arguments[2],r=!(arguments.length>3&&void 0!==arguments[3])||arguments[3],o=!(arguments.length>4&&void 0!==arguments[4])||arguments[4],i=arguments.length>5&&void 0!==arguments[5]&&arguments[5],a=!(arguments.length>6&&void 0!==arguments[6])||arguments[6],u=arguments.length>7?arguments[7]:void 0,l=arguments.length>8?arguments[8]:void 0,c=!(arguments.length>9&&void 0!==arguments[9])||arguments[9],f=arguments.length>10?arguments[10]:void 0;return un("https://www.dailymotion.com/embed/video/".concat(encodeURIComponent(t),"?api=1&html=1&app=amp"),q({"endscreen-enable":r?void 0:r,"info":o?void 0:o,"mute":i||e&&L(n)?1:void 0,"sharing-enable":a?void 0:a,"start":u,"ui-highlight":l,"ui-logo":c?void 0:c},f))}(window,f,e,r,o,i,a,u,l,c)}),[f,e,r,o,i,a,u,l,c]);return yn.createElement(mn,q(q({autoplay:e,controls:!0,ref:t},s),{},{src:d,makeMethodMessage:jn,onMessage:On}))}));qn.displayName="BentoDailymotion";var kn=function(n){c(e,an);var t=v(e);function e(){return t.apply(this,arguments)}return e}();kn.Component=qn,kn.props={"autoplay":{attr:"autoplay",type:"boolean"},"videoId":{attr:"data-videoid"},"start":{attr:"data-start"},"uiHighlight":{attr:"data-ui-highlight"},"implicitParams":{attrPrefix:"data-param-"}},kn.layoutSizeDefined=!0,kn.usesShadowDom=!0;var Sn=u(require("@bentoproject/core"));function xn(n){(0,Sn.defineBentoElement)("bento-dailymotion",kn,n)} | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=web-component.js.map |
@@ -40,3 +40,3 @@ var __create = Object.create; | ||
// src/bento/components/bento-video/1.0/base-element.js | ||
var import_base_element = __toModule(require("./@bentoproject/core")); | ||
var import_base_element = __toModule(require("@bentoproject/core")); | ||
@@ -420,11 +420,11 @@ // src/bento/components/bento-video/1.0/autoplay.jss.js | ||
// src/bento/components/bento-video/1.0/component.js | ||
var Preact = __toModule(require("./@bentoproject/core")); | ||
var import_preact = __toModule(require("./@bentoproject/core")); | ||
var import_compat = __toModule(require("./@bentoproject/core")); | ||
var import_component3 = __toModule(require("./@bentoproject/core")); | ||
var import_context2 = __toModule(require("./@bentoproject/core")); | ||
var Preact = __toModule(require("@bentoproject/core")); | ||
var import_preact = __toModule(require("@bentoproject/core")); | ||
var import_compat = __toModule(require("@bentoproject/core")); | ||
var import_component3 = __toModule(require("@bentoproject/core")); | ||
var import_context2 = __toModule(require("@bentoproject/core")); | ||
// src/preact/utils.js | ||
var import__ = __toModule(require("./@bentoproject/core")); | ||
var import_context = __toModule(require("./@bentoproject/core")); | ||
var import__ = __toModule(require("@bentoproject/core")); | ||
var import_context = __toModule(require("@bentoproject/core")); | ||
function useResourcesNotify() { | ||
@@ -1062,5 +1062,5 @@ var _useAmpContext = (0, import_context.useAmpContext)(), notify = _useAmpContext.notify; | ||
// src/bento/components/bento-video/1.0/video-iframe.js | ||
var Preact2 = __toModule(require("./@bentoproject/core")); | ||
var import_preact2 = __toModule(require("./@bentoproject/core")); | ||
var import_compat2 = __toModule(require("./@bentoproject/core")); | ||
var Preact2 = __toModule(require("@bentoproject/core")); | ||
var import_preact2 = __toModule(require("@bentoproject/core")); | ||
var import_compat2 = __toModule(require("@bentoproject/core")); | ||
var _excluded = ["loading", "unloadOnPause", "sandbox", "muted", "controls", "origin", "onCanPlay", "onMessage", "playerStateRef", "makeMethodMessage", "makeFullscreenMessage", "onIframeLoad"]; | ||
@@ -1219,5 +1219,5 @@ function _extends3() { | ||
// src/bento/components/bento-dailymotion/1.0/component.js | ||
var Preact3 = __toModule(require("./@bentoproject/core")); | ||
var import_preact3 = __toModule(require("./@bentoproject/core")); | ||
var import_compat3 = __toModule(require("./@bentoproject/core")); | ||
var Preact3 = __toModule(require("@bentoproject/core")); | ||
var import_preact3 = __toModule(require("@bentoproject/core")); | ||
var import_compat3 = __toModule(require("@bentoproject/core")); | ||
var _excluded2 = ["autoplay", "endscreenEnable", "info", "mute", "sharingEnable", "start", "uiHighlight", "uiLogo", "videoId"]; | ||
@@ -1342,3 +1342,3 @@ function _extends4() { | ||
// src/bento/components/bento-dailymotion/1.0/build/web-component.js | ||
var import_bento_ce = __toModule(require("./@bentoproject/core")); | ||
var import_bento_ce = __toModule(require("@bentoproject/core")); | ||
function defineElement(win) { | ||
@@ -1345,0 +1345,0 @@ (0, import_bento_ce.defineBentoElement)("bento-dailymotion", BaseElement, win); |
// src/bento/components/bento-video/1.0/base-element.js | ||
import { PreactBaseElement } from "./@bentoproject/core"; | ||
import { PreactBaseElement } from "@bentoproject/core"; | ||
@@ -338,11 +338,11 @@ // src/bento/components/bento-video/1.0/autoplay.jss.js | ||
createElement | ||
} from "./@bentoproject/core"; | ||
import { useCallback as useCallback2, useEffect, useImperativeHandle, useLayoutEffect as useLayoutEffect2, useMemo, useRef, useState } from "./@bentoproject/core"; | ||
import { forwardRef } from "./@bentoproject/core"; | ||
import { ContainWrapper, useValueRef } from "./@bentoproject/core"; | ||
import { useAmpContext as useAmpContext2, useLoading } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useCallback as useCallback2, useEffect, useImperativeHandle, useLayoutEffect as useLayoutEffect2, useMemo, useRef, useState } from "@bentoproject/core"; | ||
import { forwardRef } from "@bentoproject/core"; | ||
import { ContainWrapper, useValueRef } from "@bentoproject/core"; | ||
import { useAmpContext as useAmpContext2, useLoading } from "@bentoproject/core"; | ||
// src/preact/utils.js | ||
import { useCallback, useLayoutEffect } from "./@bentoproject/core"; | ||
import { useAmpContext } from "./@bentoproject/core"; | ||
import { useCallback, useLayoutEffect } from "@bentoproject/core"; | ||
import { useAmpContext } from "@bentoproject/core"; | ||
function useResourcesNotify() { | ||
@@ -959,5 +959,5 @@ const { | ||
createElement as createElement2 | ||
} from "./@bentoproject/core"; | ||
import { useCallback as useCallback3, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2 } from "./@bentoproject/core"; | ||
import { forwardRef as forwardRef2 } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useCallback as useCallback3, useImperativeHandle as useImperativeHandle2, useLayoutEffect as useLayoutEffect3, useMemo as useMemo2, useRef as useRef2 } from "@bentoproject/core"; | ||
import { forwardRef as forwardRef2 } from "@bentoproject/core"; | ||
var _excluded = ["loading", "unloadOnPause", "sandbox", "muted", "controls", "origin", "onCanPlay", "onMessage", "playerStateRef", "makeMethodMessage", "makeFullscreenMessage", "onIframeLoad"]; | ||
@@ -1121,5 +1121,5 @@ function _extends3() { | ||
createElement as createElement3 | ||
} from "./@bentoproject/core"; | ||
import { useMemo as useMemo3 } from "./@bentoproject/core"; | ||
import { forwardRef as forwardRef3 } from "./@bentoproject/core"; | ||
} from "@bentoproject/core"; | ||
import { useMemo as useMemo3 } from "@bentoproject/core"; | ||
import { forwardRef as forwardRef3 } from "@bentoproject/core"; | ||
var _excluded2 = ["autoplay", "endscreenEnable", "info", "mute", "sharingEnable", "start", "uiHighlight", "uiLogo", "videoId"]; | ||
@@ -1237,3 +1237,3 @@ function _extends4() { | ||
// src/bento/components/bento-dailymotion/1.0/build/web-component.js | ||
import { defineBentoElement } from "./@bentoproject/core"; | ||
import { defineBentoElement } from "@bentoproject/core"; | ||
function defineElement(win) { | ||
@@ -1240,0 +1240,0 @@ defineBentoElement("bento-dailymotion", BaseElement, win); |
; | ||
import{PreactBaseElement as t}from"./@bentoproject/core";function e(t,e){if(null==t)return{};var n,o,r={},a=Object.keys(t);for(o=0;o<a.length;o++)n=a[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}function n(t){return(n="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 o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l=class{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}};function s(t){return new Promise((e=>{e(t())}))}var c,{isArray:u}=Array,{hasOwnProperty:f,toString:d}=Object.prototype;function p(t){const e=Object.create(null);return t&&Object.assign(e,t),e}function m(t){const e=Object.getOwnPropertyDescriptor(t,"message");if(null!=e&&e.writable)return t;const{message:n,stack:o}=t,r=new Error(n);for(const e in t)r[e]=t[e];return r.stack=o,r}function b(t){let e=null,n="";for(const t of arguments)t instanceof Error&&!e?e=m(t):(n&&(n+=" "),n+=t);return e?n&&(e.message=n+": "+e.message):e=new Error(n),e}function y(t){const e=b.apply(null,arguments);return e.expected=!0,e}function g(t,...e){var n,o,r;n=y.apply(null,e),null===(o=(r=self).__AMP_REPORT_ERROR)||void 0===o||o.call(r,n)}var v=["Webkit","webkit","Moz","moz","ms","O","o"];function h(t,e,n,o,r){const a=function(t,e,n){if(e.startsWith("--"))return e;c||(c=p());let o=c[e];if(!o||n){if(o=e,void 0===t[e]){const n=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e),r=function(t,e){for(let n=0;n<v.length;n++){const o=v[n]+e;if(void 0!==t[o])return o}return""}(t,n);void 0!==t[r]&&(o=r)}n||(c[e]=o)}return o}(t.style,e,r);if(!a)return;const i=o?n+o:n;t.style.setProperty(function(t){const e=t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()));return v.some((t=>e.startsWith(t+"-")))?`-${e}`:e}(a),i)}function w(t){return null==t.__AMP_AUTOPLAY&&(t.__AMP_AUTOPLAY=function(t){const e=t.document.createElement("video");var n;return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(t,e){for(const n in e)h(t,n,e[n])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),n=e,s((()=>n.play())).catch((()=>{})),Promise.resolve(!e.paused)}(t)),t.__AMP_AUTOPLAY}import{Fragment as j,createElement as k}from"./@bentoproject/core";import{useCallback as O,useEffect as x,useImperativeHandle as q,useLayoutEffect as S,useMemo as C,useRef as I,useState as P}from"./@bentoproject/core";import{forwardRef as E}from"./@bentoproject/core";import{ContainWrapper as M,useValueRef as R}from"./@bentoproject/core";import{useAmpContext as L,useLoading as N}from"./@bentoproject/core";import{useCallback as $,useLayoutEffect as F}from"./@bentoproject/core";import{useAmpContext as T}from"./@bentoproject/core";var U={bubbles:!0,cancelable:!0};function z(t,e,n,o){const r=n||{};t.ownerDocument;const a=t.ownerDocument.createEvent("Event");a.data=r;const{bubbles:i,cancelable:l}=o||U;a.initEvent(e,i,l),t.dispatchEvent(a)}var A=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function H(t,e=""){try{return decodeURIComponent(t)}catch(t){return e}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var V={"title":"","artist":"","album":"","artwork":[{"src":""}]};function J(t){const e=t.querySelector('script[type="application/ld+json"]');if(!e)return;const n=function(t,e){try{return function(t){return JSON.parse(t)}(t)}catch(t){return null}}(e.textContent);return n&&n.image?"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:void 0}function W(t){const e=t.querySelector('meta[property="og:image"]');return e?e.getAttribute("content"):void 0}function Y(t){const e=t.querySelector('link[rel="shortcut icon"]')||t.querySelector('link[rel="icon"]');return e?e.getAttribute("href"):void 0}function B({displayIcon:t,displayOverlay:e,metadata:n,onOverlayClick:o,pause:r,play:a,playing:i,wrapperRef:l}){const{playable:s}=L();return x((()=>{if(!s)return void r();const t=new IntersectionObserver((t=>{t[t.length-1].isIntersecting?a().catch((()=>{})):r()}),{threshold:.5});return t.observe(l.current),()=>{t.disconnect()}}),[l,a,r,s]),k(j,null,t&&k("div",{class:"eq-9e7199f"+(i?" eq-playing-9e7199f":"")},k(D,null)),e&&k("button",{"aria-label":n&&n.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var D=function(t){let e=!1,n=null,o=()=>[1,2,3,4].map((t=>k("div",{class:"eq-col-9e7199f",key:t})));return(...t)=>(e||(n=o.apply(self,t),e=!0,o=null),n)}(),Z=E((function(t,n){let r="class",{autoplay:a=!1,component:c="video",controls:u=!1,loading:f,loop:d=!1,mediasession:p=!0,noaudio:m=!1,onPlayingState:b,onReadyState:y,poster:v,sources:h,src:w,style:j,[r]:E}=t,$=e(t,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(o));!function(){const{notify:t}=T();F((()=>{t&&t()}))}();const{playable:U}=L(),z=N(f),A="unload"!==z,[H,D]=P(a),[Z,G]=P(!1),[K,Q]=P(null),[X,_]=P(!a),tt=I(null),et=I(null),nt=C((()=>new l),[]),ot=I("loading"),rt=R(y),at=O(((t,e)=>{if(t!==ot.current){ot.current=t;const n=rt.current;n&&n(t,e)}}),[rt]),it=R(b),lt=O((t=>{G(t);const e=it.current;e&&e(t)}),[it]);S((()=>{A||lt(!1)}),[A,lt]);const st=O((()=>nt.promise.then((()=>function(t,e){const n=s((()=>t.play(!1)));return n.catch((t=>{g(0,t)})),n}(et.current)))),[nt]),ct=O((()=>{nt.promise.then((()=>{var t;return null===(t=et.current)||void 0===t?void 0:t.pause()}))}),[nt]),ut=O((()=>nt.promise.then((()=>et.current.requestFullscreen()))),[nt]),ft=O((()=>{D(!1),_(!0)}),[]);return S((()=>{var t;const e=null===(t=et.current)||void 0===t?void 0:t.readyState;null!=e&&at(e>0?"complete":"loading")}),[at]),S((()=>(p&&Z&&K&&function(t,e,n,o){const{navigator:r}=t;"mediaSession"in r&&t.MediaMetadata&&(r.mediaSession.metadata=new t.MediaMetadata(V),r.mediaSession.metadata=new t.MediaMetadata(e),r.mediaSession.setActionHandler("play",n),r.mediaSession.setActionHandler("pause",o))}(window,K,st,ct),()=>{})),[p,Z,K,st,ct]),x((()=>{U||ct()}),[U,ct]),q(n,(()=>({get readyState(){return ot.current},play:st,pause:ct,requestFullscreen:ut,get currentTime(){return et.current?et.current.currentTime:0},get duration(){return et.current?et.current.duration:NaN},get autoplay(){return a},get controls(){return u},get loop(){return d},userInteracted:ft,mute:()=>D(!0),unmute:()=>{X&&D(!1)}})),[st,ct,ut,ft,X,a,u,d]),k(M,{contentRef:tt,class:E,style:j,size:!0,layout:!0,paint:!0},A&&k(c,i(i({},$),{},{ref:et,loading:z,muted:H,loop:d,controls:u&&(!a||X),onCanPlay:()=>{nt.resolve(),at("complete")},onLoadedMetadata:()=>{p&&nt.promise.then((()=>{var t,e;Q((t=et.current,i({"title":(e=$).title||e["aria-label"]||document.title,"artist":e.artist||"","album":e.album||"","artwork":[{"src":e.artwork||e.poster||J(document)||W(document)||Y(document)||""}]},t&&t.getMetadata?t.getMetadata():Object.create(null))))})),at("complete")},onPlaying:()=>lt(!0),onPause:()=>lt(!1),onEnded:()=>lt(!1),onError:t=>{at("error",t),nt.reject(t)},class:"fill-stretch-fc551a7",src:w,poster:v}),h),a&&!X&&k(B,{metadata:K,playing:Z,displayIcon:!m&&H,wrapperRef:tt,play:st,pause:ct,displayOverlay:u,onOverlayClick:ft}))}));Z.displayName="VideoWrapper";var G=class extends t{};function K(t,e){return JSON.stringify({"command":t,"parameters":e})}G.Component=Z,G.loadable=!0,G.layoutSizeDefined=!0,G.staticProps,G.props={"album":{attr:"album"},"alt":{attr:"alt"},"artist":{attr:"artist"},"artwork":{attr:"artwork"},"attribution":{attr:"attribution"},"autoplay":{attr:"autoplay",type:"boolean"},"controls":{attr:"controls",type:"boolean"},"controlslist":{attr:"controlslist"},"crossorigin":{attr:"crossorigin"},"disableremoteplayback":{attr:"disableremoteplayback"},"loop":{attr:"loop",type:"boolean"},"noaudio":{attr:"noaudio",type:"boolean"},"poster":{attr:"poster"},"sources":{selector:"source",single:!1,clone:!0},"src":{attr:"src"},"title":{attr:"title"},"dock":{attr:"dock",media:!0},"rotate-to-fullscreen":{attr:"rotate-to-fullscreen",type:"boolean",media:!0}},G.shadowCss='.fill-stretch-fc551a7{width:100%;height:100%;position:relative}.fill-content-overlay-fc551a7{top:0;left:0;right:0;bottom:0;position:absolute}.autoplay-mask-button-9e7199f{width:100%;border:none;display:block;-webkit-appearance:none;appearance:none;background:transparent}.eq-9e7199f{right:7px;width:20px;bottom:7px;height:12px;display:-ms-flexbox;display:flex;opacity:0.8;z-index:1;overflow:hidden;position:absolute;-ms-flex-align:end;align-items:flex-end;pointer-events:none!important}.eq-playing-9e7199f>div:after,.eq-playing-9e7199f>div:before{animation-play-state:running}.eq-col-9e7199f{-ms-flex:1;flex:1;height:100%;position:relative;margin-right:1px}.eq-col-9e7199f:after,.eq-col-9e7199f:before{width:100%;height:100%;content:"";position:absolute;animation:keyframes-eq-animation-9e7199f 0s linear infinite alternate;will-change:transform;background-color:#fafafa;animation-play-state:paused}.eq-col-9e7199f:nth-child(4):before{animation-duration:0.4s}.eq-col-9e7199f:nth-child(4):after{animation-duration:0.25s}.eq-col-9e7199f:nth-child(3):before{animation-duration:0.3s}.eq-col-9e7199f:nth-child(3):after{animation-duration:0.35s}.eq-col-9e7199f:nth-child(2):before{animation-duration:0.5s}.eq-col-9e7199f:nth-child(2):after{animation-duration:0.4s}.eq-col-9e7199f:first-child:before{animation-duration:0.3s}.eq-col-9e7199f:first-child:after{animation-duration:0.45s}@keyframes keyframes-eq-animation-9e7199f{0%{transform:translateY(100%)}to{transform:translateY(0)}}',G.usesShadowDom=!0,new Set(["c","v","a","ad"]);import{createElement as Q}from"./@bentoproject/core";import{useCallback as X,useImperativeHandle as _,useLayoutEffect as tt,useMemo as et,useRef as nt}from"./@bentoproject/core";import{forwardRef as ot}from"./@bentoproject/core";var rt=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],at=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function it(t,e,n){t&&t.contentWindow&&e.then((()=>{t.contentWindow.postMessage(n(),"*")}))}var lt=ot((function(t,n){let{loading:o,unloadOnPause:r=!1,sandbox:a=at,muted:s=!1,controls:c=!1,origin:u,onCanPlay:f,onMessage:d,playerStateRef:p,makeMethodMessage:m,makeFullscreenMessage:b,onIframeLoad:y}=t,g=e(t,rt);const v=nt(null),h=et((()=>new l),[]),w=nt(m),j=X((t=>{it(null==v?void 0:v.current,h.promise,(()=>w.current(t)))}),[h.promise]),k=nt(b),O=X((()=>it(null==v?void 0:v.current,h.promise,k.current)),[h.promise]);_(n,(()=>({get currentTime(){var t,e;return null!==(t=null==p||null===(e=p.current)||void 0===e?void 0:e.currentTime)&&void 0!==t?t:NaN},get duration(){var t,e;return null!==(t=null==p||null===(e=p.current)||void 0===e?void 0:e.duration)&&void 0!==t?t:NaN},requestFullscreen:()=>{if(!k.current)return h.promise.then((()=>{v.current.requestFullscreen()}));O()},play:()=>j("play"),pause:()=>{if(r){const t=v.current;t&&(t.src=t.src)}else j("pause")}})),[p,j,O,h.promise,r]);const x=function(t){const e=nt(null);return e.current=t,e}(d);return tt((()=>{if(!v.current)return;function t(t){x.current&&(u&&!u.test(t.origin)||t.source!=v.current.contentWindow||x.current({currentTarget:v.current,target:v.current,data:t.data}))}const{defaultView:e}=v.current.ownerDocument;return e.addEventListener("message",t),()=>e.removeEventListener("message",t)}),[u,x]),tt((()=>{j(s?"mute":"unmute")}),[s,j]),tt((()=>{j(c?"showControls":"hideControls")}),[c,j]),Q("iframe",i(i({},g),{},{ref:v,allowfullscreen:!0,frameborder:"0",sandbox:a,loading:o,onCanPlay:()=>{f&&h.promise.then(f),h.resolve()},onLoad:t=>{null==y||y(t)}}))}));lt.displayName="VideoIframeInternal";var st=ot((function(t,e){return Q(Z,i(i({ref:e},t),{},{component:lt}))}));st.displayName="VideoIframe";import{createElement as ct}from"./@bentoproject/core";import{useMemo as ut}from"./@bentoproject/core";import{forwardRef as ft}from"./@bentoproject/core";var dt=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pt(t){switch(t){case"mute":return K("muted",[!0]);case"unmute":return K("muted",[!1]);case"showControls":return K("controls",[!0]);case"hideControls":return K("controls",[!1]);default:return K(t)}}function mt({currentTarget:t,data:e}){const n=function(t){const e=p();if(!t)return e;let n;for(;n=A.exec(t);){const t=H(n[1],n[1]),o=n[2]?H(n[2].replace(/\+/g," "),n[2]):"";e[t]=o}return e}(e),o=null==n?void 0:n.event;"pause"===o?z(t,"pause"):"play"===o?z(t,"playing"):"end"===o?(z(t,"pause"),z(t,"end")):"apiready"===o&&z(t,"canplay")}var bt=ft((function(t,n){let{autoplay:o,endscreenEnable:r,info:a,mute:l,sharingEnable:s,start:c,uiHighlight:f,uiLogo:d,videoId:p}=t,m=e(t,dt);const b=ut((()=>function(t,e,n=!1,o=!0,r=!0,a=!1,l=!0,s,c,f=!0,d){return function(t,e,n){if(!e)return t;const o=t.split("#",2),r=o[0].split("?",2);let a=r[0]+(r[1]?`?${r[1]}&${e}`:`?${e}`);return a+=o[1]?`#${o[1]}`:"",a}(`https://www.dailymotion.com/embed/video/${encodeURIComponent(e)}?api=1&html=1&app=amp`,function(t){const e=[];for(const a in t){let i=t[a];if(null!=i){i=u(r=i)?r:[r];for(let t=0;t<i.length;t++)e.push((n=a,o=i[t],`${encodeURIComponent(n)}=${encodeURIComponent(o)}`))}}var n,o,r;return e.join("&")}(i({"endscreen-enable":o?void 0:o,"info":r?void 0:r,"mute":a||n&&w(t)?1:void 0,"sharing-enable":l?void 0:l,"start":s,"ui-highlight":c,"ui-logo":f?void 0:f},d)))}(window,p,o,r,a,l,s,c,f,d)),[p,o,r,a,l,s,c,f,d]);return ct(st,i(i({autoplay:o,controls:!0,ref:n},m),{},{src:b,makeMethodMessage:pt,onMessage:mt}))}));bt.displayName="BentoDailymotion";var yt=class extends G{};yt.Component=bt,yt.props={"autoplay":{attr:"autoplay",type:"boolean"},"videoId":{attr:"data-videoid"},"start":{attr:"data-start"},"uiHighlight":{attr:"data-ui-highlight"},"implicitParams":{attrPrefix:"data-param-"}},yt.layoutSizeDefined=!0,yt.usesShadowDom=!0;import{defineBentoElement as gt}from"./@bentoproject/core";function vt(t){gt("bento-dailymotion",yt,t)}export{vt as defineElement}; | ||
import{PreactBaseElement as t}from"@bentoproject/core";function e(t,e){if(null==t)return{};var n,o,r={},a=Object.keys(t);for(o=0;o<a.length;o++)n=a[o],e.indexOf(n)>=0||(r[n]=t[n]);return r}function n(t){return(n="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 o(t){var e=function(t,e){if("object"!==n(t)||null===t)return t;var o=t[Symbol.toPrimitive];if(void 0!==o){var r=o.call(t,"string");if("object"!==n(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"===n(e)?e:String(e)}function r(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function a(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);e&&(o=o.filter((function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable}))),n.push.apply(n,o)}return n}function i(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?a(Object(n),!0).forEach((function(e){r(t,e,n[e])})):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):a(Object(n)).forEach((function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))}))}return t}var l=class{constructor(){this.promise=new Promise(((t,e)=>{this.resolve=t,this.reject=e}))}};function s(t){return new Promise((e=>{e(t())}))}var c,{isArray:u}=Array,{hasOwnProperty:f,toString:d}=Object.prototype;function p(t){const e=Object.create(null);return t&&Object.assign(e,t),e}function m(t){const e=Object.getOwnPropertyDescriptor(t,"message");if(null!=e&&e.writable)return t;const{message:n,stack:o}=t,r=new Error(n);for(const e in t)r[e]=t[e];return r.stack=o,r}function b(t){let e=null,n="";for(const t of arguments)t instanceof Error&&!e?e=m(t):(n&&(n+=" "),n+=t);return e?n&&(e.message=n+": "+e.message):e=new Error(n),e}function y(t){const e=b.apply(null,arguments);return e.expected=!0,e}function g(t,...e){var n,o,r;n=y.apply(null,e),null===(o=(r=self).__AMP_REPORT_ERROR)||void 0===o||o.call(r,n)}var v=["Webkit","webkit","Moz","moz","ms","O","o"];function h(t,e,n,o,r){const a=function(t,e,n){if(e.startsWith("--"))return e;c||(c=p());let o=c[e];if(!o||n){if(o=e,void 0===t[e]){const n=function(t){return t.charAt(0).toUpperCase()+t.slice(1)}(e),r=function(t,e){for(let n=0;n<v.length;n++){const o=v[n]+e;if(void 0!==t[o])return o}return""}(t,n);void 0!==t[r]&&(o=r)}n||(c[e]=o)}return o}(t.style,e,r);if(!a)return;const i=o?n+o:n;t.style.setProperty(function(t){const e=t.replace(/[A-Z]/g,(t=>"-"+t.toLowerCase()));return v.some((t=>e.startsWith(t+"-")))?`-${e}`:e}(a),i)}function w(t){return null==t.__AMP_AUTOPLAY&&(t.__AMP_AUTOPLAY=function(t){const e=t.document.createElement("video");var n;return e.setAttribute("muted",""),e.setAttribute("playsinline",""),e.setAttribute("webkit-playsinline",""),e.setAttribute("height","0"),e.setAttribute("width","0"),e.muted=!0,e.playsInline=!0,e.playsinline=!0,e.webkitPlaysinline=!0,function(t,e){for(const n in e)h(t,n,e[n])}(e,{position:"fixed",top:"0",width:"0",height:"0",opacity:"0"}),n=e,s((()=>n.play())).catch((()=>{})),Promise.resolve(!e.paused)}(t)),t.__AMP_AUTOPLAY}import{Fragment as j,createElement as k}from"@bentoproject/core";import{useCallback as O,useEffect as x,useImperativeHandle as q,useLayoutEffect as S,useMemo as C,useRef as I,useState as P}from"@bentoproject/core";import{forwardRef as E}from"@bentoproject/core";import{ContainWrapper as M,useValueRef as R}from"@bentoproject/core";import{useAmpContext as L,useLoading as N}from"@bentoproject/core";import{useCallback as $,useLayoutEffect as F}from"@bentoproject/core";import{useAmpContext as T}from"@bentoproject/core";var U={bubbles:!0,cancelable:!0};function z(t,e,n,o){const r=n||{};t.ownerDocument;const a=t.ownerDocument.createEvent("Event");a.data=r;const{bubbles:i,cancelable:l}=o||U;a.initEvent(e,i,l),t.dispatchEvent(a)}var A=/(?:^[#?]?|&)([^=&]+)(?:=([^&]*))?/g;function H(t,e=""){try{return decodeURIComponent(t)}catch(t){return e}}self.__AMP_LOG=self.__AMP_LOG||{user:null,dev:null,userForEmbed:null},self.__AMP_LOG;var V={"title":"","artist":"","album":"","artwork":[{"src":""}]};function J(t){const e=t.querySelector('script[type="application/ld+json"]');if(!e)return;const n=function(t,e){try{return function(t){return JSON.parse(t)}(t)}catch(t){return null}}(e.textContent);return n&&n.image?"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:void 0}function W(t){const e=t.querySelector('meta[property="og:image"]');return e?e.getAttribute("content"):void 0}function Y(t){const e=t.querySelector('link[rel="shortcut icon"]')||t.querySelector('link[rel="icon"]');return e?e.getAttribute("href"):void 0}function B({displayIcon:t,displayOverlay:e,metadata:n,onOverlayClick:o,pause:r,play:a,playing:i,wrapperRef:l}){const{playable:s}=L();return x((()=>{if(!s)return void r();const t=new IntersectionObserver((t=>{t[t.length-1].isIntersecting?a().catch((()=>{})):r()}),{threshold:.5});return t.observe(l.current),()=>{t.disconnect()}}),[l,a,r,s]),k(j,null,t&&k("div",{class:"eq-9e7199f"+(i?" eq-playing-9e7199f":"")},k(D,null)),e&&k("button",{"aria-label":n&&n.title||"Unmute video",tabindex:"0",class:"autoplay-mask-button-9e7199f fill-content-overlay-fc551a7",onClick:o}))}var D=function(t){let e=!1,n=null,o=()=>[1,2,3,4].map((t=>k("div",{class:"eq-col-9e7199f",key:t})));return(...t)=>(e||(n=o.apply(self,t),e=!0,o=null),n)}(),Z=E((function(t,n){let r="class",{autoplay:a=!1,component:c="video",controls:u=!1,loading:f,loop:d=!1,mediasession:p=!0,noaudio:m=!1,onPlayingState:b,onReadyState:y,poster:v,sources:h,src:w,style:j,[r]:E}=t,$=e(t,["autoplay","component","controls","loading","loop","mediasession","noaudio","onPlayingState","onReadyState","poster","sources","src","style",r].map(o));!function(){const{notify:t}=T();F((()=>{t&&t()}))}();const{playable:U}=L(),z=N(f),A="unload"!==z,[H,D]=P(a),[Z,G]=P(!1),[K,Q]=P(null),[X,_]=P(!a),tt=I(null),et=I(null),nt=C((()=>new l),[]),ot=I("loading"),rt=R(y),at=O(((t,e)=>{if(t!==ot.current){ot.current=t;const n=rt.current;n&&n(t,e)}}),[rt]),it=R(b),lt=O((t=>{G(t);const e=it.current;e&&e(t)}),[it]);S((()=>{A||lt(!1)}),[A,lt]);const st=O((()=>nt.promise.then((()=>function(t,e){const n=s((()=>t.play(!1)));return n.catch((t=>{g(0,t)})),n}(et.current)))),[nt]),ct=O((()=>{nt.promise.then((()=>{var t;return null===(t=et.current)||void 0===t?void 0:t.pause()}))}),[nt]),ut=O((()=>nt.promise.then((()=>et.current.requestFullscreen()))),[nt]),ft=O((()=>{D(!1),_(!0)}),[]);return S((()=>{var t;const e=null===(t=et.current)||void 0===t?void 0:t.readyState;null!=e&&at(e>0?"complete":"loading")}),[at]),S((()=>(p&&Z&&K&&function(t,e,n,o){const{navigator:r}=t;"mediaSession"in r&&t.MediaMetadata&&(r.mediaSession.metadata=new t.MediaMetadata(V),r.mediaSession.metadata=new t.MediaMetadata(e),r.mediaSession.setActionHandler("play",n),r.mediaSession.setActionHandler("pause",o))}(window,K,st,ct),()=>{})),[p,Z,K,st,ct]),x((()=>{U||ct()}),[U,ct]),q(n,(()=>({get readyState(){return ot.current},play:st,pause:ct,requestFullscreen:ut,get currentTime(){return et.current?et.current.currentTime:0},get duration(){return et.current?et.current.duration:NaN},get autoplay(){return a},get controls(){return u},get loop(){return d},userInteracted:ft,mute:()=>D(!0),unmute:()=>{X&&D(!1)}})),[st,ct,ut,ft,X,a,u,d]),k(M,{contentRef:tt,class:E,style:j,size:!0,layout:!0,paint:!0},A&&k(c,i(i({},$),{},{ref:et,loading:z,muted:H,loop:d,controls:u&&(!a||X),onCanPlay:()=>{nt.resolve(),at("complete")},onLoadedMetadata:()=>{p&&nt.promise.then((()=>{var t,e;Q((t=et.current,i({"title":(e=$).title||e["aria-label"]||document.title,"artist":e.artist||"","album":e.album||"","artwork":[{"src":e.artwork||e.poster||J(document)||W(document)||Y(document)||""}]},t&&t.getMetadata?t.getMetadata():Object.create(null))))})),at("complete")},onPlaying:()=>lt(!0),onPause:()=>lt(!1),onEnded:()=>lt(!1),onError:t=>{at("error",t),nt.reject(t)},class:"fill-stretch-fc551a7",src:w,poster:v}),h),a&&!X&&k(B,{metadata:K,playing:Z,displayIcon:!m&&H,wrapperRef:tt,play:st,pause:ct,displayOverlay:u,onOverlayClick:ft}))}));Z.displayName="VideoWrapper";var G=class extends t{};function K(t,e){return JSON.stringify({"command":t,"parameters":e})}G.Component=Z,G.loadable=!0,G.layoutSizeDefined=!0,G.staticProps,G.props={"album":{attr:"album"},"alt":{attr:"alt"},"artist":{attr:"artist"},"artwork":{attr:"artwork"},"attribution":{attr:"attribution"},"autoplay":{attr:"autoplay",type:"boolean"},"controls":{attr:"controls",type:"boolean"},"controlslist":{attr:"controlslist"},"crossorigin":{attr:"crossorigin"},"disableremoteplayback":{attr:"disableremoteplayback"},"loop":{attr:"loop",type:"boolean"},"noaudio":{attr:"noaudio",type:"boolean"},"poster":{attr:"poster"},"sources":{selector:"source",single:!1,clone:!0},"src":{attr:"src"},"title":{attr:"title"},"dock":{attr:"dock",media:!0},"rotate-to-fullscreen":{attr:"rotate-to-fullscreen",type:"boolean",media:!0}},G.shadowCss='.fill-stretch-fc551a7{width:100%;height:100%;position:relative}.fill-content-overlay-fc551a7{top:0;left:0;right:0;bottom:0;position:absolute}.autoplay-mask-button-9e7199f{width:100%;border:none;display:block;-webkit-appearance:none;appearance:none;background:transparent}.eq-9e7199f{right:7px;width:20px;bottom:7px;height:12px;display:-ms-flexbox;display:flex;opacity:0.8;z-index:1;overflow:hidden;position:absolute;-ms-flex-align:end;align-items:flex-end;pointer-events:none!important}.eq-playing-9e7199f>div:after,.eq-playing-9e7199f>div:before{animation-play-state:running}.eq-col-9e7199f{-ms-flex:1;flex:1;height:100%;position:relative;margin-right:1px}.eq-col-9e7199f:after,.eq-col-9e7199f:before{width:100%;height:100%;content:"";position:absolute;animation:keyframes-eq-animation-9e7199f 0s linear infinite alternate;will-change:transform;background-color:#fafafa;animation-play-state:paused}.eq-col-9e7199f:nth-child(4):before{animation-duration:0.4s}.eq-col-9e7199f:nth-child(4):after{animation-duration:0.25s}.eq-col-9e7199f:nth-child(3):before{animation-duration:0.3s}.eq-col-9e7199f:nth-child(3):after{animation-duration:0.35s}.eq-col-9e7199f:nth-child(2):before{animation-duration:0.5s}.eq-col-9e7199f:nth-child(2):after{animation-duration:0.4s}.eq-col-9e7199f:first-child:before{animation-duration:0.3s}.eq-col-9e7199f:first-child:after{animation-duration:0.45s}@keyframes keyframes-eq-animation-9e7199f{0%{transform:translateY(100%)}to{transform:translateY(0)}}',G.usesShadowDom=!0,new Set(["c","v","a","ad"]);import{createElement as Q}from"@bentoproject/core";import{useCallback as X,useImperativeHandle as _,useLayoutEffect as tt,useMemo as et,useRef as nt}from"@bentoproject/core";import{forwardRef as ot}from"@bentoproject/core";var rt=["loading","unloadOnPause","sandbox","muted","controls","origin","onCanPlay","onMessage","playerStateRef","makeMethodMessage","makeFullscreenMessage","onIframeLoad"],at=["allow-scripts","allow-same-origin","allow-popups","allow-popups-to-escape-sandbox","allow-top-navigation-by-user-activation"].join(" ");function it(t,e,n){t&&t.contentWindow&&e.then((()=>{t.contentWindow.postMessage(n(),"*")}))}var lt=ot((function(t,n){let{loading:o,unloadOnPause:r=!1,sandbox:a=at,muted:s=!1,controls:c=!1,origin:u,onCanPlay:f,onMessage:d,playerStateRef:p,makeMethodMessage:m,makeFullscreenMessage:b,onIframeLoad:y}=t,g=e(t,rt);const v=nt(null),h=et((()=>new l),[]),w=nt(m),j=X((t=>{it(null==v?void 0:v.current,h.promise,(()=>w.current(t)))}),[h.promise]),k=nt(b),O=X((()=>it(null==v?void 0:v.current,h.promise,k.current)),[h.promise]);_(n,(()=>({get currentTime(){var t,e;return null!==(t=null==p||null===(e=p.current)||void 0===e?void 0:e.currentTime)&&void 0!==t?t:NaN},get duration(){var t,e;return null!==(t=null==p||null===(e=p.current)||void 0===e?void 0:e.duration)&&void 0!==t?t:NaN},requestFullscreen:()=>{if(!k.current)return h.promise.then((()=>{v.current.requestFullscreen()}));O()},play:()=>j("play"),pause:()=>{if(r){const t=v.current;t&&(t.src=t.src)}else j("pause")}})),[p,j,O,h.promise,r]);const x=function(t){const e=nt(null);return e.current=t,e}(d);return tt((()=>{if(!v.current)return;function t(t){x.current&&(u&&!u.test(t.origin)||t.source!=v.current.contentWindow||x.current({currentTarget:v.current,target:v.current,data:t.data}))}const{defaultView:e}=v.current.ownerDocument;return e.addEventListener("message",t),()=>e.removeEventListener("message",t)}),[u,x]),tt((()=>{j(s?"mute":"unmute")}),[s,j]),tt((()=>{j(c?"showControls":"hideControls")}),[c,j]),Q("iframe",i(i({},g),{},{ref:v,allowfullscreen:!0,frameborder:"0",sandbox:a,loading:o,onCanPlay:()=>{f&&h.promise.then(f),h.resolve()},onLoad:t=>{null==y||y(t)}}))}));lt.displayName="VideoIframeInternal";var st=ot((function(t,e){return Q(Z,i(i({ref:e},t),{},{component:lt}))}));st.displayName="VideoIframe";import{createElement as ct}from"@bentoproject/core";import{useMemo as ut}from"@bentoproject/core";import{forwardRef as ft}from"@bentoproject/core";var dt=["autoplay","endscreenEnable","info","mute","sharingEnable","start","uiHighlight","uiLogo","videoId"];function pt(t){switch(t){case"mute":return K("muted",[!0]);case"unmute":return K("muted",[!1]);case"showControls":return K("controls",[!0]);case"hideControls":return K("controls",[!1]);default:return K(t)}}function mt({currentTarget:t,data:e}){const n=function(t){const e=p();if(!t)return e;let n;for(;n=A.exec(t);){const t=H(n[1],n[1]),o=n[2]?H(n[2].replace(/\+/g," "),n[2]):"";e[t]=o}return e}(e),o=null==n?void 0:n.event;"pause"===o?z(t,"pause"):"play"===o?z(t,"playing"):"end"===o?(z(t,"pause"),z(t,"end")):"apiready"===o&&z(t,"canplay")}var bt=ft((function(t,n){let{autoplay:o,endscreenEnable:r,info:a,mute:l,sharingEnable:s,start:c,uiHighlight:f,uiLogo:d,videoId:p}=t,m=e(t,dt);const b=ut((()=>function(t,e,n=!1,o=!0,r=!0,a=!1,l=!0,s,c,f=!0,d){return function(t,e,n){if(!e)return t;const o=t.split("#",2),r=o[0].split("?",2);let a=r[0]+(r[1]?`?${r[1]}&${e}`:`?${e}`);return a+=o[1]?`#${o[1]}`:"",a}(`https://www.dailymotion.com/embed/video/${encodeURIComponent(e)}?api=1&html=1&app=amp`,function(t){const e=[];for(const a in t){let i=t[a];if(null!=i){i=u(r=i)?r:[r];for(let t=0;t<i.length;t++)e.push((n=a,o=i[t],`${encodeURIComponent(n)}=${encodeURIComponent(o)}`))}}var n,o,r;return e.join("&")}(i({"endscreen-enable":o?void 0:o,"info":r?void 0:r,"mute":a||n&&w(t)?1:void 0,"sharing-enable":l?void 0:l,"start":s,"ui-highlight":c,"ui-logo":f?void 0:f},d)))}(window,p,o,r,a,l,s,c,f,d)),[p,o,r,a,l,s,c,f,d]);return ct(st,i(i({autoplay:o,controls:!0,ref:n},m),{},{src:b,makeMethodMessage:pt,onMessage:mt}))}));bt.displayName="BentoDailymotion";var yt=class extends G{};yt.Component=bt,yt.props={"autoplay":{attr:"autoplay",type:"boolean"},"videoId":{attr:"data-videoid"},"start":{attr:"data-start"},"uiHighlight":{attr:"data-ui-highlight"},"implicitParams":{attrPrefix:"data-param-"}},yt.layoutSizeDefined=!0,yt.usesShadowDom=!0;import{defineBentoElement as gt}from"@bentoproject/core";function vt(t){gt("bento-dailymotion",yt,t)}export{vt as defineElement}; | ||
/*! https://mths.be/cssescape v1.5.1 by @mathias | MIT license */ | ||
//# sourceMappingURL=web-component.module.js.map |
{ | ||
"name": "@bentoproject/dailymotion", | ||
"version": "1.2204121632.0", | ||
"version": "1.2204122000.0", | ||
"description": "Bento dailymotion Component", | ||
@@ -44,4 +44,4 @@ "author": "Bento Authors", | ||
"dependencies": { | ||
"@bentoproject/core": "0.2204121632.0" | ||
"@bentoproject/core": "0.2204122000.0" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1603623
+ Added@bentoproject/core@0.2204122000.0(transitive)
- Removed@bentoproject/core@0.2204121632.0(transitive)