export default function({preset:o={},chapters:e,branding:i,src:l,analytics:t,automations:n,autoplay:s,blockAttributes:d={},provider:a="",provider_video_id:r="",youtube:u,type:p,isAdmin:v,i18n:c,storage:y={enabled:!v,key:`presto-player-${o.id}`}}){var _,g,b;const w=["settings"],m=[...["youtube","vimeo"].includes(a)?["pip"]:[]],h=["play-large","rewind","play","fast-forward","progress","current-time","mute","volume","captions","settings","pip","fullscreen"].filter((e=>((null==o?void 0:o[e])||w.includes(e))&&!m.includes(e)));let k=Object.assign(Object.assign(Object.assign(Object.assign({id:null==d?void 0:d.id,title:(null==d?void 0:d.title)||"",blockAttributes:Object.assign(Object.assign({},d),{type:p}),src:l,ajaxProgress:!0,analytics:t,preset:o,automations:n,mutedPreview:{enabled:null===(_=null==d?void 0:d.mutedPreview)||void 0===_?void 0:_.enabled},loop:{active:"loop"===(null==o?void 0:o.on_video_end)},chapters:e,controls:h,settings:["captions","quality","loop",...(null==o?void 0:o.speed)?["speed"]:[]],hideControls:null==o?void 0:o.auto_hide,captions:{active:null==o?void 0:o.captions_enabled,language:"auto",update:!1},logo:null==i?void 0:i.logo,logo_width:null==i?void 0:i.logo_width,hide_logo:null==o?void 0:o.hide_logo,lazy_load_youtube:null==o?void 0:o.lazy_load_youtube,save_player_position:!!(null==o?void 0:o.save_player_position),sticky_scroll:null==o?void 0:o.sticky_scroll,play_video_viewport:null==o?void 0:o.play_video_viewport,autoplay:!(!s||(null===(g=window.wp)||void 0===g?void 0:g.blocks))},a?{provider:a}:{}),r?{provider_video_id:r}:{}),(null==d?void 0:d.poster)?{poster:d.poster}:{}),{invertTime:!(null==o?void 0:o.show_time_elapsed),storage:y,keyboard:{focused:!1,global:!1},resetOnEnd:!!(null==o?void 0:o.reset_on_end),vimeo:{byline:!1,portrait:!1,title:!1,speed:!0,transparent:!1,customControls:!0,premium:!1,playsinline:!!(null==d?void 0:d.playsInline)},youtube:{rel:0,showinfo:0,iv_load_policy:3,modestbranding:1,customControls:!0,noCookie:!!(null==u?void 0:u.noCookie),playsinline:!!(null==d?void 0:d.playsInline)},tooltips:{controls:!0,seek:!0},i18n:c});return(null===(b=null===window||void 0===window?void 0:window.wp)||void 0===b?void 0:b.hooks)&&(k=window.wp.hooks.applyFilters("presto.playerSettings",k)),k}