1var Ra=Object.defineProperty;var Ma=(n,e,i)=>e in n?Ra(n,e,{enumerable:!0,configurable:!0,writable:!0,value:i}):n[e]=i;var kn=(n,e,i)=>Ma(n,typeof e!="symbol"?e+"":e,i);import{g as Ua,a as La,r as k,u as Va,_ as Fa,b as B,j as s,d as $a,f as yt,h as Ha,s as Ne,aK as Ba,aL as za,aM as Wa,aN as Ti,aO as ji,aP as Ga,aQ as Ka,aR as qa,aS as Ya,aT as Ni,aU as Xa,aV as Ja,aW as Za,aX as Qa,aY as er,aZ as tr,a_ as nr,a$ as ir,b0 as ar,b1 as rr,b2 as or,b3 as sr,b4 as lr,b5 as ur,b6 as cr,b7 as dr,b8 as pr,b9 as hr,ba as fr,bb as mr,bc as gr,bd as vr,be as br,bf as yr,bg as wr,bh as Sr,bi as kr,bj as xr,bk as Cr,bl as Er,K as G,W as ht,bm as Ir,O as Pe,bn as Or,x as Ie,k as et,a1 as Ht,az as Tr,t as Ct,v as Et,ah as $e,al as Di,w as xe,I as jr,aa as _i,bo as ke,bp as Nr,bq as Dr,br as _r,bs as Pr,Y as wt,bt as Ar,bu as Rr,bv as Mr,bw as Bt,bx as Pi,ai as Ur,m as Ke,by as Lr,ac as Ai,ag as Ae,bz as lt,bA as Vr,as as xn,ap as zt,bB as Ee,bC as It,aj as Fr,T as rt,bD as $r,bE as Hr,Q as ft,bF as Wt,V as Cn,bG as Br,a6 as ct,bH as st,L as Ve,bI as zr,bJ as Wr,bK as ve,bL as Gt,bM as Re,bN as Me,bO as Ue,bP as He,bQ as be,bR as Be,bS as Ri,bT as Gr,bU as En,bV as Y,bW as Kr,bX as In,bY as qr,bZ as Yr,b_ as Xr,b$ as Jr,c0 as Zr}from"./main-aBTKHUp_.js";import{C as Mi}from"./custom-button-CLW-euWD.js";import{D as Qr,C as eo,S as Kt,g as to,A as no,P as io}from"./player-preview-M4aCehFJ.js";import{p as ao}from"./poster-object-fit-DW4GTsSA.js";import{s as Ui}from"./show-default-poster-or-not-BPxh8Myj.js";import{I as On}from"./index-8mwQlFRS.js";import{I as ro}from"./input-dropdown-D9xITxF7.js";import{D as oo}from"./MoreVert-DRM6vhxb.js";import{d as Tn,b as so,a as lo}from"./South-_Dtj-uqN.js";import{d as uo}from"./Check-DjR8Kx0J.js";import{C as co}from"./custom-table-Cw5hq8xx.js";import{g as jt}from"./video-utils-CMdyr9e3.js";import{T as po}from"./tab-bar-eiRnkifs.js";import"./TableHead-CJLY4dpJ.js";import"./index-DJKxxMCm.js";import"./TablePagination-BtH5DZhT.js";import"./LastPage-DU8rFpBX.js";function ho(n){return Ua("MuiIcon",n)}La("MuiIcon",["root","colorPrimary","colorSecondary","colorAction","colorError","colorDisabled","fontSizeInherit","fontSizeSmall","fontSizeMedium","fontSizeLarge"]);const fo=["baseClassName","className","color","component","fontSize"],mo=n=>{const{color:e,fontSize:i,classes:a}=n,t={root:["root",e!=="inherit"&&`color${yt(e)}`,`fontSize${yt(i)}`]};return Ha(t,ho,a)},go=Ne("span",{name:"MuiIcon",slot:"Root",overridesResolver:(n,e)=>{const{ownerState:i}=n;return[e.root,i.color!=="inherit"&&e[`color${yt(i.color)}`],e[`fontSize${yt(i.fontSize)}`]]}})(({theme:n,ownerState:e})=>({userSelect:"none",width:"1em",height:"1em",overflow:"hidden",display:"inline-block",textAlign:"center",flexShrink:0,fontSize:{inherit:"inherit",small:n.typography.pxToRem(20),medium:n.typography.pxToRem(24),large:n.typography.pxToRem(36)}[e.fontSize],color:{primary:(n.vars||n).palette.primary.main,secondary:(n.vars||n).palette.secondary.main,info:(n.vars||n).palette.info.main,success:(n.vars||n).palette.success.main,warning:(n.vars||n).palette.warning.main,action:(n.vars||n).palette.action.active,error:(n.vars||n).palette.error.main,disabled:(n.vars||n).palette.action.disabled,inherit:void 0}[e.color]})),qt=k.forwardRef(function(e,i){const a=Va({props:e,name:"MuiIcon"}),{baseClassName:t="material-icons",className:r,color:l="inherit",component:c="span",fontSize:o="medium"}=a,u=Fa(a,fo),d=B({},a,{baseClassName:t,color:l,component:c,fontSize:o}),p=mo(d);return s.jsx(go,B({as:c,className:$a(t,"notranslate",p.root,r),ownerState:d,"aria-hidden":!0,ref:i},u))});qt.muiName="Icon";const vo=()=>({type:Cr}),bo=(n,e)=>({type:Er,videoInfo:n,videoFiles:e}),yo=n=>e=>(e(vo()),xr(n).then(i=>{const[a,t]=i.map(r=>r.data);return e(bo(a,t))}).catch(i=>{const{message:a=""}=i.data||{};e({type:"ERROR_MESSAGE",message:a})})),wo=()=>({type:rr}),So=n=>({type:or,video:n}),ko=n=>e=>(e(wo()),Ni(n).then(i=>e(So(i.data))).catch(i=>{const{message:a}=i.data;e({type:"ERROR_MESSAGE",message:a})})),mt=(n,e)=>({type:Ga,field:n,value:e}),xo=n=>({type:er,field:n}),Co=()=>({type:ir}),Eo=()=>({type:ar}),gt=n=>(e,i)=>{e(xo(n));const{videoObj:a,videoInfo:t}=i().videosInfo.videoDetails,r=t.id;return(n==="tags"?tr:nr)(r,a).then(c=>{const{message:o}=c.data;e(Co()),e({type:"SUCCESS_MESSAGE",message:o})}).catch(c=>{const{message:o}=c.data;e({type:"ERROR_MESSAGE",message:o}),e(Eo())})},Io=()=>({type:Ka}),Oo=()=>({type:qa}),To=()=>(n,e)=>{n(Io());const i=e().videosInfo.videoDetails.videoInfo.id;return Ba(i).then(()=>n(Oo())).catch(a=>{const{message:t}=a.data;n({type:"ERROR_MESSAGE",message:t})})},jo=()=>({type:Ya}),jn=()=>({type:Xa}),No=n=>(e,i)=>{const a=i().videosInfo.videoDetails.videoInfo.id;return e(jo()),Wa(a,n).then(()=>e(ko(a))).then(()=>e(jn())).catch(t=>{const{message:r}=t.data;return e({type:"ERROR_MESSAGE",message:r}),e(jn())})},Do=()=>({type:Ja}),_o=()=>({type:ji,message:""}),Po=n=>({type:Za,caption:n}),Ao=()=>({type:Qa}),Li=(n,e)=>(i,a)=>{const t=a().videosInfo.videoDetails.videoInfo.id;return i(Do()),Ti(t,n,e).then(r=>i(Po(r.data))).catch(r=>{const{message:l}=r.data;return i({type:ji,message:l}),i(Ao())})},Ro=n=>{const e=()=>({type:wr}),i=t=>({type:Sr,captions:t}),a=()=>({type:kr});return t=>(t(e()),cr(n).then(r=>t(i(r.data))).catch(r=>{t(a());const{message:l}=r.data;t({type:"ERROR_MESSAGE",message:l})}))},Mo=(n,e)=>{const i=r=>({type:vr,id:r}),a=r=>({type:br,id:r}),t=r=>({type:yr,id:r});return r=>(r(i(e)),ur(n,e).then(()=>{r(a(e))}).catch(l=>{const{message:c}=l.data;r(t(e)),r({type:"ERROR_MESSAGE",message:c})}))},Uo=n=>({type:fr,id:n}),Lo=(n,e)=>({type:mr,id:n,is_default:e}),Vo=n=>({type:gr,id:n}),Fo=(n,e)=>i=>(i(Uo(e)),lr(n,e).then(a=>{i(Lo(e,a.data.is_default))}).catch(a=>{const{message:t}=a.data;i({type:"ERROR_MESSAGE",message:t}),i(Vo(e))})),$o=n=>
1({type:dr,id:n}),Ho=(n,e)=>({type:pr,id:n,captionName:e}),Bo=n=>({type:hr,id:n}),zo=(n,e,i)=>a=>(a($o(e)),sr(n,e,i).then(()=>{a(Ho(e,i))}).catch(t=>{const{message:r}=t.data;a({type:"ERROR_MESSAGE",message:r}),a(Bo(e))})),nt=()=>({type:za}),Wo=Ne("div")(()=>({".container":{display:"flex",justifyContent:"space-between",alignItems:"baseline","div.field-div":{flex:1}},".field":{marginTop:"3vh",width:"95%",label:{fontWeight:600,color:"#3E4954"},"div:first-of-type":{marginTop:"0.5vh"}},"div.footer":{marginTop:"10vh"}})),Go=Ne(Ie)(()=>({backgroundColor:"#D74242",color:"#ffffff",borderRadius:"4px",textTransform:"initial",display:"block","&:hover":{backgroundColor:"#D74242"}}));let Nn;const Ko=({video:n,isDeleting:e,deleteButtonDisabled:i,deleteModalOpen:a,uploadingNewPoster:t,updatingVideo:r,posterImageSelected:l,onBlur:c,onKeyUp:o,onDeleteChip:u,onNewImageClick:d,onNewPosterSelected:p,onDeleteVideoClick:h,closeDeleteModal:f,verifyEmailForDelete:y,onDeleteButtonClick:v})=>{const C=n.status==="LIVE";return s.jsxs(k.Fragment,{children:[s.jsx(Qr,{deleteButtonDisabled:i,open:a,title:"video",onClose:()=>f(),verifyEmailForDelete:T=>y(T),deleteContent:()=>v()}),s.jsxs(Wo,{children:[s.jsx("div",{className:"edit-video-header",children:"Basic (Changes are saved automatically when off focus)"}),s.jsxs(G,{container:!0,className:"container",children:[s.jsxs(G,{className:"field-div",item:!0,xs:12,md:6,children:[s.jsxs("div",{className:"field",children:[s.jsx("label",{children:"Video ID"}),s.jsx("div",{children:n.id})]}),s.jsxs("div",{className:"field",children:[s.jsx("label",{children:"Name"}),s.jsx(ht,{fullWidth:!0,onBlur:T=>c(T,"title"),defaultValue:n.title,variant:"outlined"})]}),s.jsxs("div",{className:"field",children:[s.jsx("label",{children:"Description"}),s.jsx(ht,{multiline:!0,maxRows:2,fullWidth:!0,onBlur:T=>c(T,"description"),defaultValue:n.description,variant:"outlined"})]}),s.jsxs("div",{className:"details-section tags field",children:[s.jsx("label",{children:"Tags"}),s.jsx(ht,{onKeyUp:T=>o(T,"tags",n.tags),variant:"outlined",placeholder:"Press `Enter` to add",fullWidth:!0}),n.tags.length>0&&s.jsx("div",{className:"tags-wrapper",style:{marginTop:"3%"},children:n.tags.map(T=>s.jsx(Ir,{video:n,tag:T,onDeleteChip:u},T))})]})]}),s.jsx(G,{item:!0,xs:12,md:6,children:s.jsxs("div",{className:"field",children:[s.jsx("label",{style:{marginLeft:"20px"},children:"Poster Image"}),s.jsxs(G,{container:!0,spacing:3,style:{border:"2px dashed #b7bed5",display:"flex",justifyContent:"center",backgroundColor:"#f8f9ff",padding:"32px",maxWidth:"100%",margin:"20px 20px 20px 20px"},children:[t||r?s.jsx("img",{className:"responsive-img",src:l.fileURL,style:{width:"70%",maxHeight:"145px",borderRadius:"4px"}}):s.jsx("img",{className:"responsive-img",src:Ui(n.poster,n.status),style:{width:"70%",maxHeight:"145px",borderRadius:"4px"},onLoad:T=>{ao(T)}}),s.jsxs("div",{style:{width:"100%",display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column",marginTop:"20px"},children:[s.jsx(Mi,{type:"primary",variant:"contained",onClick:()=>{d(Nn)},disabled:t||r,style:{marginTop:"20px"},children:t||r?"Uploading Poster":"Upload New Poster"}),(t||r)&&s.jsx(Pe,{}),s.jsx("input",{ref:T=>Nn=T,onChange:T=>p(T.target.files[0]),className:"hide",id:"newPosterImage",type:"file",style:{visibility:"hidden"},accept:".jpg,.jpeg,.png"}),s.jsx("b",{style:{fontSize:"12px",marginBottom:"10px"},children:"Supported files"}),s.jsx("p",{style:{fontSize:"11px",margin:"0px"},children:"JPG, JPEG, PNG"})]})]})]})})]}),s.jsx(Or,{style:{marginTop:"10vh",backgroundColor:"#FFF5F3",border:"1px dashed #FF725E",borderRadius:"4px",boxShadow:"none"},message:s.jsxs("div",{style:{display:"flex",alignItems:"end",fontWeight:800,lineHeight:1.43},children:[s.jsx(Go,{disabled:e||C,type:"error",variant:"contained",onClick:()=>h(),children:"Delete Video"}),s.jsxs("div",{style:{fontWeight:"400",marginLeft:"8vh",marginBottom:"1%",color:"black"},children:[" ",C?"Sorry! Deletion is restricted for a running Livestream":`Deleting video is irreversible. Please ensure you are deleting 2 the correct video and that it is not live on your website/app`]})]})})]})]})};let Yt=!0,vt=!1,ot={fileURL:""},dt={fileURL:""},Dn;const qo=(n,e)=>({video:e.video,isDeleting:n.videosInfo.videoDetails.deletingVideo,deleteButtonDisabled:Yt,deleteModalOpen:vt,uploadingNewPoster:n.videosInfo.videoDetails.uploadingNewPoster,updatingVideo:n.videosInfo.videoDetails.updatingVideo,posterImageSelected:ot}),Yo=n=>({onBlur:(e,i)=>{n(mt(i,e.target.value)),n(gt(i))},onKeyUp:(e,i,a)=>{e.keyCode===13&&(n(mt(i,a.concat([e.target.value]))),n(gt(i)),e.target.value="")},onDeleteChip:(e,i)=>{i=i.filter(a=>a!==e),n(mt("tags",i)),n(gt("tags"))},onNewSubtitleClick:e=>{e.click()},onNewSubtitleSelected:e=>{dt=e;const i=new FileReader;i.onload=a=>{dt.fileURL=a.target.result,n(Li(dt)).then(()=>{dt={fileURL:""},n(nt())})},i.readAsDataURL(e)},onNewImageClick:e=>{Dn=e,e.click()},onNewPosterSelected:e=>{ot=e;const i=new FileReader;i.onload=a=>{ot.fileURL=a.target.result,n(No(ot)).then(()=>{ot={fileURL:""},Dn.value="",n(nt())})},i.readAsDataURL(e)},onDeleteVideoClick:()=>{vt=!0,n(nt())},closeDeleteModal:()=>{vt=!1,n(nt())},verifyEmailForDelete:e=>{const{username:i}=Tr();Yt=e.getValue()!==i,n(nt())},onDeleteButtonClick:()=>{Yt=!0,n(To()).then(()=>{vt=!1,Ht("/dashboard")})}}),Xo=et(qo,Yo)(Ko),Jo={en:{"639-1":"en","639-2":"eng",family:"Indo-European",name:"English",nativeName:"English",wikiUrl:"https://en.wikipedia.org/wiki/English_language"},aa:{"639-1":"aa","639-2":"aar",family:"Afro-Asiatic",name:"Afar",nativeName:"Afaraf",wikiUrl:"https://en.wikipedia.org/wiki/Afar_language"},ab:{"639-1":"ab","639-2":"abk",family:"Northwest Caucasian",name:"Abkhaz",nativeName:"аҧÑÑа бÑзÑÓа, аҧÑÑÓа",wikiUrl:"https://en.wikipedia.org/wiki/Abkhaz_language"},ae:{"639-1":"ae","639-2":"ave",family:"Indo-European",name:"Avestan",nativeName:"avesta",wikiUrl:"https://en.wikipedia.org/wiki/Avestan_language"},af:{"639-1":"af","639-2":"afr",family:"Indo-European",name:"Afrikaans",nativeName:"Afrikaans",wikiUrl:"https://en.wikipedia.org/wiki/Afrikaans_language"}
2,ak:{"639-1":"ak","639-2":"aka",family:"NigerâCongo",name:"Akan",nativeName:"Akan",wikiUrl:"https://en.wikipedia.org/wiki/Akan_language"},am:{"639-1":"am","639-2":"amh",family:"Afro-Asiatic",name:"Amharic",nativeName:"á ááá",wikiUrl:"https://en.wikipedia.org/wiki/Amharic_language"},an:{"639-1":"an","639-2":"arg",family:"Indo-European",name:"Aragonese",nativeName:"aragonés",wikiUrl:"https://en.wikipedia.org/wiki/Aragonese_language"},ar:{"639-1":"ar","639-2":"ara",family:"Afro-Asiatic",name:"Arabic",nativeName:"Ø§ÙØ¹Ø±Ø¨ÙØ©",wikiUrl:"https://en.wikipedia.org/wiki/Arabic_language"},as:{"639-1":"as","639-2":"asm",family:"Indo-European",name:"Assamese",nativeName:"à¦
সমà§à¦¯à¦¼à¦¾",wikiUrl:"https://en.wikipedia.org/wiki/Assamese_language"},av:{"639-1":"av","639-2":"ava",family:"Northeast Caucasian",name:"Avaric",nativeName:"Ð°Ð²Ð°Ñ Ð¼Ð°ÑÓ, магÓаÑÑл маÑÓ",wikiUrl:"https://en.wikipedia.org/wiki/Avar_language"},ay:{"639-1":"ay","639-2":"aym",family:"Aymaran",name:"Aymara",nativeName:"aymar aru",wikiUrl:"https://en.wikipedia.org/wiki/Aymara_language"},az:{"639-1":"az","639-2":"aze",family:"Turkic",name:"Azerbaijani",nativeName:"azÉrbaycan dili",wikiUrl:"https://en.wikipedia.org/wiki/Azerbaijani_language"},ba:{"639-1":"ba","639-2":"bak",family:"Turkic",name:"Bashkir",nativeName:"баÑҡоÑÑ Ñеле",wikiUrl:"https://en.wikipedia.org/wiki/Bashkir_language"},be:{"639-1":"be","639-2":"bel",family:"Indo-European",name:"Belarusian",nativeName:"белаÑÑÑÐºÐ°Ñ Ð¼Ð¾Ð²Ð°",wikiUrl:"https://en.wikipedia.org/wiki/Belarusian_language"},bg:{"639-1":"bg","639-2":"bul",family:"Indo-European",name:"Bulgarian",nativeName:"бÑлгаÑÑки език",wikiUrl:"https://en.wikipedia.org/wiki/Bulgarian_language"},bh:{"639-1":"bh","639-2":"bih",family:"Indo-European",name:"Bhojpuri",nativeName:"à¤à¥à¤à¤ªà¥à¤°à¥",wikiUrl:"https://en.wikipedia.org/wiki/Bihari_languages"},bi:{"639-1":"bi","639-2":"bis",family:"Creole",name:"Bislama",nativeName:"Bislama",wikiUrl:"https://en.wikipedia.org/wiki/Bislama_language"},bm:{"639-1":"bm","639-2":"bam",family:"NigerâCongo",name:"Bambara",nativeName:"bamanankan",wikiUrl:"https://en.wikipedia.org/wiki/Bambara_language"},bn:{"639-1":"bn","639-2":"ben",family:"Indo-European",name:"Bengali, Bangla",nativeName:"বাà¦à¦²à¦¾",wikiUrl:"https://en.wikipedia.org/wiki/Bengali_language"},bo:{"639-1":"bo","639-2":"bod","639-2/B":"tib",family:"Sino-Tibetan",name:"Tibetan Standard, Tibetan, Central",nativeName:"à½à½¼à½à¼à½¡à½²à½",wikiUrl:"https://en.wikipedia.org/wiki/Standard_Tibetan"},br:{"639-1":"br","639-2":"bre",family:"Indo-European",name:"Breton",nativeName:"brezhoneg",wikiUrl:"https://en.wikipedia.org/wiki/Breton_language"},bs:{"639-1":"bs","639-2":"bos",family:"Indo-European",name:"Bosnian",nativeName:"bosanski jezik",wikiUrl:"https://en.wikipedia.org/wiki/Bosnian_language"},ca:{"639-1":"ca","639-2":"cat",family:"Indo-European",name:"Catalan",nativeName:"català ",wikiUrl:"https://en.wikipedia.org/wiki/Catalan_language"},ce:{"639-1":"ce","639-2":"che",family:"Northeast Caucasian",name:"Chechen",nativeName:"ноÑ
Ñийн моÑÑ",wikiUrl:"https://en.wikipedia.org/wiki/Chechen_language"},ch:{"639-1":"ch","639-2":"cha",family:"Austronesian",name:"Chamorro",nativeName:"Chamoru",wikiUrl:"https://en.wikipedia.org/wiki/Chamorro_language"},co:{"639-1":"co","639-2":"cos",family:"Indo-European",name:"Corsican",nativeName:"corsu, lingua corsa",wikiUrl:"https://en.wikipedia.org/wiki/Corsican_language"},cr:{"639-1":"cr","639-2":"cre",family:"Algonquian",name:"Cree",nativeName:"áá¦ááááá£",wikiUrl:"https://en.wikipedia.org/wiki/Cree_language"},cs:{"639-1":"cs","639-2":"ces","639-2/B":"cze",family:"Indo-European",name:"Czech",nativeName:"ÄeÅ¡tina, Äeský jazyk",wikiUrl:"https://en.wikipedia.org/wiki/Czech_language"},cu:{"639-1":"cu","639-2":"chu",family:"Indo-European",name:"Old Church Slavonic, Church Slavonic, Old Bulgarian",nativeName:"ѩзÑÐºÑ ÑловѣнÑÑкÑ",wikiUrl:"https://en.wikipedia.org/wiki/Old_Church_Slavonic"},cv:{"639-1":"cv","639-2":"chv",family:"Turkic",name:"Chuvash",nativeName:"ÑÓÐ²Ð°Ñ ÑÓлÑ
и",wikiUrl:"https://en.wikipedia.org/wiki/Chuvash_language"},cy:{"639-1":"cy","639-2":"cym","639-2/B":"wel",family:"Indo-European",name:"Welsh",nativeName:"Cymraeg",wikiUrl:"https://en.wikipedia.org/wiki/Welsh_language"},da:{"639-1":"da","639-2":"dan",family:"Indo-European",name:"Danish",nativeName:"dansk",wikiUrl:"https://en.wikipedia.org/wiki/Danish_language"},de:{"639-1":"de","639-2":"deu","639-2/B":"ger",family:"Indo-European",name:"German",nativeName:"Deutsch",wikiUrl:"https://en.wikipedia.org/wiki/German_language"},dv:{"639-1":"dv","639-2":"div",family:"Indo-European",name:"Divehi, Dhivehi, Maldivian",nativeName:"ÞÞ¨ÞÞ¬ÞÞ¨",wikiUrl:"https://en.wikipedia.org/wiki/Dhivehi_language"},dz:{"639-1":"dz","639-2":"dzo",family:"Sino-Tibetan",name:"Dzongkha",nativeName:"རྫོà½à¼à½",wikiUrl:"https://en.wikipedia.org/wiki/Dzongkha_language"},ee:{"639-1":"ee","639-2":"ewe",family:"NigerâCongo",name:"Ewe",nativeName:"EÊegbe",wikiUrl:"https://en.wikipedia.org/wiki/Ewe_language"},el:{"639-1":"el","639-2":"ell","639-2/B":"gre",family:"Indo-European",name:"Greek (modern)",nativeName:"ελληνικά",wikiUrl:"https://en.wikipedia.org/wiki/Greek_language"},eo:{"639-1":"eo","639-2":"epo",family:"Constructed",name:"Esperanto",
2nativeName:"Esperanto",wikiUrl:"https://en.wikipedia.org/wiki/Esperanto"},es:{"639-1":"es","639-2":"spa",family:"Indo-European",name:"Spanish",nativeName:"Español",wikiUrl:"https://en.wikipedia.org/wiki/Spanish_language"},et:{"639-1":"et","639-2":"est",family:"Uralic",name:"Estonian",nativeName:"eesti, eesti keel",wikiUrl:"https://en.wikipedia.org/wiki/Estonian_language"},eu:{"639-1":"eu","639-2":"eus","639-2/B":"baq",family:"Language isolate",name:"Basque",nativeName:"euskara, euskera",wikiUrl:"https://en.wikipedia.org/wiki/Basque_language"},fa:{"639-1":"fa","639-2":"fas","639-2/B":"per",family:"Indo-European",name:"Persian (Farsi)",nativeName:"ÙØ§Ø±Ø³Û",wikiUrl:"https://en.wikipedia.org/wiki/Persian_language"},ff:{"639-1":"ff","639-2":"ful",family:"NigerâCongo",name:"Fula, Fulah, Pulaar, Pular",nativeName:"Fulfulde, Pulaar, Pular",wikiUrl:"https://en.wikipedia.org/wiki/Fula_language"},fi:{"639-1":"fi","639-2":"fin",family:"Uralic",name:"Finnish",nativeName:"suomi, suomen kieli",wikiUrl:"https://en.wikipedia.org/wiki/Finnish_language"},fj:{"639-1":"fj","639-2":"fij",family:"Austronesian",name:"Fijian",nativeName:"vosa Vakaviti",wikiUrl:"https://en.wikipedia.org/wiki/Fijian_language"},fo:{"639-1":"fo","639-2":"fao",family:"Indo-European",name:"Faroese",nativeName:"føroyskt",wikiUrl:"https://en.wikipedia.org/wiki/Faroese_language"},fr:{"639-1":"fr","639-2":"fra","639-2/B":"fre",family:"Indo-European",name:"French",nativeName:"français, langue française",wikiUrl:"https://en.wikipedia.org/wiki/French_language"},fy:{"639-1":"fy","639-2":"fry",family:"Indo-European",name:"Western Frisian",nativeName:"Frysk",wikiUrl:"https://en.wikipedia.org/wiki/West_Frisian_language"},ga:{"639-1":"ga","639-2":"gle",family:"Indo-European",name:"Irish",nativeName:"Gaeilge",wikiUrl:"https://en.wikipedia.org/wiki/Irish_language"},gd:{"639-1":"gd","639-2":"gla",family:"Indo-European",name:"Scottish Gaelic, Gaelic",nativeName:"Gà idhlig",wikiUrl:"https://en.wikipedia.org/wiki/Scottish_Gaelic_language"},gl:{"639-1":"gl","639-2":"glg",family:"Indo-European",name:"Galician",nativeName:"galego",wikiUrl:"https://en.wikipedia.org/wiki/Galician_language"},gn:{"639-1":"gn","639-2":"grn",family:"Tupian",name:"GuaranÃ",nativeName:"Avañe'ẽ",wikiUrl:"https://en.wikipedia.org/wiki/Guaran%C3%AD_language"}
2,gu:{"639-1":"gu","639-2":"guj",family:"Indo-European",name:"Gujarati",nativeName:"àªà«àªàª°àª¾àª¤à«",wikiUrl:"https://en.wikipedia.org/wiki/Gujarati_language"},gv:{"639-1":"gv","639-2":"glv",family:"Indo-European",name:"Manx",nativeName:"Gaelg, Gailck",wikiUrl:"https://en.wikipedia.org/wiki/Manx_language"},ha:{"639-1":"ha","639-2":"hau",family:"Afro-Asiatic",name:"Hausa",nativeName:"(Hausa) ÙÙÙÙØ³Ù",wikiUrl:"https://en.wikipedia.org/wiki/Hausa_language"},he:{"639-1":"he","639-2":"heb",family:"Afro-Asiatic",name:"Hebrew (modern)",nativeName:"×¢×ר×ת",wikiUrl:"https://en.wikipedia.org/wiki/Hebrew_language"},hi:{"639-1":"hi","639-2":"hin",family:"Indo-European",name:"Hindi",nativeName:"हिनà¥à¤¦à¥, हिà¤à¤¦à¥",wikiUrl:"https://en.wikipedia.org/wiki/Hindi"},ho:{"639-1":"ho","639-2":"hmo",family:"Austronesian",name:"Hiri Motu",nativeName:"Hiri Motu",wikiUrl:"https://en.wikipedia.org/wiki/Hiri_Motu_language"},hr:{"639-1":"hr","639-2":"hrv",family:"Indo-European",name:"Croatian",nativeName:"hrvatski jezik",wikiUrl:"https://en.wikipedia.org/wiki/Croatian_language"},ht:{"639-1":"ht","639-2":"hat",family:"Creole",name:"Haitian, Haitian Creole",nativeName:"Kreyòl ayisyen",wikiUrl:"https://en.wikipedia.org/wiki/Haitian_Creole_language"},hu:{"639-1":"hu","639-2":"hun",family:"Uralic",name:"Hungarian",nativeName:"magyar",wikiUrl:"https://en.wikipedia.org/wiki/Hungarian_language"},hy:{"639-1":"hy","639-2":"hye","639-2/B":"arm",family:"Indo-European",name:"Armenian",nativeName:"ÕÕ¡ÕµÕ¥ÖÕ¥Õ¶",wikiUrl:"https://en.wikipedia.org/wiki/Armenian_language"},hz:{"639-1":"hz","639-2":"her",family:"NigerâCongo",name:"Herero",nativeName:"Otjiherero",wikiUrl:"https://en.wikipedia.org/wiki/Herero_language"},ia:{"639-1":"ia","639-2":"ina",family:"Constructed",name:"Interlingua",nativeName:"Interlingua",wikiUrl:"https://en.wikipedia.org/wiki/Interlingua"},id:{"639-1":"id","639-2":"ind",family:"Austronesian",name:"Indonesian",nativeName:"Bahasa Indonesia",wikiUrl:"https://en.wikipedia.org/wiki/Indonesian_language"},ie:{"639-1":"ie","639-2":"ile",family:"Constructed",name:"Interlingue",nativeName:"Originally called Occidental; then Interlingue after WWII",wikiUrl:"https://en.wikipedia.org/wiki/Interlingue_language"},ig:{"639-1":"ig","639-2":"ibo",family:"NigerâCongo",name:"Igbo",nativeName:"Asụsụ Igbo",wikiUrl:"https://en.wikipedia.org/wiki/Igbo_language"},ii:{"639-1":"ii","639-2":"iii",family:"Sino-Tibetan",name:"Nuosu",nativeName:"êê ê¿ Nuosuhxop",wikiUrl:"https://en.wikipedia.org/wiki/Nuosu_language"},ik:{"639-1":"ik","639-2":"ipk",family:"EskimoâAleut",name:"Inupiaq",nativeName:"Iñupiaq, Iñupiatun",wikiUrl:"https://en.wikipedia.org/wiki/Inupiaq_language"},io:{"639-1":"io","639-2":"ido",family:"Constructed",name:"Ido",nativeName:"Ido",wikiUrl:"https://en.wikipedia.org/wiki/Ido_(language)"},is:{"639-1":"is","639-2":"isl","639-2/B":"ice",family:"Indo-European",name:"Icelandic",nativeName:"Ãslenska",wikiUrl:"https://en.wikipedia.org/wiki/Icelandic_language"},it:{"639-1":"it","639-2":"ita",family:"Indo-European",name:"Italian",nativeName:"Italiano",wikiUrl:"https://en.wikipedia.org/wiki/Italian_language"},iu:{"639-1":"iu","639-2":"iku",family:"EskimoâAleut",name:"Inuktitut",nativeName:"áááááá¦",wikiUrl:"https://en.wikipedia.org/wiki/Inuktitut"},ja:{"639-1":"ja","639-2":"jpn",family:"Japonic",name:"Japanese",nativeName:"æ¥æ¬èª (ã«ã»ãã)",wikiUrl:"https://en.wikipedia.org/wiki/Japanese_language"},jv:{"639-1":"jv","639-2":"jav",family:"Austronesian",name:"Javanese",nativeName:"ꦧꦱê¦ê¦®, Basa Jawa",wikiUrl:"https://en.wikipedia.org/wiki/Javanese_language"},ka:{"639-1":"ka","639-2":"kat","639-2/B":"geo",family:"South Caucasian",name:"Georgian",nativeName:"á¥áá áá£áá",wikiUrl:"https://en.wikipedia.org/wiki/Georgian_language"},kg:{"639-1":"kg","639-2":"kon",family:"NigerâCongo",name:"Kongo",nativeName:"Kikongo",wikiUrl:"https://en.wikipedia.org/wiki/Kongo_language"},ki:{"639-1":"ki","639-2":"kik",family:"NigerâCongo",name:"Kikuyu, Gikuyu",nativeName:"GÄ©kÅ©yÅ©",wikiUrl:"https://en.wikipedia.org/wiki/Gikuyu_language"},kj:{"639-1":"kj","639-2":"kua",family:"NigerâCongo",name:"Kwanyama, Kuanyama",nativeName:"Kuanyama",wikiUrl:"https://en.wikipedia.org/wiki/Kwanyama"},kk:{"639-1":"kk","639-2":"kaz",family:"Turkic",name:"Kazakh",nativeName:"ÒÐ°Ð·Ð°Ò ÑÑлÑ",wikiUrl:"https://en.wikipedia.org/wiki/Kazakh_language"},kl:{"639-1":"kl","639-2":"kal",family:"EskimoâAleut",name:"Kalaallisut, Greenlandic",nativeName:"kalaallisut, kalaallit oqaasii",wikiUrl:"https://en.wikipedia.org/wiki/Kalaallisut_language"},km:{"639-1":"km","639-2":"khm",family:"Austroasiatic",name:"Khmer",nativeName:"ááááá, áááááá¶áá¶, áá¶áá¶ááááá",wikiUrl:"https://en.wikipedia.org/wiki/Khmer_language"},kn:{"639-1":"kn","639-2":"kan",family:"Dravidian",name:"Kannada",nativeName:"à²à²¨à³à²¨à²¡",wikiUrl:"https://en.wikipedia.org/wiki/Kannada_language"},ko:{"639-1":"ko","639-2":"kor",family:"Koreanic",name:"Korean",nativeName:"íêµì´",wikiUrl:"https://en.wikipedia.org/wiki/Korean_language"},kr:{"639-1":"kr","639-2":"kau",family:"Nilo-Saharan",name:"Kanuri",nativeName:"Kanuri",wikiUrl:"https://en.wikipedia.org/wiki/Kanuri_language"},ks:{"639-1":"ks","639-2":"kas",family:"Indo-European",name:"Kashmiri",nativeName:"à¤à¤¶à¥à¤®à¥à¤°à¥, ÙØ´Ù
ÙØ±Ùâ",wikiUrl:"https://en.wikipedia.org/wiki/Kashmiri_language"},ku:{"639-1":"ku","639-2":"kur",family:"Indo-European",name:"Kurdish",nativeName:"Kurdî, ÙÙØ±Ø¯Ûâ",wikiUrl:"https://en.wikipedia.org/wiki/Kurdish_language"},kv:{"639-1":"kv","639-2":"kom",family:"Uralic",name:"Komi",nativeName:"коми кÑв",wikiUrl:"https://en.wikipedia.org/wiki/Komi_language"},kw:{"639-1":"kw","639-2":"cor",family:"Indo-European",name:"Cornish",nativeName:"Kernewek",wikiUrl:"https://en.wikipedia.org/wiki/Cornish_language"},ky:{"639-1":"ky","639-2":"kir",family:"Turkic",name:"Kyrgyz",nativeName:"ÐÑÑгÑзÑа, ÐÑÑгÑз Ñили",wikiUrl:"https://en.wikipedia.org/wiki/Kyrgyz_language"},la:{"639-1":"la","639-2":"lat",family:"Indo-European",name:"Latin",nativeName:"latine, lingua latina",wikiUrl:"https://en.wikipedia.org/wiki/Latin"},lb:{"639-1":"lb","639-2":"ltz",family:"Indo-European",name:"Luxembourgish, Letzeburgesch",nativeName:"Lëtzebuergesch",wikiUrl:"https://en.wikipedia.org/wiki/Luxembourgish_language"},lg:{"639-1":"lg","639-2":"lug",family:"NigerâCongo",name:"Ganda",nativeName:"Luganda",wikiUrl:"https://en.wikipedia.org/wiki/Luganda"},li:{"639-1":"li","639-2":"lim",family:"Indo-European",name:"Limburgish, Limburgan, Limburger",nativeName:"Limburgs",wikiUrl:"https://en.wikipedia.org/wiki/Limburgish_language"},ln:{"639-1":"ln","639-2":"lin",family:"NigerâCongo",name:"Lingala",nativeName:"Lingála",wikiUrl:"https://en.wikipedia.org/wiki/Lingala_language"}
2,lo:{"639-1":"lo","639-2":"lao",family:"TaiâKadai",name:"Lao",nativeName:"àºàº²àºªàº²àº¥àº²àº§",wikiUrl:"https://en.wikipedia.org/wiki/Lao_language"},lt:{"639-1":"lt","639-2":"lit",family:"Indo-European",name:"Lithuanian",nativeName:"lietuvių kalba",wikiUrl:"https://en.wikipedia.org/wiki/Lithuanian_language"},lu:{"639-1":"lu","639-2":"lub",family:"NigerâCongo",name:"Luba-Katanga",nativeName:"Tshiluba",wikiUrl:"https://en.wikipedia.org/wiki/Tshiluba_language"},lv:{"639-1":"lv","639-2":"lav",family:"Indo-European",name:"Latvian",nativeName:"latvieÅ¡u valoda",wikiUrl:"https://en.wikipedia.org/wiki/Latvian_language"},mg:{"639-1":"mg","639-2":"mlg",family:"Austronesian",name:"Malagasy",nativeName:"fiteny malagasy",wikiUrl:"https://en.wikipedia.org/wiki/Malagasy_language"},mh:{"639-1":"mh","639-2":"mah",family:"Austronesian",name:"Marshallese",nativeName:"Kajin M̧ajeļ",wikiUrl:"https://en.wikipedia.org/wiki/Marshallese_language"},mi:{"639-1":"mi","639-2":"mri","639-2/B":"mao",family:"Austronesian",name:"MÄori",nativeName:"te reo MÄori",wikiUrl:"https://en.wikipedia.org/wiki/M%C4%81ori_language"},mk:{"639-1":"mk","639-2":"mkd","639-2/B":"mac",family:"Indo-European",name:"Macedonian",nativeName:"македонÑки Ñазик",wikiUrl:"https://en.wikipedia.org/wiki/Macedonian_language"},ml:{"639-1":"ml","639-2":"mal",family:"Dravidian",name:"Malayalam",nativeName:"മലയാളà´",wikiUrl:"https://en.wikipedia.org/wiki/Malayalam_language"},mn:{"639-1":"mn","639-2":"mon",family:"Mongolic",name:"Mongolian",nativeName:"Ðонгол Ñ
Ñл",wikiUrl:"https://en.wikipedia.org/wiki/Mongolian_language"},mr:{"639-1":"mr","639-2":"mar",family:"Indo-European",name:"Marathi (MarÄá¹hÄ«)",nativeName:"मराठà¥",wikiUrl:"https://en.wikipedia.org/wiki/Marathi_language"},ms:{"639-1":"ms","639-2":"msa","639-2/B":"may",family:"Austronesian",name:"Malay",nativeName:"bahasa Melayu, Ø¨ÙØ§Ø³ Ù
ÙØ§ÙÙâ",wikiUrl:"https://en.wikipedia.org/wiki/Malay_language"},mt:{"639-1":"mt","639-2":"mlt",family:"Afro-Asiatic",name:"Maltese",nativeName:"Malti",wikiUrl:"https://en.wikipedia.org/wiki/Maltese_language"},my:{"639-1":"my","639-2":"mya","639-2/B":"bur",family:"Sino-Tibetan",name:"Burmese",nativeName:"ááá¬á
á¬",wikiUrl:"https://en.wikipedia.org/wiki/Burmese_language"},na:{"639-1":"na","639-2":"nau",family:"Austronesian",name:"Nauruan",nativeName:"Dorerin Naoero",wikiUrl:"https://en.wikipedia.org/wiki/Nauruan_language"},nb:{"639-1":"nb","639-2":"nob",family:"Indo-European",name:"Norwegian BokmÃ¥l",nativeName:"Norsk bokmÃ¥l",wikiUrl:"https://en.wikipedia.org/wiki/Bokm%C3%A5l"},nd:{"639-1":"nd","639-2":"nde",family:"NigerâCongo",name:"Northern Ndebele",nativeName:"isiNdebele",wikiUrl:"https://en.wikipedia.org/wiki/Northern_Ndebele_language"},ne:{"639-1":"ne","639-2":"nep",family:"Indo-European",name:"Nepali",nativeName:"नà¥à¤ªà¤¾à¤²à¥",wikiUrl:"https://en.wikipedia.org/wiki/Nepali_language"},ng:{"639-1":"ng","639-2":"ndo",family:"NigerâCongo",name:"Ndonga",nativeName:"Owambo",wikiUrl:"https://en.wikipedia.org/wiki/Ndonga"},nl:{"639-1":"nl","639-2":"nld","639-2/B":"dut",family:"Indo-European",name:"Dutch",nativeName:"Nederlands, Vlaams",wikiUrl:"https://en.wikipedia.org/wiki/Dutch_language"},nn:{"639-1":"nn","639-2":"nno",family:"Indo-European",name:"Norwegian Nynorsk",nativeName:"Norsk nynorsk",wikiUrl:"https://en.wikipedia.org/wiki/Nynorsk"},no:{"639-1":"no","639-2":"nor",family:"Indo-European",name:"Norwegian",nativeName:"Norsk",wikiUrl:"https://en.wikipedia.org/wiki/Norwegian_language"},nr:{"639-1":"nr","639-2":"nbl",family:"NigerâCongo",name:"Southern Ndebele",nativeName:"isiNdebele",wikiUrl:"https://en.wikipedia.org/wiki/Southern_Ndebele_language"},nv:{"639-1":"nv","639-2":"nav",family:"DenéâYeniseian",name:"Navajo, Navaho",nativeName:"Diné bizaad",wikiUrl:"https://en.wikipedia.org/wiki/Navajo_language"},ny:{"639-1":"ny","639-2":"nya",family:"NigerâCongo",name:"Chichewa, Chewa, Nyanja",nativeName:"chiCheŵa, chinyanja",wikiUrl:"https://en.wikipedia.org/wiki/Chichewa_language"},oc:{"639-1":"oc","639-2":"oci",family:"Indo-European",name:"Occitan",nativeName:"occitan, lenga d'
2òc",wikiUrl:"https://en.wikipedia.org/wiki/Occitan_language"},oj:{"639-1":"oj","639-2":"oji",family:"Algonquian",name:"Ojibwe, Ojibwa",nativeName:"ááááá¯á§áá",wikiUrl:"https://en.wikipedia.org/wiki/Ojibwe_language"},om:{"639-1":"om","639-2":"orm",family:"Afro-Asiatic",name:"Oromo",nativeName:"Afaan Oromoo",wikiUrl:"https://en.wikipedia.org/wiki/Oromo_language"},or:{"639-1":"or","639-2":"ori",family:"Indo-European",name:"Odia",nativeName:"à¬à¬¡à¬¼à¬¿à¬",wikiUrl:"https://en.wikipedia.org/wiki/Oriya_language"},os:{"639-1":"os","639-2":"oss",family:"Indo-European",name:"Ossetian, Ossetic",nativeName:"иÑон æвзаг",wikiUrl:"https://en.wikipedia.org/wiki/Ossetic_language"},pa:{"639-1":"pa","639-2":"pan",family:"Indo-European",name:"(Eastern) Punjabi",nativeName:"ਪੰà¨à¨¾à¨¬à©",wikiUrl:"https://en.wikipedia.org/wiki/Eastern_Punjabi_language"},pi:{"639-1":"pi","639-2":"pli",family:"Indo-European",name:"PÄli",nativeName:"पाऴि",wikiUrl:"https://en.wikipedia.org/wiki/P%C4%81li_language"},pl:{"639-1":"pl","639-2":"pol",family:"Indo-European",name:"Polish",nativeName:"jÄzyk polski, polszczyzna",wikiUrl:"https://en.wikipedia.org/wiki/Polish_language"},ps:{"639-1":"ps","639-2":"pus",family:"Indo-European",name:"Pashto, Pushto",nativeName:"Ù¾ÚØªÙ",wikiUrl:"https://en.wikipedia.org/wiki/Pashto_language"},pt:{"639-1":"pt","639-2":"por",family:"Indo-European",name:"Portuguese",nativeName:"Português",wikiUrl:"https://en.wikipedia.org/wiki/Portuguese_language"},qu:{"639-1":"qu","639-2":"que",family:"Quechuan",name:"Quechua",nativeName:"Runa Simi, Kichwa",wikiUrl:"https://en.wikipedia.org/wiki/Quechua_language"},rm:{"639-1":"rm","639-2":"roh",family:"Indo-European",name:"Romansh",nativeName:"rumantsch grischun",wikiUrl:"https://en.wikipedia.org/wiki/Romansh_language"},rn:{"639-1":"rn","639-2":"run",family:"NigerâCongo",name:"Kirundi",nativeName:"Ikirundi",wikiUrl:"https://en.wikipedia.org/wiki/Kirundi"},ro:{"639-1":"ro","639-2":"ron","639-2/B":"rum",family:"Indo-European",name:"Romanian",nativeName:"RomânÄ",wikiUrl:"https://en.wikipedia.org/wiki/Romanian_language"},ru:{"639-1":"ru","639-2":"rus",family:"Indo-European",name:"Russian",nativeName:"Ð ÑÑÑкий",wikiUrl:"https://en.wikipedia.org/wiki/Russian_language"},rw:{"639-1":"rw","639-2":"kin",family:"NigerâCongo",name:"Kinyarwanda",nativeName:"Ikinyarwanda",wikiUrl:"https://en.wikipedia.org/wiki/Kinyarwanda"},sa:{"639-1":"sa","639-2":"san",family:"Indo-European",name:"Sanskrit (Saá¹ská¹ta)",nativeName:"सà¤à¤¸à¥à¤à¥à¤¤à¤®à¥",wikiUrl:"https://en.wikipedia.org/wiki/Sanskrit"},sc:{"639-1":"sc","639-2":"srd",family:"Indo-European",name:"Sardinian",
2nativeName:"sardu",wikiUrl:"https://en.wikipedia.org/wiki/Sardinian_language"},sd:{"639-1":"sd","639-2":"snd",family:"Indo-European",name:"Sindhi",nativeName:"सिनà¥à¤§à¥, سÙÚÙØ Ø³ÙØ¯Ú¾Ûâ",wikiUrl:"https://en.wikipedia.org/wiki/Sindhi_language"},se:{"639-1":"se","639-2":"sme",family:"Uralic",name:"Northern Sami",nativeName:"Davvisámegiella",wikiUrl:"https://en.wikipedia.org/wiki/Northern_Sami"},sg:{"639-1":"sg","639-2":"sag",family:"Creole",name:"Sango",nativeName:"yângâ tî sängö",wikiUrl:"https://en.wikipedia.org/wiki/Sango_language"},si:{"639-1":"si","639-2":"sin",family:"Indo-European",name:"Sinhalese, Sinhala",nativeName:"à·à·à¶à·à¶½",wikiUrl:"https://en.wikipedia.org/wiki/Sinhalese_language"},sk:{"639-1":"sk","639-2":"slk","639-2/B":"slo",family:"Indo-European",name:"Slovak",nativeName:"slovenÄina, slovenský jazyk",wikiUrl:"https://en.wikipedia.org/wiki/Slovak_language"},sl:{"639-1":"sl","639-2":"slv",family:"Indo-European",name:"Slovene",nativeName:"slovenski jezik, slovenÅ¡Äina",wikiUrl:"https://en.wikipedia.org/wiki/Slovene_language"},sm:{"639-1":"sm","639-2":"smo",family:"Austronesian",name:"Samoan",nativeName:"gagana fa'a Samoa",wikiUrl:"https://en.wikipedia.org/wiki/Samoan_language"},sn:{"639-1":"sn","639-2":"sna",family:"NigerâCongo",name:"Shona",nativeName:"chiShona",wikiUrl:"https://en.wikipedia.org/wiki/Shona_language"},so:{"639-1":"so","639-2":"som",family:"Afro-Asiatic",name:"Somali",nativeName:"Soomaaliga, af Soomaali",wikiUrl:"https://en.wikipedia.org/wiki/Somali_language"},sq:{"639-1":"sq","639-2":"sqi","639-2/B":"alb",family:"Indo-European",name:"Albanian",
2nativeName:"Shqip",wikiUrl:"https://en.wikipedia.org/wiki/Albanian_language"},sr:{"639-1":"sr","639-2":"srp",family:"Indo-European",name:"Serbian",nativeName:"ÑÑпÑки Ñезик",wikiUrl:"https://en.wikipedia.org/wiki/Serbian_language"},ss:{"639-1":"ss","639-2":"ssw",family:"NigerâCongo",name:"Swati",nativeName:"SiSwati",wikiUrl:"https://en.wikipedia.org/wiki/Swati_language"},st:{"639-1":"st","639-2":"sot",family:"NigerâCongo",name:"Southern Sotho",nativeName:"Sesotho",wikiUrl:"https://en.wikipedia.org/wiki/Sotho_language"},su:{"639-1":"su","639-2":"sun",family:"Austronesian",name:"Sundanese",nativeName:"Basa Sunda",wikiUrl:"https://en.wikipedia.org/wiki/Sundanese_language"},sv:{"639-1":"sv","639-2":"swe",family:"Indo-European",name:"Swedish",nativeName:"svenska",wikiUrl:"https://en.wikipedia.org/wiki/Swedish_language"},sw:{"639-1":"sw","639-2":"swa",family:"NigerâCongo",name:"Swahili",nativeName:"Kiswahili",wikiUrl:"https://en.wikipedia.org/wiki/Swahili_language"},ta:{"639-1":"ta","639-2":"tam",family:"Dravidian",name:"Tamil",nativeName:"தமிழà¯",wikiUrl:"https://en.wikipedia.org/wiki/Tamil_language"},te:{"639-1":"te","639-2":"tel",family:"Dravidian",name:"Telugu",nativeName:"à°¤à±à°²à±à°à±",wikiUrl:"https://en.wikipedia.org/wiki/Telugu_language"},tg:{"639-1":"tg","639-2":"tgk",family:"Indo-European",name:"Tajik",nativeName:"Ñоҷикӣ, toçikÄ«, تاجÛÚ©Ûâ",wikiUrl:"https://en.wikipedia.org/wiki/Tajik_language"},th:{"639-1":"th","639-2":"tha",family:"TaiâKadai",name:"Thai",nativeName:"à¹à¸à¸¢",wikiUrl:"https://en.wikipedia.org/wiki/Thai_language"},ti:{"639-1":"ti","639-2":"tir",family:"Afro-Asiatic",name:"Tigrinya",nativeName:"áµááá",wikiUrl:"https://en.wikipedia.org/wiki/Tigrinya_language"},tk:{"639-1":"tk","639-2":"tuk",family:"Turkic",name:"Turkmen",nativeName:"Türkmen, ТүÑкмен",wikiUrl:"https://en.wikipedia.org/wiki/Turkmen_language"},tl:{"639-1":"tl","639-2":"tgl",family:"Austronesian",name:"Tagalog",nativeName:"Wikang Tagalog",wikiUrl:"https://en.wikipedia.org/wiki/Tagalog_language"},tn:{"639-1":"tn","639-2":"tsn",family:"NigerâCongo",name:"Tswana",nativeName:"Setswana",wikiUrl:"https://en.wikipedia.org/wiki/Tswana_language"},to:{"639-1":"to","639-2":"ton",family:"Austronesian",name:"Tonga (Tonga Islands)",nativeName:"faka Tonga",wikiUrl:"https://en.wikipedia.org/wiki/Tongan_language"},tr:{"639-1":"tr","639-2":"tur",family:"Turkic",name:"Turkish",nativeName:"Türkçe",wikiUrl:"https://en.wikipedia.org/wiki/Turkish_language"},ts:{"639-1":"ts","639-2":"tso",family:"NigerâCongo",name:"Tsonga",nativeName:"Xitsonga",wikiUrl:"https://en.wikipedia.org/wiki/Tsonga_language"},tt:{"639-1":"tt","639-2":"tat",family:"Turkic",name:"Tatar",nativeName:"ÑаÑÐ°Ñ Ñеле, tatar tele",wikiUrl:"https://en.wikipedia.org/wiki/Tatar_language"},tw:{"639-1":"tw","639-2":"twi",family:"NigerâCongo",name:"Twi",nativeName:"Twi",wikiUrl:"https://en.wikipedia.org/wiki/Twi"},ty:{"639-1":"ty","639-2":"tah",family:"Austronesian",name:"Tahitian",nativeName:"Reo Tahiti",wikiUrl:"https://en.wikipedia.org/wiki/Tahitian_language"},ug:{"639-1":"ug","639-2":"uig",family:"Turkic",name:"Uyghur",nativeName:"ئÛÙØºÛرÚÛâ, Uyghurche",wikiUrl:"https://en.wikipedia.org/wiki/Uyghur_language"},uk:{"639-1":"uk","639-2":"ukr",family:"Indo-European",name:"Ukrainian",nativeName:"УкÑаÑнÑÑка",wikiUrl:"https://en.wikipedia.org/wiki/Ukrainian_language"},ur:{"639-1":"ur","639-2":"urd",family:"Indo-European",name:"Urdu",nativeName:"اردÙ",wikiUrl:"https://en.wikipedia.org/wiki/Urdu"},uz:{"639-1":"uz","639-2":"uzb",family:"Turkic",name:"Uzbek",nativeName:"OÊ»zbek, Ðзбек, Ø£ÛØ²Ø¨ÛÙâ",wikiUrl:"https://en.wikipedia.org/wiki/Uzbek_language"},ve:{"639-1":"ve","639-2":"ven",family:"NigerâCongo",name:"Venda",nativeName:"Tshivená¸a",wikiUrl:"https://en.wikipedia.org/wiki/Venda_language"},vi:{"639-1":"vi","639-2":"vie",family:"Austroasiatic",name:"Vietnamese",nativeName:"Tiếng Viá»t",wikiUrl:"https://en.wikipedia.org/wiki/Vietnamese_language"},vo:{"639-1":"vo","639-2":"vol",family:"Constructed",name:"Volapük",nativeName:"Volapük",wikiUrl:"https://en.wikipedia.org/wiki/Volap%C3%BCk"},wa:{"639-1":"wa","639-2":"wln",family:"Indo-European",name:"Walloon",nativeName:"walon",wikiUrl:"https://en.wikipedia.org/wiki/Walloon_language"},wo:{"639-1":"wo","639-2":"wol",family:"NigerâCongo",name:"Wolof",nativeName:"Wollof",wikiUrl:"https://en.wikipedia.org/wiki/Wolof_language"},xh:{"639-1":"xh","639-2":"xho",family:"NigerâCongo",name:"Xhosa",nativeName:"isiXhosa",wikiUrl:"https://en.wikipedia.org/wiki/Xhosa_language"}
2,yi:{"639-1":"yi","639-2":"yid",family:"Indo-European",name:"Yiddish",nativeName:"××Ö´××ש",wikiUrl:"https://en.wikipedia.org/wiki/Yiddish_language"},yo:{"639-1":"yo","639-2":"yor",family:"NigerâCongo",name:"Yoruba",nativeName:"Yorùbá",wikiUrl:"https://en.wikipedia.org/wiki/Yoruba_language"},za:{"639-1":"za","639-2":"zha",family:"TaiâKadai",name:"Zhuang, Chuang",nativeName:"Saɯ cueÅÆ
, Saw cuengh",wikiUrl:"https://en.wikipedia.org/wiki/Zhuang_languages"},zh:{"639-1":"zh","639-2":"zho","639-2/B":"chi",family:"Sino-Tibetan",name:"Chinese",nativeName:"䏿 (ZhÅngwén), æ±è¯, æ¼¢èª",wikiUrl:"https://en.wikipedia.org/wiki/Chinese_language"},zu:{"639-1":"zu","639-2":"zul",family:"NigerâCongo",name:"Zulu",nativeName:"isiZulu",wikiUrl:"https://en.wikipedia.org/wiki/Zulu_language"}};var sn={},Zo=Et;Object.defineProperty(sn,"__esModule",{value:!0});var ln=sn.default=void 0,Qo=Zo(Ct()),es=s;ln=sn.default=(0,Qo.default)((0,es.jsx)("path",{d:"M17 3H5c-1.11 0-2 .9-2 2v14c0 1.1.89 2 2 2h14c1.1 0 2-.9 2-2V7zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3m3-10H5V5h10z"}),"Save");function ts({clickHandler:n,value:e}){const[i,a]=k.useState(!1),[t,r]=k.useState(""),l=()=>{i&&n(t),a(!i)};return k.useEffect(()=>{r(e)},[]),s.jsxs(G,{container:!0,direction:"row",justifyContent:"space-between",children:[i?s.jsx(ht,{autoFocus:!0,value:t,onChange:c=>r(c.target.value),onKeyPress:c=>{c.key==="Enter"&&l()},onBlur:()=>l()}):s.jsx("p",{onClick:()=>a(!0),children:t}),s.jsx($e,{onClick:l,children:i?s.jsx(ln,{}):s.jsx(Di,{})})]})}let _n;const Pn=Ne("div")(()=>({display:"flex",justifyContent:"center",flexDirection:"column",alignItems:"center",backgroundColor:"#F7F6FF",border:"1px dashed #5F50E4",padding:"18px 0",cursor:"pointer","span.material-icons":{color:"#5F50E4",height:"3em",width:"3em",svg:{height:"3em",width:"3em"}},p:{fontSize:"11px",color:"#55575E"},"&.disabled":{opacity:"0.3",cursor:"no-drop"}})),ns=({title:n,onChange:e,acceptedTypes:i,isDisabled:a=!1})=>{const t=()=>{_n.open()};return s.jsx("span",{className:"gtm-trigger","data-analytics":"Upload Subtitle",style:{width:"49%",flex:"1",minWidth:"400px"},children:a?s.jsxs(Pn,{onClick:()=>{a||t()},className:a?"disabled":"",children:[s.jsxs("h2",{children:["Upload ",n]}),s.jsx(qt,{children:s.jsx(Tn,{})}),s.jsx("p",{children:"Drag and drop or choose browse to choose a file"})]}):s.jsx(oo,{style:{height:"100%",width:"100%"},ref:r=>_n=r,onDrop:e,disableClick:!0,accept:i,children:s.jsxs(Pn,{onClick:()=>{a||t()},className:a?"disabled":"",children:[s.jsxs("h2",{children:["Upload ",n]}),s.jsx(qt,{children:s.jsx(Tn,{})}),s.jsx("p",{children:"Drag and drop or choose browse to choose a file"})]})})})},Vi=xe(jr)(({btnColor:n,textColor:e})=>({padding:"3px 10px",margin:"4px",fontSize:"11px",color:`${e}`,fontWeight:600,"min-width":"54px",borderRadius:"4px",".MuiButton-startIcon":{marginRight:"2px"},".MuiButton-startIcon>*:nth-of-type(1)":{fontSize:"14px"},borderColor:`${n} !important`,"&:hover":{borderColor:n}}));var un={},is=Et;Object.defineProperty(un,"__esModule",{value:!0});var Fi=un.default=void 0,as=is(Ct()),rs=s;Fi=un.default=(0,as.default)((0,rs.jsx)("path",{d:"m17.66 5.41.92.92-2.69 2.69-.92-.92zM17.67 3c-.26 0-.51.1-.71.29l-3.12 3.12-1.93-1.91-1.41 1.41 1.42 1.42L3 16.25V21h4.75l8.92-8.92 1.42 1.42 1.41-1.41-1.92-1.92 3.12-3.12c.4-.4.4-1.03.01-1.42l-2.34-2.34c-.2-.19-.45-.29-.7-.29M6.92 19 5 17.08l8.06-8.06 1.92 1.92z"}),"ColorizeOutlined");const $i=10,ce=({hh:n,mm:e,ss:i,ttt:a})=>{const t=parseInt(n||0)*3600+parseInt(e||0)*60+parseInt(i||0);return parseInt(a||0)?t+parseInt(a||0)/1e3:t},ut=n=>{const e=Math.floor(n/3600),i=Math.floor(n%3600/60),a=Math.floor(n-(e*3600+i*60)),t=Math.floor(n.toFixed(3)%1*1e3);return os({hh:e,mm:i,ss:a,ttt:t})},os=n=>{const{hh:e,mm:i,ss:a,ttt:t}=n,r=[e,i,a,t];return r.forEach((l,c)=>{c!==3&&(r[c]=("0"+l).slice(-2))}),r[3]=("00"+r[3]).slice(-3),{hh:r[0],mm:r[1],ss:r[2],ttt:r[3]}},An=n=>{const e=[...n];let i=!1;return e.sort((a,t)=>ce(a.time)-ce(t.time)),e.forEach((a,t)=>{t<=e.length-2&&ce(e[t].time)===ce(e[t+1].time)&&(i=!0)}),i},ss=n=>{const e=[...n];if(e.length===0||e.length===1)return!0;let i=!0;return e.sort((a,t)=>ce(a.time)-ce(t.time)),e.forEach((a,t)=>{t>0&&ce(e[t].time)-ce(e[t-1].time)<$i&&(i=!1)}),i},ls=n=>[...n].length!=1,Rn=n=>{const e=[];
2return n.forEach(i=>{i.title&&i.time&&e.push({title:i.title,startTime:ce(i.time)})}),e},us=(n,e,i,a)=>{const t=ce(e[n].time),r=window.VdoPlayer.getInstance(i.getElementById(a));r.video.currentTime=t},Mn=n=>{const e=[];return n.forEach(i=>{e.push({title:i.title,time:ut(i.startTime)})}),e},Hi="vtt-editor/UPDATE_TEXT",Xt="vtt-editor/ADD_NEW_CUE",Bi="vtt-editor/DELETE_CUE",cs="vtt-editor/SET_FILE_URL",zi="vtt-editor/UPDATE_TIME",Wi="vtt-editor/SET_STATE",Jt="vtt-editor/UPDATE_COLOR",Gi="vtt-editor/POSITION_VTT",Ki="vtt-editor/SORT_CUE",qi="vtt-editor/MARK_UNSORTED_CUES",Se="vtt-video-preview",Qe="vdocipher-edited-track",Un="vdocipher",ds=n=>` 3${n.startTime.hh}:${n.startTime.mm}:${n.startTime.ss}.${n.startTime.ttt} --> ${n.endTime.hh}:${n.endTime.mm}:${n.endTime.ss}.${n.endTime.ttt} ${n.line&&n.line!=="auto"?`line:${n.line}`:""} ${n.position&&n.position!=="auto"?`position:${n.position}`:""} 4${n.text} 5 6`,ps=["lime","cyan","white","red","yellow","magenta","blue","black"],hs={white:"#ffffff",lime:"#00ff00",cyan:"#00ffff",red:"#ff0000",yellow:"#ffff00",magenta:"#ff00ff",blue:"#0000ff",black:"#000000"},fs=n=>{if(n.indexOf("#")===0&&(n=n.slice(1)),n.length===3&&(n=n[0]+n[0]+n[1]+n[1]+n[2]+n[2]),n.length!==6)throw new Error("Invalid HEX color.");const e=(255-parseInt(n.slice(0,2),16)).toString(16),i=(255-parseInt(n.slice(2,4),16)).toString(16),a=(255-parseInt(n.slice(4,6),16)).toString(16);return"#"+Nt(e)+Nt(i)+Nt(a)};function Nt(n){return(new Array(2).join("0")+n).slice(-2)}const Dt=(n,e="white",i="bg_black")=>`<c${e?`.${e}`:""}${e?`.bg_${i}`:""}>${n}</c>`,Zt=n=>n.replace(/<\s*c\b[^>]*>|<\/c\s*>/g,""),Ye=(n,e)=>{var i;(i=document.querySelector(`#${Se}`))==null||i.requestActualVideoElement().then(a=>{const t=Object.values(a.textTracks).filter(r=>r.id===Qe)[0]||Object.values(a.textTracks||{})[0];try{Object.values(t.cues||[]).forEach(r=>{r.id===n.id&&(t.removeCue(r),t.dispatchEvent(new Event("cuechange")))}),t.addCue(e)}catch(r){console.error(r)}})},ms=n=>{var e;(e=document.querySelector(`#${Se}`))==null||e.requestActualVideoElement().then(i=>{const a=Object.values(i.textTracks||{}).filter(t=>t.id===Qe)[0];try{a.removeCue(n),a.dispatchEvent(new Event("cuechange"))}catch(t){console.log(t)}})},Xe=n=>{const e=new VTTCue(ce(n.startTime),ce(n.endTime),n.text);e.position="auto",e.id=n.id,e.snapToLines=!1,e.position=!(n!=null&&n.position)||isNaN(parseFloat(`${n.position}`.replace("%","")))?"auto":parseInt(`${n.position}`.replace("%",""));const i=parseInt(`${n.line}`.replace("%",""));return i||i===0?e.line=i:e.line="auto",e.size=100,e},bt=n=>{const e=n.split("/");return e[e.indexOf("video")+1]},gs=()=>{const e=window.location.href.split("/");return e[e.indexOf("subtitles")+1]},vs=n=>{const i=window.location.pathname.split("/");return i.push(n),i.join("/")},bs=xe("div")(()=>({padding:"12px",boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.25)",borderRadius:"4px",background:"white"})),ys=xe(Pr)(({boxColor:n,boxSize:e})=>({background:n,borderRadius:0,margin:0,width:e,height:e})),ws=xe(_r)({display:"flex",flexDirection:"row","& .MuiFormControlLabel-root":{margin:0}}),Ln=n=>{const{anchorEl:e,handleClick:i}=n,a=!!e,t=a?"color-popper":void 0,{buttonText:r,colors:l,boxHeading:c,colorSelectHandler:o,value:u}=n;let{numberOfColorsInARow:d,colorBoxSize:p=40}=n;const h=1;return d=d||4,p=p||40,s.jsxs("div",{children:[s.jsx(Vi,{"aria-describedby":t,size:"small",btnColor:"#B4B4B4",textColor:"#9194A4",startIcon:s.jsx(Fi,{style:{marginRight:0}}),onClick:i,children:r||"Color"}),s.jsx(_i,{id:t,open:a,anchorEl:e,children:s.jsxs(bs,{style:{width:d*p+h*2},children:[s.jsx("p",{style:{margin:0,marginBottom:"13px"},children:s.jsx(ke,{fw:600,children:c})}),s.jsx(Nr,{children:s.jsx(ws,{sx:{border:`${h}px solid #e5e5e5`},"aria-labelledby":"colors",name:"radio-buttons-group",value:u,onChange:f=>o(f.target.value),children:l.map(f=>s.jsx(Dr,{value:f,label:"",control:s.jsx(ys,{disableRipple:!0,boxSize:p,checkedIcon:s.jsx(uo,{fontSize:"small",sx:{color:fs(hs[f])}}),icon:s.jsx(s.Fragment,{}),boxColor:f})},f))})})]})})]})};var cn={},Ss=Et;Object.defineProperty(cn,"__esModule",{value:!0});var Qt=cn.default=void 0,ks=Ss(Ct()),xs=s;Qt=cn.default=(0,ks.default)((0,xs.jsx)("path",{d:"M12 2C6.5 2 2 6.5 2 12s4.5 10 10 10 10-4.5 10-10S17.5 2 12 2m0 18c-4.41 0-8-3.59-8-8s3.59-8 8-8 8 3.59 8 8-3.59 8-8 8m.5-13H11v6l5.2 3.2.8-1.3-4.5-2.7z"}),"WatchLaterOutlined");const _t={top:"-18px",position:"absolute",color:"grey",fontSize:"11px"},Cs=xe("div")(()=>({display:"flex",alignItems:"center",height:"30px",".input-wrapper:has(input:focus)":{background:" #FFFFFF",boxShadow:"0px 0px 2px #8D85D6"},".input-wrapper":{display:"flex",padding:"0 6px",position:"relative",margin:"0 auto","&:hover":{background:"#EEF2F6"},input:{width:"26px",background:"none",border:"none",outline:"none","&:focus":{outline:"none",border:"none"}},".hh-input-wrapper::before":{content:'"H"',left:"11px",..._t},".mm-input-wrapper::before":{content:'"M"',left:"35px",..._t},".ss-input-wrapper::before":{content:'"S"',left:"65px",..._t}},".label-container":{width:"30px",p:{textAlign:"center"}}}));function en(n){const{disabled:e,label:i,hhValue:a,mmValue:t,ssValue:r,tttValue:l,onCh
6angeHandler:c,index:o,showTTT:u,v2:d,showLables:p}=n,h=(b,$)=>{b.key==="Backspace"&&($==="ttt"&&l.length===0&&u&&O.ss.current.focus(),$==="ss"&&r.length===0&&O.mm.current.focus(),$==="mm"&&O.mm.current.value.length===0&&O.hh.current.focus())},f=(b,$)=>{$==="hh"&&b.target.value.length===2&&O.mm.current.focus(),$==="mm"&&b.target.value.length===2&&O.ss.current.focus(),$==="ss"&&b.target.value.length===2&&u&&O.ttt.current.focus()},y=k.useRef(),v=k.useRef(),C=k.useRef(),T=k.useRef(),O={hh:y,mm:v,ss:C,ttt:T};return d?s.jsxs(Cs,{children:[s.jsx("div",{style:{display:"flex",alignItems:"center"},children:s.jsx(Qt,{fontSize:"small"})}),s.jsx("div",{className:"label-container",children:s.jsx("p",{children:s.jsx(ke,{fs:"extraSmall",children:i})})}),s.jsxs("div",{className:"input-wrapper",children:[s.jsx("div",{className:`${p&&"hh-input-wrapper"}`,children:s.jsx("input",{id:"hh-input",placeholder:"HH",type:"text",maxLength:2,ref:O.hh,disabled:e,value:a,onChange:b=>{c(b,"hh",o),f(b,"hh")}})}),s.jsx("div",{className:`${p&&"mm-input-wrapper"}`,children:s.jsx("input",{id:"mm-input",onKeyDown:b=>h(b,"mm"),placeholder:"MM",type:"text",maxLength:2,ref:O.mm,value:t,disabled:e,onChange:b=>{c(b,"mm",o),f(b,"mm")}})}),s.jsx("div",{className:`${p&&"ss-input-wrapper"}`,children:s.jsx("input",{id:"ss-input",placeholder:"SS",onKeyDown:b=>h(b,"ss"),type:"text",value:r,maxLength:2,ref:O.ss,disabled:e,onChange:b=>{c(b,"ss",o),u&&f(b,"ss")}})}),u&&s.jsx("div",{className:`${p&&"ttt-input-wrapper"}`,children:s.jsx("input",{className:"ms-input",id:"tt-input",placeholder:"TTT",onKeyDown:b=>h(b,"ttt"),type:"text",value:l,maxLength:3,ref:O.ttt,disabled:e,style:{width:"30px"},onChange:b=>c(b,"ttt",o)})})]})]}):s.jsxs(s.Fragment,{children:[i&&s.jsx(ke,{fs:"12px",children:i}),s.jsxs("div",{className:"hms-input-wrapper",children:[s.jsx(Qt,{}),s.jsx("input",{id:"hh-input",placeholder:"HH",type:"text",maxLength:2,ref:O.hh,disabled:e,value:a,onChange:b=>{c(b,"hh",o),f(b,"hh")}}),":",s.jsx("input",{id:"mm-input",onKeyDown:b=>h(b,"mm"),placeholder:"MM",type:"text",maxLength:2,ref:O.mm,value:t,disabled:e,onChange:b=>{c(b,"mm",o),f(b,"mm")}}),":",s.jsx("input",{id:"ss-input",placeholder:"SS",onKeyDown:b=>h(b,"ss"),type:"text",value:r,maxLength:2,ref:O.ss,disabled:e,onChange:b=>{c(b,"ss",o),u&&f(b,"ss")}}),u&&s.jsxs(s.Fragment,{children:[".",s.jsx("input",{className:"ms-input",id:"tt-input",placeholder:"TTT",onKeyDown:b=>h(b,"ttt"),type:"text",value:l,maxLength:3,ref:O.ttt,disabled:e,onChange:b=>c(b,"ttt",o)})]})]})]})}const Es=xe("div")(()=>({padding:"12px",boxShadow:"0px 0px 4px rgba(0, 0, 0, 0.25)",borderRadius:"4px",background:"white"})),Is=xe("div")(()=>({padding:"10px 0",p:{margin:0}})),Os=n=>{const{anchorEl:e,handleClick:i}=n,a=!!e,t=a?"position-popper":void 0,{buttonText:r,boxHeading:l,updatePosition:c,index:o,value:u}=n;return s.jsxs("div",{children:[s.jsx(Vi,{"aria-describedby":t,size:"small",btnColor:"#B4B4B4",textColor:"#9194A4",startIcon:s.jsx(wt,{svgName:"positionIcon"}),onClick:i,children:r||"Color"}),s.jsx(_i,{placement:"bottom-start",id:t,open:a,anchorEl:e,children:s.jsxs(Es,{children:[l&&s.jsx("p",{style:{margin:0,marginBottom:"13px"},children:s.jsx(ke,{fw:"bolder",children:l})}),s.jsx(Ar,{style:{width:"194px"},children:s.jsxs(Is,{children:[s.jsx("p",{style:{margin:"0 0 10px 0"},children:s.jsx(ke,{children:"Line"})}),s.jsxs("div",{style:{display:"flex",justifyContent:"space-between"},children:[s.jsx("div",{children:s.jsx(ke,{children:"Bottom"})}),s.jsx("div",{children:s.jsx(ke,{children:"Top"})})]}),s.jsx(Rr,{"aria-label":"Line",defaultValue:parseFloat(`${u.line}`),value:Math.abs(parseFloat(`${u.line}`)-100),onChange:d=>c(d,o,"line"),valueLabelDisplay:"off",step:1,min:5,max:100})]})})]})})]})},Vn=ps,Fn=2,$n=16,Ts=xe(G,{shouldForwardProp:n=>n!=="isInvalidTime"&&n!=="isHighlighted"})(({theme:n,isInvalidTime:e,isHighlighted:i})=>({border:`${i?"2px":"1px"} solid ${e?"red":"#E6E6E6"}`,background:i?"#f5f6ff":"white",borderRadius:"6px",margin:"18px 0",padding:"20px 15px 0",paddingBottom:"0",justifyContent:"space-between",".add-btn":{display:"none"}
6,"&:hover":{border:"2px solid #E6E6E6"},".hover-trigger":{width:"100%",height:`${$n}px`,display:"flex",justifyContent:"center"},"&:has(.hover-trigger:hover)":{borderBottom:`${Fn}px solid ${n.palette.primary.main}`,marginBottom:"16px",".add-btn":{display:"block",position:"relative",top:"3px",width:"78px",padding:0,fontSize:"13px",borderRadius:"20px",background:"white",border:"2px solid"},".hover-trigger":{height:`${$n-Fn+1}px`}}})),js=xe("div")(()=>({display:"flex",justifyContent:"left",alignItems:"center",marginTop:"10px"})),Ns=xe(Pi)(()=>({fill:"#9A9A9A",transform:"scale(1)"})),Ds=n=>{const{cue:e,updateTextHandler:i,deleteHandler:a,addNewCueHandler:t,index:r,updateTimeHandler:l,updatePosition:c,handlePreview:o,isUnsorted:u,isInvalidTime:d,colorSelectHandler:p,isHighlighted:h,bgColorSelectHandler:f}=n,[y,v]=k.useState(null),[C,T]=k.useState(null),[O,b]=k.useState(null),$=M=>{v(y?null:M.currentTarget),T(null),b(null)},g=M=>{T(C?null:M.currentTarget),v(null),b(null)},Z=M=>{b(O?null:M.currentTarget),T(null),v(null)};return s.jsxs(Ts,{container:!0,onClick:()=>o(e),isHighlighted:h,isInvalidTime:d,children:[s.jsxs(G,{item:!0,xs:6.5,style:{paddingRight:"10px",display:"flex",flexDirection:"column",justifyContent:"space-around"},children:[s.jsx(Mr,{ml:!0,value:Zt(e.text),onChangeHandler:i}),s.jsxs(js,{children:[s.jsx(Os,{buttonText:"Position",anchorEl:O,handleClick:Z,index:r,updatePosition:c,value:{line:Number.isNaN(parseFloat(`${e.line}`))?100:e.line,position:Number.isNaN(parseFloat(`${e.position}`))?50:e.position}}),s.jsx(Ln,{buttonText:"Color",boxHeading:"Color",handleClick:$,anchorEl:y,colors:Vn,colorSelectHandler:M=>p(M),value:e.color||"white"}),s.jsx(Ln,{buttonText:"BG Color",boxHeading:"Background Color",handleClick:g,anchorEl:C,colors:Vn,colorSelectHandler:M=>f(M),value:e.bgColor||"black"})]}),e.error&&s.jsx("p",{style:{color:"red",margin:0,fontSize:"12px"},children:e.error})]}),s.jsxs(G,{item:!0,xs:3.9,style:{display:"flex",flexDirection:"column",justifyContent:"center"},children:[s.jsx(en,{showLables:!0,hhValue:e.startTime.hh,mmValue:e.startTime.mm,tttValue:e.startTime.ttt,ssValue:e.startTime.ss,index:r,label:"In",v2:!0,onChangeHandler:(M,K,R)=>l(M,K,R,"startTime"),showTTT:!0}),s.jsx(en,{hhValue:e.endTime.hh,mmValue:e.endTime.mm,tttValue:e.endTime.ttt,ssValue:e.endTime.ss,index:r,label:"Out",v2:!0,onChangeHandler:(M,K,R)=>{l(M,K,R,"endTime")},showTTT:!0}),u&&s.jsx(Bt,{label:"Unsorted",size:"small",variant:"outlined"})]}),s.jsxs(G,{item:!0,xs:1.3,style:{display:"flex",justifyContent:"center",alignItems:"center"},children:[s.jsx($e,{disableRipple:!0,sx:{height:"fit-content"},onClick:()=>a(e.id),children:s.jsx(wt,{svgName:"deleteIcon"})}),s.jsx($e,{disableRipple:!0,sx:{height:"fit-content"},onClick:()=>t(e.id),children:s.jsx(Ns,{})})]}),s.jsxs(G,{className:"hover-trigger",children:[" ",s.jsx("div",{style:{position:"relative"},children:s.jsx(Ie,{className:"add-btn",variant:"outlined",onClick:()=>t(e.id),children:"Add Cue"})})]})]})};var dn={};Object.defineProperty(dn,"__esModule",{value:!0});var Yi=dn.ViewportList=void 0;const Hn=s,oe=k,pn=typeof window>"u",Xi=!pn&&(()=>{try{return"ontouchstart"in window||navigator.maxTouchPoints}catch{return!1}})(),Ji=!pn&&(()=>{try{return window.CSS.supports("overflow-anchor: auto")}catch{return!1}})(),_s=Xi&&!Ji,Ps={top:"top",bottom:"bottom",clientHeight:"clientHeight",scrollHeight:"scrollHeight",scrollTop:"scrollTop",overflowY:"overflowY",height:"height",minHeight:"minHeight",maxHeight:"maxHeight",marginTop:"marginTop"},As={top:"left",bottom:"right",scrollHeight:"scrollWidth",clientHeight:"clientWidth",scrollTop:"scrollLeft",overflowY:"overflowX",minHeight:"minWidth",height:"width",maxHeight:"maxWidth",marginTop:"marginLeft"},Te=(n,e,i=1/0)=>Math.max(Math.min(e,i),n),Je=(n,e,i)=>Math.ceil(Math.abs(n-e)/i),Pt=pn?oe.useEffect:oe.useLayoutEffect,Rs=(n,e,i)=>{const a=[];for(let t=n;t<e;t++)a.push(i(t));return a},_e=({fromElement:n,toElement:e,fromIndex:i,asc:a=!0,compare:t})=>{let r=i,l=n;for(;l&&l!==e;){if(t(l,r))return[l,r];a?(r++,l=l.nextSibling):(r--,l=l.previousSibling)}return[null,-1]},Bn=/auto|scroll/gi,Zi=(n,e)=>{if(!e||e===document.body||e===document.documentElement)return document.documentElement;const i=window.getComputedStyle(e);return Bn.test(i[n.overflowY])||Bn.test(i.overflow)?e:Zi(n,e.parentNode)},zn=(n,e,i=0)=>({padding:0,margin:0,border:"none",visibility:"hidden",overflowAnchor:"none",[n.minHeight]:e,[n.height]:e,[n.maxHeight]:e,[n.marginTop]:i}),Ms=({items:n=[],count:e,children:i,viewportRef:a,itemSize:t=0,itemMargin:r=-1,overscan:l=1,axis:c="y",initialIndex:o=-1,initialAlignToTop:u=!0,initialOffset:d=0,initialDelay:p=-1,initialPrerender:h=0,onViewportIndexesChange:f,overflowAnchor:y="auto",withCache:v=!0,scrollThreshold:C=0,renderSpacer:T=({ref:g,style:Z})=>(0,Hn.jsx)("div",{ref:g,style:Z}),indexesShift:O=0,getItemBoundingClientRect:b=g=>g.getBoundingClientRect()},$)=>{const g=c==="y"?Ps:As,Z=typeof e=="number",M=(Z?e:n.length)-1,[[K,R],z]=(0,oe.useState)(()=>[Te(0,t),Te(-1,r)]),x=Te(0,K+R),_=Te(0,Math.ceil(l*x)),[A,P]=(0,oe.useState)([o-h,o+h]),I=(0,oe.useRef)(null),X=(0,oe.useRef)(-1),Q=(0,oe.useRef)(null),J=(0,oe.useRef)(null),se=(0,oe.useRef)(!1),pe=(0,oe.useRef)(O),fe=(0,oe.useRef)([]),j=(0,oe.useRef)(o>
6=0?{index:o,alignToTop:u,offset:d,delay:p,prerender:h}:null),N=(0,oe.useRef)(null),E=(0,oe.useRef)(0),V=(0,oe.useRef)([-1,-1]),m=(0,oe.useRef)(null),[U,w]=(0,oe.useMemo)(()=>{A[0]=Te(0,A[0],M),A[1]=Te(A[0],A[1],M);const S=O-pe.current;pe.current=O;const H=Q.current;return H&&S&&(A[0]=Te(0,A[0]+S,M),A[1]=Te(A[0],A[1]+S,M),I.current=H.nextSibling,X.current=A[0],se.current=!0),A},[O,A,M]),me=(0,oe.useMemo)(()=>zn(g,(v?fe.current:[]).slice(0,U).reduce((S,H)=>S+(H-K),U*x),E.current),[g,v,U,x,K]),te=(0,oe.useMemo)(()=>zn(g,(v?fe.current:[]).slice(w+1,M+1).reduce((S,H)=>S+(H-K),x*(M-w))),[g,v,w,M,x,K]),ie=(0,oe.useMemo)(()=>{let S=null;return()=>{if(a)return a.current===document.body?document.documentElement:a.current;if(S&&S.isConnected)return S;const H=Q.current;return H?(S=Zi(g,H.parentNode),S):null}},[g,a]),W=(0,oe.useRef)(()=>{}),ye=(0,oe.useRef)(()=>({index:-1,offset:0}));Pt(()=>{W.current=()=>{const S=ie(),H=Q.current,L=J.current;if(!S||!H||!L)return;const q=H.nextSibling,de=L.previousSibling,ee=S.getBoundingClientRect(),ue=H.getBoundingClientRect(),le=L.getBoundingClientRect(),re={[g.top]:S===document.documentElement?0:ee[g.top],[g.bottom]:S===document.documentElement?document.documentElement[g.clientHeight]:ee[g.bottom]},D={[g.top]:re[g.top]-_,[g.bottom]:re[g.bottom]+_};if(E.current<0&&ue[g.top]-E.current>=D[g.top]||E.current>0&&ue[g.top]>=D[g.top]||E.current&&j.current){H.style[g.marginTop]="0px",S.style[g.overflowY]="hidden",S[g.scrollTop]+=-E.current,S.style[g.overflowY]="",E.current=0;return}if(K===0||R===-1){let ae=0;if(_e({fromElement:q,toElement:L,fromIndex:U,compare:We=>(ae+=b(We)[g.height],!1)}),!ae)return;const ge=w-U+1,De=K===0?Math.ceil(ae/ge):K,ze=R===-1?Math.ceil((le[g.top]-ue[g.bottom]-ae)/ge):R;z([De,ze]);return}if(N.current)return;if(j.current){const ae=Te(0,j.current.index,M);if(ae<U||ae>w){P([ae-j.current.prerender,ae+j.current.prerender]);return}const[ge]=_e({fromElement:q,toElement:L,fromIndex:U,compare:(Ot,Tt)=>Tt===ae});if(!ge)return;const{alignToTop:De,offset:ze,delay:We}=j.current;j.current=null;const wn=()=>{const Ot=b(ge),Tt=De?Ot[g.top]-re[g.top]+ze:Ot[g.bottom]-re[g.top]-S[g.clientHeight]+ze;S[g.scrollTop]+=Tt,N.current=null},Sn=We<0&&_s?30:We;if(Sn>0){N.current=setTimeout(wn,Sn);return}wn();return}if(m.current===null)m.current=S.scrollTop;else if(m.current!==S.scrollTop){const ae=Math.abs(S.scrollTop-m.current);if(m.current=S.scrollTop,C>0&&ae>C)return}const ne=q===L?L:q.nextSibling,qe=de===H?H:de.previousSibling,je=Math.ceil((le[g.top]-ue[g.bottom])/(w+1-U)),we=ue[g.bottom]>D[g.bottom],tt=le[g.top]<D[g.top],Da=!we&&!tt&&ue[g.bottom]>D[g.top],_a=!we&&!tt&&le[g.top]<D[g.bottom],Pa=!we&&!tt&&(qe===H?ue:b(qe))[g.bottom]>D[g.bottom],Aa=!we&&!tt&&(ne===L?le:b(ne))[g.top]<D[g.top];let Ce=U,Le=w;if(we&&(Ce-=Je(ue[g.bottom],D[g.top],je),Le-=Je(le[g.top],D[g.bottom],je)),tt&&(Le+=Je(le[g.top],D[g.bottom],je),Ce+=Je(ue[g.bottom],D[g.top],je)),Da&&(Ce-=Je(ue[g.bottom],D[g.top],je)),_a&&(Le+=Je(le[g.top],D[g.bottom],je)),Pa){const[,ae]=_e({fromElement:de,toElement:H,fromIndex:w,asc:!1,compare:ge=>b(ge)[g.bottom]<=D[g.bottom]});ae!==-1&&(Le=ae+1)}if(Aa){const[,ae]=_e({fromElement:q,toElement:L,fromIndex:U,compare:ge=>b(ge)[g.top]>=D[g.top]});ae!==-1&&(Ce=ae-1)}if(f){let[,ae]=_e({fromElement:q,toElement:L,fromIndex:U,compare:De=>b(De)[g.bottom]>re[g.top]});ae===-1&&(ae=U);let[,ge]=_e({fromElement:de,toElement:H,fromIndex:w,asc:!1,compare:De=>b(De)[g.top]<re[g.bottom]});ge===-1&&(ge=w),(ae!==V.current[0]||ge!==V.current[1])&&(V.current=[ae,ge],f(V.current))}if(Ce=Te(0,Ce,M),Le=Te(Ce,Le,M),!(Ce===U&&Le===w)){if(Ce!==U)if(U>=Ce)I.current=q,X.current=U;else{const[ae,ge]=_e({fromElement:q,toElement:L,fromIndex:U,compare:(De,ze)=>{if(ze===Ce)return!0;const We=b(De);return We[g.height]!==K&&(fe.current[ze]=We[g.height]),!1}});ae?(I.current=ae,X.current=ge):(I.current=de,X.current=w)}P([Ce,Le])}},ye.current=()=>{const S=ie(),H=Q.current,L=J.current;let q=-1,de=0;if(!S||!H||!L)return{index:q,offset:de};const ee=H.nextSibling,ue=S.getBoundingClientRect(),le={[g.top]:S===document.documentElement?0:ue[g.top],[g.bottom]:S===document.documentElement?document.documentElement[g.clientHeight]:ue[g.bottom]}
6;return _e({fromElement:ee,toElement:L,fromIndex:U,compare:(re,D)=>{const ne=b(re);return q=D,de=le[g.top]-ne[g.top],ne[g.bottom]>le[g.top]}}),{index:q,offset:de}}});let Oe;return I.current&&ie()&&Q.current&&(Oe=b(I.current)[g.top]-(ie()===document.documentElement?0:ie().getBoundingClientRect()[g.top])),Pt(()=>{I.current=null;const S=X.current,H=se.current;X.current=-1,se.current=!1;const L=ie(),q=Q.current,de=J.current;if(S===-1||!L||!q||!de||Oe===void 0||Ji&&y!=="none"&&!H)return;let ee=null;if(S>=U&&S<=w){const[le]=_e({fromElement:q.nextSibling,toElement:de,fromIndex:U,compare:(re,D)=>D===S});le&&(ee=b(le)[g.top])}else S<U?ee=q.getBoundingClientRect()[g.top]+(v?fe.current:[]).slice(0,S).reduce((le,re)=>le+(re-K),S*x):S<=M&&(ee=de.getBoundingClientRect()[g.top]+(v?fe.current:[]).slice(w+1,S).reduce((le,re)=>le+(re-K),x*(S-1-w)));if(ee===null)return;const ue=ee-(L===document.documentElement?0:L.getBoundingClientRect()[g.top])-Oe;if(ue){if(Xi){E.current-=ue,q.style[g.marginTop]=`${E.current}px`;return}L[g.scrollTop]+=ue}},[U]),Pt(()=>{let S;const H=()=>{S=requestAnimationFrame(H),W.current()};return H(),()=>{cancelAnimationFrame(S),N.current&&clearTimeout(N.current)}},[]),(0,oe.useImperativeHandle)($,()=>({scrollToIndex:({index:S=-1,alignToTop:H=!0,offset:L=0,delay:q=-1,prerender:de=0})=>{j.current={index:S,alignToTop:H,offset:L,delay:q,prerender:de},W.current()},getScrollPosition:()=>ye.current()}),[]),(0,Hn.jsxs)(oe.Fragment,{children:[T({ref:Q,style:me,type:"top"}),(!!e||!!n.length)&&Rs(U,w+1,Z?i:S=>i(n[S],S,n)),T({ref:J,style:te,type:"bottom"})]})};Yi=dn.ViewportList=(0,oe.forwardRef)(Ms);const Us=(n,e)=>{var i,a,t;switch(e.type){case Wi:return{...e.payload.state};case Hi:{const r={...n},{payload:{text:l,index:c}}=e,o=l.replace(/(\r\n|\r|\n){2,}/g,"$1");r.cues[c].text=Dt(o,r.cues[c].color,r.cues[c].bgColor);const u=r.cues[c],d=Xe(u),p=u.cueRef;return r.cues[c].cueRef=d,(i=document.querySelector(`#${Se}`))==null||i.requestActualVideoElement().then(h=>(h.currentTime=d.startTime,Ye(p,d),r)).catch(h=>(console.error(h),n)),r}case Xt:{const r={...n},l={id:e.payload.id,startTime:e.payload.prevEndTime,endTime:ut(parseFloat(`${ce(e.payload.prevEndTime)}`)+5),text:"",cueRef:new VTTCue(ce((a=e==null?void 0:e.payload)==null?void 0:a.prevEndTime)||0,parseFloat(`${ce((t=e==null?void 0:e.payload)==null?void 0:t.prevEndTime)}`)+5||0,"")},c=[...r.cues];let o=c.findIndex(d=>d.id===e.payload.prevId);o=o>=0?o:c.length,c.splice(o+1,0,l);const u=Xe(l);return l.cueRef=u,Ye(new VTTCue(0,0,""),u),r.cues=c,r}case zi:{const{index:r,timeType:l,unit:c}=e.payload;let{time:o}=e.payload;(c==="mm"||c==="ss")&&parseInt(o)>59&&(o="59");const u={...n},p={...n.cues[r][l],[c]:o},h=Xe(u.cues[r]),f=u.cues[r].cueRef;return u.cues[r].cueRef=h,Ye(f,h),u.cues[r][l]=p,ce(u.cues[r].startTime)>ce(u.cues[r].endTime)?(u.cues[r].isInvalidTime=!0,u.cues[r].error="Start time must be greater than end time."):(u.cues[r].isInvalidTime=!1,u.cues[r].error=""),u}case Bi:{let r=new VTTCue(0,0,"");const l={...n,cues:n.cues.filter(c=>(c.id===e.payload.id&&(r=c.cueRef),c.id!==e.payload.id))};return ms(r),l}case cs:return{...n,fileUrl:e.payload.fileUrl};case Gi:{const{index:r,direction:l,value:c}=e.payload,o={...n};
6o.cues[r][l]=`${Math.abs(parseInt(`${c}`))}%`;const u=Xe(o.cues[r]),d=o.cues[r].cueRef;return o.cues[r].cueRef=u,Ye(d,u),o}case Jt:{const r={...n},l=e.payload.color,c=e.payload.bgColor,o=e.payload.index,u=e.payload.index;if(l){const d=r.cues[o];r.cues[o].color=l;let p=Zt(d.text);p=Dt(p,l,d.bgColor),r.cues[o].text=p;const h=d.cueRef,f=Xe(r.cues[o]);Ye(h,f)}else{const d=r.cues[u];r.cues[u].bgColor=c;let p=Zt(d.text);p=Dt(p,d.color,c),r.cues[u].text=p;const h=d.cueRef,f=Xe(r.cues[o]);Ye(h,f)}return r}case Ki:{const r={...n};return r.cues.sort((c,o)=>parseFloat(`${ce(c.startTime)}`)>parseFloat(`${ce(o.startTime)}`)?1:-1),r}case qi:{const r={...n};return r.cues.forEach(l=>{e.payload.unsortedCueIds.includes(l.id)?l.isUnsorted=!0:l.isUnsorted=!1}),r}default:return n}};function Ls(n){const{track:e,saveSubtitles:i,savingSubtitles:a,activeCueId:t,cancelEditing:r,trackLoaded:l,videoContainerRef:c,setUnsavedChanges:o}=n,[u,d]=k.useReducer(Us,{fileUrl:"",cues:[]}),[p,h]=k.useState(!1),[f,y]=k.useState(""),v=window.location.href.includes("createSubtitle"),C=a?"Creating Subtitles":"Create Subtitles";k.useEffect(()=>{const R="white";if(e){Object.values((e==null?void 0:e.cues)||[]).forEach(_=>{_.snapToLines=!1,_.id=`${Un}-${crypto.randomUUID()}`,e.dispatchEvent(new Event("cuechange"))});const z="bg_black",x=Object.values(e.cues||[]).map(_=>({text:_.text,startTime:ut(_.startTime),endTime:ut(_.endTime),id:_.id||`${Un}-${crypto.randomUUID()}`,position:_.position===0?0:_.position||"auto",line:_.line===0?0:_.line||"auto",cueRef:_,snapToLines:!1,color:R,bgColor:z}));d({type:Wi,payload:{state:{fileUrl:"",cues:x}}})}c.current&&(c.current.style.visibility="visible")},[e]);const T=()=>{let R=u==null?void 0:u.cues.map(P=>ds(P));R=[`WEBVTT 7`,...R||[]];const z=R.join(` 8`),x=new FormData;x.append("data",z);const _=new Blob([z],{type:"text/vtt"}),A=new File([_],"subtitles.vtt",{type:"text/vtt",lastModified:Date.now()});return v?A:x},O=R=>{var z;(z=document.querySelector(`#${Se}`))==null||z.requestActualVideoElement().then(x=>{x&&(x.currentTime=ce(R.startTime)+.001,y(R.id))})},b=(R,z,x,_)=>{d({type:zi,payload:{index:x,time:R.target.value,timeType:_,unit:z}}),g(),o(!0)},$=()=>{d({type:Ki}),g(),o(!0)};k.useEffect(()=>{g()},[u==null?void 0:u.cues.length]);const g=()=>{let R=-1;const z=[];u==null||u.cues.forEach(x=>{const _=parseFloat(`${ce(x.startTime)}`);_<R&&z.push(x.id),R=_}),d({type:qi,payload:{unsortedCueIds:z}})},Z=()=>{let R=!1;u==null||u.cues.forEach(z=>{z.error&&(R=!0)}),h(R)},M=k.useRef(null),K=k.useRef(null);return k.useEffect(()=>{Z()},[l]),k.useEffect(()=>{var z;const R=u==null?void 0:u.cues.findIndex(x=>x.id===t);(z=K==null?void 0:K.current)==null||z.scrollToIndex({index:R}),y(t||"")},[t]),s.jsxs("div",{style:{overflow:"auto",height:"calc(100vh - 300px)",scrollBehavior:"smooth"},ref:M,children:[s.jsx("div",{style:{width:"98%"},children:s.jsx(Yi,{viewportRef:M,ref:K,items:u.cues,children:(R,z)=>s.jsx(Ds,{isHighlighted:R.id===f,isInvalidTime:R.isInvalidTime,cue:R,isUnsorted:R.isUnsorted,index:z,handlePreview:O,updateTextHandler:x=>{d({type:Hi,payload:{text:x.target.value,index:z,track:e}}),o(!0)},deleteHandler:x=>{d({type:Bi,payload:{id:x}}),o(!0)},addNewCueHandler:x=>{d({type:Xt,payload:{prevId:x,id:`vdocipher-subtitle-${window.crypto.randomUUID()}`,prevEndTime:R.endTime}}),o(!0)},updateTimeHandler:b,updatePosition:(x,_,A)=>{d({type:Gi,payload:{direction:A,value:A==="line"?Math.abs(parseFloat(x.target.value)-100):x.target.value,index:_}}),o(!0)},colorSelectHandler:x=>{d({type:Jt,payload:{color:x,index:z}}),o(!0)},bgColorSelectHandler:x=>{d({type:Jt,payload:{bgColor:x,index:z}}),o(!0)}},R.id)})}),s.jsxs("div",{style:{position:"sticky",bottom:0,background:"white",padding:"10px"},children:[(u==null?void 0:u.cues.length)===0&&s.jsxs("div",{children:[" ",s.jsx(Ie,{style:{marginBottom:"10px"},variant:"outlined",onClick:()=>{d({type:Xt,payload:{id:`vdocipher-subtitle-${window.crypto.randomUUID()}`,prevEndTime:{hh:"00",mm:"00",ss:"00",ttt:"000"}}}),o(!0)},children:"Add New Cue"})]}),s.jsx(Ie,{variant:"contained",onClick:()=>{$(),i(T())},disabled:a||p||(u==null?void 0:u.cues.length)===0,endIcon:a&&s.jsx(Pe,{size:12}),style:{marginRight:"10px"},children:v?C:"Sort & Save Progress"}),s.jsx(Ie,{variant:"outlined",onClick:()=>$(),startIcon:s.jsx(so,{}),style:{marginRight:"10px"},children:"Sort Cues by Start Time"}),s.jsx(Ie,{variant:"outlined",onClick:()=>r(),color:"error",children:"Exit Editing"})]})]})}const Vs=({token:n=""})=>{const e=window.location.pathname,i=bt(e);
8return Ur()?s.jsx("vdocipher-player",{style:{width:"100%",minWidth:"300px",maxHeight:"900px"},videoid:i,id:Se}):s.jsx("vdocipher-player",{style:{width:"100%",minWidth:"300px",maxHeight:"900px"},token:n,videoid:i,disableclipstat:"true",id:Se})};function Fs(n){const{videoContainerRef:e,token:i,isTokenFetching:a}=n;return s.jsx("div",{ref:e,style:{minWidth:"300px",visibility:"hidden"},children:a?s.jsx(Pe,{}):s.jsx(Vs,{token:i})})}const $s=(n,e)=>Ke({url:`/videos/${n}/subtitles/${e}`,method:"GET"}),Hs=(n,e,i)=>Ke({url:`/videos/${n}/subtitles/${e}`,method:"PUT",data:i}),Bs=(n="")=>Ke({url:`/videos/${n}/token`,method:"POST",data:{whitelisthref:window.location.hostname}}),zs={white:[],lime:[],cyan:[],red:[],yellow:[],magenta:[],blue:[],black:[]};function Wn(n){const[e,i]=k.useState(null),[a,t]=k.useState(!1),[r,l]=k.useState(""),[c,o]=k.useState(!1),[u,d]=k.useState(!1),[p,h]=k.useState(!1),[f,y]=k.useState(zs),[v,C]=k.useState(!1),[T,O]=k.useState(""),b=Lr();k.useEffect(()=>{(async()=>{var _;C(!0);try{const A=window.location.pathname,P=bt(A),{data:I}=await Bs(P);l(I==null?void 0:I.token)}catch(A){b(Ae(((_=A==null?void 0:A.data)==null?void 0:_.message)||"Something went wrong while loading video!"))}finally{C(!1)}})()},[]);const $=()=>{t(!0)},g=x=>{const _="A video upload is ongoing. Closing this tab will interrupt the upload and it will need to be uploaded again from start.";return(x||window.event).returnValue=_,_};k.useEffect(()=>(p?window.addEventListener("beforeunload",g):window.removeEventListener("beforeunload",g),()=>{window.removeEventListener("beforeunload",g)}),[p]),k.useEffect(()=>{if(r){const x=document.getElementById(Se);x!=null&&x.player?t(!0):x==null||x.addEventListener("apiReady",$)}return()=>{const x=document.getElementById(Se);x==null||x.removeEventListener("apiReady",$)}},[r,v]);const Z=x=>{x==null||x.player.api.getCaptionLanguages().then(()=>{x.player.api.setCaptionLanguage({id:Qe})})};k.useEffect(()=>{var Q;if(!a)return;(Q=document.querySelector(`#${Se}`))==null||Q.player.api.updatePlayerConfig({enableKeyboardShortcuts:!1});const x=window.location.pathname,_=bt(x),A=n.subtitleId,P=J=>{const se=new Blob([J],{type:"text/vtt"});return URL.createObjectURL(se)},I=async J=>{var fe,j;const se=await((j=(fe=document.querySelector(`#${Se}`))==null?void 0:fe.requestActualVideoElement)==null?void 0:j.call(fe));if(!se)return;const pe=document.createElement("track");pe.kind="subtitles",pe.track.mode="hidden",pe.label="Subtitle-Preview",pe.srclang="en",pe.src=J,pe.id=Qe,pe.addEventListener("load",K),pe.addEventListener("load",()=>Z(document.querySelector(`#${Se}`))),se.appendChild(pe)};return(async()=>{try{let J="";if(A.includes("createSubtitle"))J=P(`WEBVTT 900:00:00.000 --> 00:00:05.000`);else{const se=await $s(_,A),{data:{data:pe}}=se;J=P(pe)}J&&await I(J)}catch(J){b(Ae(J.message||"Something went wrong!"))}})(),()=>{var J;(J=document.querySelector(`#${Se}`))==null||J.requestActualVideoElement().then(se=>{e==null||e.removeEventListener("load",K),se==null||se.removeEventListener("seeked",R)})}},[a]);const M=k.useRef(null),K=()=>{var x;(x=document.querySelector(`#${Se}`))==null||x.requestActualVideoElement().then(_=>{_.addEventListener("seeked",R),Object.values(_.textTracks).forEac
9h(A=>{A.id===Qe&&(i(A),d(!0))})})},R=()=>{var x;(x=document.querySelector(`#${Se}`))==null||x.requestActualVideoElement().then(_=>{var P;const A=Object.values(_.textTracks).filter(I=>I.id===Qe)[0];O(A.activeCues&&((P=A.activeCues[0])==null?void 0:P.id)||null)})},z=async x=>{const _=window.location.pathname,A=bt(_),P=n.subtitleId;if(o(!0),P.includes("createSubtitle")){const I=window.location.href.split("createSubtitle-")[1]||"en";h(!1),await Ti(A,x,I),b(lt("Created Subtitles!")),setTimeout(()=>{n.cancelEditing()},1e3)}else Hs(A,P,x).then(()=>{b(lt("Saved!")),o(!1),h(!1)}).catch(I=>{b(Ae(I||"Something went wrong!")),o(!1)})};return s.jsx(Ai,{children:s.jsxs(G,{container:!0,style:{padding:"20px"},children:[s.jsx(G,{item:!0,xs:12,md:6,children:a&&u&&e?s.jsx(Ls,{track:e,setUnsavedChanges:h,isPlayerReady:a,setTrack:i,setColorsAndCueMap:y,colorsAndCueMap:f,saveSubtitles:z,savingSubtitles:c,activeCueId:T,cancelEditing:n.cancelEditing,trackLoaded:u,videoContainerRef:M}):s.jsx(ke,{children:"Loading..."})}),s.jsx(G,{item:!0,xs:12,md:6,style:{padding:"40px"},children:s.jsx(Fs,{videoContainerRef:M,token:r,isTokenFetching:v})})]})})}const Ws=Ne("div")(()=>({width:"49%",paddingBottom:"10px",flex:"1",minWidth:"275px"})),Gn=Jo;class Gs extends k.Component{constructor(i){super(i);kn(this,"handleCountry",i=>{const a=i.target.value.trim(),t=/^(?:[a-z]{2}|[a-z]{3}|[a-z]{2}-[A-Z]{2})$/;if(this.setState({country:a}),a.length===0){this.setState({lanError:!1,language:""});return}if(!t.test(a)){this.setState({lanError:!0,language:""});return}const r=a.split("-")[0],l=Object.values(Gn).find(c=>c["639-1"]===r||c["639-2"]===r);this.setState({lanError:!1,language:l?l["639-1"]:" "})});this.state={language:null,isDeleteDialogOpen:!1,toBeDeletedCaptionId:null,editingSubtitles:"",requestingGenerateSubtitles:!1,togglingEnableSubtitles:[],subtitlesEnableDisableMap:{},country:"",lanError:!1,creatingSubtitle:!1},this.getTableData=this.getTableData.bind(this),this.handleEdit=this.handleEdit.bind(this),this.onCancelEditing=this.onCancelEditing.bind(this),this.handleGenerateSubtitles=this.handleGenerateSubtitles.bind(this)}componentDidMount(){this.props.fetchVideoMeta(this.props.video.id);const i=gs();i!=null&&i.includes("createSubtitle")&&this.setState({creatingSubtitle:!0}),i&&!(i!=null&&i.includes("createSubtitle"))&&this.setState({editingSubtitles:i}),this.props.removeLocalErrorMessage()}handleLanguageChange(i){this.setState({language:i,country:i,lanError:!1})}componentDidUpdate(i){var t;const a=(t=this.props.videoDetails)==null?void 0:t.captions;try{if(a&&JSON.stringify(this.createEnableDisableMap(a))!==JSON.stringify(this.createEnableDisableMap(i.videoDetails.captions))||a&&Object.keys(this.state.subtitlesEnableDisableMap).length!==a.length){const r=this.createEnableDisableMap(a);this.setState({subtitlesEnableDisableMap:{...r},country:"",language:null})}}catch{this.props.showErrorMessage("Something unexpected happened!")}}async handleGenerateSubtitles(){var a;this.setState({requestingGenerateSubtitles:!0});const i=this.props.video.id;try{await Vr(i),this.props.fetchVideoMeta(i),lt("Subtitles autogeneration started successfully!")}catch(t){const{showErrorMessage:r}=this.props;r(((a=t.data)==null?void 0:a.message)||"Something went wrong")}this.setState({requestingGenerateSubtitles:!1})}createEnableDisableMap(i){if(!i)return{};const a={};return i.forEach(t=>a[t.id]=t.is_enabled),a}getTableData(i){const a=async o=>{var d;this.setState({togglingEnableSubtitles:[...this.state.togglingEnableSubtitles,o]});const u=this.props.video.id;try{const p=await Br(u,o);this.setState({subtitlesEnableDisableMap:{...this.state.subtitlesEnableDisableMap,[o]:p.data.enabled}})}catch(p){const{showErrorMessage:h}=this.props;h(((d=p.data)==null?void 0:d.message)||"Something went wrong")}this.setState({togglingEnableSubtitles:[this.state.togglingEnableSubtitles].filter(p=>p!==o)})},{video:t,updateCaptionName:r,updateDefaultSubtitle:l}=this.props,c=xn("generateCaptionsButton");return i.map(o=>{const u=s.jsxs("div",{style:{marginTop:"10px"},children:[o.transcription_status&&s.jsx(Bt,{color:"primary",size:"small",label:`Auto Generated${c?": "+o.transcription_status:""}`,style:{marginRight:"10px"}}),this.state.subtitlesEnableDisableMap[o.id]&&c&&s.jsx(Bt,{color:"success",size:"small",label:"Enabled"})]});return o.caption_name=s.jsx(ts,{value:o.caption_name,clickHandler:d=>r(t.id,o.id,d)}),o.time=zt(o.time,!0),o.lang=s.jsxs(s.Fragment,{children:[o.label?o.label:o.lang,u]}),o.editSubtitle=s.jsx(Ie,{variant:"outlined",size:"small",onClick:()=>{this.handleEdit(o)},disabled:["failed","processing","requested"].includes(o.transcription_status),endIcon:s.jsx(Di,{}
9),children:"Edit captions"}),o.default=s.jsx(On,{checked:o.is_default,onChange:()=>l(t.id,o.id)}),o.enabled=this.state.togglingEnableSubtitles.includes(o.id)?s.jsx(Pe,{size:20}):s.jsx(On,{checked:!!this.state.subtitlesEnableDisableMap[o.id],onChange:()=>a(o.id)}),o})}onNewSubtitleSelected(i,a){i.forEach(t=>{this.props.uploadSubtitle(t,a)})}onCancelEditing(){const a=window.location.pathname.split("/");a.pop(),Ht(a.join("/")),this.setState({editingSubtitles:"",creatingSubtitle:!1}),this.props.fetchVideoMeta(this.props.video.id)}handleEdit(i){const a=vs(i.id);Ht(a),String(i.id).includes("createSubtitle")?this.setState({creatingSubtitle:!0}):this.setState({editingSubtitles:String(i.id)})}render(){const{videoDetails:i,video:a,deleteSubtitle:t}=this.props,{fetchingVideoMeta:r,captions:l,uploadingNewSubtitle:c,localErrorMessage:o}=i,{language:u,country:d}=this.state,p=Ee.VIDEO_EDIT.SUBTITLES_COLUMNS,h=xn("generateCaptionsButton");return p.enabled="Enabled",p.editSubtitle="Edit",s.jsxs(s.Fragment,{children:[this.state.editingSubtitles===""&&!this.state.creatingSubtitle&&s.jsxs("div",{children:[h&&s.jsx(Ie,{style:{margin:"20px 0"},variant:"contained",onClick:this.handleGenerateSubtitles,disabled:this.state.requestingGenerateSubtitles,endIcon:this.state.requestingGenerateSubtitles&&s.jsx(Pe,{size:20}),children:"Generate English Subtitles"}),h&&s.jsx(It,{children:"Or"}),s.jsx("p",{className:"edit-video-header",children:"All Subtitle list"}),s.jsxs("div",{className:"details-section poster",style:{display:"flex",gap:"20px",flexWrap:"wrap"},children:[s.jsxs(Ws,{children:[o&&s.jsxs("div",{style:{backgroundColor:"#FFF5F3",border:"1px solid #FF725E",borderRadius:"4px",boxShadow:"none",padding:"10px 10px",display:"flex",alignItems:"center",marginBottom:"10px"},children:[s.jsx(Fr,{sx:{color:"#FF725E"}}),"Â Â ",o]}),s.jsx(rt,{sx:{fontSize:"14px",color:"#55575e"},children:"Please select Language to upload subtitle"}),s.jsx(ro,{value:u===null?"":u,items:Gn,required:!0,name:"language",placeholder:"Language*",onChange:f=>this.handleLanguageChange(f.target.value),onClick:()=>{this.props.removeLocalErrorMessage()},valueKey:"name",outlined:!0,style:{marginRight:"10px"},children:s.jsx($r,{style:{marginLeft:0},children:"Only vtt and srt files are supported."})}),this.state.language!==null&&s.jsxs("div",{children:[s.jsx(Hr,{onChange:f=>this.handleCountry(f),value:this.state.country,inputProps:{maxLength:5},onClick:()=>{this.props.removeLocalErrorMessage()}}),s.jsx(rt,{variant:"subtitle1",component:"label",htmlFor:"my-input",display:"block",sx:{fontWeight:"bold"},children:"Enter custom code if required"}),s.jsx(rt,{variant:"subtitle1",component:"label",htmlFor:"my-input",display:"block",sx:{fontSize:"14px"},children:"The custom code can be in aa, aaa, aa-AA format (ISO 639-1, 639-2 or RFC-5646)"}),this.state.lanError&&s.jsx("p",{style:{margin:0,color:"red",fontSize:"14px"},children:"The code format is not valid"})]})]}),c?s.jsx("div",{style:{width:"49%",display:"flex",alignItems:"center"},children:s.jsx(Pe,{style:{width:"40px",height:"40px",alignSelf:"center"}})}):s.jsx(ns,{title:"Subtitle",acceptedTypes:".vtt,.srt",isDisabled:!u||this.state.lanError,onChange:f=>this.onNewSubtitleSelected(f,d.length>2?d:u)})]}),s.jsxs("div",{style:{display:"flex",alignItems:"center",marginTop:"10px",gap:"10px"},children:[s.jsx("p",{children:"You can also create subtitle manually. "}),s.jsx(ft,{title:"Please select the language",arrow:!0,placement:"top",disableHoverListener:!(!u||this.state.lanError),children:s.jsx("span",{children:s.jsx(Ie,{disabled:!u||this.state.lanError,variant:"contained",onClick:()=>{this.handleEdit({id:`createSubtitle-${this.state.country}`})},children:"Create subtitles"})})})]})]}),this.state.editingSubtitles===""&&!this.state.creatingSubtitle&&s.jsxs(s.Fragment,{children:[r?s.jsx("p",{children:" loading... "}):typeof l=="object"&&l.length>0&&s.jsx(eo,{columns:p,tableData:this.getTableData(JSON.parse(JSON.stringify(l))),handleDelete:f=>t(a.id,f),identityKey:"id",showAdd:!1,tableType:"Subtitle"}),!r&&typeof l=="object"&&l.length===0&&s.jsx("div",{style:{margin:"10px 20px",padding:"10px 10px"},children:s.jsx(rt,{color:"textSecondary",align:"center",children:"No captions for this video yet. Upload one!"})})]}),this.state.creatingSubtitle&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex"},children:[s.jsx(Wt,{children:"Creating Subtitle"}),s.jsx(ft,{title:"Exit creating subtitles",children:s.jsx($e,{onClick:this.onCancelEditing,style:{marginRight:"20px",height:"40px",width:"40px"},children:s.jsx(Cn,{})})})]}),s.jsx(Wn,{subtitleId:"createSubtitle",cancelEditing:this.onCancelEditing})]}),this.state.editingSubtitles!==""&&s.jsxs(s.Fragment,{children:[s.jsxs("div",{style:{display:"flex"},children:[s.jsx(Wt,{children:"Editing Subtitle"}),s.jsx(ft,{title:"Exit editing",children:s.jsx($e,{onClick:this.onCancelEditing,style:{marginRight:"20px",height:"40px",width:"40px"},children:s.jsx(Cn,{})})})]}),s.jsx(Wn,{subtitleId:this.state.editingSubtitles,cancelEditing:this.onCancelEditing})]})]})}}const Ks=n=>n.videosInfo,qs=n=>ct({fetchVideoMeta:Ro,uploadSubtitle:Li,deleteSubtitle:Mo,updateDefaultSubtitle:Fo,updateCaptionName:zo,showSuccessMessage:lt,showErrorMessage:Ae,removeLocalErrorMessage:_o},n),Ys=et(Ks,qs)(Gs),Xs=(n,e,i,a)=>{const t=n.filter(l=>l.contentType==="video").length>1?"Adaptive Bitrate":"";let r=[];for(let l=0;l<n.length;l++){const c=n[l].bandwidth*a*1e3/8/1024,{contentType:o}=n[l];r.push({size:c,contentType:o})}return r=r.sort((l,c)=>c.size-l.size),r=r.map((l,c)=>{if(c===0&&(e>=720||i>=720)&&l.contentType==="video")return`HD Video (${st(l.size)})`;if(l.contentType==="video")return`Video (${st(l.size)})`;if(l.contentType==="audio")return`Audio (${st(l.size)})`}).filter(l=>!!l),{adaptiveBitrate:t,sizes:r}};let Kn;const Js=Ne("div")(()=>({"button.MuiIconButton-root":{backgroundColor:"#5F5DE4",borderRadius:"50%",color:"#fff",svg:{height:"1rem",width:"1rem"}}})),Zs=({videoFiles:n,downloadFile:e,fileDownloadURL:i,totalSizeBytes:a,videoLength:t})=>{const r=k.useMemo(()=>n.sort((u,d)=>{if(u.encryption_type==="original")return-1;if(d.encryption_type==="original")return 1;const p=Ee.VIDEO_EDIT.FORMAT_DETAILS[u.format]?Ee.VIDEO_EDIT.FORMAT_DETAILS[u.format].weight:0;return(Ee.VIDEO_EDIT.FORMAT_DETAILS[d.format]?Ee.VIDEO_EDIT.FORMAT_DETAILS[d.format].weight:0)-p}),[n]),l=u=>u.encryption_type==="original"?"Original video":u.format&&Ee.VIDEO_EDIT.FORMAT_DETAILS[u.format]?Ee.VIDEO_EDIT.FORMAT_DETAILS[u.format].label:"",c=u=>u.isDownloadable?s.jsx($e,{onClick:()=>e(Kn,u.id),children:s.jsx(lo,{})}):"",o=()=>r.map(u=>({...u,type:l(u),use:u.format&&Ee.VIDEO_EDIT.FORMAT_DETAILS[u.format]?Ee.VIDEO_EDIT.FORMAT_DETAILS[u.format].use:"",size:st(u.size),action:u.params&&u.params.streams?s.jsx("span",{style:{textAlign:"center"},children:Xs(u.params.streams,u.height,u.width,t).sizes.map((d,p)=>s.jsx("li",{style:{listStyleType:"none"},children:d},p))}):s.jsx(Kt,{flex:!0,justifyContent:"center",children:c(u)})}));return s.jsxs(Js,{children:[s.jsxs(G,{container:!0,justifyContent:"space-between",children:[s.jsxs(G,{item:!0,children:[s.jsx("p",{style:{marginTop:0},children:"Files associated with the video"}),s.jsx("a",{href:i,className:"hide",ref:u=>Kn=u,target:"_blank",rel:"noopener noreferrer"})]}),s.jsx("div",{style:{fontSize:16},children:s.jsxs("p",{style:{fontWeight:"bold",marginTop:0},children:["Total Storage: ",st(a)]})})]}),s.jsx(co,{columns:Ee.VIDEO_EDIT.COLUMNS,tableData:o(),columnWidths:[0,0,250,0,200]}),s.jsx("div",{style:{padding:20,fontSize:12},children:s.jsx(Ve,{target:"_blank",rel:"noopener noreferrer",href:"/blog/drm-compatibility-explanation/",children:s.jsxs("p",{children:[s.jsx("strong",{children:"Device Compatibility"}),s.jsx("br",{}),"DRM secure playback compatibility chart"]})})})]})};function Qs(n){if(Array.isArray(n))return n}function el(n,e){var i=n==null?null:typeof Symbol<"u"&&n[Symbol.iterator]||n["@@iterator"];if(i!=null){var a,t,r,l,c=[],o=!0,u=!1;try{if(r=(i=i.call(n)).next,e!==0)for(;
9!(o=(a=r.call(i)).done)&&(c.push(a.value),c.length!==e);o=!0);}catch(d){u=!0,t=d}finally{try{if(!o&&i.return!=null&&(l=i.return(),Object(l)!==l))return}finally{if(u)throw t}}return c}}function tl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance. 10In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function qn(n,e){return Qs(n)||el(n,e)||zr(n,e)||tl()}var Yn=Number.isNaN||function(e){return typeof e=="number"&&e!==e};function nl(n,e){return!!(n===e||Yn(n)&&Yn(e))}function il(n,e){if(n.length!==e.length)return!1;for(var i=0;i<n.length;i++)if(!nl(n[i],e[i]))return!1;return!0}function Xn(n,e){e===void 0&&(e=il);var i,a=[],t,r=!1;function l(){for(var c=[],o=0;o<arguments.length;o++)c[o]=arguments[o];return r&&i===this&&e(c,a)||(t=n.apply(this,c),r=!0,i=this,a=c),t}return l}function al(n){if(n.sheet)return n.sheet;for(var e=0;e<document.styleSheets.length;e++)if(document.styleSheets[e].ownerNode===n)return document.styleSheets[e]}function rl(n){var e=document.createElement("style");return e.setAttribute("data-emotion",n.key),n.nonce!==void 0&&e.setAttribute("nonce",n.nonce),e.appendChild(document.createTextNode("")),e}var ol=function(){function n(i){this.isSpeedy=i.speedy===void 0?!0:i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.before=null}var e=n.prototype;return e.insert=function(a){if(this.ctr%(this.isSpeedy?65e3:1)===0){var t=rl(this),r;this.tags.length===0?r=this.before:r=this.tags[this.tags.length-1].nextSibling,this.container.insertBefore(t,r),this.tags.push(t)}var l=this.tags[this.tags.length-1];if(this.isSpeedy){var c=al(l);try{var o=a.charCodeAt(1)===105&&a.charCodeAt(0)===64;c.insertRule(a,o?0:c.cssRules.length)}catch{}}else l.appendChild(document.createTextNode(a));this.ctr++}
10,e.flush=function(){this.tags.forEach(function(a){return a.parentNode.removeChild(a)}),this.tags=[],this.ctr=0},n}();function sl(n){function e(j,N,E,V,m){for(var U=0,w=0,me=0,te=0,ie,W,ye=0,Oe=0,S,H=S=ie=0,L=0,q=0,de=0,ee=0,ue=E.length,le=ue-1,re,D="",ne="",qe="",je="",we;L<ue;){if(W=E.charCodeAt(L),L===le&&w+te+me+U!==0&&(w!==0&&(W=w===47?10:47),te=me=U=0,ue++,le++),w+te+me+U===0){if(L===le&&(0<q&&(D=D.replace(h,"")),0<D.trim().length)){switch(W){case 32:case 9:case 59:case 13:case 10:break;default:D+=E.charAt(L)}W=59}switch(W){case 123:for(D=D.trim(),ie=D.charCodeAt(0),S=1,ee=++L;L<ue;){switch(W=E.charCodeAt(L)){case 123:S++;break;case 125:S--;break;case 47:switch(W=E.charCodeAt(L+1)){case 42:case 47:e:{for(H=L+1;H<le;++H)switch(E.charCodeAt(H)){case 47:if(W===42&&E.charCodeAt(H-1)===42&&L+2!==H){L=H+1;break e}break;case 10:if(W===47){L=H+1;break e}}L=H}}break;case 91:W++;case 40:W++;case 34:case 39:for(;L++<le&&E.charCodeAt(L)!==W;);}if(S===0)break;L++}switch(S=E.substring(ee,L),ie===0&&(ie=(D=D.replace(p,"").trim()).charCodeAt(0)),ie){case 64:switch(0<q&&(D=D.replace(h,"")),W=D.charCodeAt(1),W){case 100:case 109:case 115:case 45:q=N;break;default:q=X}if(S=e(N,q,S,W,m+1),ee=S.length,0<J&&(q=i(X,D,de),we=c(3,S,q,N,A,_,ee,W,m,V),D=q.join(""),we!==void 0&&(ee=(S=we.trim()).length)===0&&(W=0,S="")),0<ee)switch(W){case 115:D=D.replace(Z,l);case 100:case 109:case 45:S=D+"{"+S+"}";break;case 107:D=D.replace(O,"$1 $2"),S=D+"{"+S+"}",S=I===1||I===2&&r("@"+S,3)?"@-webkit-"+S+"@"+S:"@"+S;break;default:S=D+S,V===112&&(S=(ne+=S,""))}else S="";break;default:S=e(N,i(N,D,de),S,V,m+1)}qe+=S,S=de=q=H=ie=0,D="",W=E.charCodeAt(++L);break;case 125:case 59:if(D=(0<q?D.replace(h,""):D).trim(),1<(ee=D.length))switch(H===0&&(ie=D.charCodeAt(0),ie===45||96<ie&&123>ie)&&(ee=(D=D.replace(" ",":")).length),0<J&&(we=c(1,D,N,j,A,_,ne.length,V,m,V))!==void 0&&(ee=(D=we.trim()).length)===0&&(D="\0\0"),ie=D.charCodeAt(0),W=D.charCodeAt(1),ie){case 0:break;case 64:if(W===105||W===99){je+=D+E.charAt(L);break}default:D.charCodeAt(ee-1)!==58&&(ne+=t(D,ie,W,D.charCodeAt(2)))}de=q=H=ie=0,D="",W=E.charCodeAt(++L)}}switch(W){case 13:case 10:w===47?w=0:1+ie===0&&V!==107&&0<D.length&&(q=1,D+="\0"),0<J*pe&&c(0,D,N,j,A,_,ne.length,V,m,V),_=1,A++;break;case 59:case 125:if(w+te+me+U===0){_++;break}default:switch(_++,re=E.charAt(L),W){case 9:case 32:if(te+U+w===0)switch(ye){case 44:case 58:case 9:case 32:re="";break;default:W!==32&&(re=" ")}break;case 0:re="\\0";break;case 12:re="\\f";break;case 11:re="\\v";break;case 38:te+w+U===0&&(q=de=1,re="\f"+re);break;case 108:if(te+w+U+P===0&&0<H)switch(L-H){case 2:ye===112&&E.charCodeAt(L-3)===58&&(P=ye);case 8:Oe===111&&(P=Oe)}break;case 58:te+w+U===0&&(H=L);break;case 44:w+me+te+U===0&&(q=1,re+="\r");break;case 34:case 39:w===0&&(te=te===W?0:te===0?W:te);break;case 91:te+w+me===0&&U++;break;case 93:te+w+me===0&&U--;break;case 41:te+w+U===0&&me--;break;case 40:if(te+w+U===0){if(ie===0)switch(2*ye+3*Oe){case 533:break;default:ie=1}me++}break;case 64:w+me+te+U+H+S===0&&(S=1);break;case 42:case 47:if(!(0<te+U+me))switch(w){case 0:switch(2*W+3*E.charCodeAt(L+1)){case 235:w=47;break;case 220:ee=L,w=42}break;case 42:W===47&&ye===42&&ee+2!==L&&(E.charCodeAt(ee+2)===33&&(ne+=E.substring(ee,L+1)),re="",w=0)}}w===0&&(D+=re)}Oe=ye,ye=W,L++}if(ee=ne.length,0<ee){if(q=N,0<J&&(we=c(2,ne,q,j,A,_,ee,V,m,V),we!==void 0&&(ne=we).length===0))return je+ne+qe;if(ne=q.join(",")+"{"+ne+"}",I*P!==0){switch(I!==2||r(ne,2)||(P=0),P){case 111:ne=ne.replace($,":-moz-$1")+ne;break;case 112:ne=ne.replace(b,"::-webkit-input-$1")+ne.replace(b,"::-moz-$1")+ne.replace(b,":-ms-input-$1")+ne}P=0}}return je+ne+qe}function i(j,N,E){var V=N.trim().split(C);N=V;var m=V.length,U=j.length;switch(U){case 0:case 1:var w=0;for(j=U===0?"":j[0]+" ";w<m;++w)N[w]=a(j,N[w],E).trim();break;default:var me=w=0;for(N=[];w<m;++w)for(var te=0;te<U;++te)N[me++]=a(j[te]+" ",V[w],E).trim()}return N}function a(j,N,E){var V=N.charCodeAt(0);switch(33>V&&(V=(N=N.trim()).charCodeAt(0)),V){case 38:return N.replace(T,"$1"+j.trim());case 58:return j.trim()+N.replace(T,"$1"+j.trim());default:if(0<1*E&&0<N.indexOf("\f"))return N.replace(T,(j.charCodeAt(0)===58?"":"$1")+j.trim())}return j+N}function t(j,N,E,V){var m=j+";",U=2*N+3*E+4*V;if(U===944){j=m.indexOf(":",9)+1;var w=m.substring(j,m.length-1).trim();return w=m.substring(0,j).trim()+w+";",I===1||I===2&&r(w,1)?"-webkit-"+w+w:w}if(I===0||I===2&&!r(m,1))return m;switch(U){case 1015:return m.charCodeAt(10)===97?"-webkit-"+m+m:m;case 951:return m.charCodeAt(3)===116?"-webkit-"+m+m:m;case 963:return m.charCodeAt(5)===110?"-webkit-"+m+m:m;case 1009:if(m.charCodeAt(4)!==100)break;case 969:case 942:return"-webkit-"+m+m;case 978:return"-webkit-"+m+"-moz-"+m+m;case 1019:case 983:return"-webkit-"+m+"-moz-"+m+"-ms-"+m+m;case 883:if(m.charCodeAt(8)===45)return"-webkit-"+m+m;if(0<m.indexOf("image-set(",11))return m.replace(x,"$1-webkit-$2")+m;break;case 932:if(m.charCodeAt(4)===45)switch(m.charCodeAt(5)){case 103:return"-webkit-box-"+m.replace("-grow","")+"-webkit-"+m+"-ms-"+m.replace("grow","positive")+m;case 115:return"-webkit-"+m+"-ms-"+m.replace("shrink","negative")+m;case 98:return"-webkit-"+m+"-ms-"+m.replace("basis","preferred-size")+m}return"-webkit-"+m+"-ms-"+m+m;case 964:return"-webkit-"+m+"-ms-flex-"+m+m;case 1023:if(m.charCodeAt(8)!==99)break;return w=m.substring(m.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),"-webkit-box-pack"+w+"-webkit-"+m+"-ms-flex-pack"+w+m;case 1005:return y.test(m)?m.replace(f,":-webkit-")+m.replace(f,":-moz-")+m:m;case 1e3:switch(w=m.substring(13).trim(),N=w.indexOf("-")+1,w.charCo
10deAt(0)+w.charCodeAt(N)){case 226:w=m.replace(g,"tb");break;case 232:w=m.replace(g,"tb-rl");break;case 220:w=m.replace(g,"lr");break;default:return m}return"-webkit-"+m+"-ms-"+w+m;case 1017:if(m.indexOf("sticky",9)===-1)break;case 975:switch(N=(m=j).length-10,w=(m.charCodeAt(N)===33?m.substring(0,N):m).substring(j.indexOf(":",7)+1).trim(),U=w.charCodeAt(0)+(w.charCodeAt(7)|0)){case 203:if(111>w.charCodeAt(8))break;case 115:m=m.replace(w,"-webkit-"+w)+";"+m;break;case 207:case 102:m=m.replace(w,"-webkit-"+(102<U?"inline-":"")+"box")+";"+m.replace(w,"-webkit-"+w)+";"+m.replace(w,"-ms-"+w+"box")+";"+m}return m+";";case 938:if(m.charCodeAt(5)===45)switch(m.charCodeAt(6)){case 105:return w=m.replace("-items",""),"-webkit-"+m+"-webkit-box-"+w+"-ms-flex-"+w+m;case 115:return"-webkit-"+m+"-ms-flex-item-"+m.replace(K,"")+m;default:return"-webkit-"+m+"-ms-flex-line-pack"+m.replace("align-content","").replace(K,"")+m}break;case 973:case 989:if(m.charCodeAt(3)!==45||m.charCodeAt(4)===122)break;case 931:case 953:if(z.test(j)===!0)return(w=j.substring(j.indexOf(":")+1)).charCodeAt(0)===115?t(j.replace("stretch","fill-available"),N,E,V).replace(":fill-available",":stretch"):m.replace(w,"-webkit-"+w)+m.replace(w,"-moz-"+w.replace("fill-",""))+m;break;case 962:if(m="-webkit-"+m+(m.charCodeAt(5)===102?"-ms-"+m:"")+m,E+V===211&&m.charCodeAt(13)===105&&0<m.indexOf("transform",10))return m.substring(0,m.indexOf(";",27)+1).replace(v,"$1-webkit-$2")+m}return m}function r(j,N){var E=j.indexOf(N===1?":":"{"),V=j.substring(0,N!==3?E:10);return E=j.substring(E+1,j.length-1),se(N!==2?V:V.replace(R,"$1"),E,N)}function l(j,N){var E=t(N,N.charCodeAt(0),N.charCodeAt(1),N.charCodeAt(2));return E!==N+";"?E.replace(M," or ($1)").substring(4):"("+N+")"}function c(j,N,E,V,m,U,w,me,te,ie){for(var W=0,ye=N,Oe;W<J;++W)switch(Oe=Q[W].call(d,j,ye,E,V,m,U,w,me,te,ie)){case void 0:case!1:case!0:case null:break;default:ye=Oe}if(ye!==N)return ye}function o(j){switch(j){case void 0:case null:J=Q.length=0;break;default:if(typeof j=="function")Q[J++]=j;else if(typeof j=="object")for(var N=0,E=j.length;N<E;++N)o(j[N]);else pe=!!j|0}return o}function u(j){return j=j.prefix,j!==void 0&&(se=null,j?typeof j!="function"?I=1:(I=2,se=j):I=0),u}function d(j,N){var E=j;
10if(33>E.charCodeAt(0)&&(E=E.trim()),fe=E,E=[fe],0<J){var V=c(-1,N,E,E,A,_,0,0,0,0);V!==void 0&&typeof V=="string"&&(N=V)}var m=e(X,E,N,0,0);return 0<J&&(V=c(-2,m,E,E,A,_,m.length,0,0,0),V!==void 0&&(m=V)),fe="",P=0,_=A=1,m}var p=/^\0+/g,h=/[\0\r\f]/g,f=/: */g,y=/zoo|gra/,v=/([,: ])(transform)/g,C=/,\r+?/g,T=/([\t\r\n ])*\f?&/g,O=/@(k\w+)\s*(\S*)\s*/,b=/::(place)/g,$=/:(read-only)/g,g=/[svh]\w+-[tblr]{2}/,Z=/\(\s*(.*)\s*\)/g,M=/([\s\S]*?);/g,K=/-self|flex-/g,R=/[^]*?(:[rp][el]a[\w-]+)[^]*/,z=/stretch|:\s*\w+\-(?:conte|avail)/,x=/([^-])(image-set\()/,_=1,A=1,P=0,I=1,X=[],Q=[],J=0,se=null,pe=0,fe="";return d.use=o,d.set=u,n!==void 0&&u(n),d}var tn="/*|*/",ll=tn+"}";function ul(n){n&&St.current.insert(n+"}")}var St={current:null},cl=function(e,i,a,t,r,l,c,o,u,d){switch(e){case 1:{switch(i.charCodeAt(0)){case 64:return St.current.insert(i+";"),"";case 108:if(i.charCodeAt(2)===98)return""}break}case 2:{if(o===0)return i+tn;break}case 3:switch(o){case 102:case 112:return St.current.insert(a[0]+i),"";default:return i+(d===0?tn:"")}case-2:i.split(ll).forEach(ul)}},dl=function(e){e===void 0&&(e={});var i=e.key||"css",a;e.prefix!==void 0&&(a={prefix:e.prefix});var t=new sl(a),r={},l;{l=e.container||document.head;var c=document.querySelectorAll("style[data-emotion-"+i+"]");Array.prototype.forEach.call(c,function(d){var p=d.getAttribute("data-emotion-"+i);p.split(" ").forEach(function(h){r[h]=!0}),d.parentNode!==l&&l.appendChild(d)})}var o;t.use(e.stylisPlugins)(cl),o=function(p,h,f,y){var v=h.name;St.current=f,t(p,h.styles),y&&(u.inserted[v]=!0)};var u={key:i,sheet:new ol({key:i,container:l,nonce:e.nonce,speedy:e.speedy}),nonce:e.nonce,inserted:r,registered:{},insert:o};return u},pl=!0;function Qi(n,e,i){var a="";return i.split(" ").forEach(function(t){n[t]!==void 0?e.push(n[t]):a+=t+" "}),a}var ea=function(e,i,a){var t=e.key+"-"+i.name;if((a===!1||pl===!1)&&e.registered[t]===void 0&&(e.registered[t]=i.styles),e.inserted[i.name]===void 0){var r=i;do e.insert("."+t,r,e.sheet,!0),r=r.next;while(r!==void 0)}};function hl(n){for(var e=0,i,a=0,t=n.length;t>=4;++a,t-=4)i=n.charCodeAt(a)&255|(n.charCodeAt(++a)&255)<<8|(n.charCodeAt(++a)&255)<<16|(n.charCodeAt(++a)&255)<<24,i=(i&65535)*1540483477+((i>>>16)*59797<<16),i^=i>>>24,e=(i&65535)*1540483477+((i>>>16)*59797<<16)^(e&65535)*1540483477+((e>>>16)*59797<<16);switch(t){case 3:e^=(n.charCodeAt(a+2)&255)<<16;case 2:e^=(n.charCodeAt(a+1)&255)<<8;case 1:e^=n.charCodeAt(a)&255,e=(e&65535)*1540483477+((e>>>16)*59797<<16)}return e^=e>>>13,e=(e&65535)*1540483477+((e>>>16)*59797<<16),((e^e>>>15)>>>0).toString(36)}var fl={animationIterationCount:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function ml(n){var e={};return function(i){return e[i]===void 0&&(e[i]=n(i)),e[i]}}var gl=/[A-Z]|^ms/g,vl=/_EMO_([^_]+?)_([^]*?)_EMO_/g,ta=function(e){return e.charCodeAt(1)===45},Jn=function(e){return e!=null&&typeof e!="boolean"},At=ml(function(n){return ta(n)?n:n.replace(gl,"-$&").toLowerCase()}),Zn=function(e,i){switch(e){case"animation":case"animationName":if(typeof i=="string")return i.replace(vl,function(a,t,r){return Fe={name:t,styles:r,next:Fe},t})}return fl[e]!==1&&!ta(e)&&typeof i=="number"&&i!==0?i+"px":i};function kt(n,e,i,a){if(i==null)return"";if(i.__emotion_styles!==void 0)return i;switch(typeof i){case"boolean":return"";case"object":{if(i.anim===1)return Fe={name:i.name,styles:i.styles,next:Fe},i.name;if(i.styles!==void 0){var t=i.next;if(t!==void 0)for(;t!==void 0;)Fe={name:t.name,styles:t.styles,next:Fe},t=t.next;var r=i.styles+";";return r}return bl(n,e,i)}}if(e==null)return i;var l=e[i];return l!==void 0&&!a?l:i}function bl(n,e,i){var a="";if(Array.isArray(i))for(var t=0;t<i.length;t++)a+=kt(n,e,i[t],!1);else for(var r in i){var l=i[r];if(typeof l!="object")e!=null&&e[l]!==void 0?a+=r+"{"+e[l]+"}":Jn(l)&&(a+=At(r)+":"+Zn(r,l)+";");else if(Array.isArray(l)&&typeof l[0]=="string"&&(e==null||e[l[0]]===void 0))for(var c=0;c<l.length;c++)Jn(l[c])&&(a+=At(r)+":"+Zn(r,l[c])+";");else{var o=kt(n,e,l,!1);switch(r){case"animation":case"animationName":{a+=At(r)+":"+o+";";break}default:a+=r+"{"+o+"}"}}}return a}var Qn=/label:\s*([^\s;\n{]+)\s*;/g,Fe,hn=function(e,i,a){if(e.length===1&&typeof e[0]=="object"&&e[0]!==null&&e[0].styles!==void 0)return e[0];var t=!0,r="";Fe=void 0;var l=e[0];l==null||l.raw===void 0?(t=!1,r+=kt(a,i,l,!1)):r+=l[0];for(var c=1;c<e.length;c++)r+=kt(a,i,e[c],r.charCodeAt(r.length-1)===46),t&&(r+=l[c]);Qn.lastIndex=0;for(var o="",u;(u=Qn.exec(r))!==null;)o+="-"+u[1];var d=hl(r)+o;return{name:d,styles:r,next:Fe}},fn=Object.prototype.hasOwnProperty,na=k.createContext(typeof HTMLElement<"u"?dl():null),ia=k.createContext({});na.Provider;var aa=function(e){var i=function(t,r){return k.createElement(na.Consumer,null,function(l){return e(t,l,r)})};return k.forwardRef(i)},nn="__EMOTION_TYPE_PLEASE_DO_NOT_USE__",yl=function(e,i){var a={};
10for(var t in i)fn.call(i,t)&&(a[t]=i[t]);return a[nn]=e,a},wl=function(){return null},ei=function(e,i,a,t){var r=a===null?i.css:i.css(a);typeof r=="string"&&e.registered[r]!==void 0&&(r=e.registered[r]);var l=i[nn],c=[r],o="";typeof i.className=="string"?o=Qi(e.registered,c,i.className):i.className!=null&&(o=i.className+" ");var u=hn(c);ea(e,u,typeof l=="string"),o+=e.key+"-"+u.name;var d={};for(var p in i)fn.call(i,p)&&p!=="css"&&p!==nn&&(d[p]=i[p]);d.ref=t,d.className=o;var h=k.createElement(l,d),f=k.createElement(wl,null);return k.createElement(k.Fragment,null,f,h)},Sl=aa(function(n,e,i){return typeof n.css=="function"?k.createElement(ia.Consumer,null,function(a){return ei(e,n,a,i)}):ei(e,n,null,i)});function mn(){for(var n=arguments.length,e=new Array(n),i=0;i<n;i++)e[i]=arguments[i];return hn(e)}var F=function(e,i){var a=arguments;if(i==null||!fn.call(i,"css"))return k.createElement.apply(void 0,a);var t=a.length,r=new Array(t);r[0]=Sl,r[1]=yl(e,i);for(var l=2;l<t;l++)r[l]=a[l];return k.createElement.apply(null,r)},kl=function(){var e=mn.apply(void 0,arguments),i="animation-"+e.name;return{name:i,styles:"@keyframes "+i+"{"+e.styles+"}",anim:1,toString:function(){return"_EMO_"+this.name+"_"+this.styles+"_EMO_"}}},xl=function n(e){for(var i=e.length,a=0,t="";a<i;a++){var r=e[a];if(r!=null){var l=void 0;switch(typeof r){case"boolean":break;case"object":{if(Array.isArray(r))l=n(r);else{l="";for(var c in r)r[c]&&c&&(l&&(l+=" "),l+=c)}break}default:l=r}l&&(t&&(t+=" "),t+=l)}}return t};function Cl(n,e,i){var a=[],t=Qi(n,a,i);return a.length<2?i:t+e(a)}var El=function(){return null},Il=aa(function(n,e){return k.createElement(ia.Consumer,null,function(i){var a=function(){for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];var h=hn(d,e.registered);return ea(e,h,!1),e.key+"-"+h.name},t=function(){for(var u=arguments.length,d=new Array(u),p=0;p<u;p++)d[p]=arguments[p];return Cl(e.registered,a,xl(d))},r={css:a,cx:t,theme:i},l=n.children(r),c=k.createElement(El,null);return k.createElement(k.Fragment,null,c,l)})});function Ol(n,e){return e||(e=n.slice(0)),Object.freeze(Object.defineProperties(n,{raw:{value:Object.freeze(e)}}))}var ra={};Object.defineProperty(ra,"__esModule",{value:!0});var Rt=Object.assign||function(n){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var a in i)Object.prototype.hasOwnProperty.call(i,a)&&(n[a]=i[a])}return n},ti=function(){function n(e,i){for(var a=0;a<i.length;a++){var t=i[a];t.enumerable=t.enumerable||!1,t.configurable=!0,"value"in t&&(t.writable=!0),Object.defineProperty(e,t.key,t)}}return function(e,i,a){return i&&n(e.prototype,i),a&&n(e,a),e}}(),oa=k,it=sa(oa),Tl=Wr,he=sa(Tl);function sa(n){return n&&n.__esModule?n:{default:n}}function jl(n,e){var i={};for(var a in n)e.indexOf(a)>=0||Object.prototype.hasOwnProperty.call(n,a)&&(i[a]=n[a]);return i}function Nl(n,e){if(!(n instanceof e))throw new TypeError("Cannot call a class as a function")}function Dl(n,e){if(!n)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e&&(typeof e=="object"||typeof e=="function")?e:n}function _l(n,e){if(typeof e!="function"&&e!==null)throw new TypeError("Super expression must either be null or a function, not "+typeof e);n.prototype=Object.create(e&&e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(n,e):n.__proto__=e)}var ni={position:"absolute",top:0,left:0,visibility:"hidden",height:0,overflow:"scroll",whiteSpace:"pre"},Pl=["extraWidth","injectStyles","inputClassName","inputRef","inputStyle","minWidth","onAutosize","placeholderIsMinWidth"],Al=function(e){return Pl.forEach(function(i){return delete e[i]}),e},ii=function(e,i){i.style.fontSize=e.fontSize,i.style.fontFamily=e.fontFamily,i.style.fontWeight=e.fontWeight,i.style.fontStyle=e.fontStyle,i.style.letterSpacing=e.letterSpacing,i.style.textTransform=e.textTransform},la=typeof window<"u"&&window.navigator?/MSIE |Trident\/|Edge\//.test(window.navigator.userAgent):!1,ai=function(){return la?"_"+Math.random().toString(36).substr(2,12):void 0},gn=function(n){_l(e,n),ti(e,null,[{key:"getDerivedStateFromProps",value:function(a,t){var r=a.id;return r!==t.prevId?{inputId:r||ai(),prevId:r}:null}}]);function e(i){Nl(this,e);var a=Dl(this,(e.__proto__||Object.getPrototypeOf(e)).call(this,i));return a.inputRef=function(t){a.input=t,typeof a.props.inputRef=="function"&&a.props.inputRef(t)},a.placeHolderSizerRef=function(t){a.placeHolderSizer=t},a.sizerRef=function(t){a.sizer=t},a.state={inputWidth:i.minWidth,inputId:i.id||ai(),prevId:i.id},a}
vendor: 10,653 bytes, line 10
10return ti(e,[{key:"componentDidMount",value:function(){this.mounted=!0,this.copyInputStyles(),this.updateInputWidth()}},{key:"componentDidUpdate",value:function(a,t){t.inputWidth!==this.state.inputWidth&&typeof this.props.onAutosize=="function"&&this.props.onAutosize(this.state.inputWidth),this.updateInputWidth()}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"copyInputStyles",value:function(){if(!(!this.mounted||!window.getComputedStyle)){var a=this.input&&window.getComputedStyle(this.input);a&&(ii(a,this.sizer),this.placeHolderSizer&&ii(a,this.placeHolderSizer))}}},{key:"updateInputWidth",value:function(){if(!(!this.mounted||!this.sizer||typeof this.sizer.scrollWidth>"u")){var a=void 0;this.props.placeholder&&(!this.props.value||this.props.value&&this.props.placeholderIsMinWidth)?a=Math.max(this.sizer.scrollWidth,this.placeHolderSizer.scrollWidth)+2:a=this.sizer.scrollWidth+2;var t=this.props.type==="number"&&this.props.extraWidth===void 0?16:parseInt(this.props.extraWidth)||0;a+=t,a<this.props.minWidth&&(a=this.props.minWidth),a!==this.state.inputWidth&&this.setState({inputWidth:a})}}},{key:"getInput",value:function(){return this.input}},{key:"focus",value:function(){this.input.focus()}},{key:"blur",value:function(){this.input.blur()}},{key:"select",value:function(){this.input.select()}},{key:"renderStyles",value:function(){var a=this.props.injectStyles;return la&&a?it.default.createElement("style",{dangerouslySetInnerHTML:{__html:"input#"+this.state.inputId+"::-ms-clear {display: none;}"}}):null}},{key:"render",value:function(){var a=[this.props.defaultValue,this.props.value,""].reduce(function(c,o){return c??o}),t=Rt({},this.props.style);t.display||(t.display="inline-block");var r=Rt({boxSizing:"content-box",width:this.state.inputWidth+"px"},this.props.inputStyle),l=jl(this.props,[]);return Al(l),l.className=this.props.inputClassName,l.id=this.state.inputId,l.style=r,it.default.createElement("div",{className:this.props.className,style:t},this.renderStyles(),it.default.createElement("input",Rt({},l,{ref:this.inputRef})),it.default.createElement("div",{ref:this.sizerRef,style:ni},a),this.props.placeholder?it.default.createElement("div",{ref:this.placeHolderSizerRef,style:ni},this.props.placeholder):null)}}]),e}(oa.Component);gn.propTypes={className:he.default.string,defaultValue:he.default.any,extraWidth:he.default.oneOfType([he.default.number,he.default.string]),id:he.default.string,injectStyles:he.default.bool,inputClassName:he.default.string,inputRef:he.default.func,inputStyle:he.default.object,minWidth:he.default.oneOfType([he.default.number,he.default.string]),onAutosize:he.default.func,onChange:he.default.func,placeholder:he.default.string,placeholderIsMinWidth:he.default.bool,style:he.default.object,value:he.default.any};gn.defaultProps={minWidth:1,injectStyles:!0};var Rl=ra.default=gn,ua=function(){};function Ml(n,e){return e?e[0]==="-"?n+e:n+"__"+e:n}function Ul(n,e,i){var a=[i];if(e&&n)for(var t in e)e.hasOwnProperty(t)&&e[t]&&a.push("".concat(Ml(n,t)));return a.filter(function(r){return r}).map(function(r){return String(r).trim()}).join(" ")}var ri=function(e){return Array.isArray(e)?e.filter(Boolean):Gt(e)==="object"&&e!==null?[e]:[]};function Ll(n,e,i){if(i){var a=i(n,e);if(typeof a=="string")return a}return n}function vn(n){return[document.documentElement,document.body,window].indexOf(n)>-1}function ca(n){return vn(n)?window.pageYOffset:n.scrollTop}function xt(n,e){if(vn(n)){window.scrollTo(0,e);return}n.scrollTop=e}function Vl(n){var e=getComputedStyle(n),i=e.position==="absolute",a=/(auto|scroll)/,t=document.documentElement;if(e.position==="fixed")return t;for(var r=n;r=r.parentElement;)if(e=getComputedStyle(r),!(i&&e.position==="static")&&a.test(e.overflow+e.overflowY+e.overflowX))return r;return t}function Fl(n,e,i,a){return i*((n=n/a-1)*n*n+1)+e}function pt(n,e){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:200,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:ua,t=ca(n),r=e-t,l=10,c=0;function o(){c+=l;var u=Fl(c,t,r,i);xt(n,u),c<i?window.requestAnimationFrame(o):a(n)}o()}function $l(n,e){var i=n.getBoundingClientRect(),a=e.getBoundingClientRect(),t=e.offsetHeight/3;a.bottom+t>i.bottom?xt(n,Math.min(e.offsetTop+e.clientHeight-n.offsetHeight+t,n.scrollHeight)):a.top-t<i.top&&xt(n,Math.max(e.offsetTop-t,0))}function Hl(n){var e=n.getBoundingClientRect();return{bottom:e.bottom,height:e.height,left:e.left,right:e.right,top:e.top,width:e.width}}function oi(){try{return document.createEvent("TouchEvent"),!0}catch{return!1}}function Bl(){try{return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}catch{return!1}}function si(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function li(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?si(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):si(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}function da(n){var e=zl();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function zl(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}function Wl(n){var e=n.maxHeight,i=n.menuEl,a=n.minHeight,t=n.placement,r=n.shouldScroll,l=n.isFixedPosition,c=n.theme,o=c.spacing,u=Vl(i),d={placement:"bottom",maxHeight:e};if(!i||!i.offsetParent)return d;var p=u.getBoundingClientRect(),h=p.height,f=i.getBoundingClientRect(),y=f.bottom,v=f.height,C=f.top,T=i.offsetParent.getBoundingClientRect(),O=T.top,b=window.innerHeight,$=ca(u),g=parseInt(getComputedStyle(i).marginBottom,10),Z=parseInt(getComputedStyle(i).marginTop,10),M=O-Z,K=b-C,R=M+$,z=h-$-C,x=y-b+$+g,_=$+C-Z,A=160;switch(t){case"auto":case"bottom":if(K>=v)return{placement:"bottom",maxHeight:e};if(z>=v&&!l)return r&&pt(u,x,A),{placement:"bottom",maxHeight:e};if(!l&&z>=a||l&&K>=a){r&&pt(u,x,A);var P=l?K-g:z-g;return{placement:"bottom",maxHeight:P}}if(t==="auto"||l){var I=e,X=l?M:R;return X>=a&&(I=Math.min(X-g-o.controlHeight,e)),{placement:"top",maxHeight:I}}if(t==="bottom")return xt(u,x),{placement:"bottom",maxHeight:e};break;case"top":if(M>=v)return{placement:"top",maxHeight:e};if(R>=v&&!l)return r&&pt(u,_,A),{placement:"top",maxHeight:e};if(!l&&R>=a||l&&M>=a){var Q=e;return(!l&&R>=a||l&&M>=a)&&(Q=l?M-Z:R-Z),r&&pt(u,_,A),{placement:"top",maxHeight:Q}}return{placement:"bottom",maxHeight:e};default:throw new Error('Invalid placement provided "'.concat(t,'".'))}return d}function Gl(n){var e={bottom:"top",top:"bottom"};return n?e[n]:"bottom"}var an=function(e){return e==="auto"?"bottom":e},Kl=function(e){var i,a=e.placement,t=e.theme,r=t.borderRadius,l=t.spacing,c=t.colors;return i={label:"menu"},ve(i,Gl(a),"100%"),ve(i,"backgroundColor",c.neutral0),ve(i,"borderRadius",r),ve(i,"boxShadow","0 0 0 1px hsla(0, 0%, 0%, 0.1), 0 4px 11px hsla(0, 0%, 0%, 0.1)"),ve(i,"marginBottom",l.menuGutter),ve(i,"marginTop",l.menuGutter),ve(i,"position","absolute"),ve(i,"width","100%"),ve(i,"zIndex",1),i},pa=k.createContext({getPortalPlacement:null}),ha=function(n){Re(i,n);var e=da(i);function i(){var a;Me(this,i);for(var t=arguments.length,r=new Array(t),l=0;l<t;l++)r[l]=arguments[l];return a=e.call.apply(e,[this].concat(r)),a.state={maxHeight:a.props.maxMenuHeight,placement:null},a.getPlacement=function(c){var o=a.props,u=o.minMenuHeight,d=o.maxMenuHeight,p=o.menuPlacement,h=o.menuPosition,f=o.menuShouldScrollIntoView,y=o.theme;if(c){var v=h==="fixed",C=f&&!v,T=Wl({maxHeight:d,menuEl:c,minHeight:u,placement:p,shouldScroll:C,isFixedPosition:v,theme:y}),O=a.context.getPortalPlacement;O&&O(T),a.setState(T)}},a.getUpdatedProps=function(){var c=a.props.menuPlacement,o=a.state.placement||an(c);return li(li({},a.props),{},{placement:o,maxHeight:a.state.maxHeight})},a}return Ue(i,[{key:"render",value:function(){var t=this.props.children;return t({ref:this.getPlacement,placerProps:this.getUpdatedProps()})}}]),i}(k.Component);ha.contextType=pa;var ql=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerRef,c=e.innerProps;return F("div",B({css:r("menu",e),className:t({menu:!0},a)},c,{ref:l}),i)},Yl=function(e){var i=e.maxHeight,a=e.theme.spacing.baseUnit;return{maxHeight:i,overflowY:"auto",paddingBottom:a,paddingTop:a,position:"relative",WebkitOverflowScrolling:"touch"}},Xl=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.isMulti,c=e.innerRef,o=e.innerProps;return F("div",B({css:r("menuList",e),className:t({"menu-list":!0,"menu-list--is-multi":l},a),ref:c},o),i)},fa=function(e){var i=e.theme,a=i.spacing.baseUnit,t=i.colors;return{color:t.neutral40,padding:"".concat(a*2,"px ").concat(a*3,"px"),textAlign:"center"}},Jl=fa,Zl=fa,ma=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerProps;return F("div",B({css:r("noOptionsMessage",e),className:t({"menu-notice":!0,"menu-notice--no-options":!0},a)},l),i)};ma.defaultProps={children:"No options"};var ga=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerProps;return F("div",B({css:r("loadingMessage",e),className:t({"menu-notice":!0,"menu-notice--loading":!0},a)},l),i)};ga.defaultProps={children:"Loading..."};var Ql=function(e){var i=e.rect,a=e.offset,t=e.position;return{left:i.left,position:t,top:a,width:i.width,zIndex:1}},eu=function(n){Re(i,n);var e=da(i);function i(){var a;Me(this,i);for(var t=arguments.length,r=new Array(t),l=0;l<t;l++)r[l]=arguments[l];return a=e.call.apply(e,[this].concat(r)),a.state={placement:null},a.getPortalPlacement=function(c){var o=c.placement,u=an(a.props.menuPlacement);o!==u&&a.setState({placement:o})},a}return Ue(i,[{key:"render",value:function(){var t=this.props,r=t.appendTo,l=t.children,c=t.controlElement,o=t.menuPlacement,u=t.menuPosition,d=t.getStyles,p=u==="fixed";if(!r&&!p||!c)return null;var h=this.state.placement||an(o),f=Hl(c),y=p?0:window.pageYOffset,v=f[h]+y,C={offset:v,position:u,rect:f},T=F("div",{css:d("menuPortal",C)},l);return F(pa.Provider,{value:{getPortalPlacement:this.getPortalPlacement}},r?Ri.createPortal(T,r):T)}}]),i}(k.Component),ui=Array.isArray,ci=Object.keys,tu=Object.prototype.hasOwnProperty;function rn(n,e){if(n===e)return!0;
10if(n&&e&&Gt(n)=="object"&&Gt(e)=="object"){var i=ui(n),a=ui(e),t,r,l;if(i&&a){if(r=n.length,r!=e.length)return!1;for(t=r;t--!==0;)if(!rn(n[t],e[t]))return!1;return!0}if(i!=a)return!1;var c=n instanceof Date,o=e instanceof Date;if(c!=o)return!1;if(c&&o)return n.getTime()==e.getTime();var u=n instanceof RegExp,d=e instanceof RegExp;if(u!=d)return!1;if(u&&d)return n.toString()==e.toString();var p=ci(n);if(r=p.length,r!==ci(e).length)return!1;for(t=r;t--!==0;)if(!tu.call(e,p[t]))return!1;for(t=r;t--!==0;)if(l=p[t],!(l==="_owner"&&n.$$typeof)&&!rn(n[l],e[l]))return!1;return!0}return n!==n&&e!==e}function nu(n,e){try{return rn(n,e)}catch(i){if(i.message&&i.message.match(/stack|recursion/i))return console.warn("Warning: react-fast-compare does not handle circular references.",i.name,i.message),!1;throw i}}var iu=function(e){var i=e.isDisabled,a=e.isRtl;return{label:"container",direction:a?"rtl":null,pointerEvents:i?"none":null,position:"relative"}},au=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerProps,c=e.isDisabled,o=e.isRtl;return F("div",B({css:r("container",e),className:t({"--is-disabled":c,"--is-rtl":o},a)},l),i)},ru=function(e){var i=e.theme.spacing;return{alignItems:"center",display:"flex",flex:1,flexWrap:"wrap",padding:"".concat(i.baseUnit/2,"px ").concat(i.baseUnit*2,"px"),WebkitOverflowScrolling:"touch",position:"relative",overflow:"hidden"}},ou=function(e){var i=e.children,a=e.className,t=e.cx,r=e.isMulti,l=e.getStyles,c=e.hasValue;return F("div",{css:l("valueContainer",e),className:t({"value-container":!0,"value-container--is-multi":r,"value-container--has-value":c},a)},i)},su=function(){return{alignItems:"center",alignSelf:"stretch",display:"flex",flexShrink:0}},lu=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles;return F("div",{css:r("indicatorsContainer",e),className:t({indicators:!0},a)},i)};function va(){var n=Ol([` 11 0%, 80%, 100% { opacity: 0; } 12 40% { opacity: 1; } 13`]);return va=function(){return n},n}var uu={name:"19bqh2r",styles:"display:inline-block;fill:currentColor;line-height:1;stroke:currentColor;stroke-width:0;"},ba=function(e){var i=e.size,a=He(e,["size"]);return F("svg",B({height:i,width:i,viewBox:"0 0 20 20","aria-hidden":"true",focusable:"false",css:uu},a))},bn=function(e){return F(ba,B({size:20},e),F("path",{d:"M14.348 14.849c-0.469 0.469-1.229 0.469-1.697 0l-2.651-3.030-2.651 3.029c-0.469 0.469-1.229 0.469-1.697 0-0.469-0.469-0.469-1.229 0-1.697l2.758-3.15-2.759-3.152c-0.469-0.469-0.469-1.228 0-1.697s1.228-0.469 1.697 0l2.652 3.031 2.651-3.031c0.469-0.469 1.228-0.469 1.697 0s0.469 1.229 0 1.697l-2.758 3.152 2.758 3.15c0.469 0.469 0.469 1.229 0 1.698z"}))},ya=function(e){return F(ba,B({size:20},e),F("path",{d:"M4.516 7.548c0.436-0.446 1.043-0.481 1.576 0l3.908 3.747 3.908-3.747c0.533-0.481 1.141-0.446 1.574 0 0.436 0.445 0.408 1.197 0 1.615-0.406 0.418-4.695 4.502-4.695 4.502-0.217 0.223-0.502 0.335-0.787 0.335s-0.57-0.112-0.789-0.335c0 0-4.287-4.084-4.695-4.502s-0.436-1.17 0-1.615z"}))},wa=function(e){var i=e.isFocused,a=e.theme,t=a.spacing.baseUnit,r=a.colors;return{label:"indicatorContainer",color:i?r.neutral60:r.neutral20,display:"flex",padding:t*2,transition:"color 150ms",":hover":{color:i?r.neutral80:r.neutral40}}},cu=wa,du=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerProps;return F("div",B({},l,{css:r("dropdownIndicator",e),className:t({indicator:!0,"dropdown-indicator":!0},a)}),i||F(ya,null))},pu=wa,hu=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerProps;return F("div",B({},l,{css:r("clearIndicator",e),className:t({indicator:!0,"clear-indicator":!0},a)}),i||F(bn,null))},fu=function(e){var i=e.isDisabled,a=e.theme,t=a.spacing.baseUnit,r=a.colors;return{label:"indicatorSeparator",alignSelf:"stretch",backgroundColor:i?r.neutral10:r.neutral20,marginBottom:t*2,marginTop:t*2,width:1}},mu=function(e){var i=e.className,a=e.cx,t=e.getStyles,r=e.innerProps;return F("span",B({},r,{css:t("indicatorSeparator",e),className:a({"indicator-separator":!0},i)}))},gu=kl(va()),vu=function(e){var i=e.isFocused,a=e.size,t=e.theme,r=t.colors,l=t.spacing.baseUnit;return{label:"loadingIndicator",color:i?r.neutral60:r.neutral20,display:"flex",padding:l*2,transition:"color 150ms",alignSelf:"center",fontSize:a,lineHeight:1,marginRight:a,textAlign:"center",verticalAlign:"middle"}},Mt=function(e){var i=e.delay,a=e.offset;return F("span",{css:mn({animation:"".concat(gu," 1s ease-in-out ").concat(i,"ms infinite;"),backgroundColor:"currentColor",borderRadius:"1em",display:"inline-block",marginLeft:a?"1em":null,height:"1em",verticalAlign:"top",width:"1em"},"")})},Sa=function(e){var i=e.className,a=e.cx,t=e.getStyles,r=e.innerProps,l=e.isRtl;return F("div",B({},r,{css:t("loadingIndicator",e),className:a({indicator:!0,"loading-indicator":!0},i)}),F(Mt,{delay:0,offset:l}),F(Mt,{delay:160,offset:!0}),F(Mt,{delay:320,offset:!l}))};Sa.defaultProps={size:4};var bu=function(e){var i=e.isDisabled,a=e.isFocused,t=e.theme,r=t.colors,l=t.borderRadius,c=t.spacing;return{label:"control",alignItems:"center",backgroundColor:i?r.neutral5:r.neutral0,borderColor:i?r.neutral10:a?r.primary:r.neutral20,borderRadius:l,borderStyle:"solid",borderWidth:1,boxShadow:a?"0 0 0 1px ".concat(r.primary):null,cursor:"default",display:"flex",flexWrap:"wrap",justifyContent:"space-between",minHeight:c.
vendor: 14,350 bytes, line 13
13controlHeight,outline:"0 !important",position:"relative",transition:"all 100ms","&:hover":{borderColor:a?r.primary:r.neutral30}}},yu=function(e){var i=e.children,a=e.cx,t=e.getStyles,r=e.className,l=e.isDisabled,c=e.isFocused,o=e.innerRef,u=e.innerProps,d=e.menuIsOpen;return F("div",B({ref:o,css:t("control",e),className:a({control:!0,"control--is-disabled":l,"control--is-focused":c,"control--menu-is-open":d},r)},u),i)};function di(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function wu(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?di(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):di(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}var Su=function(e){var i=e.theme.spacing;return{paddingBottom:i.baseUnit*2,paddingTop:i.baseUnit*2}},ku=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.Heading,c=e.headingProps,o=e.label,u=e.theme,d=e.selectProps;return F("div",{css:r("group",e),className:t({group:!0},a)},F(l,B({},c,{selectProps:d,theme:u,getStyles:r,cx:t}),o),F("div",null,i))},xu=function(e){var i=e.theme.spacing;return{label:"group",color:"#999",cursor:"default",display:"block",fontSize:"75%",fontWeight:"500",marginBottom:"0.25em",paddingLeft:i.baseUnit*3,paddingRight:i.baseUnit*3,textTransform:"uppercase"}},Cu=function(e){var i=e.className,a=e.cx,t=e.getStyles,r=e.theme;e.selectProps;var l=He(e,["className","cx","getStyles","theme","selectProps"]);return F("div",B({css:t("groupHeading",wu({theme:r},l)),className:a({"group-heading":!0},i)},l))};function pi(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function Eu(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?pi(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):pi(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}var Iu=function(e){var i=e.isDisabled,a=e.theme,t=a.spacing,r=a.colors;return{margin:t.baseUnit/2,paddingBottom:t.baseUnit/2,paddingTop:t.baseUnit/2,visibility:i?"hidden":"visible",color:r.neutral80}},Ou=function(e){return{label:"input",background:0,border:0,fontSize:"inherit",opacity:e?0:1,outline:0,padding:0,color:"inherit"}},Tu=function(e){var i=e.className,a=e.cx,t=e.getStyles,r=e.innerRef,l=e.isHidden,c=e.isDisabled,o=e.theme;e.selectProps;var u=He(e,["className","cx","getStyles","innerRef","isHidden","isDisabled","theme","selectProps"]);return F("div",{css:t("input",Eu({theme:o},u))},F(Rl,B({className:a({input:!0},i),inputRef:r,inputStyle:Ou(l),disabled:c},u)))};function hi(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function Ut(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?hi(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):hi(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}var ju=function(e){var i=e.theme,a=i.spacing,t=i.borderRadius,r=i.colors;return{label:"multiValue",backgroundColor:r.neutral10,borderRadius:t/2,display:"flex",margin:a.baseUnit/2,minWidth:0}},Nu=function(e){var i=e.theme,a=i.borderRadius,t=i.colors,r=e.cropWithEllipsis;return{borderRadius:a/2,color:t.neutral80,fontSize:"85%",overflow:"hidden",padding:3,paddingLeft:6,textOverflow:r?"ellipsis":null,whiteSpace:"nowrap"}},Du=function(e){var i=e.theme,a=i.spacing,t=i.borderRadius,r=i.colors,l=e.isFocused;return{alignItems:"center",borderRadius:t/2,backgroundColor:l&&r.dangerLight,display:"flex",paddingLeft:a.baseUnit,paddingRight:a.baseUnit,":hover":{backgroundColor:r.dangerLight,color:r.danger}}},ka=function(e){var i=e.children,a=e.innerProps;return F("div",a,i)},_u=ka,Pu=ka;function Au(n){var e=n.children,i=n.innerProps;return F("div",i,e||F(bn,{size:14}))}var xa=function(e){var i=e.children,a=e.className,t=e.components,r=e.cx,l=e.data,c=e.getStyles,o=e.innerProps,u=e.isDisabled,d=e.removeProps,p=e.selectProps,h=t.Container,f=t.Label,y=t.Remove;return F(Il,null,function(v){var C=v.css,T=v.cx;return F(h,{data:l,innerProps:Ut(Ut({},o),{},{className:T(C(c("multiValue",e)),r({"multi-value":!0,"multi-value--is-disabled":u},a))}),selectProps:p},F(f,{data:l,innerProps:{className:T(C(c("multiValueLabel",e)),r({"multi-value__label":!0},a))},selectProps:p},i),F(y,{data:l,innerProps:Ut({className:T(C(c("multiValueRemove",e)),r({"multi-value__remove":!0},a))},d),selectProps:p}))})};xa.defaultProps={cropWithEllipsis:!0};var Ru=function(e){var i=e.isDisabled,a=e.isFocused,t=e.isSelected,r=e.theme,l=r.spacing,c=r.colors;return{label:"option",backgroundColor:t?c.primary:a?c.primary25:"transparent",color:i?c.neutral20:t?c.neutral0:"inherit",cursor:"default",display:"block",fontSize:"inherit",padding:"".concat(l.baseUnit*2,"px ").concat(l.baseUnit*3,"px"),width:"100%",userSelect:"none",WebkitTapHighlightColor:"rgba(0, 0, 0, 0)",":active":{backgroundColor:!i&&(t?c.primary:c.primary50)}}},Mu=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.isDisabled,c=e.isFocused,o=e.isSelected,u=e.innerRef,d=e.innerProps;return F("div",B({css:r("option",e),className:t({option:!0,"option--is-disabled":l,"option--is-focused":c,"option--is-selected":o},a),ref:u},d),i)},Uu=function(e){var i=e.theme,a=i.spacing,t=i.colors;return{label:"placeholder",color:t.neutral50,marginLeft:a.baseUnit/2,marginRight:a.baseUnit/2,position:"absolute",top:"50%",transform:"translateY(-50%)"}},Lu=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.innerProps;return F("div",B({css:r("placeholder",e),className:t({placeholder:!0},a)},l),i)},Vu=function(e){var i=e.isDisabled,a=e.theme,t=a.spacing,r=a.colors;return{label:"singleValue",color:i?r.neutral40:r.neutral80,marginLeft:t.baseUnit/2,marginRight:t.baseUnit/2,maxWidth:"calc(100% - ".concat(t.baseUnit*2,"px)"),overflow:"hidden",position:"absolute",textOverflow:"ellipsis",whiteSpace:"nowrap",top:"50%",transform:"translateY(-50%)"}},Fu=function(e){var i=e.children,a=e.className,t=e.cx,r=e.getStyles,l=e.isDisabled,c=e.innerProps;return F("div",B({css:r("singleValue",e),className:t({"single-value":!0,"single-value--is-disabled":l},a)},c),i)};function fi(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function mi(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?fi(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):fi(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}var $u={ClearIndicator:hu,Control:yu,DropdownIndicator:du,DownChevron:ya,CrossIcon:bn,Group:ku,GroupHeading:Cu,IndicatorsContainer:lu,IndicatorSeparator:mu,Input:Tu,LoadingIndicator:Sa,Menu:ql,MenuList:Xl,MenuPortal:eu,LoadingMessage:ga,NoOptionsMessage:ma,MultiValue:xa,MultiValueContainer:_u,MultiValueLabel:Pu,MultiValueRemove:Au,Option:Mu,Placeholder:Lu,SelectContainer:au,SingleValue:Fu,ValueContainer:ou},Hu=function(e){return mi(mi({},$u),e.components)},on=[{base:"A",letters:"Aâ¶ï¼¡ÃÃÃẦẤẪẨÃÄÄáº°áº®áº´áº²È¦Ç ÃÇẢÃ
ǺÇÈÈẠẬẶá¸ÄȺⱯ"},{base:"AA",letters:"ê²"},{base:"AE",letters:"ÃǼǢ"},{base:"AO",letters:"ê´"},{base:"AU",letters:"ê¶"},{base:"AV",letters:"ê¸êº"},{base:"AY",letters:"ê¼"},{base:"B",letters:"Bâ·ï¼¢á¸á¸á¸ÉÆÆ"},{base:"C",letters:"Câ¸ï¼£ÄÄÄÄÃá¸ÆÈ»ê¾"},{base:"D",letters:"Dâ¹ï¼¤á¸Äá¸á¸á¸á¸ÄÆÆÆê¹"},{base:"DZ",letters:"DZÇ"},{base:"Dz",letters:"DzÇ
"},{base:"E",letters:"Eâºï¼¥ÃÃÃá»áº¾á»á»áº¼Äá¸á¸ÄÄÃẺÄÈÈẸá»È¨á¸Äá¸á¸ÆÆ"},{base:"F",letters:"Fâ»ï¼¦á¸Æê»"},{base:"G",letters:"Gâ¼ï¼§Ç´ÄḠÄÄ Ç¦Ä¢Ç¤Æê ê½ê¾"},{base:"H",letters:"Hâ½ï¼¨Ä¤á¸¢á¸¦ÈḤḨḪĦⱧⱵê"},{base:"I",letters:"Iâ¾ï¼©ÃÃÃĨĪĬİÃḮá»ÇÈÈá»Ä®á¸¬Æ"},{base:"J",letters:"Jâ¿ï¼ªÄ´É"},{base:"K",letters:"KâKḰǨḲĶḴÆâ±©êêêê¢"},{base:"L",letters:"LâLĿĹĽḶḸĻḼḺÅȽⱢⱠêêê"},{base:"LJ",letters:"Ç"},{base:"Lj",letters:"Ç"},{base:"M",letters:"Mâï¼á¸¾á¹á¹â±®Æ"},{base:"N",letters:"NâNǸÅÃá¹Åá¹Å
á¹á¹È Æêê¤"},{base:"NJ",letters:"Ç"},{base:"Nj",letters:"Ç"},{base:"O",letters:"OâOÃÃÃá»á»á»á»Ãá¹È¬á¹Åá¹á¹ÅȮȰÃȪá»ÅÇÈÈÆ á»á»á» á»á»¢á»á»ÇªÇ¬ÃÇ¾ÆÆêê"},{base:"OI",letters:"Æ¢"},{base:"OO",letters:"ê"},{base:"OU",letters:"È¢"},{base:"P",letters:"Pâ
ï¼°á¹á¹Æ¤â±£êêê"},{base:"Q",letters:"Qâï¼±êêÉ"},{base:"R",letters:"Râï¼²Åá¹ÅÈÈá¹á¹Åá¹ÉⱤêê¦ê"},{base:"S",letters:"Sâï¼³áºÅṤÅṠŠṦṢṨÈÅâ±¾ê¨ê"},{base:"T",letters:"TâTṪŤṬÈŢṰṮŦƬƮȾê"},{base:"TZ",letters:"ê¨"},{base:"U",letters:"Uâï¼µÃÃÃŨṸŪṺŬÃÇÇÇÇỦŮŰÇÈÈÆ¯á»ªá»¨á»®á»¬á»°á»¤á¹²Å²á¹¶á¹´É"},{base:"V",letters:"VâVṼṾƲêÉ
"},{base:"VY",letters:"ê "},{base:"W",letters:"Wâï¼·áºáºÅ´áºáºáºâ±²"},{base:"X",letters:"XâXáºáº"},{base:"Y",letters:"YâYỲÃŶỸȲáºÅ¸á»¶á»´Æ³ÉỾ"},{base:"Z",letters:"ZâZŹáºÅ»Å½áºáºÆµÈ¤â±¿â±«ê¢"},{base:"a",letters:"aâï½áºÃ áâầấẫẩãÄÄằắẵẳȧǡäÇảåǻÇÈÈạáºáº·á¸Ä
â±¥É"},{base:"aa",letters:"ê³"},{base:"ae",letters:"æǽǣ"},{base:"ao",letters:"êµ"},{base:"au",letters:"ê·"},{base:"av",letters:"ê¹ê»"},{base:"ay",letters:"ê½"},{base:"b",letters:"bâï½á¸á¸
á¸ÆÆÉ"},{base:"c",letters:"câï½ÄÄÄÄÃ§á¸ÆÈ¼ê¿â"},{base:"d",letters:"dâï½á¸Äá¸á¸á¸á¸ÄÆÉÉêº"},{base:"dz",letters:"dzÇ"},{base:"e",letters:"eâï½
èéêá»áº¿á»
á»áº½Äá¸á¸ÄÄëẻÄÈ
Èẹá»È©á¸Äá¸á¸ÉÉÇ"},{base:"f",letters:"fâï½á¸Æê¼"},{base:"g",letters:"gâï½ÇµÄḡÄÄ¡Ç§Ä£Ç¥É ê¡áµ¹ê¿"},{base:"h",letters:"hâï½Ä¥á¸£á¸§ÈḥḩḫáºÄ§â±¨â±¶É¥"},{base:"hv",letters:"Æ"},{base:"i",letters:"iâï½Ã¬ÃîĩīÄïḯá»ÇÈÈá»Ä¯á¸É¨Ä±"},{base:"j",letters:"jâï½ÄµÇ°É"},{base:"k",letters:"kâï½á¸±Ç©á¸³Ä·á¸µÆâ±ªêêê
ê£"},{base:"l",letters:"lâï½ÅÄºÄ¾á¸·á¸¹Ä¼á¸½á¸»Å¿ÅÆÉ«â±¡êêê"},{base:"lj",letters:"Ç"},{base:"m",letters:"mâï½á¸¿á¹á¹É±É¯"},{base:"n",letters:"nâï½Ç¹Åñá¹
Åá¹Åá¹á¹ÆÉ²Åêê¥"},{base:"nj",letters:"Ç"},{base:"o",letters:"oâï½Ã²Ã³Ã´á»á»á»á»Ãµá¹Èá¹Åá¹á¹Åȯȱöȫá»ÅÇÈÈÆ¡á»á»á»¡á»á»£á»á»Ç«ÇøǿÉêêɵ"},{base:"oi",letters:"Æ£"},{base:"ou",letters:"È£"},{base:"oo",letters:"ê"},{base:"p",letters:"pâï½á¹á¹Æ¥áµ½êêê"},{base:"q",letters:"qâ ï½Éêê"},{base:"r",letters:"râ¡ï½Åá¹ÅÈÈá¹á¹Åá¹Éɽêê§ê"},{base:"s",letters:"sâ¢ï½ÃÅá¹¥ÅṡšṧṣṩÈÅÈ¿ê©ê
áº"},{base:"t",letters:"tâ£ï½á¹«áºÅ¥á¹ÈţṱṯŧÆÊⱦê"},{base:"tz",letters:"ê©"},{base:"u",letters:"uâ¤ï½Ã¹ÃºÃ»Å©á¹¹Å«á¹»ÅüÇÇÇÇủůűÇÈÈÆ°á»«á»©á»¯á»á»±á»¥á¹³Å³á¹·á¹µÊ"},{base:"v",letters:"vâ¥ï½á¹½á¹¿ÊêÊ"},{base:"vy",letters:"ê¡"},{base:"w",letters:"wâ¦ï½áºáºÅµáºáº
áºáºâ±³"},{base:"x",letters:"xâ§ï½áºáº"},{base:"y",letters:"yâ¨ï½á»³Ã½Å·á»¹È³áºÃ¿á»·áºá»µÆ´Éỿ"},{base:"z",letters:"zâ©ï½ÅºáºÅ¼Å¾áºáºÆ¶È¥Éⱬê£"}],Bu=new RegExp("["+on.map(function(n){return n.letters}).join("")+"]","g"),Ca={};for(var Lt=0;Lt<on.length;Lt++)for(var Vt=on[Lt],Ft=0;Ft<Vt.letters.length;Ft++)Ca[Vt.letters[Ft]]=Vt.base;var gi=function(e){return e.replace(Bu,function(i){return Ca[i]})};function vi(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function zu(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};e%2?vi(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):vi(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}var bi=function(e){return e.replace(/^\s+|\s+$/g,"")},Wu=function(e){return"".concat(e.label," ").concat(e.value)},Gu=function(e){return function(i,a){var t=zu({ignoreCase:!0,ignoreAccents:!0,stringify:Wu,trim:!0,matchFrom:"any"},e),r=t.ignoreCase,l=t.ignoreAccents,c=t.stringify,o=t.trim,u=t.matchFrom,d=o?bi(a):a,p=o?bi(c(i)):c(i);return r&&(d=d.toLowerCase(),p=p.toLowerCase()),l&&(d=gi(d),p=gi(p)),u==="start"?p.substr(0,d.length)===d:p.indexOf(d)>-1}},Ku={name:"1laao21-a11yText",styles:"label:a11yText;z-index:9999;border:0;clip:rect(1px, 1px, 1px, 1px);height:1px;width:1px;position:absolute;overflow:hidden;padding:0;white-space:nowrap;"},qu=function(e){return F("span",B({css:Ku},e))};function Yu(n){n.in,n.out,n.onExited,n.appear,n.enter,n.exit;var e=n.innerRef;n.emotion;var i=He(n,["in","out","onExited","appear","enter","exit","innerRef","emotion"]);return F("input",B({ref:e},i,{css:mn({label:"dummyInput",background:0,border:0,fontSize:"inherit",outline:0,padding:0,width:1,color:"transparent",left:-100,opacity:0,position:"relative",transform:"scale(0)"},"")}))}function Xu(n){var e=Ju();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function Ju(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Ea=function(n){Re(i,n);var e=Xu(i);function i(){return Me(this,i),e.apply(this,arguments)}
13return Ue(i,[{key:"componentDidMount",value:function(){this.props.innerRef(Ri.findDOMNode(this))}},{key:"componentWillUnmount",value:function(){this.props.innerRef(null)}},{key:"render",value:function(){return this.props.children}}]),i}(k.Component),yi=["boxSizing","height","overflow","paddingRight","position"],wi={boxSizing:"border-box",overflow:"hidden",position:"relative",height:"100%"};function Si(n){n.preventDefault()}function ki(n){n.stopPropagation()}function xi(){var n=this.scrollTop,e=this.scrollHeight,i=n+this.offsetHeight;n===0?this.scrollTop=1:i===e&&(this.scrollTop=n-1)}function Ci(){return"ontouchstart"in window||navigator.maxTouchPoints}function Zu(n){var e=Qu();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function Qu(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Ei=!!(window.document&&window.document.createElement),at=0,Ia=function(n){Re(i,n);var e=Zu(i);function i(){var a;Me(this,i);for(var t=arguments.length,r=new Array(t),l=0;l<t;l++)r[l]=arguments[l];return a=e.call.apply(e,[this].concat(r)),a.originalStyles={},a.listenerOptions={capture:!1,passive:!1},a}return Ue(i,[{key:"componentDidMount",value:function(){var t=this;if(Ei){var r=this.props,l=r.accountForScrollbars,c=r.touchScrollTarget,o=document.body,u=o&&o.style;if(l&&yi.forEach(function(f){var y=u&&u[f];t.originalStyles[f]=y}),l&&at<1){var d=parseInt(this.originalStyles.paddingRight,10)||0,p=document.body?document.body.clientWidth:0,h=window.innerWidth-p+d||0;Object.keys(wi).forEach(function(f){var y=wi[f];u&&(u[f]=y)}),u&&(u.paddingRight="".concat(h,"px"))}o&&Ci()&&(o.addEventListener("touchmove",Si,this.listenerOptions),c&&(c.addEventListener("touchstart",xi,this.listenerOptions),c.addEventListener("touchmove",ki,this.listenerOptions))),at+=1}}},{key:"componentWillUnmount",value:function(){var t=this;if(Ei){var r=this.props,l=r.accountForScrollbars,c=r.touchScrollTarget,o=document.body,u=o&&o.style;at=Math.max(at-1,0),l&&at<1&&yi.forEach(function(d){var p=t.originalStyles[d];u&&(u[d]=p)}),o&&Ci()&&(o.removeEventListener("touchmove",Si,this.listenerOptions),c&&(c.removeEventListener("touchstart",xi,this.listenerOptions),c.removeEventListener("touchmove",ki,this.listenerOptions)))}}},{key:"render",value:function(){return null}}]),i}(k.Component);Ia.defaultProps={accountForScrollbars:!0};function ec(n){var e=tc();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function tc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var nc={name:"1dsbpcp",styles:"position:fixed;left:0;bottom:0;right:0;top:0;"},ic=function(n){Re(i,n);var e=ec(i);function i(){var a;Me(this,i);for(var t=arguments.length,r=new Array(t),l=0;l<t;l++)r[l]=arguments[l];return a=e.call.apply(e,[this].concat(r)),a.state={touchScrollTarget:null},a.getScrollTarget=function(c){c!==a.state.touchScrollTarget&&a.setState({touchScrollTarget:c})},a.blurSelectInput=function(){document.activeElement&&document.activeElement.blur()},a}return Ue(i,[{key:"render",value:function(){var t=this.props,r=t.children,l=t.isEnabled,c=this.state.touchScrollTarget;return l?F("div",null,F("div",{onClick:this.blurSelectInput,css:nc}),F(Ea,{innerRef:this.getScrollTarget},r),c?F(Ia,{touchScrollTarget:c}):null):r}}]),i}(k.PureComponent);function ac(n){var e=rc();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function rc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var oc=function(n){Re(i,n);var e=ac(i);function i(){var a;Me(this,i);for(var t=arguments.length,r=new Array(t),l=0;l<t;l++)r[l]=arguments[l];return a=e.call.apply(e,[this].concat(r)),a.isBottom=!1,a.isTop=!1,a.scrollTarget=void 0,a.touchStart=void 0,a.cancelScroll=function(c){c.preventDefault(),c.stopPropagation()},a.handleEventDelta=function(c,o){var u=a.props,d=u.onBottomArrive,p=u.onBottomLeave,h=u.onTopArrive,f=u.onTopLeave,y=a.scrollTarget,v=y.scrollTop,C=y.scrollHeight,T=y.clientHeight,O=a.scrollTarget,b=o>0,$=C-T-v,g=!1;$>o&&a.isBottom&&(p&&p(c),a.isBottom=!1),b&&a.isTop&&(f&&f(c),a.isTop=!1),b&&o>$?(d&&!a.isBottom&&d(c),O.scrollTop=C,g=!0,a.isBottom=!0):!b&&-o>
13v&&(h&&!a.isTop&&h(c),O.scrollTop=0,g=!0,a.isTop=!0),g&&a.cancelScroll(c)},a.onWheel=function(c){a.handleEventDelta(c,c.deltaY)},a.onTouchStart=function(c){a.touchStart=c.changedTouches[0].clientY},a.onTouchMove=function(c){var o=a.touchStart-c.changedTouches[0].clientY;a.handleEventDelta(c,o)},a.getScrollTarget=function(c){a.scrollTarget=c},a}return Ue(i,[{key:"componentDidMount",value:function(){this.startListening(this.scrollTarget)}},{key:"componentWillUnmount",value:function(){this.stopListening(this.scrollTarget)}},{key:"startListening",value:function(t){t&&(typeof t.addEventListener=="function"&&t.addEventListener("wheel",this.onWheel,!1),typeof t.addEventListener=="function"&&t.addEventListener("touchstart",this.onTouchStart,!1),typeof t.addEventListener=="function"&&t.addEventListener("touchmove",this.onTouchMove,!1))}},{key:"stopListening",value:function(t){t&&(typeof t.removeEventListener=="function"&&t.removeEventListener("wheel",this.onWheel,!1),typeof t.removeEventListener=="function"&&t.removeEventListener("touchstart",this.onTouchStart,!1),typeof t.removeEventListener=="function"&&t.removeEventListener("touchmove",this.onTouchMove,!1))}},{key:"render",value:function(){return Y.createElement(Ea,{innerRef:this.getScrollTarget},this.props.children)}}]),i}(k.Component);function sc(n){var e=n.isEnabled,i=e===void 0?!0:e,a=He(n,["isEnabled"]);return i?Y.createElement(oc,a):a.children}var lc=function(e){var i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},a=i.isSearchable,t=i.isMulti,r=i.label,l=i.isDisabled,c=i.tabSelectsValue;switch(e){case"menu":return"Use Up and Down to choose options".concat(l?"":", press Enter to select the currently focused option",", press Escape to exit the menu").concat(c?", press Tab to select the option and exit the menu":"",".");case"input":return"".concat(r||"Select"," is focused ").concat(a?",type to refine list":"",", press Down to open the menu, ").concat(t?" press left to focus selected values":"");case"value":return"Use left and right to toggle between focused values, press Backspace to remove the currently focused value"}},uc=function(e,i){var a=i.value,t=i.isDisabled;if(a)switch(e){case"deselect-option":case"pop-value":case"remove-value":return"option ".concat(a,", deselected.");case"select-option":return t?"option ".concat(a," is disabled. Select another option."):"option ".concat(a,", selected.")}},cc=function(e){var i=e.focusedValue,a=e.getOptionLabel,t=e.selectValue;return"value ".concat(a(i)," focused, ").concat(t.indexOf(i)+1," of ").concat(t.length,".")},dc=function(e){var i=e.focusedOption,a=e.getOptionLabel,t=e.options;return"option ".concat(a(i)," focused").concat(i.isDisabled?" disabled":"",", ").concat(t.indexOf(i)+1," of ").concat(t.length,".")},pc=function(e){var i=e.inputValue,a=e.screenReaderMessage;return"".concat(a).concat(i?" for search term "+i:"",".")},hc=function(e){return e.label},fc=function(e){return e.label},mc=function(e){return e.value},Oa=function(e){return!!e.isDisabled},gc={clearIndicator:pu,container:iu,control:bu,dropdownIndicator:cu,group:Su,groupHeading:xu,indicatorsContainer:su,indicatorSeparator:fu,input:Iu,loadingIndicator:vu,loadingMessage:Zl,menu:Kl,menuList:Yl,menuPortal:Ql,multiValue:ju,multiValueLabel:Nu,multiValueRemove:Du,noOptionsMessage:Jl,option:Ru,placeholder:Uu,singleValue:Vu,valueContainer:ru},vc={primary:"#2684FF",primary75:"#4C9AFF",primary50:"#B2D4FF",primary25:"#DEEBFF",danger:"#DE350B",dangerLight:"#FFBDAD",neutral0:"hsl(0, 0%, 100%)",neutral5:"hsl(0, 0%, 95%)",neutral10:"hsl(0, 0%, 90%)",neutral20:"hsl(0, 0%, 80%)",neutral30:"hsl(0, 0%, 70%)",neutral40:"hsl(0, 0%, 60%)",neutral50:"hsl(0, 0%, 50%)",neutral60:"hsl(0, 0%, 40%)",neutral70:"hsl(0, 0%, 30%)",neutral80:"hsl(0, 0%, 20%)",neutral90:"hsl(0, 0%, 10%)"},bc=4,Ta=4,yc=38,wc=Ta*2,Sc={baseUnit:Ta,controlHeight:yc,menuGutter:wc},$t={borderRadius:bc,colors:vc,spacing:Sc};function Ii(n,e){var i=Object.keys(n);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(n);e&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(n,t).enumerable})),i.push.apply(i,a)}return i}function Ze(n){for(var e=1;e<arguments.length;e++){var i=arguments[e]!=null?arguments[e]:{};
13e%2?Ii(Object(i),!0).forEach(function(a){ve(n,a,i[a])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(i)):Ii(Object(i)).forEach(function(a){Object.defineProperty(n,a,Object.getOwnPropertyDescriptor(i,a))})}return n}function kc(n){var e=xc();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function xc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Cc={backspaceRemovesValue:!0,blurInputOnSelect:oi(),captureMenuScroll:!oi(),closeMenuOnSelect:!0,closeMenuOnScroll:!1,components:{},controlShouldRenderValue:!0,escapeClearsValue:!1,filterOption:Gu(),formatGroupLabel:hc,getOptionLabel:fc,getOptionValue:mc,isDisabled:!1,isLoading:!1,isMulti:!1,isRtl:!1,isSearchable:!0,isOptionDisabled:Oa,loadingMessage:function(){return"Loading..."},maxMenuHeight:300,minMenuHeight:140,menuIsOpen:!1,menuPlacement:"bottom",menuPosition:"absolute",menuShouldBlockScroll:!1,menuShouldScrollIntoView:!Bl(),noOptionsMessage:function(){return"No options"},openMenuOnFocus:!1,openMenuOnClick:!0,options:[],pageSize:5,placeholder:"Select...",screenReaderStatus:function(e){var i=e.count;return"".concat(i," result").concat(i!==1?"s":""," available")},styles:{},tabIndex:"0",tabSelectsValue:!0},Ec=1,ja=function(n){Re(i,n);var e=kc(i);function i(a){var t;Me(this,i),t=e.call(this,a),t.state={ariaLiveSelection:"",ariaLiveContext:"",focusedOption:null,focusedValue:null,inputIsHidden:!1,isFocused:!1,menuOptions:{render:[],focusable:[]},selectValue:[]},t.blockOptionHover=!1,t.isComposing=!1,t.clearFocusValueOnUpdate=!1,t.commonProps=void 0,t.components=void 0,t.hasGroups=!1,t.initialTouchX=0,t.initialTouchY=0,t.inputIsHiddenAfterUpdate=void 0,t.instancePrefix="",t.openAfterFocus=!1,t.scrollToFocusedOptionOnUpdate=!1,t.userIsDragging=void 0,t.controlRef=null,t.getControlRef=function(o){t.controlRef=o},t.focusedOptionRef=null,t.getFocusedOptionRef=function(o){t.focusedOptionRef=o},t.menuListRef=null,t.getMenuListRef=function(o){t.menuListRef=o},t.inputRef=null,t.getInputRef=function(o){t.inputRef=o},t.cacheComponents=function(o){t.components=Hu({components:o})},t.focus=t.focusInput,t.blur=t.blurInput,t.onChange=function(o,u){var d=t.props,p=d.onChange,h=d.name;p(o,Ze(Ze({},u),{},{name:h}))},t.setValue=function(o){var u=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"set-value",d=arguments.length>2?arguments[2]:void 0,p=t.props,h=p.closeMenuOnSelect,f=p.isMulti;t.onInputChange("",{action:"set-value"}),h&&(t.inputIsHiddenAfterUpdate=!f,t.onMenuClose()),t.clearFocusValueOnUpdate=!0,t.onChange(o,{action:u,option:d})},t.selectOption=function(o){var u=t.props,d=u.blurInputOnSelect,p=u.isMulti,h=t.state.selectValue;if(p)if(t.isOptionSelected(o,h)){var f=t.getOptionValue(o);t.setValue(h.filter(function(y){return t.getOptionValue(y)!==f}),"deselect-option",o),t.announceAriaLiveSelection({event:"deselect-option",context:{value:t.getOptionLabel(o)}})}else t.isOptionDisabled(o,h)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(o),isDisabled:!0}}):(t.setValue([].concat(Gr(h),[o]),"select-option",o),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(o)}}));else t.isOptionDisabled(o,h)?t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(o),isDisabled:!0}}):(t.setValue(o,"select-option"),t.announceAriaLiveSelection({event:"select-option",context:{value:t.getOptionLabel(o)}}));d&&t.blurInput()},t.removeValue=function(o){var u=t.state.selectValue,d=t.getOptionValue(o),p=u.filter(function(h){return t.getOptionValue(h)!==d});t.onChange(p.length?p:null,{action:"remove-value",removedValue:o}),t.announceAriaLiveSelection({event:"remove-value",context:{value:o?t.getOptionLabel(o):""}}),t.focusInput()},t.clearValue=function(){t.onChange(null,{action:"clear"})},t.popValue=function(){var o=t.state.selectValue,u=o[o.length-1],d=o.slice(0,o.length-1);t.announceAriaLiveSelection({event:"pop-value",context:{value:u?t.getOptionLabel(u):""}}),t.onChange(d.length?d:null,{action:"pop-value",removedValue:u})},t.getValue=function(){return t.state.selectValue},t.cx=function(){for(var o=arguments.length,u=new Array(o),d=0;d<o;d++)u[d]=arguments[d];return Ul.apply(void 0,[t.props.classNamePrefix].concat(u))},t.getOptionLabel=function(o){return t.props.getOptionLabel(o)},t.getOptionValue=function(o){return t.props.getOptionValue(o)},t.getStyles=function(o,u){var d=gc[o](u);d.boxSizing="border-box";var p=t.props.styles[o];return p?p(d,u):d},t.getElementId=function(o){return"".concat(t.instancePrefix,"-").concat(o)},t.getActiveDescendentId=function(){var o=t.props.menuIsOpen,u=t.state,d=u.menuOptions,p=u.focusedOption;if(!(!p||!o)){var h=d.focusable.indexOf(p),f=d.render[h];return f&&f.key}},t.announceAriaLiveSelection=function(o){var u=o.event,d=o.context;t.setState({ariaLiveSelection:uc(u,d)})},t.announceAriaLiveContext=function(o){var u=o.event,d=o.context;t.setState({ariaLiveContext:lc(u,Ze(Ze({},d),{},{label:t.props["aria-label"]}))})},t.onMenuMouseDown=function(o){o.button===0&&(o.stopPropagation(),o.preventDefault(),t.focusInput())},t.onMenuMouseMove=function(o){t.blockOptionHover=!1},t.onControlMouseDown=function(o){var u=t.props.openMenuOnClick;t.state.isFocused?t.props.menuIsOpen?o.target.tagName!=="INPUT"&&o.target.tagName!=="TEXTAREA"&&t.onMenuClose():u&&t.openMenu("first"):(u&&(t.openAfterFocus=!0),t.focusInput()),o.target.tagName!=="INPUT"&&o.target.tagName!=="TEXTAREA"&&o.preventDefault()}
vendor: 4,268 bytes, line 13
13,t.onDropdownIndicatorMouseDown=function(o){if(!(o&&o.type==="mousedown"&&o.button!==0)&&!t.props.isDisabled){var u=t.props,d=u.isMulti,p=u.menuIsOpen;t.focusInput(),p?(t.inputIsHiddenAfterUpdate=!d,t.onMenuClose()):t.openMenu("first"),o.preventDefault(),o.stopPropagation()}},t.onClearIndicatorMouseDown=function(o){o&&o.type==="mousedown"&&o.button!==0||(t.clearValue(),o.stopPropagation(),t.openAfterFocus=!1,o.type==="touchend"?t.focusInput():setTimeout(function(){return t.focusInput()}))},t.onScroll=function(o){typeof t.props.closeMenuOnScroll=="boolean"?o.target instanceof HTMLElement&&vn(o.target)&&t.props.onMenuClose():typeof t.props.closeMenuOnScroll=="function"&&t.props.closeMenuOnScroll(o)&&t.props.onMenuClose()},t.onCompositionStart=function(){t.isComposing=!0},t.onCompositionEnd=function(){t.isComposing=!1},t.onTouchStart=function(o){var u=o.touches,d=u&&u.item(0);d&&(t.initialTouchX=d.clientX,t.initialTouchY=d.clientY,t.userIsDragging=!1)},t.onTouchMove=function(o){var u=o.touches,d=u&&u.item(0);if(d){var p=Math.abs(d.clientX-t.initialTouchX),h=Math.abs(d.clientY-t.initialTouchY),f=5;t.userIsDragging=p>f||h>f}},t.onTouchEnd=function(o){t.userIsDragging||(t.controlRef&&!t.controlRef.contains(o.target)&&t.menuListRef&&!t.menuListRef.contains(o.target)&&t.blurInput(),t.initialTouchX=0,t.initialTouchY=0)},t.onControlTouchEnd=function(o){t.userIsDragging||t.onControlMouseDown(o)},t.onClearIndicatorTouchEnd=function(o){t.userIsDragging||t.onClearIndicatorMouseDown(o)},t.onDropdownIndicatorTouchEnd=function(o){t.userIsDragging||t.onDropdownIndicatorMouseDown(o)},t.handleInputChange=function(o){var u=o.currentTarget.value;t.inputIsHiddenAfterUpdate=!1,t.onInputChange(u,{action:"input-change"}),t.props.menuIsOpen||t.onMenuOpen()},t.onInputFocus=function(o){var u=t.props,d=u.isSearchable,p=u.isMulti;t.props.onFocus&&t.props.onFocus(o),t.inputIsHiddenAfterUpdate=!1,t.announceAriaLiveContext({event:"input",context:{isSearchable:d,isMulti:p}}),t.setState({isFocused:!0}),(t.openAfterFocus||t.props.openMenuOnFocus)&&t.openMenu("first"),t.openAfterFocus=!1},t.onInputBlur=function(o){if(t.menuListRef&&t.menuListRef.contains(document.activeElement)){t.inputRef.focus();return}t.props.onBlur&&t.props.onBlur(o),t.onInputChange("",{action:"input-blur"}),t.onMenuClose(),t.setState({focusedValue:null,isFocused:!1})},t.onOptionHover=function(o){t.blockOptionHover||t.state.focusedOption===o||t.setState({focusedOption:o})},t.shouldHideSelectedOptions=function(){var o=t.props,u=o.hideSelectedOptions,d=o.isMulti;return u===void 0?d:u},t.onKeyDown=function(o){var u=t.props,d=u.isMulti,p=u.backspaceRemovesValue,h=u.escapeClearsValue,f=u.inputValue,y=u.isClearable,v=u.isDisabled,C=u.menuIsOpen,T=u.onKeyDown,O=u.tabSelectsValue,b=u.openMenuOnFocus,$=t.state,g=$.focusedOption,Z=$.focusedValue,M=$.selectValue;if(!v&&!(typeof T=="function"&&(T(o),o.defaultPrevented))){switch(t.blockOptionHover=!0,o.key){case"ArrowLeft":if(!d||f)return;t.focusValue("previous");break;case"ArrowRight":if(!d||f)return;t.focusValue("next");break;case"Delete":case"Backspace":if(f)return;if(Z)t.removeValue(Z);else{if(!p)return;d?t.popValue():y&&t.clearValue()}break;case"Tab":if(t.isComposing||o.shiftKey||!C||!O||!g||b&&t.isOptionSelected(g,M))return;t.selectOption(g);break;case"Enter":if(o.keyCode===229)break;if(C){if(!g||t.isComposing)return;t.selectOption(g);break}return;case"Escape":C?(t.inputIsHiddenAfterUpdate=!1,t.onInputChange("",{action:"menu-close"}),t.onMenuClose()):y&&h&&t.clearValue();break;case" ":if(f)return;if(!C){t.openMenu("first");break}if(!g)return;t.selectOption(g);break;case"ArrowUp":C?t.focusOption("up"):t.openMenu("last");break;case"ArrowDown":C?t.focusOption("down"):t.openMenu("first");break;case"PageUp":if(!C)return;t.focusOption("pageup");break;case"PageDown":if(!C)return;t.focusOption("pagedown");break;case"Home":if(!C)return;t.focusOption("first");break;case"End":if(!C)return;t.focusOption("last");break;default:return}o.preventDefault()}},t.buildMenuOptions=function(o,u){var d=o.inputValue,p=d===void 0?"":d,h=o.options,f=function(v,C){var T=t.isOptionDisabled(v,u),O=t.isOptionSelected(v,u),b=t.getOptionLabel(v),$=t.getOptionValue(v);if(!(t.shouldHideSelectedOptions()&&O||!t.filterOption({label:b,value:$,data:v}
13,p))){var g=T?void 0:function(){return t.onOptionHover(v)},Z=T?void 0:function(){return t.selectOption(v)},M="".concat(t.getElementId("option"),"-").concat(C);return{innerProps:{id:M,onClick:Z,onMouseMove:g,onMouseOver:g,tabIndex:-1},data:v,isDisabled:T,isSelected:O,key:M,label:b,type:"option",value:$}}};return h.reduce(function(y,v,C){if(v.options){t.hasGroups||(t.hasGroups=!0);var T=v.options,O=T.map(function(g,Z){var M=f(g,"".concat(C,"-").concat(Z));return M&&y.focusable.push(g),M}).filter(Boolean);if(O.length){var b="".concat(t.getElementId("group"),"-").concat(C);y.render.push({type:"group",key:b,data:v,options:O})}}else{var $=f(v,"".concat(C));$&&(y.render.push($),y.focusable.push(v))}return y},{render:[],focusable:[]})};var r=a.value;t.cacheComponents=Xn(t.cacheComponents,nu).bind(En(t)),t.cacheComponents(a.components),t.instancePrefix="react-select-"+(t.props.instanceId||++Ec);var l=ri(r);t.buildMenuOptions=Xn(t.buildMenuOptions,function(o,u){var d=o,p=qn(d,2),h=p[0],f=p[1],y=u,v=qn(y,2),C=v[0],T=v[1];return f===T&&h.inputValue===C.inputValue&&h.options===C.options}).bind(En(t));var c=a.menuIsOpen?t.buildMenuOptions(a,l):{render:[],focusable:[]};return t.state.menuOptions=c,t.state.selectValue=l,t}return Ue(i,[{key:"componentDidMount",value:function(){this.startListeningComposition(),this.startListeningToTouch(),this.props.closeMenuOnScroll&&document&&document.addEventListener&&document.addEventListener("scroll",this.onScroll,!0),this.props.autoFocus&&this.focusInput()}},{key:"UNSAFE_componentWillReceiveProps",value:function(t){var r=this.props,l=r.options,c=r.value,o=r.menuIsOpen,u=r.inputValue;if(this.cacheComponents(t.components),t.value!==c||t.options!==l||t.menuIsOpen!==o||t.inputValue!==u){var d=ri(t.value),p=t.menuIsOpen?this.buildMenuOptions(t,d):{render:[],focusable:[]},h=this.getNextFocusedValue(d),f=this.getNextFocusedOption(p.focusable);this.setState({menuOptions:p,selectValue:d,focusedOption:f,focusedValue:h})}this.inputIsHiddenAfterUpdate!=null&&(this.setState({inputIsHidden:this.inputIsHiddenAfterUpdate}),delete this.inputIsHiddenAfterUpdate)}},{key:"componentDidUpdate",value:function(t){var r=this.props,l=r.isDisabled,c=r.menuIsOpen,o=this.state.isFocused;(o&&!l&&t.isDisabled||o&&c&&!t.menuIsOpen)&&this.focusInput(),o&&l&&!t.isDisabled&&this.setState({isFocused:!1},this.onMenuClose),this.menuListRef&&this.focusedOptionRef&&this.scrollToFocusedOptionOnUpdate&&($l(this.menuListRef,this.focusedOptionRef),this.scrollToFocusedOptionOnUpdate=!1)}},{key:"componentWillUnmount",value:function(){this.stopListeningComposition(),this.stopListeningToTouch(),document.removeEventListener("scroll",this.onScroll,!0)}},{key:"onMenuOpen",value:function(){this.props.onMenuOpen()}},{key:"onMenuClose",value:function(){var t=this.props,r=t.isSearchable,l=t.isMulti;this.announceAriaLiveContext({event:"input",context:{isSearchable:r,isMulti:l}}),this.onInputChange("",{action:"menu-close"}),this.props.onMenuClose()}},{key:"onInputChange",value:function(t,r){this.props.onInputChange(t,r)}},{key:"focusInput",value:function(){this.inputRef&&this.inputRef.focus()}},{key:"blurInput",value:function(){this.inputRef&&this.inputRef.blur()}},{key:"openMenu",value:function(t){var r=this,l=this.state,c=l.selectValue,o=l.isFocused,u=this.buildMenuOptions(this.props,c),d=this.props,p=d.isMulti,h=d.tabSelectsValue,f=t==="first"?0:u.focusable.length-1;if(!p){var y=u.focusable.indexOf(c[0]);y>-1&&(f=y)}this.scrollToFocusedOptionOnUpdate=!(o&&this.menuListRef),this.inputIsHiddenAfterUpdate=!1,this.setState({menuOptions:u,focusedValue:null,focusedOption:u.focusable[f]},function(){r.onMenuOpen(),r.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:h}})})}},{key:"focusValue",value:function(t){var r=this.props,l=r.isMulti,c=r.isSearchable,o=this.state,u=o.selectValue,d=o.focusedValue;if(l){this.setState({focusedOption:null});var p=u.indexOf(d);d||(p=-1,this.announceAriaLiveContext({event:"value"}));var h=u.length-1,f=-1;if(u.length){switch(t){case"previous":p===0?f=0:p===-1?f=h:f=p-1;break;case"next":p>-1&&p<h&&(f=p+1);break}f===-1&&this.announceAriaLiveContext({event:"input",context:{isSearchable:c,isMulti:l}}),this.setState({inputIsHidden:f!==-1,focusedValue:u[f]})}}}},{key:"focusOption",value:function(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:"first",r=this.props,l=r.pageSize,c=r.tabSelectsValue,o=this.state,u=o.focusedOption,d=o.menuOptions,p=d.focusable;if(p.length){var h=0,f=p.indexOf(u);u||(f=-1,this.announceAriaLiveContext({event:"menu",context:{tabSelectsValue:c}})),t==="up"?h=f>0?f-1:p.length-1:t==="down"?h=(f+1)%p.length:t==="pageup"?(h=f-l,h<0&&(h=0)):t==="pagedown"?(h=f+l,h>p.length-1&&(h=p.length-1)):t==="last"&&(h=p.length-1),this.scrollToFocusedOptionOnUpdate=!0,this.setState({focusedOption:p[h],focusedValue:null}),this.announceAriaLiveContext({event:"menu",context:{isDisabled:Oa(p[h]),tabSelectsValue:c}})}}},{key:"getTheme",value:function(){return this.props.theme?typeof this.props.theme=="function"?this.props.theme($t):Ze(Ze({},$t),this.props.theme):$t}}
13,{key:"getCommonProps",value:function(){var t=this.clearValue,r=this.cx,l=this.getStyles,c=this.getValue,o=this.setValue,u=this.selectOption,d=this.props,p=d.isMulti,h=d.isRtl,f=d.options,y=this.hasValue();return{cx:r,clearValue:t,getStyles:l,getValue:c,hasValue:y,isMulti:p,isRtl:h,options:f,selectOption:u,setValue:o,selectProps:d,theme:this.getTheme()}}},{key:"getNextFocusedValue",value:function(t){if(this.clearFocusValueOnUpdate)return this.clearFocusValueOnUpdate=!1,null;var r=this.state,l=r.focusedValue,c=r.selectValue,o=c.indexOf(l);if(o>-1){var u=t.indexOf(l);if(u>-1)return l;if(o<t.length)return t[o]}return null}},{key:"getNextFocusedOption",value:function(t){var r=this.state.focusedOption;return r&&t.indexOf(r)>-1?r:t[0]}},{key:"hasValue",value:function(){var t=this.state.selectValue;return t.length>0}},{key:"hasOptions",value:function(){return!!this.state.menuOptions.render.length}},{key:"countOptions",value:function(){return this.state.menuOptions.focusable.length}},{key:"isClearable",value:function(){var t=this.props,r=t.isClearable,l=t.isMulti;return r===void 0?l:r}},{key:"isOptionDisabled",value:function(t,r){return typeof this.props.isOptionDisabled=="function"?this.props.isOptionDisabled(t,r):!1}},{key:"isOptionSelected",value:function(t,r){var l=this;if(r.indexOf(t)>-1)return!0;if(typeof this.props.isOptionSelected=="function")return this.props.isOptionSelected(t,r);var c=this.getOptionValue(t);return r.some(function(o){return l.getOptionValue(o)===c})}},{key:"filterOption",value:function(t,r){return this.props.filterOption?this.props.filterOption(t,r):!0}},{key:"formatOptionLabel",value:function(t,r){if(typeof this.props.formatOptionLabel=="function"){var l=this.props.inputValue,c=this.state.selectValue;return this.props.formatOptionLabel(t,{context:r,inputValue:l,selectValue:c})}else return this.getOptionLabel(t)}},{key:"formatGroupLabel",value:function(t){return this.props.formatGroupLabel(t)}},{key:"startListeningComposition",value:function(){document&&document.addEventListener&&(document.addEventListener("compositionstart",this.onCompositionStart,!1),document.addEventListener("compositionend",this.onCompositionEnd,!1))}},{key:"stopListeningComposition",value:function(){document&&document.removeEventListener&&(document.removeEventListener("compositionstart",this.onCompositionStart),document.removeEventListener("compositionend",this.onCompositionEnd))}},{key:"startListeningToTouch",value:function(){document&&document.addEventListener&&(document.addEventListener("touchstart",this.onTouchStart,!1),document.addEventListener("touchmove",this.onTouchMove,!1),document.addEventListener("touchend",this.onTouchEnd,!1))}},{key:"stopListeningToTouch",value:function(){document&&document.removeEventListener&&(document.removeEventListener("touchstart",this.onTouchStart),document.removeEventListener("touchmove",this.onTouchMove),document.removeEventListener("touchend",this.onTouchEnd))}},{key:"constructAriaLiveMessage",value:function(){var t=this.state,r=t.ariaLiveContext,l=t.selectValue,c=t.focusedValue,o=t.focusedOption,u=this.props,d=u.options,p=u.menuIsOpen,h=u.inputValue,f=u.screenReaderStatus,y=c?cc({focusedValue:c,getOptionLabel:this.getOptionLabel,selectValue:l}):"",v=o&&p?dc({focusedOption:o,getOptionLabel:this.getOptionLabel,options:d}):"",C=pc({inputValue:h,screenReaderMessage:f({count:this.countOptions()})});return"".concat(y," ").concat(v," ").concat(C," ").concat(r)}},{key:"renderInput",value:function(){var t=this.props,r=t.isDisabled,l=t.isSearchable,c=t.inputId,o=t.inputValue,u=t.tabIndex,d=t.form,p=this.components.Input,h=this.state.inputIsHidden,f=c||this.getElementId("input"),y={"aria-autocomplete":"list","aria-label":this.props["aria-label"],"aria-labelledby":this.props["aria-labelledby"]};if(!l)return Y.createElement(Yu,B({id:f,innerRef:this.getInputRef,onBlur:this.onInputBlur,onChange:ua,onFocus:this.onInputFocus,readOnly:!0,disabled:r,tabIndex:u,form:d,value:""},y));var v=this.commonProps,C=v.cx,T=v.theme,O=v.selectProps;return Y.createElement(p,B({autoCapitalize:"none",autoComplete:"off",autoCorrect:"off",cx:C,getStyles:this.getStyles,id:f,innerRef:this.getInputRef,isDisabled:r,isHidden:h,onBlur:this.onInputBlur,onChange:this.handleInputChange,onFocus:this.onInputFocus,selectProps:O,spell
13Check:"false",tabIndex:u,form:d,theme:T,type:"text",value:o},y))}},{key:"renderPlaceholderOrValue",value:function(){var t=this,r=this.components,l=r.MultiValue,c=r.MultiValueContainer,o=r.MultiValueLabel,u=r.MultiValueRemove,d=r.SingleValue,p=r.Placeholder,h=this.commonProps,f=this.props,y=f.controlShouldRenderValue,v=f.isDisabled,C=f.isMulti,T=f.inputValue,O=f.placeholder,b=this.state,$=b.selectValue,g=b.focusedValue,Z=b.isFocused;if(!this.hasValue()||!y)return T?null:Y.createElement(p,B({},h,{key:"placeholder",isDisabled:v,isFocused:Z}),O);if(C){var M=$.map(function(R,z){var x=R===g;return Y.createElement(l,B({},h,{components:{Container:c,Label:o,Remove:u},isFocused:x,isDisabled:v,key:"".concat(t.getOptionValue(R)).concat(z),index:z,removeProps:{onClick:function(){return t.removeValue(R)},onTouchEnd:function(){return t.removeValue(R)},onMouseDown:function(A){A.preventDefault(),A.stopPropagation()}},data:R}),t.formatOptionLabel(R,"value"))});return M}if(T)return null;var K=$[0];return Y.createElement(d,B({},h,{data:K,isDisabled:v}),this.formatOptionLabel(K,"value"))}},{key:"renderClearIndicator",value:function(){var t=this.components.ClearIndicator,r=this.commonProps,l=this.props,c=l.isDisabled,o=l.isLoading,u=this.state.isFocused;if(!this.isClearable()||!t||c||!this.hasValue()||o)return null;var d={onMouseDown:this.onClearIndicatorMouseDown,onTouchEnd:this.onClearIndicatorTouchEnd,"aria-hidden":"true"};return Y.createElement(t,B({},r,{innerProps:d,isFocused:u}))}},{key:"renderLoadingIndicator",value:function(){var t=this.components.LoadingIndicator,r=this.commonProps,l=this.props,c=l.isDisabled,o=l.isLoading,u=this.state.isFocused;if(!t||!o)return null;var d={"aria-hidden":"true"};return Y.createElement(t,B({},r,{innerProps:d,isDisabled:c,isFocused:u}))}},{key:"renderIndicatorSeparator",value:function(){var t=this.components,r=t.DropdownIndicator,l=t.IndicatorSeparator;if(!r||!l)return null;var c=this.commonProps,o=this.props.isDisabled,u=this.state.isFocused;return Y.createElement(l,B({},c,{isDisabled:o,isFocused:u}))}},{key:"renderDropdownIndicator",value:function(){var t=this.components.DropdownIndicator;if(!t)return null;var r=this.commonProps,l=this.props.isDisabled,c=this.state.isFocused,o={onMouseDown:this.onDropdownIndicatorMouseDown,onTouchEnd:this.onDropdownIndicatorTouchEnd,"aria-hidden":"true"};return Y.createElement(t,B({},r,{innerProps:o,isDisabled:l,isFocused:c}))}},{key:"renderMenu",value:function(){var t=this,r=this.components,l=r.Group,c=r.GroupHeading,o=r.Menu,u=r.MenuList,d=r.MenuPortal,p=r.LoadingMessage,h=r.NoOptionsMessage,f=r.Option,y=this.commonProps,v=this.state,C=v.focusedOption,T=v.menuOptions,O=this.props,b=O.captureMenuScroll,$=O.inputValue,g=O.isLoading,Z=O.loadingMessage,M=O.minMenuHeight,K=O.maxMenuHeight,R=O.menuIsOpen,z=O.menuPlacement,x=O.menuPosition,_=O.menuPortalTarget,A=O.menuShouldBlockScroll,P=O.menuShouldScrollIntoView,I=O.noOptionsMessage,X=O.onMenuScrollToTop,Q=O.onMenuScrollToBottom;if(!R)return null;var J=function(V){var m=C===V.data;return V.innerRef=m?t.getFocusedOptionRef:void 0,Y.createElement(f,B({},y,V,{isFocused:m}),t.formatOptionLabel(V.data,"menu"))},se;if(this.hasOptions())se=T.render.map(function(E){if(E.type==="group"){E.type;var V=He(E,["type"]),m="".concat(E.key,"-heading");return Y.createElement(l,B({},y,V,{Heading:c,headingProps:{id:m,data:E.data},label:t.formatGroupLabel(E.data)}),E.options.map(function(U){return J(U)}))}else if(E.type==="option")return J(E)});else if(g){var pe=Z({inputValue:$});if(pe===null)return null;se=Y.createElement(p,y,pe)}else{var fe=I({inputValue:$});if(fe===null)return null;se=Y.createElement(h,y,fe)}var j={minMenuHeight:M,maxMenuHeight:K,menuPlacement:z,menuPosition:x,menuShouldScrollIntoView:P},N=Y.createElement(ha,B({},y,j),function(E){var V=E.ref,m=E.placerProps,U=m.placement,w=m.maxHeight;return Y.createElement(o,B({},y,j,{innerRef:V,innerProps:{onMouseDown:t.onMenuMouseDown,onMouseMove:t.onMenuMouseMove},isLoading:g,placement:U}),Y.createElement(sc,{isEnabled:b,onTopArrive:X,onBottomArrive:Q},Y.createElement(ic,{isEnabled:A},Y.createElement(u,B({},y,{innerRef:t.getMenuListRef,isLoading:g,maxHeight:w}),se))))});return _||x==="fixed"?Y.createElement(d,B({},y,{appendTo:_,controlElement:this.controlRef,menuPlacement:z,menuPosition:x}),N):N}},{key:"renderFormField",value:function(){var t=this,r=this.props,l=r.delimiter,c=r.isDisabled,o=r.isMulti,u=r.name,d=this.state.selectValue;if(!(!u||c))if(o)if(l){var p=d.map(function(y){return t.getOptionValue(y)}).join(l);return Y.createElement("input",{name:u,type:"hidden",value:p})}else{var h=d.length>0?d.map(function(y,v){return Y.createElement("input",{key:"i-".concat(v),name:u,type:"hidden",value:t.getOptionValue(y)})}):Y.createElement("input",{name:u,type:"hidden"});return Y.createElement("div",null,h)}
13else{var f=d[0]?this.getOptionValue(d[0]):"";return Y.createElement("input",{name:u,type:"hidden",value:f})}}},{key:"renderLiveRegion",value:function(){return this.state.isFocused?Y.createElement(qu,{"aria-live":"polite"},Y.createElement("span",{id:"aria-selection-event"},"Â ",this.state.ariaLiveSelection),Y.createElement("span",{id:"aria-context"},"Â ",this.constructAriaLiveMessage())):null}},{key:"render",value:function(){var t=this.components,r=t.Control,l=t.IndicatorsContainer,c=t.SelectContainer,o=t.ValueContainer,u=this.props,d=u.className,p=u.id,h=u.isDisabled,f=u.menuIsOpen,y=this.state.isFocused,v=this.commonProps=this.getCommonProps();return Y.createElement(c,B({},v,{className:d,innerProps:{id:p,onKeyDown:this.onKeyDown},isDisabled:h,isFocused:y}),this.renderLiveRegion(),Y.createElement(r,B({},v,{innerRef:this.getControlRef,innerProps:{onMouseDown:this.onControlMouseDown,onTouchEnd:this.onControlTouchEnd},isDisabled:h,isFocused:y,menuIsOpen:f}),Y.createElement(o,B({},v,{isDisabled:h}),this.renderPlaceholderOrValue(),this.renderInput()),Y.createElement(l,B({},v,{isDisabled:h}),this.renderClearIndicator(),this.renderLoadingIndicator(),this.renderIndicatorSeparator(),this.renderDropdownIndicator())),this.renderMenu(),this.renderFormField())}}]),i}(k.Component);ja.defaultProps=Cc;function Ic(n){var e=Oc();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function Oc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var Tc={defaultInputValue:"",defaultMenuIsOpen:!1,defaultValue:null},jc=function(e){var i,a;return a=i=function(t){Re(l,t);var r=Ic(l);function l(){var c;Me(this,l);for(var o=arguments.length,u=new Array(o),d=0;d<o;d++)u[d]=arguments[d];return c=r.call.apply(r,[this].concat(u)),c.select=void 0,c.state={inputValue:c.props.inputValue!==void 0?c.props.inputValue:c.props.defaultInputValue,menuIsOpen:c.props.menuIsOpen!==void 0?c.props.menuIsOpen:c.props.defaultMenuIsOpen,value:c.props.value!==void 0?c.props.value:c.props.defaultValue},c.onChange=function(p,h){c.callProp("onChange",p,h),c.setState({value:p})},c.onInputChange=function(p,h){var f=c.callProp("onInputChange",p,h);c.setState({inputValue:f!==void 0?f:p})},c.onMenuOpen=function(){c.callProp("onMenuOpen"),c.setState({menuIsOpen:!0})},c.onMenuClose=function(){c.callProp("onMenuClose"),c.setState({menuIsOpen:!1})},c}return Ue(l,[{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"getProp",value:function(o){return this.props[o]!==void 0?this.props[o]:this.state[o]}},{key:"callProp",value:function(o){if(typeof this.props[o]=="function"){for(var u,d=arguments.length,p=new Array(d>1?d-1:0),h=1;h<d;h++)p[h-1]=arguments[h];return(u=this.props)[o].apply(u,p)}}},{key:"render",value:function(){var o=this,u=this.props;u.defaultInputValue,u.defaultMenuIsOpen,u.defaultValue;var d=He(u,["defaultInputValue","defaultMenuIsOpen","defaultValue"]);return Y.createElement(e,B({},d,{ref:function(h){o.select=h},inputValue:this.getProp("inputValue"),menuIsOpen:this.getProp("menuIsOpen"),onChange:this.onChange,onInputChange:this.onInputChange,onMenuClose:this.onMenuClose,onMenuOpen:this.onMenuOpen,value:this.getProp("value")}))}}]),l}(k.Component),i.defaultProps=Tc,a};function Nc(n){var e=Dc();return function(){var a=be(n),t;if(e){var r=be(this).constructor;t=Reflect.construct(a,arguments,r)}else t=a.apply(this,arguments);return Be(this,t)}}function Dc(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch{return!1}}var _c={cacheOptions:!1,defaultOptions:!1,filterOption:null,isLoading:!1},Pc=function(e){var i,a;return a=i=function(t){Re(l,t);var r=Nc(l);function l(c){var o;return Me(this,l),o=r.call(this),o.select=void 0,o.lastRequest=void 0,o.mounted=!1,o.optionsCache={},o.handleInputChange=function(u,d){var p=o.props,h=p.cacheOptions,f=p.onInputChange,y=Ll(u,d,f);
13if(!y){delete o.lastRequest,o.setState({inputValue:"",loadedInputValue:"",loadedOptions:[],isLoading:!1,passEmptyOptions:!1});return}if(h&&o.optionsCache[y])o.setState({inputValue:y,loadedInputValue:y,loadedOptions:o.optionsCache[y],isLoading:!1,passEmptyOptions:!1});else{var v=o.lastRequest={};o.setState({inputValue:y,isLoading:!0,passEmptyOptions:!o.state.loadedInputValue},function(){o.loadOptions(y,function(C){o.mounted&&(C&&(o.optionsCache[y]=C),v===o.lastRequest&&(delete o.lastRequest,o.setState({isLoading:!1,loadedInputValue:y,loadedOptions:C||[],passEmptyOptions:!1})))})})}return y},o.state={defaultOptions:Array.isArray(c.defaultOptions)?c.defaultOptions:void 0,inputValue:typeof c.inputValue<"u"?c.inputValue:"",isLoading:c.defaultOptions===!0,loadedOptions:[],passEmptyOptions:!1},o}return Ue(l,[{key:"componentDidMount",value:function(){var o=this;this.mounted=!0;var u=this.props.defaultOptions,d=this.state.inputValue;u===!0&&this.loadOptions(d,function(p){if(o.mounted){var h=!!o.lastRequest;o.setState({defaultOptions:p||[],isLoading:h})}})}},{key:"UNSAFE_componentWillReceiveProps",value:function(o){o.cacheOptions!==this.props.cacheOptions&&(this.optionsCache={}),o.defaultOptions!==this.props.defaultOptions&&this.setState({defaultOptions:Array.isArray(o.defaultOptions)?o.defaultOptions:void 0})}},{key:"componentWillUnmount",value:function(){this.mounted=!1}},{key:"focus",value:function(){this.select.focus()}},{key:"blur",value:function(){this.select.blur()}},{key:"loadOptions",value:function(o,u){var d=this.props.loadOptions;if(!d)return u();var p=d(o,u);p&&typeof p.then=="function"&&p.then(u,function(){return u()})}},{key:"render",value:function(){var o=this,u=this.props;u.loadOptions;var d=u.isLoading,p=He(u,["loadOptions","isLoading"]),h=this.state,f=h.defaultOptions,y=h.inputValue,v=h.isLoading,C=h.loadedInputValue,T=h.loadedOptions,O=h.passEmptyOptions,b=O?[]:y&&C?T:f||[];return Y.createElement(e,B({},p,{ref:function(g){o.select=g},options:b,isLoading:v||d,onInputChange:this.handleInputChange}))}}]),l}(k.Component),i.defaultProps=_c,a},Ac=jc(ja),Rc=Pc(Ac),yn={},Mc=Et;Object.defineProperty(yn,"__esModule",{value:!0});var Na=yn.default=void 0,Uc=Mc(Ct()),Lc=s;Na=yn.default=(0,Uc.default)((0,Lc.jsx)("path",{d:"M6.99 11 3 15l3.99 4v-3H14v-2H6.99zM21 9l-3.99-4v3H10v2h7.01v3z"}),"SwapHoriz");const Vc=xe("img")(()=>({border:"1px solid #ddd",borderRadius:"4px",marginRight:"10px",width:"100%"})),Fc=xe(rt)(()=>({fontSize:"14px",fontWeight:"600",display:"-webkit-box",WebkitLineClamp:"1",WebkitBoxOrient:"vertical",overflow:"hidden","&:hover":{WebkitLineClamp:"4"}}));function Oi({videoTitle:n,img:e,alt:i,videoId:a,videoStatus:t,duration:r,uploadedOn:l}){return s.jsx(Ai,{style:{padding:"10px",height:"100%"},children:s.jsxs(G,{container:!0,spacing:2,children:[s.jsx(G,{item:!0,xs:3,style:{display:"flex",alignItems:"center"},children:s.jsx(Vc,{src:Ui(e,t),alt:i})}),s.jsxs(G,{item:!0,xs:9,children:[s.jsx(Fc,{children:n}),s.jsx(ke,{fw:"bold",children:"Id: "})," ",s.jsx(ke,{wordBreak:"break-all",children:a}),s.jsx("br",{}),s.jsx(ke,{fw:"bold",children:"Duration: "}),s.jsx(ke,{children:r}),s.jsx("br",{}),s.jsx(ke,{fw:"bold",children:"Uploaded On: "}),s.jsx(ke,{children:l})]})]})})}const $c=Ne(Na)(()=>({fontSize:"50px",alignSelf:"center"})),Hc=Ne("div")(()=>({".MuiPaper-elevation1":{boxShadow:"none"}}));class Bc extends k.Component{constructor(e){super(e),this.state={value:{},videos:[],swapSuccessful:!1},this.debouncedLoadOptions=Kr((i,a,t)=>this.loadOptions(i,a,t),500)}handleUpdateInput(e){this.setState({value:e})}handleButtonClick(e,i){return Ke({url:"/videos/swapVideoIds",method:"POST",data:JSON.stringify({firstVideoId:e,secondVideoId:i})}).then(()=>{this.setState({swapSuccessful:!0})}).catch(a=>{const{message:t}=a.data;this.props.showErrorMessage(t)})}componentDidMount(){this.loadOptions("")}filterOptions(e,i){return e.map(a=>({title:a.title,id:a.id,length:a.length,upload_time:a.upload_time,poster:a.poster,label:`${a.title} [${a.id}] (${jt(a.length)})`})).filter(a=>a.id!==i)}loadOptions(e,i,a){let{value:r}=this.state;Ke({url:"/videos",method:"GET",params:{q:e,page:1}}).then(l=>{const{rows:c}=l.data,o=c,u=o.findIndex(d=>d.id===r);if(u<0)r={};else{const d=o[u];r={title:d.name,id:d.value,length:d.length,upload_time:d.upload_time,poster:d.poster}}this.setState({videos:o,value:r}),i&&i(this.filterOptions(c,a))})}render(){const{value:e,swapSuccessful:i}=this.state,{video:a}=this.props;return s.jsxs(Hc,{children:[s.jsx("p",{className:"edit-video-header",children:"Allowing swapping video id of two videos such that embed code on your websites or your database need not be updated when new version of a video is released"}),!i&&s.jsx(Rc,{cacheOptions:!0,placeholder:"Enter video id/title and press enter to select the video",loadOptions:(t,r)=>this.debouncedLoadOptions(t,r,a.id),onChange:t=>this.handleUpdateInput(t),defaultOptions:!0}),e.id&&!i&&s.jsxs(Kt,{pt:"10px",position:"relative",bc:"#ffffff",children:[s.jsx(Kt,{flex:!0,margin:"9px 42px 33px 42px",justifyContent:"space-around",children:s.jsxs(G,{container:!0,children:[s.jsx(G,{item:!0,xs:12,md:5,children:s.jsx(Oi,{videoTitle:a.title,img:a.poster,alt:"video poster image",videoId:a.id,videoStatus:a.status,duration:jt(a.length),uploadedOn:zt(ne
13w Date(a.upload_time*1e3),!0)})}),s.jsx(G,{item:!0,xs:12,md:2,container:!0,justifyItems:"center",justifyContent:"center",children:s.jsx($c,{})}),s.jsx(G,{item:!0,xs:12,md:5,children:s.jsx(Oi,{videoTitle:e.title,img:e.poster,alt:"video poster image",videoId:e.id,duration:jt(e.length),videoStatus:a.status,uploadedOn:zt(new Date(e.upload_time*1e3),!0)})})]})}),s.jsx(Mi,{variant:"contained",type:"swapid",color:"primary",onClick:()=>this.handleButtonClick(a.id,e.id),children:"Swap video id"})]}),i&&s.jsx("div",{children:"Successfully Swapped! Please go back to the video list"})]})}}const zc=n=>ct({showErrorMessage:Ae},n),Wc=et(null,zc)(Bc);class Gc extends k.Component{constructor(e){super(e),this.handleSaveChange=this.handleSaveChange.bind(this),this.getUrlWhiteListObject=this.getUrlWhiteListObject.bind(this)}getUrlWhiteListObject(e,i,a){const t=e.split(` 14`).filter(r=>r.trim()!=="");return t.length>0?JSON.stringify({mode:a,values:t,override:i}):""}async handleSaveChange(e,i,a,t,r){const{showErrorMessage:l,editVideoDetails:c,saveVideoDetails:o}=this.props;let u="Please enter a valid JSON";const d=this.getUrlWhiteListObject(e,a,i);try{const p=r&&t!=""?JSON.parse(t):t;if(Array.isArray(p)){if(!p.map(f=>f.ipSet).flat().every(f=>f.match(In)))throw u="Invalid IP(s)",new Error("Invalid IP(s)")}else if(p.selectedCountriesAndIPs&&!p.selectedCountriesAndIPs.filter(f=>!qr[f]).every(f=>f.match(In)))throw u="Invalid IP(s)",new Error("Invalid IP(s)");if(r)await c("whitelisthref",d||""),await c("ipGeoRules",t),o();else{const{whiteListOrBlack:h,selectedCountriesAndIPs:f}=t,y=to(f,h);await c("whitelisthref",d||""),await c("ipGeoRules",y),o()}}catch{l(u)}}render(){const{videoDetails:{videoInfo:{ipGeoRules:e,whitelisthref:i}}}=this.props;return s.jsx(no,{note:Ee.VIDEO_EDIT.ACCESS_CONTROL_NOTE,saving:this.props.videoDetails.savingVideo,ipAndCountry:e,urlwhitelist:i||"",handleSaveChange:this.handleSaveChange,showErrorMessage:Ae})}}const Kc=n=>n.videosInfo,qc=n=>ct({editVideoDetails:mt,saveVideoDetails:gt,showErrorMessage:Ae},n),Yc=et(Kc,qc)(Gc),Xc=(n,e)=>{const i=Ke({url:`/videos/${n}/${e}`,method:"GET"});return[Ni(n),i]},Jc=(n,e,i)=>Ke({url:`/videos/${n}/${e}`,method:"PUT",data:i}),Ge={E0:"First chapter must start from 0 sec",E2:"Start time for each chapter must be unique!",E3:`All the Chapters must be atleast ${$i} sec long!`,E4:"Title can not be empty!",E5:"There should be at least 2 chapters or you can remove all the chapters!",E6:"Something went wrong!"};function Zc({isOtpFetching:n,videoParams:e,videoStatus:i,fetchingStatus:a}){const[t,r]=k.useState(!1),[l,c]=k.useState("false");return k.useEffect(()=>{a?(c("Fetching video status"),r(!0)):i==="ready"?n?(r(!0),c("Loading preview.")):(r(!1),c("")):(c("Your video is not ready yet. You can still set the chapters while your video is getting processed."),r(!1))},[n,a]),s.jsxs(G,{item:!0,xs:12,md:5,className:"chapter-preview vertical-border",children:[s.jsx(G,{item:!0,xs:12,children:s.jsx("h3",{children:"Preview"})}),s.jsx(It,{className:"header-divider",color:"#ececec"}),l?s.jsxs(G,{item:!0,xs:12,container:!0,justifyContent:"center",children:[t&&s.jsx(Pe,{}),s.jsx(G,{item:!0,xs:12,container:!0,justifyContent:"center",children:l})]}):s.jsx(io,{otp:e.otp,id:"preview-iframe",hideHeading:!0,playbackInfo:e.playbackInfo})]})}const Qc=xe("div")(()=>({maxWidth:"600px",margin:"40px 0",textAlign:"justify",".versions_info":{borderCollapse:"collapse",border:"1px solid black",th:{background:"gray",color:"white"},"td, th":{border:"1px solid black",padding:5}}}));function ed(){return s.jsxs(Qc,{children:[s.jsx("h3",{children:"Chapters instructions"}),s.jsxs("p",{children:["Chapters are a new feature of our video player. This means that you"," ",s.jsx("strong",{children:"need to be on the latest video player"})," to have chapters displayed on your video. Please note the minimum versions for each platform below."]}),s.jsx("p",{children:"Our video players provide UI controls on the player. But there is always a provision to disable those and create your own.
14Chapters are only available with the default provided controls. If you disable those controls and create your own, then chapters will not be shown. In that case, you are expected to create your own chapters."}),s.jsxs("p",{children:["Below versions are ",s.jsx("strong",{children:"minimum and not exact requirements"}),". In general, using the latest versions is recommended. Please follow the links to see the latest available versions of each."]}),s.jsxs("table",{className:"versions_info",children:[s.jsx("thead",{children:s.jsxs("tr",{children:[s.jsx("th",{children:"Platform"}),s.jsx("th",{children:"Minimum version"}),s.jsx("th",{children:"Links"})]})}),s.jsxs("tbody",{children:[s.jsxs("tr",{children:[s.jsx("td",{children:"Android"}),s.jsx("td",{children:"1.19.1"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",target:"_blank",href:"https://www.vdocipher.com/docs/mobile/android/getting-started/",rel:"noopener noreferrer",children:"Android Native SDK"})})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"iOS"}),s.jsx("td",{children:"2.3.3"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",rel:"noopener noreferer",target:"_blank",href:"https://www.vdocipher.com/docs/mobile/ios/getting-started",children:"iOS Native SDK"})})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"HTML"}),s.jsx("td",{children:"v2"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",rel:"noopener noreferer",target:"_blank",href:"https://www.vdocipher.com/docs/player/v2/",children:"Web Player"})})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"React Native"}),s.jsx("td",{children:"1.19.1"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",rel:"noopener noreferer",target:"_blank",href:"https://www.vdocipher.com/docs/mobile/react-native/getting-started",children:"React Native SDK"})})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Flutter"}),s.jsx("td",{children:"2.1.1"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",rel:"noopener noreferer",target:"_blank",href:"https://www.vdocipher.com/docs/mobile/flutter/getting-started",children:"Flutter SDK"})})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Wordpress"}),s.jsx("td",{children:"1.28"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",rel:"noopener noreferer",target:"_blank",href:"https://www.vdocipher.com/blog/2022/11/protect-videos-on-wordpress/",children:"Wordpress Plugin"})})]}),s.jsxs("tr",{children:[s.jsx("td",{children:"Moodle"}),s.jsx("td",{children:"Coming soon"}),s.jsx("td",{children:s.jsx(Ve,{underline:"none",rel:"noopener noreferer",target:"_blank",href:"https://github.com/VdoCipher/moodle-filter_vdocipher",children:"Moodle doc"})})]})]})]})]})}function td({msg:n}){return n&&s.jsx(G,{className:"error-msg-card",children:s.jsx("p",{children:n})})}function nd({chapters:n,updateProperties:e,updating:i,handleAdd:a,editTimeHandler:t,editTitlehandler:r,showPreview:l,errorMsg:c,deleteChapterHandler:o,fetchingChaptersData:u}){return s.jsxs(G,{item:!0,xs:12,md:7,style:{padding:"20px"},children:[s.jsx(G,{item:!0,xs:12,children:s.jsxs("h3",{children:["Chapters (",n.length,")"]})}),s.jsx(It,{className:"header-divider"}),s.jsx(G,{item:!0,xs:12,container:!0,style:{maxHeight:"350px",overflow:"auto"},children:u?s.jsx(Pe,{}):n.map((d,p)=>s.jsxs(G,{container:!0,spacing:1,alignItems:"center",style:{marginBottom:"10px",padding:"10px 0"},children:[s.jsxs(G,{item:!0,children:["Start Time",s.jsx(en,{disabled:p===0,hhValue:d.time.hh,mmValue:d.time.mm,ssValue:d.time.ss,index:p,onChangeHandler:t})]}),s.jsxs(G,{item:!0,xs:6,children:["Title",s.jsx("input",{className:"chapter-title",placeholder:"Chapter Title",value:d.title,onChange:h=>r(h,p)}),d.title===""&&s.jsx("div",{style:{position:"relative"},children:s.jsx("p",{style:{color:"#9f0000",fontSize:"12px",marginTop:0,position:"absolute"},children:Ge.E4})})]}),s.jsx(G,{item:!0,style:{paddingTop:"20px"},children:s.jsx(ft,{title:"Seek to this chapter",children:s.jsx($e,{onClick:()=>l(p),children:s.jsx(wt,{svgName:"previewIcon"})})})}),s.jsx(G,{item:!0,style:{paddingTop:"20px"},children:s.jsx($e,{onClick:()=>o(p),children:s.jsx(wt,{svgName:"deleteIcon"})})})]},(d.title+d.hh+d.mm,d.ss)))}),s.jsxs(G,{container:!0,className:"chapter-card-wrapper",children:[s.jsx(G,{item:!0,children:s.jsx(Ie,{variant:"contained",onClick:a,color:"primary",startIcon:s.jsx(Pi,{}),children:"Add Chapter"})}),s.jsx(G,{item:!0,children:s.jsx(Ie,{variant:"outlined",color:"primary",className:"save-button",onClick:e,disabled:!!(i||c),startIcon:i?s.jsx(Pe,{style:{height:"22px",width:"22px",color:"#1a73e8"},className:"updating-progress-icon"}):s.jsx(ln,{}),children:"Save Chapters"})})]}),s.jsx(G,{item:!0,children:s.jsx(td,{msg:c}
14)})]})}const id=(n,e,i)=>{e.getElementById(n)&&window.VdoPlayer.getInstance(e.getElementById(n)).api._setChapters(i)},ad=({id:n,dispatchShowErrorMessage:e,dispatchShowSuccessMessage:i})=>{const[a,t]=k.useState(""),[r,l]=k.useState(!1),[c,o]=k.useState({}),[u,d]=k.useState(!1),[p,h]=k.useState(!1),[f,y]=k.useState({}),[v,C]=k.useState([]),[T,O]=k.useState(!0),b="preview-iframe";k.useEffect(()=>{O(!0),Yr(n,{ttl:1*60*60}).then(P=>{O(!1),o({otp:P.data.otp,playbackInfo:P.data.playbackInfo})})},[]),k.useEffect(()=>{t("")},[v]),k.useEffect(()=>{Z()},[]);const $=P=>{if(P.status==="fulfilled"){const{data:I}=P.value,X=Mn(I);X.length>0&&C(X),d(!1)}else{const I=P.reason.data.message||Ge.E6;e(I)}},g=P=>{if(P.status==="fulfilled"){const{data:I}=P.value;y(I),h(!1)}else{const I=P.reason.data.message||Ge.E6;e(I)}};function Z(){d(!0),h(!0);const P=Xc(n,"chapters");Promise.allSettled(P).then(I=>{const X=I[0],Q=I[1];$(Q),g(X)})}async function M(){const P=Rn(v);if(!R()){l(!0);try{const X=await Jc(n,"chapters",P),{data:Q}=X,J=Mn(Q);C(J),i("Updated!")}catch(X){e(X.data.message||"Something went wrong during update")}l(!1)}}const K=()=>{const P=[...v],I=ut(0);P.push({title:"",time:I}),C([...P])};An(v);const R=()=>{const P=!!document.getElementById(b);let I=!1;return v.length>0&&ce(v[0].time)!=0?t(Ge.E0):An(v)?(t(Ge.E2),I=!0):ss(v)?ls(v)?(t(""),P&&id(b,document,Rn(v))):(t(Ge.E5),I=!0):(t(Ge.E3),I=!0),I},z=(P,I)=>{const X=[...v];X[I].title=P.target.value,C([...X])},x=(P,I,X)=>{if(P.target.value>=0&&P.target.value<=99){const Q=[...v];Q[X].time[I]=P.target.value,I!=="hh"&&Q[X].time[I]>59?Q[X].time[I]=59:I!=="hh"&&Q[X].time[I]<0&&(Q[X].time[I]=0),C([...Q])}},_=P=>{const I=[...v];I.splice(P,1),I.length>0&&(I[0].time.hh="00",I[0].time.mm="00",I[0].time.ss="00"),C(I)},A=P=>{us(P,v,document,b)};return s.jsxs(s.Fragment,{children:[s.jsxs(G,{container:!0,className:"chapters-container",children:[s.jsx(Zc,{isOtpFetching:T,videoParams:c,videoStatus:f.status,fetchingStatus:p}),s.jsx(nd,{updating:r,deleteChapterHandler:_,showPreview:A,errorMsg:a,chapters:v,editTitlehandler:z,updateProperties:M,handleAdd:K,editTimeHandler:x,fetchingChaptersData:u})]}),s.jsx(It,{}),s.jsx(ed,{})]})},rd=n=>ct({dispatchShowErrorMessage:Ae,dispatchShowSuccessMessage:lt},n),od=et(null,rd)(ad),sd=Ne("main")(()=>({flex:1,padding:"30px 30px",background:"#ffffff"})),ld=Ne("div")(()=>({margin:"0 30px 0px","span.MuiTabs-indicator":{backgroundColor:"transparent"},"button.Mui-selected":{backgroundColor:"#fff"},".edit-video-header":{marginBottom:14,color:"rgba(0,0,0,0.54)",fontStyle:"italic",marginTop:"5px"}})),ud=({history:n})=>s.jsxs("div",{style:{display:"flex",gap:"10px",alignItems:"center",margin:"15px 0"},children:[s.jsx(Ie,{variant:"contained",to:"/dashboard",size:"small",onClick:()=>n.goBack(),sx:{fontSize:" 14px",fontWeight:"600",boxShadow:"none"},children:"Back"}),s.jsx(Wt,{children:"Edit Video"})]}),cd=({fetchingVideoDetails:n,video:e,videoFiles:i,downloadFile:a,fileDownloadURL:t,tabNameFromRoute:r,history:l})=>{k.useEffect(()=>{c(null,r)},[]);function c(o,u){const d=l.location.pathname,p=Xr(d,u);l.replace(p)}return s.jsxs(k.Fragment,{children:[n&&s.jsx("div",{className:"center",children:"Fetching..."}),!n&&s.jsxs(ld,{children:[s.jsx(ud,{history:l}),s.jsx(po,{value:r,onChange:c,tabs:Ee.VIDEO_EDIT.TABS}),s.jsxs(sd,{children:[r===0&&s.jsx(Xo,{video:e}),r===1&&s.jsx(Ys,{video:e}),r===2&&s.jsx(Wc,{video:e}),r===3&&s.jsx(Zs,{totalSizeBytes:e.totalSizeBytes,videoFiles:i,downloadFile:a,fileDownloadURL:t,videoLength:e.length}),r===4&&s.jsx(Yc,{}),r===5&&s.jsx(od,{id:e.id})]})]})]})};class dd extends k.Component{constructor(e){super(e),this.state={fileDownloadURL:""}}componentDidMount(){const{params:e}=this.props.match,{videoId:i}=e;this.props.fetchVideoDetails(i)}downloadFile(e,i){const{videoDetails:{videoInfo:a}}=this.props.videosInfo,{id:t}=a;Jr(t,i).then(r=>{this.setState({fileDownloadURL:r.data.redirect},()=>{e.click()})}).catch(r=>{const{message:l}=r.data;this.props.showErrorMessage(l)})}render(){const{fileDownloadURL:e}=this.state,{location:{pathname:i},videosInfo:a}=this.props,{videoDetails:{videoInfo:t,fetchingVideoDetails:r,videoFiles:l}}=a,c=Zr(i);
14return s.jsx(cd,{handleItemClick:o=>this.handleItemClick(o),downloadFile:(o,u)=>this.downloadFile(o,u),fetchingVideoDetails:r,video:t,videoFiles:l,fileDownloadURL:e,tabNameFromRoute:parseInt(c)||0,history:this.props.history})}}const pd=n=>ct({showErrorMessage:Ae,fetchVideoDetails:yo},n),hd=n=>({videosInfo:n.videosInfo}),_d=et(hd,pd)(dd);export{_d as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.