react-covideo-embed 1.0.82-flow.3 → 1.0.82-flow.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/build/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Ce=require("react-query"),ro=require("axios"),p=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),Ce=require("react-query"),ro=require("axios"),p=require("react"),qs=require("react-resize-detector"),We=require("dayjs"),Gs=require("dayjs/plugin/utc"),Ys=require("dayjs/plugin/timezone"),he=require("react-router-dom"),Qs=require("file-saver"),i=require("styled-components"),Zs=require("jwt-decode"),H=require("react-icons/md"),F=require("react-covideo-common"),W=require("react-i18next"),Wt=require("lodash"),xi=require("react-icons/ai"),fi=require("react-covideo-ai-assist"),ve=require("react-icons/io"),it=require("react-router"),vi=require("react-icons/bs"),bi=require("color-convert"),wi=require("react-full-screen"),Ks=require("react-select/creatable"),Ze=require("react-select"),lt=require("i18next"),Xs=require("react-icons/bi"),yi=require("react-icons/io5"),$e=require("formik"),Js=require("yup"),Zt=require("react-compound-slider"),Ro=require("react-beautiful-dnd"),$o=require("react-spinners"),Vo=require("rc-progress/lib"),Xr=require("recordrtc"),vo=require("react-icons/fa"),ea=require("rc-progress"),ta=require("react-scroll"),Jr=require("@mediapipe/tasks-vision"),oa=require("react-dropzone"),ra=require("react-infinite-scroll-component"),na=require("js-cookie"),en=require("droplr-api");function Ci(e){const o=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const r in e)if(r!=="default"){const s=Object.getOwnPropertyDescriptor(e,r);Object.defineProperty(o,r,s.get?s:{enumerable:!0,get:()=>e[r]})}}return o.default=e,Object.freeze(o)}const k=Ci(p),Oe=Ci(Js),Si="React-Covideo-Embed-Version",cr={default:"https://api-sandbox.covideo.com/",development:"https://localhost:3000/api/",sandbox:"https://api-sandbox.covideo.com/",staging:"https://api-staging.covideo.com/",production:"https://api.covideo.com/"};var ze=(e=>(e.jwt="react-covideo-embed-jwt",e.merge="react-covideo-merge",e.recordSettings="record_settings",e.recordError="react-covideo-record-error",e))(ze||{});let He=localStorage.getItem("react-covideo-embed-jwt"),$t=cr.default,mt;const bo=(e,o=!1)=>{o||localStorage.setItem("react-covideo-embed-jwt",e),He=e,ie.defaults.headers.Authorization=`Bearer ${He}`,Sr.headers.Authorization=`Bearer ${He}`},ia=e=>{$t=cr[e]||cr.default,ie.defaults.baseURL=$t},sa=e=>{mt=e,ie.defaults.headers.ApiKey=mt,Sr.headers.ApiKey=mt};let Sr={headers:{Authorization:`Bearer ${He}`,...mt!==void 0?{ApiKey:mt}:{},[Si]:"1.0.82-flow.4"}};const ie=ro.create({baseURL:$t,headers:{"Content-Type":"application/json",Authorization:`Bearer ${He}`,...mt!==void 0?{ApiKey:mt}:{},[Si]:"1.0.82-flow.4"}});We.extend(Gs);We.extend(Ys);const ji=e=>e&&(Object.keys(e).forEach(o=>{if(typeof e[o]=="object")return ji(e[o]);typeof e[o]!="boolean"&&(e[o]=""+e[o])}),e),tn=(e,o=30)=>{const r=Math.floor(e/3600),s=Math.floor((e-r*3600)/60);let n=e-r*3600-s*60;const a=parseInt((n%1).toFixed(3).substring(2));let c=parseInt(Math.floor(a/(1e3/o)).toFixed(0));if(n=parseInt(Math.floor(n).toFixed(0)),isNaN(s))return"00:00:00:00";let d="";return r<10&&(d="0"),d+=r+":",s<10&&(d+="0"),d+=s+":",n<10&&(d+="0"),d+=n+":",c<10&&(d+="0"),d+c},Vt=(e,o=1)=>{const r=Math.floor(e/3600),s=Math.floor((e-r*3600)/60),n=e-r*3600-s*60;if(isNaN(s))return"00:00.0";let a="";return s<10&&(a+="0"),a+=s+":",n<10&&(a+="0"),a+=n.toFixed(o),a},Ei=(e,o)=>e.userId+"_"+e.customerId+"_"+(Math.random()+1).toString(36).substring(2)+"."+o,aa=()=>{const e=We(new Date).date();let o="th";return e===1||e===21||e===31?o="st":e===2||e===22?o="nd":(e===3||e===23)&&(o="rd"),We(new Date).format(`MMM D[${o}] YYYY @ h:mm A`)},ca=(e,o,r="YYYY-MM-DD HH:mm:ss")=>{const s=o.timeZone||Intl.DateTimeFormat().resolvedOptions().timeZone||We.tz.guess(),n=We(e,["M/DD/YYYY h:mm:ss A","M/DD/YYYY, h:mm:ss A","M/D/YYYY h:mm:ss A","M/D/YYYY, h:mm:ss A","MM/DD/YYYY"]),a=-We().tz("America/New_York").utcOffset(),c=We().tz(s).utcOffset(),d=n.add(a,"minute");return We(d).add(c,"minute").format(r)},la=(e,o,r)=>{const s=Array.from(e),[n]=s.splice(o,1);return s.splice(r,0,n),s},Ti=({trimStart:e,trimEnd:o,videoDuration:r})=>r===0||o===0?!1:e!==0||r-o>.3,Dt=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),Lo=e=>(e/1e3).toFixed(2);function da(e){return e.charAt(0).toUpperCase()+e.slice(1)}function ki(){for(let e in ze)localStorage.removeItem(ze[e])}const ua=(e,o=1)=>{const r=Math.floor(e/60),s=e-r*60;if(isNaN(r))return"00.0";let n="";return r<10&&(n+="0"),n+=r+":",s<10&&(n+="0"),n+=s.toFixed(o),n};function Ht(){return/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)}const Ii=p.createContext({}),pa=i.createGlobalStyle`
|
|
2
2
|
* {
|
|
3
3
|
font-family: ${e=>e.$isCdk?"'Roboto', sans-serif":"'Work Sans', sans-serif"};
|
|
4
4
|
}
|
|
5
5
|
button span {
|
|
6
6
|
font-family: ${e=>e.$isCdk?"'Roboto', sans-serif!important":"'Work Sans', sans-serif"};
|
|
7
7
|
}
|
|
8
|
-
`,
|
|
8
|
+
`,ha=({children:e,...o})=>{const{width:r,height:s,ref:n}=qs.useResizeDetector({refreshMode:"debounce",refreshRate:100}),{token:a,env:c,onVideoInsert:d,onVideoInsertError:l,hideFeatures:u,apikey:g,onRecordButtonClick:h,onUploadButtonClick:x,reRender:y,flow:m,startupPage:w}=o,f=Object.fromEntries(Object.values(Zr).map(C=>[`show${da(C)}Feature`,!(u!=null&&u.includes(C))]));c&&ia(c),g&&sa(g);const b=!!a;b&&bo(a,b);const S=!!h||f.showRecordBothFeature||f.showRecordCamFeature||f.showRecordScreenFeature,T=!!x||f.showUploadFeature,V=f.showInsertFeature&&!!d,I={token:a,env:c,onVideoInsert:d,onVideoInsertError:l,hasExternalJwt:b,containerWidth:r||0,containerHeight:s||0,...f,showRecordFeature:S,showInsertFeature:V,onRecordButtonClick:h,onUploadButtonClick:x,showUploadFeature:T,reRender:y,whitelabel:o.whitelabel,flow:m,startupPage:w},L=(o==null?void 0:o.whitelabel)||"branding",v=(o==null?void 0:o.whitelabel)==="cdk";return t.jsxs(Ii.Provider,{value:I,children:[t.jsx(pa,{$isCdk:v}),t.jsx(F.CovideoThemeProvider,{themeName:L,additionalStyles:{themeName:L,isCdkEnviroment:v,containerWidth:r,containerHeight:s},children:t.jsx("div",{ref:n,children:e})})]})},Se=()=>{const e=p.useContext(Ii);if(!e)throw new Error("useConfigurationContext must be used within ConfigurationProvider");return e},ga=async()=>{const{data:e}=await ie.get("/auth/user");return e},Ft={EMPTY:"",COMPANY:"Company",PRIMARY:"Primary",PRIVATE:"Private",VAULT:"Vault",VIDEO_REPLIES:"Video Replies",VEHICLE_WALKAROUNDS:"Vehicle Walkarounds",APPOINTMENT_REMINDERS:"Appointment Reminders",INTRODUCTIONS:"Introductions",POST_SALE_THANK_YOU:"Post - Sale Thank You"},ma=-1,xa="~~shared~~",_e={value:"_all",label:"All folders"},fa=async()=>{const{data:e}=await ie.get("/folders/new?getShared=true"),o=e&&e.folders||[];return o.push({folderId:_e.value,name:_e.label,isDeletable:!1}),o},va=async e=>{var c,d;const r={start:(e.page||0)*(e.size||10),limit:e.size,search:e.search,folder:e.folder},{data:s}=await ie.get("/videos",{params:r}),n=((c=s==null?void 0:s.data)==null?void 0:c.videos)||(s==null?void 0:s.videos)||[];return{count:((d=s==null?void 0:s.data)==null?void 0:d.count)||(s==null?void 0:s.count)||0,videos:n}},wo=async e=>(await ie.get(`/videos/${e}`)).data,ba=async({videoIds:e,deleteMultiple:o,companyVideos:r})=>{let s={isCompanyVideo:r},n=`/videos/${e[0]}`;return(await ie.delete(n,{data:s})).data},wa=async e=>(await ie.post("/videos/merge",e)).data,ya=async({videoId:e,videoBody:o})=>({video:(await ie.put(`/videos/${e}`,o)).data}),Ai=async(e,o)=>(await ie.put(`/videos/${e}/trim`,o)).data,Ca=async(e,o)=>{const r=await ie.get(`/videos/${e}/download`,{responseType:"blob"});return Qs.saveAs(new Blob([r.data],{type:"video/mp4"}),o)},Sa=async e=>(await ie.put(`/videos/${e}/move`,{videoId:e,copy:!0,videoFolder:Ft.PRIMARY})).data,ja=async e=>(await ie.post(`/videos/${e}/transcripts/start`)).data,jr=async e=>(await ie.get("/inventory",{params:e})).data,Ea=async({data:e})=>(await ie.post("/video-requests",e)).data,Ta=async e=>(await ie.post("/aws/signedurl/voiceover-audio",e)).data,ka=async({data:e})=>(await ro.put(e.uploadURL,e.file,{headers:{"Content-Type":e.mimeType}})).data,Ia=async({videoId:e,audioFileName:o,newVideoTitle:r="",overwriteOriginal:s=!1})=>(await ie.post(`/videos/${e}/voiceover`,{newVideoTitle:r,audioFileName:o,overwriteOriginal:s})).data,at={all:[],user:[]},Aa=async({page:e=0,size:o=50,search:r="",all:s=!1,sort:n,refresh:a=!0})=>{var u,g;const d={start:e*o,limit:o,search:r,sort:n,all:""};if(s&&(d.all="true"),!a){if(s&&((u=at==null?void 0:at.all)!=null&&u.length))return at.all;if(!s&&((g=at==null?void 0:at.user)!=null&&g.length))return at.user}const l=await ie.get("/video-tags",{params:d});return s?at.all=l.data:at.user=l.data,l.data},on=async e=>{const r={start:((e.page||1)-1)*(e.limit||12),limit:e.limit,search:e.search,year:e.year},{data:s}=await ie.get("/wtv",{params:r}),n=s&&s.count||0,a=s&&s.videos||[];return{count:n,videos:a}},Ra=async e=>{const o={title:e.title,flvName:e.flvName,wtvId:parseInt(e.wtvId.toString(),10),animatedGifPath:e.animatedGifPath,notes:e.year+";"+e.make+";"+e.model+";"+e.title};return(await ie.post("/wtv/videos",o)).data},$a=async({page:e=0,size:o=10,search:r,sort:s,filterByDepartment:n=!1})=>{const a={start:e*o,limit:o,search:r,sort:s,filterByDepartment:n},{data:c}=await ie.get("/video-attributes",{params:a}),d=c&&c.videoAttributes||[];return{count:c&&c.count||0,attributes:d}},Va=async(e,o)=>({videoAttributes:(await ie.put(`/videos/${e}/video-attributes`,o)).data}),La=e=>k.createElement("svg",{width:133,height:33,viewBox:"0 0 133 33",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M48.4811 22.7098C44.7502 22.7098 42.0752 20.0065 42.0752 16.208C42.0752 12.3628 44.8206 9.65956 48.6219 9.65956C51.0857 9.65956 53.268 10.8947 54.2301 12.8755L53.0803 13.528C52.2355 11.9667 50.5695 10.9413 48.6219 10.9413C45.6653 10.9413 43.4831 13.1085 43.4831 16.208C43.4831 19.2608 45.5949 21.428 48.4811 21.428C50.4287 21.428 52.2121 20.3328 53.0099 18.8413L54.1597 19.5404C53.1507 21.4746 50.9215 22.7098 48.4811 22.7098Z",fill:"white"}),k.createElement("path",{d:"M61.8263 22.7331C58.0484 22.7331 55.303 19.8434 55.303 16.1847C55.303 12.5492 58.0484 9.65956 61.8263 9.65956C65.6042 9.65956 68.3496 12.5492 68.3496 16.1847C68.3496 19.8434 65.6042 22.7331 61.8263 22.7331ZM61.8263 21.4513C64.7829 21.4513 66.9417 19.121 66.9417 16.1847C66.9417 13.2717 64.7829 10.9413 61.8263 10.9413C58.8932 10.9413 56.7109 13.2717 56.7109 16.1847C56.7109 19.121 58.8932 21.4513 61.8263 21.4513Z",fill:"white"}),k.createElement("path",{d:"M78.8263 9.65956H82.8388L77.2776 22.4068H74.3914L68.8537 9.65956H72.9131L75.8932 17.4897L78.8263 9.65956Z",fill:"white"}),k.createElement("path",{d:"M85.617 8.35455C84.3734 8.35455 83.4113 7.42239 83.4113 6.18728C83.4113 4.95218 84.3969 4.02002 85.617 4.02002C86.8607 4.02002 87.8227 4.95218 87.8227 6.18728C87.8227 7.42239 86.8607 8.35455 85.617 8.35455ZM87.4473 22.4301H83.7633V9.65956H87.4473V22.4301Z",fill:"white"}),k.createElement("path",{d:"M98.9292 4.69583H102.613V22.4301H99.0465V21.0552C98.1783 22.0339 96.9581 22.7564 95.2217 22.7564C91.6316 22.7564 88.8862 19.9133 88.8862 16.0448C88.8862 12.1997 91.6316 9.33331 95.2217 9.33331C96.8877 9.33331 98.061 10.0091 98.9292 10.8947V4.69583ZM95.8318 19.4239C97.7794 19.4239 99.1169 17.9091 99.1169 16.0215C99.1169 14.1805 97.7794 12.6658 95.8318 12.6658C93.8842 12.6658 92.5467 14.1805 92.5467 16.0215C92.5467 17.9091 93.8842 19.4239 95.8318 19.4239Z",fill:"white"}),k.createElement("path",{d:"M117.413 15.7419C117.413 16.2546 117.366 16.7673 117.295 17.2799H107.839C108.238 18.6782 109.341 19.6802 111.335 19.6802C112.72 19.6802 114.315 19.1443 115.348 18.4451L116.803 20.9387C115.559 21.8708 113.565 22.7098 111.171 22.7098C106.361 22.7098 104.132 19.4938 104.132 16.0215C104.132 12.223 106.83 9.33331 110.913 9.33331C114.597 9.33331 117.413 11.687 117.413 15.7419ZM110.913 12.2929C109.411 12.2929 108.238 13.1785 107.816 14.6699H113.87C113.541 13.2251 112.462 12.2929 110.913 12.2929Z",fill:"white"}),k.createElement("path",{d:"M125.152 22.7797C120.999 22.7797 118.23 19.7502 118.23 16.0448C118.23 12.3395 120.999 9.31001 125.152 9.31001C129.329 9.31001 132.122 12.3395 132.122 16.0448C132.122 19.7502 129.329 22.7797 125.152 22.7797ZM125.152 19.3773C127.006 19.3773 128.438 17.9091 128.438 16.0215C128.438 14.1805 127.006 12.7124 125.152 12.7124C123.322 12.7124 121.891 14.1805 121.891 16.0215C121.891 17.9091 123.322 19.3773 125.152 19.3773Z",fill:"white"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.438 25.0699V6.95488L8.33453 2.43408L0 10.7149V21.4334L8.33453 29.77L15.438 25.0699Z",fill:"#1C8578"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.6235 15.8128L35.6432 15.765V10.7185L24.9183 0H10.791L8.33688 2.43765L24.6235 15.8128Z",fill:"url(#paint0_linear_11_13017)"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M24.6235 15.8134L8.33688 29.7741L10.7233 32.16H24.9183L35.6432 21.4375V15.7656L24.6235 15.8134Z",fill:"#11A694"}),k.createElement("defs",null,k.createElement("linearGradient",{id:"paint0_linear_11_13017",x1:18.7201,y1:1.67911,x2:27.9868,y2:15.5693,gradientUnits:"userSpaceOnUse"},k.createElement("stop",{offset:.0483,stopColor:"#11A694"}),k.createElement("stop",{offset:1,stopColor:"#2FE0C7"})))),Ma=i(La)`
|
|
9
9
|
max-height: 48px;
|
|
10
10
|
max-width: 200px;
|
|
11
|
-
`,
|
|
11
|
+
`,Da=e=>k.createElement("svg",{width:1024,height:219,viewBox:"0 0 1024 219",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M99.8311 97.6852V121.3H107.851C112.249 121.3 114.486 120.31 116.404 118.468C118.641 116.29 119.889 113.596 119.889 109.591C119.889 105.846 118.778 103.075 116.738 100.913C114.836 98.8728 112.599 97.6852 107.866 97.6852H99.8311Z",fill:"white"}),k.createElement("path",{d:"M109.449 0C49.0938 0 0 49.1166 0 109.5C0 169.883 49.0938 219 109.449 219C169.804 219 218.898 169.883 218.898 109.5C218.898 49.1166 169.804 0 109.449 0ZM58.4834 132.292C44.087 132.292 34.5452 122.03 34.5452 109.47C34.5452 96.9087 44.1479 86.7078 58.1486 86.7078C66.0316 86.7078 74.0516 89.7376 79.5758 94.0768L72.6667 101.568C68.6491 98.279 63.4597 96.3758 59.5791 96.3758C51.62 96.3758 46.4915 102.359 46.4915 109.53C46.4915 116.702 51.7569 122.685 59.8987 122.685C64.8902 122.685 70.0948 119.731 73.8994 116.169L80.8693 123.538C75.6799 128.136 67.9186 132.292 58.4529 132.292H58.4834ZM125.732 124.847C121.989 128.532 116.602 130.968 108.11 130.968H88.3262V88.0172H108.11C116.13 88.0172 122.05 90.2553 126.052 94.4575C129.735 98.3399 131.774 103.593 131.774 109.454C131.774 115.316 129.674 120.965 125.732 124.847ZM172.544 130.968L157.888 112.484L152.699 117.417V130.968H141.133V88.0172H152.699V104.125L169.591 88.0172H184.185L165.969 105.054L186.803 130.968H172.544Z",fill:"white"}),k.createElement("path",{d:"M988.664 158.418C981.983 158.418 975.962 156.923 970.6 153.933C965.326 150.855 961.151 146.678 958.074 141.401C954.998 136.037 953.459 129.925 953.459 123.065C953.459 116.118 954.998 110.006 958.074 104.729C961.151 99.4527 965.326 95.3194 970.6 92.3293C975.874 89.3393 981.895 87.8443 988.664 87.8443C995.52 87.8443 1001.59 89.3393 1006.86 92.3293C1012.22 95.3194 1016.4 99.4527 1019.39 104.729C1022.46 110.006 1024 116.118 1024 123.065C1024 129.925 1022.46 136.037 1019.39 141.401C1016.4 146.678 1012.22 150.855 1006.86 153.933C1001.5 156.923 995.432 158.418 988.664 158.418ZM988.664 150.107C993.674 150.107 998.113 149.008 1001.98 146.81C1005.85 144.523 1008.88 141.357 1011.08 137.312C1013.36 133.178 1014.51 128.43 1014.51 123.065C1014.51 117.613 1013.36 112.864 1011.08 108.818C1008.88 104.773 1005.85 101.651 1001.98 99.4527C998.113 97.1662 993.718 96.0229 988.796 96.0229C983.873 96.0229 979.478 97.1662 975.61 99.4527C971.743 101.651 968.666 104.773 966.381 108.818C964.095 112.864 962.953 117.613 962.953 123.065C962.953 128.43 964.095 133.178 966.381 137.312C968.666 141.357 971.743 144.523 975.61 146.81C979.478 149.008 983.829 150.107 988.664 150.107Z",fill:"white"}),k.createElement("path",{d:"M910.276 158.418C903.068 158.418 896.739 156.923 891.289 153.933C885.839 150.855 881.576 146.678 878.499 141.401C875.423 136.037 873.885 129.925 873.885 123.065C873.885 116.206 875.335 110.138 878.236 104.861C881.224 99.5846 885.268 95.4513 890.366 92.4613C895.552 89.3833 901.354 87.8443 907.771 87.8443C914.275 87.8443 920.033 89.3393 925.043 92.3293C930.141 95.2314 934.141 99.3647 937.042 104.729C939.942 110.006 941.393 116.118 941.393 123.065C941.393 123.505 941.349 123.989 941.261 124.516C941.261 124.956 941.261 125.44 941.261 125.967H881.005V118.976H936.251L932.559 121.746C932.559 116.733 931.46 112.292 929.262 108.423C927.153 104.465 924.252 101.387 920.56 99.1888C916.868 96.9903 912.605 95.891 907.771 95.891C903.024 95.891 898.761 96.9903 894.981 99.1888C891.201 101.387 888.256 104.465 886.147 108.423C884.037 112.38 882.982 116.909 882.982 122.01V123.461C882.982 128.737 884.125 133.398 886.411 137.444C888.784 141.401 892.036 144.523 896.168 146.81C900.387 149.008 905.177 150.107 910.539 150.107C914.759 150.107 918.67 149.36 922.274 147.865C925.966 146.37 929.131 144.083 931.768 141.005L937.042 147.073C933.965 150.767 930.097 153.581 925.439 155.516C920.868 157.451 915.813 158.418 910.276 158.418Z",fill:"white"}),k.createElement("path",{d:"M819.069 158.418C812.477 158.418 806.543 156.923 801.269 153.933C796.083 150.943 791.996 146.809 789.007 141.533C786.018 136.168 784.524 130.012 784.524 123.065C784.524 116.03 786.018 109.874 789.007 104.597C791.996 99.3207 796.083 95.2314 801.269 92.3293C806.543 89.3392 812.477 87.8442 819.069 87.8442C825.134 87.8442 830.54 89.2073 835.287 91.9335C840.122 94.6597 843.945 98.6611 846.758 103.938C849.659 109.126 851.109 115.502 851.109 123.065C851.109 130.54 849.703 136.916 846.89 142.192C844.077 147.469 840.254 151.514 835.419 154.329C830.672 157.055 825.222 158.418 819.069 158.418ZM819.729 150.107C824.651 150.107 829.046 149.008 832.914 146.809C836.869 144.523 839.946 141.357 842.143 137.312C844.429 133.178 845.572 128.43 845.572 123.065C845.572 117.613 844.429 112.864 842.143 108.818C839.946 104.773 836.869 101.651 832.914 99.4526C829.046 97.1661 824.651 96.0228 819.729 96.0228C814.894 96.0228 810.543 97.1661 806.675 99.4526C802.808 101.651 799.731 104.773 797.446 108.818C795.16 112.864 794.017 117.613 794.017 123.065C794.017 128.43 795.16 133.178 797.446 137.312C799.731 141.357 802.808 144.523 806.675 146.809C810.543 149.008 814.894 150.107 819.729 150.107ZM845.835 157.758V136.916L846.758 122.933L845.44 108.95V59.8786H854.801V157.758H845.835Z",fill:"white"}),k.createElement("path",{d:"M756.103 157.758V88.5038H765.464V157.758H756.103ZM760.849 73.2018C758.915 73.2018 757.289 72.5423 755.971 71.2231C754.652 69.904 753.993 68.3211 753.993 66.4743C753.993 64.6275 754.652 63.0885 755.971 61.8573C757.289 60.5382 758.915 59.8786 760.849 59.8786C762.783 59.8786 764.409 60.4942 765.728 61.7254C767.046 62.9566 767.705 64.4956 767.705 66.3423C767.705 68.2771 767.046 69.904 765.728 71.2231C764.497 72.5423 762.871 73.2018 760.849 73.2018Z",fill:"white"}),k.createElement("path",{d:"M694.572 157.758L653.698 65.4186H664.246L702.484 152.349H696.682L735.183 65.4186H745.072L704.198 157.758H694.572Z",fill:"white"}),k.createElement("path",{d:"M503.809 157.758V65.4186H521.477L560.769 130.584H551.408L590.04 65.4186H607.577L607.84 157.758H587.799L587.667 96.1544H591.359L560.505 147.996H550.88L519.368 96.1544H523.851V157.758H503.809Z",fill:"white"}),k.createElement("path",{d:"M406.852 157.758V65.4186H446.803C455.066 65.4186 462.186 66.7817 468.163 69.5079C474.14 72.1462 478.755 75.9717 482.007 80.9844C485.26 85.9971 486.886 91.9771 486.886 98.9246C486.886 105.784 485.26 111.72 482.007 116.733C478.755 121.658 474.14 125.439 468.163 128.077C462.186 130.716 455.066 132.035 446.803 132.035H418.718L428.212 122.669V157.758H406.852ZM465.526 157.758L442.452 124.252H465.262L488.6 157.758H465.526ZM428.212 125.043L418.718 115.018H445.616C452.209 115.018 457.131 113.611 460.384 110.797C463.636 107.895 465.262 103.937 465.262 98.9246C465.262 93.8239 463.636 89.8665 460.384 87.0524C457.131 84.2382 452.209 82.8312 445.616 82.8312H418.718L428.212 72.6738V125.043Z",fill:"white"}),k.createElement("path",{d:"M354.323 159.341C347.203 159.341 340.566 158.198 334.413 155.911C328.348 153.537 323.074 150.195 318.591 145.886C314.108 141.577 310.592 136.52 308.043 130.716C305.581 124.912 304.351 118.536 304.351 111.588C304.351 104.641 305.581 98.2652 308.043 92.461C310.592 86.6568 314.108 81.6002 318.591 77.291C323.162 72.9818 328.48 69.684 334.545 67.3975C340.61 65.023 347.247 63.8358 354.454 63.8358C362.453 63.8358 369.661 65.2429 376.078 68.0571C382.583 70.7833 388.033 74.8286 392.428 80.1931L378.715 92.8568C375.551 89.2511 372.035 86.5689 368.167 84.81C364.299 82.9633 360.08 82.0399 355.509 82.0399C351.202 82.0399 347.247 82.7434 343.643 84.1505C340.039 85.5575 336.918 87.5802 334.281 90.2185C331.644 92.8568 329.578 95.9787 328.084 99.5843C326.678 103.19 325.974 107.191 325.974 111.588C325.974 115.986 326.678 119.987 328.084 123.593C329.578 127.198 331.644 130.32 334.281 132.958C336.918 135.597 340.039 137.619 343.643 139.026C347.247 140.433 351.202 141.137 355.509 141.137C360.08 141.137 364.299 140.258 368.167 138.499C372.035 136.652 375.551 133.882 378.715 130.188L392.428 142.852C388.033 148.216 382.583 152.306 376.078 155.12C369.661 157.934 362.41 159.341 354.323 159.341Z",fill:"white"})),Oa=i(Da)`
|
|
12
12
|
max-height: 48px;
|
|
13
13
|
max-width: 200px;
|
|
14
|
-
`,mo=()=>{const{isCdkEnviroment:e}=i.useTheme();return e?t.jsx(
|
|
14
|
+
`,mo=()=>{const{isCdkEnviroment:e}=i.useTheme();return e?t.jsx(Oa,{}):t.jsx(Ma,{})},z={mb:420,xs:660,sm:768,cmd:812,md:1024,lg:1200},Na="var(--font-family-secondary)",Er={fontFamily:Na},Ri={...Er,fontWeight:400},$i={...Er,fontWeight:500},Pa={...Er,fontWeight:700},yo={sm:"14px",m:"15px",lg:"18px"},qt={mb:`@media (min-width: ${z.mb}px)`,lg:`@media (min-width: ${z.lg}px)`,cmd:`@media (min-width: ${z.cmd}px)`},E={white:"#fff",black_1_100:"#000",blackRgb60:"rgba(52,58,64, .6)",blackRgba75:"rgba(0,0,0, .75)",themeDark:"#343A40",gray10:"#F6F7F9",gray20:"#EEEFF2",gray40:"#D0D3D9",gray60:"#9297A2",gray80:"#4E5461",gray100:"#272A32",transparent:"transparent",error:"rgba(232, 76, 61, 1)",black:"#000",black25:"rgba(39, 42, 50, 0.25)",black40:"rgba(39, 42, 50, 0.4)",red100:"#E84C3D",whiteRgb85:"rgba(255,255,255, .85)",primaryDarkBlue:"#041640",lightgray40:"rgba(213,214,217,0.4)",covideoGray100:"rgba(78, 84, 97, 1)",themeDark50Percent:"#B3B9BF",themeDark75Percent:"#676D73",secondaryButtonBlueBg:"#F2F4F6",label:"#9297a2",lightgray:"rgba(213,214,217,1)",blackRgb75:"rgba(52,58,64, .75)",secondaryBlue:"#007BFF",midGrey:"#9297a2",coal:"#272a32",covideoGray40:"rgba(208, 211, 217, 1)"},Fa=i.div`
|
|
15
15
|
height: 64px;
|
|
16
16
|
position: relative;
|
|
17
17
|
z-index: 9;
|
|
@@ -22,14 +22,14 @@
|
|
|
22
22
|
box-shadow:
|
|
23
23
|
0px 0px 2px rgba(66, 79, 104, 0.08),
|
|
24
24
|
0px 4px 8px rgba(66, 79, 104, 0.03);
|
|
25
|
-
`,
|
|
25
|
+
`,za=i.div`
|
|
26
26
|
height: 64px;
|
|
27
27
|
display: flex;
|
|
28
28
|
align-items: center;
|
|
29
29
|
justify-content: space-between;
|
|
30
30
|
z-index: 8;
|
|
31
31
|
padding: 0 12px;
|
|
32
|
-
`,
|
|
32
|
+
`,_a=i.div`
|
|
33
33
|
margin-right: auto;
|
|
34
34
|
width: 42%;
|
|
35
35
|
display: flex;
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
40
40
|
width: 49%;
|
|
41
41
|
`}
|
|
42
|
-
`,
|
|
42
|
+
`,Ba=i.div`
|
|
43
43
|
margin: 0 auto;
|
|
44
44
|
display: flex;
|
|
45
45
|
align-items: center;
|
|
@@ -49,7 +49,7 @@
|
|
|
49
49
|
display: none;
|
|
50
50
|
`}
|
|
51
51
|
}
|
|
52
|
-
`,
|
|
52
|
+
`,Ua=i.div`
|
|
53
53
|
margin-left: auto;
|
|
54
54
|
width: 42%;
|
|
55
55
|
display: flex;
|
|
@@ -64,13 +64,13 @@
|
|
|
64
64
|
`}
|
|
65
65
|
`,Mo=i.div`
|
|
66
66
|
min-height: 1px;
|
|
67
|
-
`,Ke=({left:e,right:o,center:r})=>t.jsx(
|
|
67
|
+
`,Ke=({left:e,right:o,center:r})=>t.jsx(Fa,{children:t.jsxs(za,{children:[t.jsx(_a,{children:e||t.jsx(Mo,{})}),t.jsx(Ba,{children:r||t.jsx(Mo,{})}),t.jsx(Ua,{children:o||t.jsx(Mo,{})})]})}),Wa=i.div`
|
|
68
68
|
width: 928px;
|
|
69
69
|
max-width: 100%;
|
|
70
70
|
margin: 0 auto 0;
|
|
71
71
|
padding: 32px 16px;
|
|
72
72
|
position: relative;
|
|
73
|
-
`,ut=({children:e,extendStyle:o})=>t.jsx(
|
|
73
|
+
`,ut=({children:e,extendStyle:o})=>t.jsx(Wa,{style:o==null?void 0:o.wrapper,children:e}),Gt=i.input.attrs(({type:e="text"})=>({type:e}))`
|
|
74
74
|
background: ${E.white};
|
|
75
75
|
border: 1px solid
|
|
76
76
|
${e=>e.borderColor||e.theme.colors.primary[20]};
|
|
@@ -88,7 +88,7 @@
|
|
|
88
88
|
&:focus {
|
|
89
89
|
border: 1px solid ${({theme:e})=>e.colors.primary[100]};
|
|
90
90
|
}
|
|
91
|
-
`,
|
|
91
|
+
`,Ha=i.button`
|
|
92
92
|
background-color: ${({backgroundColor:e})=>e};
|
|
93
93
|
box-sizing: border-box;
|
|
94
94
|
color: ${({textColor:e,theme:o})=>e||o.colors.primary[100]};
|
|
@@ -118,17 +118,17 @@
|
|
|
118
118
|
border-color: ${e};
|
|
119
119
|
`}
|
|
120
120
|
}
|
|
121
|
-
`,
|
|
121
|
+
`,qa=i.div`
|
|
122
122
|
display: flex;
|
|
123
123
|
align-items: center;
|
|
124
124
|
justify-content: center;
|
|
125
125
|
margin: ${({margin:e})=>e};
|
|
126
|
-
`,
|
|
126
|
+
`,Ga=i.div`
|
|
127
127
|
display: flex;
|
|
128
128
|
align-items: center;
|
|
129
129
|
justify-content: center;
|
|
130
130
|
margin: ${({margin:e})=>e};
|
|
131
|
-
`,
|
|
131
|
+
`,Ya=i.div`
|
|
132
132
|
display: flex;
|
|
133
133
|
align-items: flex-start;
|
|
134
134
|
flex-direction: column;
|
|
@@ -139,7 +139,7 @@
|
|
|
139
139
|
overflow: hidden;
|
|
140
140
|
text-overflow: ellipsis;
|
|
141
141
|
}
|
|
142
|
-
`,
|
|
142
|
+
`,Qa=i.div`
|
|
143
143
|
font-size: 10px;
|
|
144
144
|
line-height: 10px;
|
|
145
145
|
opacity: 0.8;
|
|
@@ -147,7 +147,7 @@
|
|
|
147
147
|
overflow: hidden;
|
|
148
148
|
text-overflow: ellipsis;
|
|
149
149
|
max-width: 115px;
|
|
150
|
-
`,Do=({text:e,subtext:o,type:r="button",icon:s,iconOther:n,backgroundColor:a=E.white,borderColor:c,hoverBorderColor:d,textColor:l,disabled:u=!1,margin:g="0",width:h="auto",fontSize:x="13px",padding:
|
|
150
|
+
`,Do=({text:e,subtext:o,type:r="button",icon:s,iconOther:n,backgroundColor:a=E.white,borderColor:c,hoverBorderColor:d,textColor:l,disabled:u=!1,margin:g="0",width:h="auto",fontSize:x="13px",padding:y="0 16px",height:m,onClick:w,title:f})=>{const b=y||(s?"0 16px 0 12px":"0 16px");return t.jsxs(Ha,{backgroundColor:a,borderColor:c,textColor:l,disabled:u,margin:g,onClick:w,type:r,width:h,fontSize:x,padding:b,height:m,hoverBorderColor:d,title:f,children:[!!s&&t.jsx(qa,{margin:e?"0 6px 0 0":"0",children:s}),t.jsxs(Ya,{children:[t.jsx("span",{children:e}),t.jsx(Qa,{children:o})]}),!!n&&t.jsx(Ga,{margin:e?"0 0 0 8px":"0",children:n})]})},Za=i.keyframes`
|
|
151
151
|
0% {
|
|
152
152
|
transform: rotate(0deg);
|
|
153
153
|
}
|
|
@@ -170,7 +170,7 @@
|
|
|
170
170
|
${e=>e.color?e.color:"#fff"};
|
|
171
171
|
border-color: ${e=>e.color?e.color:"#fff"} transparent
|
|
172
172
|
${e=>e.color?e.color:"#fff"} transparent;
|
|
173
|
-
animation: ${
|
|
173
|
+
animation: ${Za} 1.2s linear infinite;
|
|
174
174
|
}
|
|
175
175
|
`,rn=i.div`
|
|
176
176
|
font-weight: 700;
|
|
@@ -199,15 +199,15 @@
|
|
|
199
199
|
margin: 0;
|
|
200
200
|
letter-spacing: 1px;
|
|
201
201
|
}
|
|
202
|
-
`,
|
|
202
|
+
`,Ka=i.div`
|
|
203
203
|
position: ${e=>e.height?"relative":"inherit"};
|
|
204
204
|
height: ${e=>{if(typeof e.height=="string")return e.height;if(typeof e.height=="number")return`${e.height}px`;if(typeof e.height>"u")return 0}};
|
|
205
|
-
`,Ue=({isLoading:e=!1,error:o=!1,text:r,color:s,height:n,zIndex:a,onRetry:c,hideLoaderText:d})=>{const{t:l}=W.useTranslation();return t.jsxs(
|
|
205
|
+
`,Ue=({isLoading:e=!1,error:o=!1,text:r,color:s,height:n,zIndex:a,onRetry:c,hideLoaderText:d})=>{const{t:l}=W.useTranslation();return t.jsxs(Ka,{height:n,children:[e&&!o&&t.jsx(rn,{zIndex:a,children:t.jsxs(nn,{children:[t.jsx("div",{children:t.jsx(rt,{color:s||E.gray100})}),!d&&t.jsx("h1",{style:{color:s},children:r||l("Loading...")})]})}),o&&t.jsx(rn,{zIndex:a,children:t.jsx(nn,{style:{cursor:c?"pointer":"auto"},onClick:()=>c&&c(),children:t.jsx("h1",{children:"Try Again..."})})})]})},Vi="JWT_DECODED",Xa="GET_USER_START",Ja="GET_USER_ERROR",Li="GET_USER_SUCCESS",ec=(e,o)=>{const{payload:r,type:s}=o;switch(s){case Li:return{...e,userData:{...e.userData,...ji(r)}};case Vi:return{...e,userData:{...e.userData,...r}};default:return e}},sn={JWT_DECODED:Vi,GET_USER_START:Xa,GET_USER_ERROR:Ja,GET_USER_SUCCESS:Li},an={id:"0",uid:"0",userId:"0",customerId:"0",resellerId:"0",firstName:"0",lastName:"0",eleadEnabled:!1,admin:!1,resellerAdmin:!1,trial:!1,notifyMe:!1,access:"0",verified:0,captions:!1,vin:!1,iat:0,exp:0,totalLogins:0,showWelcome:!1,salesforceIntegration:!1,autoTranscribe:!1,wheelsTV:!1,webEmailEnabled:!1,allowDelete:!0,webShare:!0,timeZone:"",intercom:{},videoCount:0,droplrAccess:!1,affiliateAccess:!1,email:"",phone1:"",customer:{},transcriptionAccess:!1,playButtonPosition:"0",trialAccount:!1,automotiveRole:"0",vdpEnabled:!1,markVideosAsSent:null,packageDetails:null,reactionsPreference:null,isCompanyAdmin:!1,eleadDMSEmployeeID:null},Mi=p.createContext({}),tc=({initialUser:e={},children:o})=>{const[r,s]=p.useState(He),[n,a]=p.useReducer(ec,{userData:{...an,...e},jwt:"",setJwt:s});p.useEffect(()=>{Object.keys(e).length!==0&&a({type:sn.GET_USER_SUCCESS,payload:e})},[JSON.stringify(e)]),p.useEffect(()=>{try{const d=r&&Zs(r)||an;a({type:sn.JWT_DECODED,payload:d})}catch{console.log("Invalid token.")}},[r]);const c={...n,dispatch:a};return t.jsx(Mi.Provider,{value:c,children:o})},me=()=>p.useContext(Mi);var xt=(e=>(e.NO_ROLE="0",e.TECHNICIAN="1",e.SERVICE_ADVISOR="2",e.SERVICE_MANAGER="3",e.SALESPERSON="4",e.SALES_MANAGER="5",e.BDC="6",e))(xt||{});const nt={ASK_VERY_TIME:{value:2},NEVER:{value:0},ALWAYS:{value:1}},Xe=e=>st(e)||pt(e),st=e=>{const{customer:o,automotiveRole:r}=e;return o.automotiveAccess==="1"&&[xt.TECHNICIAN.toString(),xt.SERVICE_ADVISOR.toString(),xt.SERVICE_MANAGER.toString()].includes(r)},pt=e=>{const{customer:o,automotiveRole:r}=e;return o.automotiveAccess==="1"&&[xt.SALESPERSON.toString(),xt.SALES_MANAGER.toString(),xt.BDC.toString()].includes(r)},Di=e=>{const{customer:o,automotiveRole:r}=e;return o.automotiveAccess==="1"&&r===xt.TECHNICIAN},Lt=e=>Xe(e)?e.customer.markVideosAsSent===null?nt.ASK_VERY_TIME.value:parseInt(e.customer.markVideosAsSent.toString(),10):nt.NEVER.value,lr=i.svg`
|
|
206
206
|
fill: none;
|
|
207
207
|
stroke: white;
|
|
208
208
|
stroke-width: 5px;
|
|
209
209
|
display: flex;
|
|
210
|
-
`,
|
|
210
|
+
`,oc=i.label`
|
|
211
211
|
display: block;
|
|
212
212
|
position: relative;
|
|
213
213
|
margin: 0 auto;
|
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
width: 24px;
|
|
218
218
|
height: 24px;
|
|
219
219
|
}
|
|
220
|
-
`,
|
|
220
|
+
`,rc=i.input.attrs({type:"checkbox"})`
|
|
221
221
|
position: absolute;
|
|
222
222
|
border: 0;
|
|
223
223
|
z-index: -1;
|
|
@@ -228,9 +228,9 @@
|
|
|
228
228
|
&:focus {
|
|
229
229
|
outline: 0;
|
|
230
230
|
}
|
|
231
|
-
`,
|
|
231
|
+
`,nc=i.div`
|
|
232
232
|
width: ${e=>e.width?e.width:"auto"};
|
|
233
|
-
`,
|
|
233
|
+
`,ic=i.div`
|
|
234
234
|
border-radius: 4px;
|
|
235
235
|
box-sizing: border-box;
|
|
236
236
|
background-color: ${e=>e.checked?`${e.theme.colors.primary[100]}`:"white"};
|
|
@@ -255,7 +255,7 @@
|
|
|
255
255
|
width: 24px;
|
|
256
256
|
height: 24px;
|
|
257
257
|
}
|
|
258
|
-
`,
|
|
258
|
+
`,Oi=e=>{const{boxSize:o,checked:r,checkGroupIndicator:s=!1,disabled:n,width:a,onClick:c,style:d={}}=e,{userData:l}=me(),u=Xe(l);return t.jsx(nc,{width:a,children:t.jsxs(oc,{className:e.className,onClick:g=>{c&&c(g)},children:[t.jsx(rc,{type:"checkbox",...e,disabled:n,"aria-label":"Hidden"}),t.jsx(ic,{boxSize:o,checked:r,checkGroupIndicator:s,disabled:n,isAutomotive:u,style:d,children:s?t.jsx(lr,{viewBox:"0 0 24 24",children:t.jsx("polyline",{points:"4,12 20,12"})}):t.jsx(lr,{viewBox:"0 0 24 24",children:t.jsx("polyline",{points:"20 6 9 17 4 12"})})})]})})},sc=i.label`
|
|
259
259
|
display: flex;
|
|
260
260
|
padding: ${({removePadding:e})=>e===!0?"0":"5px 0"};
|
|
261
261
|
align-items: center;
|
|
@@ -266,7 +266,7 @@
|
|
|
266
266
|
&:hover ~ span {
|
|
267
267
|
opacity: 0.5;
|
|
268
268
|
}
|
|
269
|
-
`,
|
|
269
|
+
`,ac=i.span`
|
|
270
270
|
box-sizing: border-box;
|
|
271
271
|
position: relative;
|
|
272
272
|
height: 24px;
|
|
@@ -279,12 +279,12 @@
|
|
|
279
279
|
display: flex;
|
|
280
280
|
justify-content: center;
|
|
281
281
|
align-items: center;
|
|
282
|
-
`,
|
|
282
|
+
`,cc=i.span`
|
|
283
283
|
background: #fff;
|
|
284
284
|
border-radius: 50%;
|
|
285
285
|
height: 8px;
|
|
286
286
|
width: 8px;
|
|
287
|
-
`,
|
|
287
|
+
`,lc=i.input.attrs({type:"radio"})`
|
|
288
288
|
appearance: none;
|
|
289
289
|
width: 0px;
|
|
290
290
|
cursor: pointer;
|
|
@@ -293,7 +293,7 @@
|
|
|
293
293
|
border: 3px solid
|
|
294
294
|
${({theme:e})=>e.colors.primary[100]}};
|
|
295
295
|
}
|
|
296
|
-
`,Oo=e=>{const{value:o,text:r,removePadding:s,...n}=e;return t.jsxs(
|
|
296
|
+
`,Oo=e=>{const{value:o,text:r,removePadding:s,...n}=e;return t.jsxs(sc,{onClick:e.onClick,htmlFor:n.name,removePadding:s,value:o,children:[t.jsx(lc,{value:o,...n}),t.jsx(ac,{value:o,...n,children:e.checked&&t.jsx(cc,{})}),r]})},dc=i.div`
|
|
297
297
|
position: fixed;
|
|
298
298
|
top: 0;
|
|
299
299
|
bottom: 0;
|
|
@@ -303,7 +303,7 @@
|
|
|
303
303
|
background-color: ${E.blackRgba75};
|
|
304
304
|
z-index: 998;
|
|
305
305
|
width: 100% !important;
|
|
306
|
-
`,
|
|
306
|
+
`,uc=i.div`
|
|
307
307
|
width: auto;
|
|
308
308
|
height: 100vh;
|
|
309
309
|
${qt.mb} {
|
|
@@ -314,7 +314,7 @@
|
|
|
314
314
|
align-items: center;
|
|
315
315
|
justify-content: center;
|
|
316
316
|
z-index: 999;
|
|
317
|
-
`,
|
|
317
|
+
`,pc=i.div`
|
|
318
318
|
background-color: #fff;
|
|
319
319
|
overflow-y: ${e=>e.overflowY};
|
|
320
320
|
overflow-x: ${e=>e.overflowX};
|
|
@@ -328,7 +328,7 @@
|
|
|
328
328
|
width: ${e=>e.widthOnDesktop?e.widthOnDesktop:"auto"};
|
|
329
329
|
max-height: ${e=>e.maxHeight?e.maxHeight:"90%"};
|
|
330
330
|
}
|
|
331
|
-
`,Ot=({style:e={},children:o,widthOnDesktop:r,disableFullScreen:s,maxHeight:n,overrideBodyHeight:a=!1,bodyOverflowY:c="auto",bodyOverflowX:d="hidden"})=>(p.useEffect(()=>{if(document&&document.body){const l=document.body.className;document.body.className=l+(l?" ":"")+"modal-open"}return()=>{document&&document.body&&(document.body.className=document.body.className.replace(/ ?modal-open/,""))}},[]),t.jsx(
|
|
331
|
+
`,Ot=({style:e={},children:o,widthOnDesktop:r,disableFullScreen:s,maxHeight:n,overrideBodyHeight:a=!1,bodyOverflowY:c="auto",bodyOverflowX:d="hidden"})=>(p.useEffect(()=>{if(document&&document.body){const l=document.body.className;document.body.className=l+(l?" ":"")+"modal-open"}return()=>{document&&document.body&&(document.body.className=document.body.className.replace(/ ?modal-open/,""))}},[]),t.jsx(dc,{style:e,children:t.jsx(uc,{children:t.jsx(pc,{disableFullScreen:s,widthOnDesktop:r,maxHeight:n,overrideBodyHeight:a,overflowX:d,overflowY:c,children:o})})})),hc=i.button`
|
|
332
332
|
border: none;
|
|
333
333
|
cursor: ${e=>e.disabled?"not-allowed":"pointer"};
|
|
334
334
|
width: 60px;
|
|
@@ -358,7 +358,7 @@
|
|
|
358
358
|
transform: rotate(45deg);
|
|
359
359
|
display: block;
|
|
360
360
|
}
|
|
361
|
-
`,
|
|
361
|
+
`,gc=({disabled:e=!1,onClick:o,light:r=!1,zIndex:s=!1,padding:n="",marginTop:a="",marginRight:c="",style:d})=>t.jsx(hc,{disabled:e,onClick:o,light:r,zIndex:s,padding:n,marginTop:a,marginRight:c,style:d,children:t.jsx(H.MdClose,{})}),mc=k.memo(gc),xc=i.div`
|
|
362
362
|
box-shadow:
|
|
363
363
|
0 2px 4px 0 rgba(52, 58, 64, 0.1),
|
|
364
364
|
0 4px 24px 0 rgba(52, 58, 64, 0.15);
|
|
@@ -366,21 +366,21 @@
|
|
|
366
366
|
display: flex;
|
|
367
367
|
align-items: center;
|
|
368
368
|
border-radius: 5px;
|
|
369
|
-
`,
|
|
370
|
-
${
|
|
369
|
+
`,fc=i.div`
|
|
370
|
+
${$i};
|
|
371
371
|
font-size: ${yo.sm};
|
|
372
372
|
line-height: 1.14;
|
|
373
373
|
color: ${E.themeDark};
|
|
374
374
|
padding: 10px 16px;
|
|
375
375
|
margin: 0;
|
|
376
|
-
`,
|
|
376
|
+
`,vc=e=>{const{message:o}=e;return t.jsx(xc,{children:t.jsx(fc,{children:o})})},bc=i.div`
|
|
377
377
|
position: absolute;
|
|
378
378
|
top: 72px;
|
|
379
379
|
right: 16px;
|
|
380
380
|
z-index: 999;
|
|
381
381
|
display: grid;
|
|
382
382
|
gap: 8px;
|
|
383
|
-
`,
|
|
383
|
+
`,Ni=k.createContext(),wc=({children:e})=>{const[o,r]=k.useState(),[s,n]=k.useState([]);k.useEffect(()=>{if(o){const{message:c,type:d,timeout:l=3e3}=o,u=new Date().getTime()+l,g={id:Math.random(),message:c,type:d,maxAge:u};n([...s,g]),r()}},[o,s]),k.useEffect(()=>{const c=setInterval(()=>{const d=({maxAge:u})=>u&&u<new Date().getTime(),l=s.filter(u=>!d(u));l.length!==s.length&&n(l)},500);return()=>clearInterval(c)},[s]);const a={toast:r};return t.jsx(Ni.Provider,{value:a,children:t.jsxs(t.Fragment,{children:[s.length>0&&t.jsx(bc,{children:s.map(({id:c,message:d})=>t.jsx(vc,{message:d},c))}),e]})})},Te=()=>k.useContext(Ni),io=({children:e})=>t.jsx("div",{id:"covideo-embeddable-recorder",children:e}),yc=i.div`
|
|
384
384
|
box-sizing: border-box;
|
|
385
385
|
height: 40px;
|
|
386
386
|
border-radius: 6px;
|
|
@@ -397,7 +397,7 @@
|
|
|
397
397
|
opacity: 0.5;
|
|
398
398
|
}
|
|
399
399
|
`}
|
|
400
|
-
`,
|
|
400
|
+
`,Cc=i.span`
|
|
401
401
|
font-size: 15px;
|
|
402
402
|
font-weight: 600;
|
|
403
403
|
font-stretch: normal;
|
|
@@ -407,7 +407,7 @@
|
|
|
407
407
|
text-align: center;
|
|
408
408
|
color: #9297a2;
|
|
409
409
|
cursor: pointer;
|
|
410
|
-
`,
|
|
410
|
+
`,Sc=e=>{const{defaultValue:o,values:r,onChange:s,className:n,skipConfirmation:a=!0}=e,[c,d]=p.useState(o);return t.jsx(yc,{...n&&{className:n},disabled:e.disabled,children:r.map(l=>l.value===c?t.jsx("div",{style:{width:l.width},children:t.jsx(F.Button,{text:l.text,size:"large"})},l.value):t.jsx(Cc,{onClick:()=>{s(l.value),a&&d(l.value)},children:l.text},l.value))})},jc=i.input.attrs({type:"text"})`
|
|
411
411
|
display: block;
|
|
412
412
|
width: 100%;
|
|
413
413
|
max-width: 800px;
|
|
@@ -416,7 +416,7 @@
|
|
|
416
416
|
font-size: 16px;
|
|
417
417
|
color: ${E.black_1_100};
|
|
418
418
|
opacity: 0.6;
|
|
419
|
-
${
|
|
419
|
+
${$i}
|
|
420
420
|
}
|
|
421
421
|
border: ${({error:e,theme:o})=>e?`1px solid ${o.colors.danger[100]}`:"solid 1px #dfe3e6"};
|
|
422
422
|
height: 40px;
|
|
@@ -432,7 +432,7 @@
|
|
|
432
432
|
border-color: #80bdff;
|
|
433
433
|
outline: 0;
|
|
434
434
|
}
|
|
435
|
-
`;var Mt=(e=>(e.QUOTE_SEND="Quote-Send",e.OPENED_EMAIL="Opened-Email",e.WATCHED_VIDEO="Watched-Video",e.APPROVED_ITEMS="Approved-Items",e.UPDATE_QUOTE="Update-Quote",e.RECORDED_VIDEO="Recorded-Video",e.APPROVED_VIDEO="Approved-Video",e.DENIED_VIDEO="Denied-Video",e.DELETE_VIDEO="Delete-Video",e.QUOTE_RESEND="Quote-Resend",e.UPDATE_RO="RO-Update",e.QUICKSHARE="Quickshare",e.CRM_SHARE="Crm-Share",e.WATCHED_VIDEO_UNKNOWN="WATCHED_VIDEO_UNKNOWN",e))(Mt||{});const
|
|
435
|
+
`;var Mt=(e=>(e.QUOTE_SEND="Quote-Send",e.OPENED_EMAIL="Opened-Email",e.WATCHED_VIDEO="Watched-Video",e.APPROVED_ITEMS="Approved-Items",e.UPDATE_QUOTE="Update-Quote",e.RECORDED_VIDEO="Recorded-Video",e.APPROVED_VIDEO="Approved-Video",e.DENIED_VIDEO="Denied-Video",e.DELETE_VIDEO="Delete-Video",e.QUOTE_RESEND="Quote-Resend",e.UPDATE_RO="RO-Update",e.QUICKSHARE="Quickshare",e.CRM_SHARE="Crm-Share",e.WATCHED_VIDEO_UNKNOWN="WATCHED_VIDEO_UNKNOWN",e))(Mt||{});const Ec=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("g",{fill:"#272A32"},k.createElement("path",{d:"M18.3 5.71c-.187-.187-.44-.292-.705-.292-.265 0-.518.105-.705.292L12 10.59 7.11 5.7c-.187-.187-.44-.292-.705-.292-.265 0-.518.105-.705.292-.39.39-.39 1.02 0 1.41L10.59 12 5.7 16.89c-.39.39-.39 1.02 0 1.41.39.39 1.02.39 1.41 0L12 13.41l4.89 4.89c.39.39 1.02.39 1.41 0 .39-.39.39-1.02 0-1.41L13.41 12l4.89-4.89c.38-.38.38-1.02 0-1.4z"}))),Et=i(Ec)`
|
|
436
436
|
width: ${e=>e.width||"16px"};
|
|
437
437
|
height: ${e=>e.height||"16px"};
|
|
438
438
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -440,7 +440,7 @@
|
|
|
440
440
|
fill: ${e=>e.color||"currentColor"};
|
|
441
441
|
opacity: ${e=>e.opacity||"inherit"};
|
|
442
442
|
}
|
|
443
|
-
`,
|
|
443
|
+
`,Tc=i.div`
|
|
444
444
|
box-sizing: border-box;
|
|
445
445
|
width: 592px;
|
|
446
446
|
padding: 32px;
|
|
@@ -449,16 +449,16 @@
|
|
|
449
449
|
${({theme:e})=>e.containerWidth<=z.xs&&i.css`
|
|
450
450
|
width: 100%;
|
|
451
451
|
`}
|
|
452
|
-
`,
|
|
452
|
+
`,kc=i.div`
|
|
453
453
|
display: flex;
|
|
454
454
|
align-items: center;
|
|
455
455
|
justify-content: space-between;
|
|
456
|
-
`,
|
|
456
|
+
`,Ic=i.div`
|
|
457
457
|
color: ${E.gray100};
|
|
458
458
|
font-weight: bold;
|
|
459
459
|
font-size: 18px;
|
|
460
460
|
line-height: 24px;
|
|
461
|
-
`,
|
|
461
|
+
`,Ac=i.label`
|
|
462
462
|
display: flex;
|
|
463
463
|
align-items: center;
|
|
464
464
|
margin: 0;
|
|
@@ -467,13 +467,13 @@
|
|
|
467
467
|
&:hover {
|
|
468
468
|
cursor: pointer;
|
|
469
469
|
}
|
|
470
|
-
`,
|
|
470
|
+
`,Rc=i.div`
|
|
471
471
|
font-style: normal;
|
|
472
472
|
font-weight: 400;
|
|
473
473
|
font-size: 14px;
|
|
474
474
|
line-height: 20px;
|
|
475
475
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
476
|
-
|
|
476
|
+
`,$c=i.section`
|
|
477
477
|
display: flex;
|
|
478
478
|
justify-content: flex-end;
|
|
479
479
|
margin-top: 32px;
|
|
@@ -482,7 +482,7 @@
|
|
|
482
482
|
${({theme:e})=>e.containerWidth<=z.xs&&i.css`
|
|
483
483
|
justify-content: space-between;
|
|
484
484
|
`}
|
|
485
|
-
`,
|
|
485
|
+
`,Vc=i.div`
|
|
486
486
|
display: flex;
|
|
487
487
|
flex-direction: row;
|
|
488
488
|
width: 500px;
|
|
@@ -497,15 +497,15 @@
|
|
|
497
497
|
${({theme:e})=>e.containerWidth<=z.xs&&i.css`
|
|
498
498
|
width: 100%;
|
|
499
499
|
`}
|
|
500
|
-
|
|
500
|
+
`,Lc=i.section`
|
|
501
501
|
display: flex;
|
|
502
502
|
flex-direction: column;
|
|
503
503
|
height: 100%;
|
|
504
|
-
`,
|
|
504
|
+
`,Mc=i.section`
|
|
505
505
|
margin-right: 14px;
|
|
506
506
|
height: 100%;
|
|
507
507
|
color: ${({theme:e})=>e.colors.primary[40]};
|
|
508
|
-
`,Tr=({handleModalClose:e,quickShareMarkAsSentHandler:o,isQuickShareLoading:r,markAsSentPayload:s,getMarkAsSentPayload:n})=>{const{t:a}=W.useTranslation(),{isCdkEnviroment:c}=i.useTheme(),{userData:d}=me(),{isCompanyAdmin:l}=d,u=async g=>{const h=await(n==null?void 0:n()),x={markAsSentConfirmed:g,videoActivityType:Mt.QUICKSHARE,...s,...h==null?void 0:h.videoShareSetData,...(h==null?void 0:h.useAutomotive)!==void 0?{useAutomotive:h.useAutomotive}:{}};o(x)};return t.jsx(Ot,{children:t.jsxs(
|
|
508
|
+
`,Tr=({handleModalClose:e,quickShareMarkAsSentHandler:o,isQuickShareLoading:r,markAsSentPayload:s,getMarkAsSentPayload:n})=>{const{t:a}=W.useTranslation(),{isCdkEnviroment:c}=i.useTheme(),{userData:d}=me(),{isCompanyAdmin:l}=d,u=async g=>{const h=await(n==null?void 0:n()),x={markAsSentConfirmed:g,videoActivityType:Mt.QUICKSHARE,...s,...h==null?void 0:h.videoShareSetData,...(h==null?void 0:h.useAutomotive)!==void 0?{useAutomotive:h.useAutomotive}:{}};o(x)};return t.jsx(Ot,{children:t.jsxs(Tc,{children:[t.jsxs(kc,{children:[t.jsx(Ic,{children:a("Mark Video as ‘Sent’?")}),t.jsx(Ac,{children:t.jsx(Et,{width:"24px",height:"24px",onClick:e,disabled:r})})]}),t.jsxs(Vc,{children:[t.jsx(Mc,{children:t.jsx(xi.AiFillInfoCircle,{size:24,color:"inherit"})}),t.jsx(Lc,{children:t.jsx(Rc,{children:a(l?"If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.")})})]}),t.jsxs($c,{children:[t.jsx(F.Button,{text:a("Leave as ‘Not Sent’"),variant:c?"text":"white",disabled:r,onClick:()=>u(!1)}),t.jsx(F.Button,{text:a("Mark as Sent"),disabled:r,onClick:()=>u(!0)})]})]})})};var kr=(e=>(e.TELEPROPTER_SCRIPT="Teleprompter Script",e.EMAIL="Email",e.SMS="SMS",e.CRM_MESSAGE="CRM Message",e))(kr||{});const Dc=async(e,o)=>(await ie.get(`/share/quickshare/${e}`,{params:o})).data,Pi=()=>{const{toast:e}=Te(),{t:o}=W.useTranslation(),r=async(a,c)=>{const d=l=>{l.clipboardData&&(l.clipboardData.setData("text/html",c||""),l.clipboardData.setData("text/plain",a)),l.preventDefault()};document.addEventListener("copy",l=>d(l),{once:!0}),document.execCommand("copy")},s=async a=>{const c=async()=>{const{videoId:l,toastType:u,...g}=a,h=await Dc(l,{...g});return{url:h.data.url,html:h.data.html}},d=document.createElement("textArea");await navigator.clipboard.write([await new ClipboardItem({"text/plain":new Promise(async l=>{l(new Blob([(await c()).url],{type:"text/plain"}))}),"text/html":new Promise(async l=>{d.style.visibility="hidden",d.setAttribute("contenteditable","true"),d.value=(await c()).html,document.body.appendChild(d);const u=document.createRange();u.selectNodeContents(d);const g=window.getSelection();g==null||g.removeAllRanges(),g==null||g.addRange(u),d==null||d.setSelectionRange(0,999999),l(new Blob([d.value],{type:"text/html"}))})})]),d&&d.remove&&d.remove()};return{copyClipboard:async(a,c,d)=>{try{Dt?await s(d):await r(a,c)}catch{e({message:o("Failed to copy to clipboard")})}}}},Oc=async e=>{const{videoId:o,toastType:r,...s}=e,n={...s,...Dt?{reuseShortUrl:!0}:{}},{data:a}=await ie.post(`/share/quickshare/${o}/mark-as-sent`,n);return a},Nc=(e,o)=>{switch(o.toastType){case"crm_code":return{title:"CRM Code Copied!",clipboardText:e.url,clipboardHtml:e.html};case"url":return{title:"URL Copied!",clipboardText:e.url};case"html_code":return{title:"Raw HTML Copied!",clipboardText:e.legacyHtml};case"quickshare":return{title:"Link copied to clipboard!",clipboardText:e.url,clipboardHtml:e.html};case"insert":return{title:"Inserting video..."}}},Pc=e=>{const{t:o}=W.useTranslation(),{userData:r}=me(),{toast:s}=Te(),{copyClipboard:n}=Pi(),{onVideoInsert:a,onVideoInsertError:c}=Se(),d=Lt(r);return Ce.useMutation(Oc,{onSuccess:(l,u)=>{const g=Nc(l,u);if(d===nt.ALWAYS.value&&s({message:o("Video marked as Sent")}),d===nt.ASK_VERY_TIME.value&&u.markAsSentConfirmed&&s({message:o("Video marked as Sent")}),g){if(g.clipboardText)try{!Dt&&g.clipboardText&&n(g.clipboardText,(g==null?void 0:g.clipboardHtml)||"",{})}catch(h){console.log("Failed to copy to clipboard...",h)}g.title&&setTimeout(()=>{s({message:o(g.title)})},100)}u.toastType==="insert"&&(a==null||a({url:l.url,thumbnail:l.thumbnail,image:(l==null?void 0:l.image)||"",html:l.html,token:He})),e()},onError:l=>{c==null||c(l)}})},Ir=({video:e,videoRequest:o,setShowModalQuickShareMarkAsSent:r,handleOnMarkAsSentSuccessCallback:s})=>{const{userData:n}=me(),{copyClipboard:a}=Pi(),c=()=>{s==null||s(),r(!1)},{isLoading:d,mutateAsync:l}=Pc(c),u=async({markAsSentConfirmed:h,videoActivityType:x,...y})=>{const m={videoId:typeof e=="number"?e.toString():(e==null?void 0:e.id)||"",vin:(o==null?void 0:o.vin)||"",useAutomotive:!!(o!=null&&o.vin),...x?{videoActivityType:x}:{},...h!==void 0?{markAsSentConfirmed:h}:{},...y};if(Dt)try{await a("","",m)}catch(w){console.log("Failed to copy to clipboard...",w)}return await l(m)};return{onQuickShareButtonClick:({videoActivityType:h,...x})=>{const y=Lt(n);if(y===nt.NEVER.value)return u({videoActivityType:h,...x});if(y===nt.ASK_VERY_TIME.value)return r(!0);if(y===nt.ALWAYS.value)return u({videoActivityType:h,...x})},isQuickshareLoading:d,onQuickShareMutationHandler:u}},Fi=({src:e,onLoad:o})=>{const n=p.useRef(null),[a,c]=p.useState(0),[d,l]=p.useState(!1),u=()=>{var h,x;l(!1),c(0),o&&o(((h=n.current)==null?void 0:h.offsetWidth)??0,((x=n.current)==null?void 0:x.offsetHeight)??0)},g=()=>{if(l(!0),a>=30)return;let h=Math.pow(2,a)*1e3;h>5e3&&(h=5e3),setTimeout(()=>c(a+1),h)};return p.useEffect(()=>(n!=null&&n.current&&(n.current.onload=u,n.current.onerror=g,n.current.src=e),()=>{n!=null&&n.current&&(n.current.onload=null,n.current.onerror=null)}),[e,a]),{imgRef:n,retryCount:a,error:d}};var At=(e=>(e[e.READY=0]="READY",e[e.PROCESSING=1]="PROCESSING",e[e.FAILED=2]="FAILED",e))(At||{});const zi=({videoId:e,checkField:o,enabled:r})=>{const[a,c]=p.useState(null),[d,l]=p.useState(0),[u,g]=p.useState(!1);return p.useEffect(()=>{if(!r)return;(async()=>{try{const x=await wo(e.toString()),y=(x==null?void 0:x.processing)===At.FAILED||(x==null?void 0:x.processing)===At.READY;if(o&&x[o]){c(x);return}if(y){const m=localStorage.getItem(ze.merge);if(m){const w=JSON.parse(m)||[];w.forEach((f,b)=>{f.id===x.id&&(w[b]=x)}),localStorage.setItem(ze.merge,JSON.stringify(w))}c(x);return}if(d<30){let m=Math.pow(2,d)*1e3;m>5e3&&(m=5e3),setTimeout(()=>{l(d+1)},m);return}g(!0)}catch{g(!0)}})()},[e,o,d,r]),{videoData:a,retryCount:d,error:u}},Fc=i.div`
|
|
509
509
|
position: relative;
|
|
510
510
|
width: ${e=>e.thumbnailWidth?e.thumbnailWidth:"100%"};
|
|
511
511
|
height: ${e=>e.thumbnailHeight?e.thumbnailHeight:"100%"};
|
|
@@ -514,7 +514,7 @@
|
|
|
514
514
|
cursor: pointer;
|
|
515
515
|
overflow: hidden;
|
|
516
516
|
opacity: ${e=>e.status==="deleted"?.5:1};
|
|
517
|
-
`,
|
|
517
|
+
`,zc=i.img`
|
|
518
518
|
position: absolute;
|
|
519
519
|
top: 0;
|
|
520
520
|
bottom: 0;
|
|
@@ -522,12 +522,12 @@
|
|
|
522
522
|
transform: translateX(-50%);
|
|
523
523
|
height: 100%;
|
|
524
524
|
opacity: ${e=>e.visible?1:0};
|
|
525
|
-
`,
|
|
525
|
+
`,_c=i.div`
|
|
526
526
|
position: absolute;
|
|
527
527
|
left: 50%;
|
|
528
528
|
top: 50%;
|
|
529
529
|
transform: translate(-50%, -50%);
|
|
530
|
-
`,
|
|
530
|
+
`,Bc=i.div`
|
|
531
531
|
display: flex;
|
|
532
532
|
justify-content: center;
|
|
533
533
|
align-items: center;
|
|
@@ -537,7 +537,7 @@
|
|
|
537
537
|
left: 0;
|
|
538
538
|
right: 0;
|
|
539
539
|
background-color: ${E.black};
|
|
540
|
-
`,
|
|
540
|
+
`,Uc=i.div`
|
|
541
541
|
display: flex;
|
|
542
542
|
justify-content: center;
|
|
543
543
|
align-items: center;
|
|
@@ -548,7 +548,7 @@
|
|
|
548
548
|
right: 0;
|
|
549
549
|
color: ${E.red100};
|
|
550
550
|
background-color: ${E.black};
|
|
551
|
-
`,
|
|
551
|
+
`,Wc=i.div`
|
|
552
552
|
position: absolute;
|
|
553
553
|
left: 8px;
|
|
554
554
|
bottom: 6px;
|
|
@@ -563,7 +563,7 @@
|
|
|
563
563
|
align-items: center;
|
|
564
564
|
justify-content: center;
|
|
565
565
|
min-width: 36px;
|
|
566
|
-
`,
|
|
566
|
+
`,_i=({onClick:e,thumbnail:o,duration:r,videoId:s,emailStatus:n,processing:a,thumbnailHeight:c,thumbnailWidth:d,refreshVideoList:l})=>{const{t:u}=W.useTranslation(),g=V=>ua(V/1e3).split(".")[0],{videoData:h}=zi({videoId:s,enabled:a===1});p.useEffect(()=>{a!==(h==null?void 0:h.processing)&&l&&l()},[h]);const{imgRef:x,retryCount:y,error:m}=Fi({src:(h==null?void 0:h.autogeneratedThumbnail)||o}),w=!m&&y===0,f=r?g(r):h!=null&&h.videoLength?g(h==null?void 0:h.videoLength):"...",b=a===2||(h==null?void 0:h.processing)===2,S=a===0||(h==null?void 0:h.processing)===0,T=b||S;return t.jsxs(Fc,{onClick:()=>e(),status:n,thumbnailHeight:c,thumbnailWidth:d,children:[t.jsx(zc,{src:o,ref:x,visible:w},y),S&&t.jsx(_c,{children:t.jsx(vi.BsPlayFill,{color:E.white,size:30})}),!T&&t.jsx(Bc,{children:t.jsx(rt,{})}),b&&t.jsx(Uc,{children:u("Failed")}),!b&&r&&t.jsx(Wc,{children:f})]})},Ar=e=>{const[o,r]=k.useState(null);return k.useEffect(()=>{if(!o)return;const n=a=>{o.contains(a.target)||e()};return document.addEventListener("click",n,!0),()=>document.removeEventListener("click",n,!0)},[o]),{ref:k.useCallback(n=>r(n),[])}},Hc=i.div`
|
|
567
567
|
position: fixed;
|
|
568
568
|
top: 0;
|
|
569
569
|
bottom: 0;
|
|
@@ -573,7 +573,7 @@
|
|
|
573
573
|
background-color: ${E.blackRgba75};
|
|
574
574
|
z-index: 998;
|
|
575
575
|
width: 100% !important;
|
|
576
|
-
`,
|
|
576
|
+
`,qc=i.div`
|
|
577
577
|
width: auto;
|
|
578
578
|
height: 100vh;
|
|
579
579
|
${({theme:e})=>e.containerWidth>=z.mb&&i.css`
|
|
@@ -584,7 +584,7 @@
|
|
|
584
584
|
align-items: center;
|
|
585
585
|
justify-content: center;
|
|
586
586
|
z-index: 999;
|
|
587
|
-
`,
|
|
587
|
+
`,Gc=i.div`
|
|
588
588
|
height: ${e=>e.maxHeight?e.maxHeight:"100vh"};
|
|
589
589
|
background-color: #fff;
|
|
590
590
|
overflow-y: ${e=>e.overflowY};
|
|
@@ -594,13 +594,13 @@
|
|
|
594
594
|
height: ${e.overrideBodyHeight&&e.maxHeight?e.maxHeight:"auto"};
|
|
595
595
|
width: ${e.widthOnDesktop?e.widthOnDesktop:"auto"};
|
|
596
596
|
`}}
|
|
597
|
-
`,Co=({style:e={},children:o,widthOnDesktop:r,disableFullScreen:s,maxHeight:n,overrideBodyHeight:a=!1,bodyOverflowY:c="auto",bodyOverflowX:d="hidden",onOutsideClick:l})=>{p.useEffect(()=>{if(document&&document.body){const g=document.body.className;document.body.className=g+(g?" ":"")+"modal-open"}return()=>{document&&document.body&&(document.body.className=document.body.className.replace(/ ?modal-open/,""))}},[]);const{ref:u}=Ar(l);return t.jsx(
|
|
597
|
+
`,Co=({style:e={},children:o,widthOnDesktop:r,disableFullScreen:s,maxHeight:n,overrideBodyHeight:a=!1,bodyOverflowY:c="auto",bodyOverflowX:d="hidden",onOutsideClick:l})=>{p.useEffect(()=>{if(document&&document.body){const g=document.body.className;document.body.className=g+(g?" ":"")+"modal-open"}return()=>{document&&document.body&&(document.body.className=document.body.className.replace(/ ?modal-open/,""))}},[]);const{ref:u}=Ar(l);return t.jsx(Hc,{style:e,children:t.jsx(qc,{children:t.jsx(Gc,{disableFullScreen:s,widthOnDesktop:r,maxHeight:n,overrideBodyHeight:a,overflowX:d,overflowY:c,ref:l?u:null,children:o})})})},Yc=i.div`
|
|
598
598
|
width: 100%;
|
|
599
599
|
display: flex;
|
|
600
600
|
cursor: pointer;
|
|
601
601
|
flex: 1;
|
|
602
602
|
padding-bottom: ${e=>`${e.small?"0px":" 0px 12px"}`};
|
|
603
|
-
`,
|
|
603
|
+
`,Qc=i.progress`
|
|
604
604
|
width: 100%;
|
|
605
605
|
color: white;
|
|
606
606
|
opacity: 1;
|
|
@@ -616,27 +616,27 @@
|
|
|
616
616
|
background-color: white;
|
|
617
617
|
border-radius: 4px;
|
|
618
618
|
}
|
|
619
|
-
`,
|
|
619
|
+
`,Zc=e=>{const{duration:o=.1,currentTime:r=0,scrub:s,color:n,small:a}=e,c=k.createRef();return t.jsx(Yc,{small:a,children:t.jsx(Qc,{ref:c,onClick:d=>s(d,c),value:r.toString(),min:"0",max:o.toString(),color:n,small:a})})},Kc=e=>t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",viewBox:"0 0 24 24",children:[t.jsx("defs",{children:t.jsx("path",{id:"volumeOff-a",d:"M3.63 3.635a.996.996 0 0 0 0 1.41l3.66 3.66-.29.3H4c-.55 0-1 .45-1 1v4c0 .55.45 1 1 1h3l3.29 3.29c.63.63 1.71.18 1.71-.71v-4.17l4.18 4.18c-.49.37-1.02.68-1.6.91-.36.15-.58.53-.58.92 0 .72.73 1.18 1.39.91.8-.33 1.55-.77 2.22-1.31l1.34 1.34a.996.996 0 1 0 1.41-1.41L5.05 3.635c-.39-.39-1.02-.39-1.42 0zM19 12.005c0 .82-.15 1.61-.41 2.34l1.53 1.53c.56-1.17.88-2.48.88-3.87 0-3.83-2.4-7.11-5.78-8.4-.59-.23-1.22.23-1.22.86v.19c0 .38.25.71.61.85 2.57 1.04 4.39 3.56 4.39 6.5zm-8.71-6.29l-.17.17L12 7.765v-1.35c0-.89-1.08-1.33-1.71-.7zm6.21 6.29a4.5 4.5 0 0 0-2.5-4.03v1.79l2.48 2.48c.01-.08.02-.16.02-.24z"})}),t.jsxs("g",{fill:"none",fillRule:"evenodd",children:[t.jsx("mask",{id:"volumeOff-b",fill:"#fff",children:t.jsx("use",{xlinkHref:"#volumeOff-a"})}),t.jsx("g",{fill:"#fff",fillOpacity:"1",mask:"url(#volumeOff-b)",children:t.jsx("path",{d:"M0 0h24v24H0z"})})]})]}),Xc=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("g",{fill:"#FFF"},k.createElement("path",{d:"M7.928 6.82v10.36c0 .79.87 1.27 1.54.84l8.14-5.18c.62-.39.62-1.29 0-1.69l-8.14-5.17c-.67-.43-1.54.05-1.54.84z"}))),Jc=i(Xc)`
|
|
620
620
|
width: ${e=>e.width||"40px"};
|
|
621
621
|
height: ${e=>e.height||"40px"};
|
|
622
622
|
path {
|
|
623
623
|
opacity: ${e=>e.opacity||"inherit"};
|
|
624
624
|
}
|
|
625
|
-
`,
|
|
625
|
+
`,el=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("g",{fill:"#272A32"},k.createElement("path",{d:"M8 19c1.1 0 2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2v10c0 1.1.9 2 2 2zm6-12v10c0 1.1.9 2 2 2s2-.9 2-2V7c0-1.1-.9-2-2-2s-2 .9-2 2z"}))),tl=i(el)`
|
|
626
626
|
width: ${e=>e.width||"24px"};
|
|
627
627
|
height: ${e=>e.height||"24px"};
|
|
628
628
|
path {
|
|
629
629
|
fill: ${e=>e.color||"currentColor"};
|
|
630
630
|
opacity: ${e=>e.opacity||"inherit"};
|
|
631
631
|
}
|
|
632
|
-
`,
|
|
632
|
+
`,ol=e=>k.createElement("svg",{width:20,height:17,viewBox:"0 0 20 17",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M17.2907 7.4906C17.3029 7.31501 17.3614 7.14578 17.46 7C17.5559 6.84858 17.6907 6.72571 17.8504 6.64426C18.0101 6.56281 18.1887 6.52577 18.3676 6.53701C18.5464 6.54826 18.719 6.60738 18.8672 6.70818C19.0154 6.80898 19.1338 6.94776 19.21 7.11C19.8115 8.53356 20.0749 10.0772 19.9794 11.6196C19.884 13.1621 19.4324 14.6614 18.66 16C18.4838 16.3052 18.2301 16.5584 17.9245 16.734C17.619 16.9097 17.2724 17.0014 16.92 17H3.07C2.72098 16.9979 2.37858 16.9045 2.07683 16.7291C1.77509 16.5536 1.52451 16.3023 1.35 16C0.294996 14.182 -0.160348 12.0779 0.0486524 9.98638C0.257653 7.89489 1.12037 5.92243 2.51426 4.34919C3.90815 2.77594 5.76232 1.68191 7.81341 1.2225C9.8645 0.763091 12.0082 0.961661 13.94 1.79C14.1082 1.85914 14.2544 1.97285 14.3628 2.11888C14.4712 2.26492 14.5377 2.43776 14.5552 2.61879C14.5727 2.79982 14.5405 2.98219 14.462 3.14628C14.3836 3.31036 14.2619 3.44995 14.11 3.55C13.9642 3.64865 13.795 3.70707 13.6194 3.71936C13.4438 3.73165 13.2681 3.69738 13.11 3.62C12.4369 3.33395 11.7264 3.14538 11 3.06C9.56439 2.8728 8.10489 3.07868 6.77709 3.6557C5.44928 4.23271 4.30294 5.15924 3.46028 6.3365C2.61762 7.51376 2.11023 8.89763 1.99219 10.3406C1.87414 11.7835 2.14988 13.2314 2.79 14.53C2.87447 14.6931 3.0022 14.8297 3.1592 14.9249C3.31619 15.0202 3.49638 15.0704 3.68 15.07H16.33C16.5126 15.0713 16.6921 15.0227 16.849 14.9292C17.0059 14.8358 17.1342 14.7012 17.22 14.54C17.9267 13.0705 18.1674 11.4201 17.91 9.81C17.8129 9.18733 17.6382 8.57927 17.39 8C17.3126 7.84191 17.2784 7.66618 17.2907 7.4906Z",fill:"#001B53"}),k.createElement("path",{d:"M8.00391 11.005C8.00391 10.4743 8.21474 9.96527 8.59002 9.58999L17.08 3.92999L11.42 12.42C11.0447 12.7953 10.5357 13.0061 10.005 13.0061C9.74223 13.0061 9.48201 12.9543 9.23923 12.8538C8.99644 12.7532 8.77584 12.6058 8.59002 12.42C8.4042 12.2342 8.2568 12.0136 8.15623 11.7708C8.05567 11.528 8.00391 11.2678 8.00391 11.005Z",fill:"#001B53"})),rl=i(ol)`
|
|
633
633
|
width: ${e=>e.width||"16px"};
|
|
634
634
|
height: ${e=>e.height||"16px"};
|
|
635
635
|
path {
|
|
636
636
|
fill: ${e=>e.color||"currentColor"};
|
|
637
637
|
opacity: ${e=>e.opacity||"inherit"};
|
|
638
638
|
}
|
|
639
|
-
`,
|
|
639
|
+
`,nl=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:16,height:16,viewBox:"0 0 16 16",...e},k.createElement("g",{fill:"#FFF"},k.createElement("path",{id:"1i74dgfm6a",d:"M5.867 10.603L3.533 8.27c-.123-.125-.291-.195-.466-.195-.176 0-.344.07-.467.195-.26.26-.26.673 0 .933l2.793 2.794c.26.26.68.26.94 0l7.067-7.06c.26-.26.26-.674 0-.934-.123-.124-.291-.195-.467-.195-.175 0-.343.07-.466.195l-6.6 6.6z"}))),Bi=i(nl)`
|
|
640
640
|
width: ${e=>e.width||"21px"};
|
|
641
641
|
height: ${e=>e.height||"21px"};
|
|
642
642
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -644,7 +644,7 @@
|
|
|
644
644
|
fill: ${e=>e.color||"currentColor"};
|
|
645
645
|
opacity: ${e=>e.opacity||"inherit"};
|
|
646
646
|
}
|
|
647
|
-
`,
|
|
647
|
+
`,il=e=>k.createElement("svg",{width:20,height:20,viewBox:"0 0 290 290",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("mask",{id:"mask0_16_1171",style:{maskType:"luminance"},maskUnits:"userSpaceOnUse",x:0,y:0,width:290,height:290},k.createElement("path",{d:"M290 0H0V290H290V0Z",fill:"white"})),k.createElement("g",{mask:"url(#mask0_16_1171)"},k.createElement("path",{d:"M143.64 129.1H133.1V160.12H143.64C149.42 160.12 152.36 158.82 154.88 156.4C157.82 153.54 159.46 150 159.46 144.74C159.46 139.82 158 136.18 155.32 133.34C152.82 130.66 149.88 129.1 143.66 129.1H143.64Z",fill:"white"}),k.createElement("path",{d:"M145.74 0.78C66.42 0.78 1.9 65.3 1.9 144.62C1.9 223.94 66.42 288.46 145.74 288.46C225.06 288.46 289.58 223.94 289.58 144.62C289.58 65.3 225.06 0.78 145.74 0.78ZM78.76 174.56C59.84 174.56 47.3 161.08 47.3 144.58C47.3 128.08 59.92 114.68 78.32 114.68C88.68 114.68 98.22 118.66 106.48 124.36L97.4 134.2C92.12 129.88 85.3 127.38 80.2 127.38C69.74 127.38 63 135.24 63 144.66C63 154.08 69.92 161.94 80.62 161.94C87.18 161.94 94.02 158.06 99.02 153.38L108.18 163.06C101.36 169.1 91.16 174.56 78.72 174.56H78.76ZM167.14 164.78C162.22 169.62 155.14 172.82 143.98 172.82H117.98V116.4H143.98C154.52 116.4 162.3 119.34 167.56 124.86C172.4 129.96 175.08 136.86 175.08 144.56C175.08 152.26 172.32 159.68 167.14 164.78ZM228.66 172.82L209.4 148.54L202.58 155.02V172.82H187.38V116.4H202.58V137.56L224.78 116.4H243.96L220.02 138.78L247.4 172.82H228.66Z",fill:"white"}),k.createElement("path",{d:"M264.54 269.48H262.68V274.18H261.34V269.48H259.48V268.4H264.54V269.48Z",fill:"white"}),k.createElement("path",{d:"M270.52 270.7L268.82 273.56H268.2L266.52 270.78V274.18H265.26V268.4H266.36L268.54 271.98L270.66 268.4H271.76L271.78 274.18H270.52V270.7Z",fill:"white"}))),sl=i(il)`
|
|
648
648
|
width: ${e=>e.width||"21px"};
|
|
649
649
|
height: ${e=>e.height||"21px"};
|
|
650
650
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -652,7 +652,7 @@
|
|
|
652
652
|
fill: ${e=>e.color||"currentColor"};
|
|
653
653
|
opacity: ${e=>e.opacity||"inherit"};
|
|
654
654
|
}
|
|
655
|
-
`,
|
|
655
|
+
`,al=e=>k.createElement("svg",{width:32,height:32,viewBox:"0 0 32 32",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_169_7893)"},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M13.8611 22.8365V8.99684L7.47923 3.75562L0 11.1862V20.81L7.483 28.2956L7.52376 28.2684L13.8611 22.8365Z",fill:"white",fillOpacity:.4}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M32 12.9316V11.1862L22.3706 1.5625H9.68686L7.48309 3.75112L22.1049 15.761H32V12.9316Z",fill:"url(#paint0_linear_169_7893)"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M22.1049 15.761L7.48309 28.2956L9.62573 30.4375H22.3706L32 20.81V15.761H22.1049Z",fill:"white",fillOpacity:.6})),k.createElement("defs",null,k.createElement("linearGradient",{id:"paint0_linear_169_7893",x1:16.8056,y1:3.07019,x2:25.1265,y2:15.5418,gradientUnits:"userSpaceOnUse"},k.createElement("stop",{offset:.0483,stopColor:"white",stopOpacity:.5}),k.createElement("stop",{offset:1,stopColor:"white",stopOpacity:.8})),k.createElement("clipPath",{id:"clip0_169_7893"},k.createElement("rect",{width:32,height:32,fill:"white"})))),cl=i(al)`
|
|
656
656
|
width: ${e=>e.width||"21px"};
|
|
657
657
|
height: ${e=>e.height||"21px"};
|
|
658
658
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -660,14 +660,14 @@
|
|
|
660
660
|
fill: ${e=>e.color||"currentColor"};
|
|
661
661
|
opacity: ${e=>e.opacity||"inherit"};
|
|
662
662
|
}
|
|
663
|
-
`,
|
|
663
|
+
`,ll=i.div`
|
|
664
664
|
display: flex;
|
|
665
665
|
align-items: center;
|
|
666
666
|
color: white;
|
|
667
667
|
font-size: 14px;
|
|
668
668
|
flex-direction: column;
|
|
669
669
|
justify-content: space-between;
|
|
670
|
-
`,
|
|
670
|
+
`,dl=i.div`
|
|
671
671
|
margin-top: 6px;
|
|
672
672
|
width: 100%;
|
|
673
673
|
display: flex;
|
|
@@ -675,16 +675,16 @@
|
|
|
675
675
|
align-items: center;
|
|
676
676
|
color: white;
|
|
677
677
|
font-size: 14px;
|
|
678
|
-
`,
|
|
678
|
+
`,ul=i.div`
|
|
679
679
|
display: flex;
|
|
680
680
|
justify-content: space-between;
|
|
681
681
|
align-items: center;
|
|
682
682
|
width: max-content;
|
|
683
|
-
`,
|
|
683
|
+
`,pl=i.div`
|
|
684
684
|
display: flex;
|
|
685
685
|
justify-content: space-between;
|
|
686
686
|
align-items: center;
|
|
687
|
-
`,
|
|
687
|
+
`,hl=i.div`
|
|
688
688
|
width: ${e=>`${e.small?"16px":"20px"}`};
|
|
689
689
|
height: ${e=>`${e.small?"16px":"20px"}`};
|
|
690
690
|
cursor: pointer;
|
|
@@ -695,7 +695,7 @@
|
|
|
695
695
|
background: rgba(0, 0, 0, 0.2);
|
|
696
696
|
border-radius: 2px;
|
|
697
697
|
}
|
|
698
|
-
`,
|
|
698
|
+
`,gl=i.input`
|
|
699
699
|
/* RESET */
|
|
700
700
|
width: 74px;
|
|
701
701
|
opacity: 1;
|
|
@@ -737,14 +737,14 @@
|
|
|
737
737
|
-webkit-appearance: none;
|
|
738
738
|
margin-top: -3px;
|
|
739
739
|
}
|
|
740
|
-
`,
|
|
740
|
+
`,ml=i.div`
|
|
741
741
|
display: flex;
|
|
742
742
|
width: 100px;
|
|
743
743
|
align-items: center;
|
|
744
744
|
overflow: hidden;
|
|
745
745
|
transition: all 0.4s;
|
|
746
746
|
margin-right: 8px;
|
|
747
|
-
`,
|
|
747
|
+
`,xl=i.div`
|
|
748
748
|
height: ${e=>`${e.small?"15px":"20px"}`};
|
|
749
749
|
width: ${e=>`${e.small?"15px":"20px"}`};
|
|
750
750
|
cursor: pointer;
|
|
@@ -752,7 +752,7 @@
|
|
|
752
752
|
background: rgba(0, 0, 0, 0.2);
|
|
753
753
|
border-radius: 2px;
|
|
754
754
|
}
|
|
755
|
-
`,
|
|
755
|
+
`,fl=i.div`
|
|
756
756
|
margin-right: 16px;
|
|
757
757
|
color: ${e=>e.color};
|
|
758
758
|
|
|
@@ -780,7 +780,7 @@
|
|
|
780
780
|
path {
|
|
781
781
|
fill: ${e.color};
|
|
782
782
|
}`}}
|
|
783
|
-
`,
|
|
783
|
+
`,vl=i.div`
|
|
784
784
|
z-index: 200;
|
|
785
785
|
overflow-y: auto;
|
|
786
786
|
right: 40px;
|
|
@@ -830,7 +830,7 @@
|
|
|
830
830
|
background-color: ${E.lightgray40};
|
|
831
831
|
}
|
|
832
832
|
}
|
|
833
|
-
`,fl=[{value:2,label:"2.0x"},{value:1.5,label:"1.5x"},{value:1.25,label:"1.25x"},{value:1,label:"1.0x"},{value:.75,label:"0.75x"},{value:.5,label:"0.5x"}],vl=e=>{const{t:o}=W.useTranslation(),{isCdkEnviroment:r}=i.useTheme(),{isVideoPaused:s,isVideoMuted:n,togglePlay:a,handleMute:c,handleFullScreen:d,duration:l=0,currentTime:u=0,handleVolumeControl:g,volumeRange:h,playerIconsColor:x,playerBackgroundColor:w,setPlayBack:m,isVisible:y,small:f,videoRef:b,scrub:S,hideControls:T,showPlaybackSpeed:L,setShowPlaybackSpeed:I}=e,[V,v]=k.useState(1),C=M=>{let N=Math.floor(M/60),D=N.toString(),O=`${Math.floor(M-N*60)}`;return D.length===1&&(D=`0${N}`),O.length===1&&(O=`0${O}`),`${N}:${O}`},$=C(u),R=k.createRef(),j=h*100;k.useEffect(()=>{y||I(!1)},[y]);const A=M=>{m&&m(M),v(M),T&&T()},P=()=>{I(!L)};return t.jsxs(al,{small:f,children:[t.jsx(Yc,{duration:l,currentTime:u,scrub:S,color:x,small:f}),t.jsxs(cl,{children:[t.jsxs(ll,{children:[t.jsx(ul,{small:f,onClick:a,children:s?t.jsx(Kc,{color:x,width:20,height:20}):t.jsx(Jc,{color:x,width:20,height:20})}),!f&&t.jsxs(t.Fragment,{children:[t.jsxs(hl,{children:[t.jsx(gl,{small:f,onClick:c,children:n?t.jsx(Qc,{color:x}):t.jsx(fe.IoIosVolumeHigh,{style:{color:x,fontSize:20}})}),t.jsx(pl,{ref:R,"aria-label":"Volume Range",type:"range",min:"0",value:j.toString(),onChange:M=>g(M,R),max:"100",step:"1",color:x,small:f})]}),t.jsxs(ml,{width:b.current&&b.current.clientWidth,color:x,children:[$," / ",C(l)]})]})]}),!f&&t.jsxs(dl,{children:[t.jsx(cn,{active:L,color:w,onClick:P,children:t.jsx(tl,{color:x})}),L&&t.jsxs(xl,{width:b.current&&b.current.clientWidth,children:[t.jsx("p",{children:o("Playback Speed")}),fl.map(M=>t.jsxs("div",{onClick:()=>A(M.value),children:[t.jsx("span",{children:M.label})," ",V==M.value&&t.jsx(zi,{width:b.current&&b.current.clientWidth<500?"16px":"20px",height:b.current&&b.current.clientWidth<500?"16px":"20px"})]},M.value))]}),t.jsx(cn,{onClick:d,children:t.jsx(q.MdFullscreen,{style:{color:x,fontSize:20}})}),r?t.jsx(nl,{style:{marginLeft:4},fill:E.white}):t.jsx(sl,{style:{marginLeft:4},fill:E.white})]})]})]})};var Xt=(e=>(e.PLAY="Play",e.PAUSE="Pause",e.COMPLETE="Complete",e))(Xt||{}),qe=(e=>(e.COVIDEO_EVENT="covideo-event",e.COVIDEO_PAGEVIEW="covideo-pageview",e))(qe||{}),_i=(e=>(e.CRM_VIDEO_EMBED="CDK Video Whitelabel",e))(_i||{}),Je=(e=>(e.VIDEO_INTERACTION="Video Interaction",e.INVENTORY_INTERACTION="Inventory Interaction",e.MEETING_INTERACTION="Meeting Interaction",e.SCHEDULE_MEETING="Schedule Meeting",e.SAVED_NEW_VIDEO="Saved New Video",e.VIDEO_ATTRIBUTE_INTERACTION="Video Attribute Interaction",e.VIDEO_MESSAGE_INTERACTION="Video Message Interaction",e.SELECT_RECORDING_TYPE="Select Recording Type",e.RECORDING_TOOL_INTERACTION="Recording Tool Interaction",e.START_RECORDING="Start Recording",e.STOP_RECORDING="Stop Recording",e.ADD_VIDEO_ATTRIBUTES="Add Video Attributes",e.DISCARD_VIDEO="Discard Video",e.RECENTLY_DELETED_INTERACTION="Recently Deleted Interaction",e.NEW_LEAD_ADDED="New Lead Added",e.CREATE_NEW_MEETING="Create New Meeting",e.VIDEO_PLAYER_INTERACTION="Video Player Interaction",e))(Je||{}),yt=(e=>(e.SEND_SHARE="Send & Share",e.VIDEOS="Videos",e.RECORD="Record",e.MERGE="Merge",e.DETAILS="Details",e))(yt||{}),Ct=(e=>(e.SEND_SHARE="https://video.connectcdk.com/embed/send",e.HOME="https://video.connectcdk.com/embed/home",e.MERGE="https://video.connectcdk.com/embed/merge",e.RECORD="https://video.connectcdk.com/embed/record",e.VOICE_RECORDER="https://video.connectcdk.com/embed/voice-recorder",e))(Ct||{}),St=(e=>(e.SHARE="Share",e.OVERVIEW="Overview",e.RECORD="Record",e.RECORDER="Recorder",e.DETAILS="Details",e.VOICE_RECORDER="Voice Recorder",e))(St||{});function bl(e,o="ms",r=2){if(!Number.isFinite(e)||e<0)return 0;const n=(o==="ms"?e/1e3:e)/60,a=10**r;return Math.round(n*a)/a}function no(e){return e?{video_id:Number(e.videoId),video_title:(e==null?void 0:e.videoTitle)||void 0,video_type:(e==null?void 0:e.videoType)??void 0,video_customer_name:!!(e!=null&&e.videoCustomerName),video_length:bl(Number(e==null?void 0:e.videoLength))||0}:{}}function Jt(e){var r;return e?{vehicle:(e==null?void 0:e.title)||void 0,price:e!=null&&e.price?parseFloat(e==null?void 0:e.price.toString()):void 0,vin:(e==null?void 0:e.vin)||void 0,stock_number:((r=e==null?void 0:e.stockNumber)==null?void 0:r.toString())||void 0,condition:(e==null?void 0:e.itemCondition)||void 0,engine:(e==null?void 0:e.engine)||void 0,make:(e==null?void 0:e.make)||void 0,model:(e==null?void 0:e.model)||void 0,trim:(e==null?void 0:e.trim)||void 0,year:e!=null&&e.year?parseInt(e==null?void 0:e.year.toString(),10):void 0,mileage:e!=null&&e.mileage?parseInt(e==null?void 0:e.mileage.toString(),10):void 0,ext_color:(e==null?void 0:e.exteriorColor)||void 0,int_color:(e==null?void 0:e.interiorColor)||void 0,transmission:(e==null?void 0:e.transmission)||void 0}:{}}const vt={SEND_SHARE:{pageUrl:Ct.SEND_SHARE,pageLocation:yt.SEND_SHARE,pageSection:St.SHARE},VIDEOS_OVERVIEW:{pageUrl:Ct.HOME,pageLocation:yt.VIDEOS,pageSection:St.OVERVIEW},VIDEOS_MERGE:{pageUrl:Ct.MERGE,pageLocation:yt.MERGE,pageSection:St.DETAILS},VIDEOS_RECORD:{pageUrl:Ct.RECORD,pageLocation:yt.RECORD,pageSection:St.RECORDER},VIDEOS_RECORDER:{pageUrl:Ct.RECORD,pageLocation:yt.RECORD,pageSection:St.RECORDER},RECORD_VIDEOS_DETAILS:{pageUrl:Ct.RECORD,pageLocation:yt.RECORD,pageSection:St.DETAILS},VIDEOS_VOICE_RECORDER:{pageUrl:Ct.VOICE_RECORDER,pageSection:yt.DETAILS,pageLocation:St.VOICE_RECORDER}};function wl(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function et(e){var o;wl()&&((o=window.dataLayer)==null||o.push({...e}))}function ln({action:e,videoIds:o,videoAttributes:r,vehicleData:s}){const n={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_INTERACTION},a=no(r);et({...n,action:e,video_ids:o,...a,...s})}function yl(e){return e?{customer_id:(e==null?void 0:e.customerId)||void 0,sms:(e==null?void 0:e.sms)||void 0,email:(e==null?void 0:e.email)||void 0,notification_viewed:(e==null?void 0:e.notificationViewed)||!1,landing_page:(e==null?void 0:e.landingPage)||void 0,call_to_action:(e==null?void 0:e.callToAction)||void 0,thumbnails:(e==null?void 0:e.thumbnails)||void 0}:{}}function Cl(e,o=8e3){return new Promise((r,s)=>{const n=URL.createObjectURL(e),a=document.createElement("video");a.preload="metadata",a.muted=!0,a.playsInline=!0;let c=!1;const d=setTimeout(()=>g(new Error("Timed out reading video duration")),o),l=()=>{clearTimeout(d),a.removeEventListener("loadedmetadata",w),a.removeEventListener("canplay",m),a.removeEventListener("timeupdate",h),a.removeEventListener("error",y),URL.revokeObjectURL(n),a.removeAttribute("src");try{a.load()}catch{}},u=f=>{c||(c=!0,l(),r(Math.round(f)))},g=f=>{c||(c=!0,l(),s(f))},h=()=>{isFinite(a.duration)&&a.duration>0&&u(a.duration*1e3)},x=()=>{a.addEventListener("timeupdate",h);try{a.currentTime=1e101}catch{setTimeout(()=>{try{a.currentTime=Number.MAX_VALUE}catch{}},0)}},w=()=>{isFinite(a.duration)&&a.duration>0?u(a.duration*1e3):x()},m=()=>{isFinite(a.duration)&&a.duration>0&&u(a.duration*1e3)},y=()=>g(new Error("Failed to load video metadata"));a.addEventListener("loadedmetadata",w),a.addEventListener("canplay",m),a.addEventListener("error",y),a.src=n;try{a.load()}catch{}})}function dr(e,o,r,s=""){return Object.entries(e).reduce((n,[a,c])=>{const d=s?`${s}.${a}`:a,l=d.split(".")[0];if(!s){const u=o.some(h=>h===a||h.startsWith(`${a}.`)),g=a in r;if(!u&&!g)return n}if(Array.isArray(c)){const u=r[a]??r[l];u?c.forEach((g,h)=>{u.forEach(x=>{n[`${d}.${h}.${x}`]=String(g[x]??"")})}):n[d]=String(c)}else if(c!==null&&typeof c=="object"){if(r[l])return n;Object.assign(n,dr(c,o,r,d))}else{const u=o.some(h=>h.includes(".")),g=o.some(h=>d===h||d.startsWith(`${h}.`));(!u||g)&&(n[d]=String(c??""))}return n},{})}function Sl({initialValues:e,currentValues:o,trackedFields:r=[],trackedArrayFields:s={},onlyChangedList:n=!1}){const a=dr(e,r,s),c=dr(o,r,s),d=[],l={};for(const u in c)a[u]!==c[u]&&(d.push(u),n||(l[`${u}_before`]=a[u]??"",l[`${u}_after`]=c[u]));return{changed_fields:d,...l}}function jl({action:e,videoMessageProperties:o,video:r,vehicleData:s}){const n={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_MESSAGE_INTERACTION},a=yl(o),c=no(r);et({...n,action:e,...c,...a,...s})}function El({videoAttributes:e,vehicleData:o}){const r={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_ATTRIBUTE_INTERACTION},s=no(e);et({...r,...s,...o})}function Tl({videoAttributes:e,type:o,vehicleData:r,mergedIds:s,changedFieldKeys:n,changes:a}){const c={event:qe.COVIDEO_EVENT,event_name:Je.SAVED_NEW_VIDEO},d=no(e);et({...c,type:o,...s?{merge_ids:s}:{},...d,...r,changed_fields:n&&n.length>0?n:void 0,...a})}var zt=(e=>(e.VIEW="View",e.SEND_AND_SHARE="Send & Share (Insert)",e.COPY_VIDEO_URL="Copy Video URL",e.MERGE="Merge",e.VOICE_OVER="Voice Over",e))(zt||{}),So=(e=>(e.RECORD="Record",e.UPLOAD="Upload",e.MERGE="Merge",e.VOICE_RECORD="Voice Record",e))(So||{}),ur=(e=>(e.INSERT="Insert",e.COPY="Copy",e))(ur||{});function kl({type:e}){const o={event:qe.COVIDEO_EVENT,event_name:Je.SELECT_RECORDING_TYPE};et({...o,type:e})}function Il({action:e}){const o={event:qe.COVIDEO_EVENT,event_name:Je.RECORDING_TOOL_INTERACTION};et({...o,type:"Telepromter",action:e})}function Al(){const e={event:qe.COVIDEO_EVENT,event_name:Je.DISCARD_VIDEO};et({...e})}function Rl(){const e={event:qe.COVIDEO_EVENT,event_name:Je.START_RECORDING};et({...e})}function $l(){const e={event:qe.COVIDEO_EVENT,event_name:Je.STOP_RECORDING};et({...e})}function Vl(){const e={event:qe.COVIDEO_EVENT,event_name:Je.ADD_VIDEO_ATTRIBUTES};et({...e})}function Ll({action:e}){const o={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_PLAYER_INTERACTION};et({...o,action:e})}function Ge(){const{isCdkEnviroment:e}=i.useTheme(),o=p.useCallback(async({vehicle:a,...c})=>{const d=Jt(a);return Array.isArray(c.videoIds)&&c.videoIds.length>0?ln({action:c.action,videoIds:c.videoIds}):ln({action:c.action,videoAttributes:c.videoAttributes,vehicleData:d})},[]),r=p.useCallback(async({vehicle:a,videoAttributes:c})=>{const d=Jt(a);return El({vehicleData:d,videoAttributes:c})},[]),s=p.useCallback(async({vehicle:a,...c})=>{const d=Jt(a);return Tl({vehicleData:d,...c})},[]),n=p.useCallback(async({vehicle:a,...c})=>{const d=Jt(a);return jl({...c,vehicleData:d})},[]);return{trackGTMVideoInteractionEvent:e?o:void 0,trackGTMVideoMessageInteractionEvent:e?n:void 0,trackGTMSaveNewVideoInteractionEvent:e?s:void 0,trackGTMVideoAttributeInteractionInteractionEvent:e?r:void 0,trackGTMRecordingToolIntearctionEvent:e?Il:void 0,trackGTMSelectRecordingTypeEvent:e?kl:void 0,trackGTMStopRecordingEvent:e?$l:void 0,trackGTMStartRecordingEvent:e?Rl:void 0,trackGTMAddVideoAttributeEvent:e?Vl:void 0,trackGTMDiscardVideoEvent:e?Al:void 0,trackVideoPlayerInteractionsEvent:e?Ll:void 0}}const Ml=i.div`
|
|
833
|
+
`,bl=[{value:2,label:"2.0x"},{value:1.5,label:"1.5x"},{value:1.25,label:"1.25x"},{value:1,label:"1.0x"},{value:.75,label:"0.75x"},{value:.5,label:"0.5x"}],wl=e=>{const{t:o}=W.useTranslation(),{isCdkEnviroment:r}=i.useTheme(),{isVideoPaused:s,isVideoMuted:n,togglePlay:a,handleMute:c,handleFullScreen:d,duration:l=0,currentTime:u=0,handleVolumeControl:g,volumeRange:h,playerIconsColor:x,playerBackgroundColor:y,setPlayBack:m,isVisible:w,small:f,videoRef:b,scrub:S,hideControls:T,showPlaybackSpeed:V,setShowPlaybackSpeed:I}=e,[L,v]=k.useState(1),C=M=>{let N=Math.floor(M/60),D=N.toString(),O=`${Math.floor(M-N*60)}`;return D.length===1&&(D=`0${N}`),O.length===1&&(O=`0${O}`),`${N}:${O}`},$=C(u),R=k.createRef(),j=h*100;k.useEffect(()=>{w||I(!1)},[w]);const A=M=>{m&&m(M),v(M),T&&T()},P=()=>{I(!V)};return t.jsxs(ll,{small:f,children:[t.jsx(Zc,{duration:l,currentTime:u,scrub:S,color:x,small:f}),t.jsxs(dl,{children:[t.jsxs(ul,{children:[t.jsx(hl,{small:f,onClick:a,children:s?t.jsx(Jc,{color:x,width:20,height:20}):t.jsx(tl,{color:x,width:20,height:20})}),!f&&t.jsxs(t.Fragment,{children:[t.jsxs(ml,{children:[t.jsx(xl,{small:f,onClick:c,children:n?t.jsx(Kc,{color:x}):t.jsx(ve.IoIosVolumeHigh,{style:{color:x,fontSize:20}})}),t.jsx(gl,{ref:R,"aria-label":"Volume Range",type:"range",min:"0",value:j.toString(),onChange:M=>g(M,R),max:"100",step:"1",color:x,small:f})]}),t.jsxs(fl,{width:b.current&&b.current.clientWidth,color:x,children:[$," / ",C(l)]})]})]}),!f&&t.jsxs(pl,{children:[t.jsx(cn,{active:V,color:y,onClick:P,children:t.jsx(rl,{color:x})}),V&&t.jsxs(vl,{width:b.current&&b.current.clientWidth,children:[t.jsx("p",{children:o("Playback Speed")}),bl.map(M=>t.jsxs("div",{onClick:()=>A(M.value),children:[t.jsx("span",{children:M.label})," ",L==M.value&&t.jsx(Bi,{width:b.current&&b.current.clientWidth<500?"16px":"20px",height:b.current&&b.current.clientWidth<500?"16px":"20px"})]},M.value))]}),t.jsx(cn,{onClick:d,children:t.jsx(H.MdFullscreen,{style:{color:x,fontSize:20}})}),r?t.jsx(sl,{style:{marginLeft:4},fill:E.white}):t.jsx(cl,{style:{marginLeft:4},fill:E.white})]})]})]})};var Xt=(e=>(e.PLAY="Play",e.PAUSE="Pause",e.COMPLETE="Complete",e))(Xt||{}),qe=(e=>(e.COVIDEO_EVENT="covideo-event",e.COVIDEO_PAGEVIEW="covideo-pageview",e))(qe||{}),Ui=(e=>(e.CRM_VIDEO_EMBED="CDK Video Whitelabel",e))(Ui||{}),Je=(e=>(e.VIDEO_INTERACTION="Video Interaction",e.INVENTORY_INTERACTION="Inventory Interaction",e.MEETING_INTERACTION="Meeting Interaction",e.SCHEDULE_MEETING="Schedule Meeting",e.SAVED_NEW_VIDEO="Saved New Video",e.VIDEO_ATTRIBUTE_INTERACTION="Video Attribute Interaction",e.VIDEO_MESSAGE_INTERACTION="Video Message Interaction",e.SELECT_RECORDING_TYPE="Select Recording Type",e.RECORDING_TOOL_INTERACTION="Recording Tool Interaction",e.START_RECORDING="Start Recording",e.STOP_RECORDING="Stop Recording",e.ADD_VIDEO_ATTRIBUTES="Add Video Attributes",e.DISCARD_VIDEO="Discard Video",e.RECENTLY_DELETED_INTERACTION="Recently Deleted Interaction",e.NEW_LEAD_ADDED="New Lead Added",e.CREATE_NEW_MEETING="Create New Meeting",e.VIDEO_PLAYER_INTERACTION="Video Player Interaction",e))(Je||{}),yt=(e=>(e.SEND_SHARE="Send & Share",e.VIDEOS="Videos",e.RECORD="Record",e.MERGE="Merge",e.DETAILS="Details",e))(yt||{}),Ct=(e=>(e.SEND_SHARE="https://video.connectcdk.com/embed/send",e.HOME="https://video.connectcdk.com/embed/home",e.MERGE="https://video.connectcdk.com/embed/merge",e.RECORD="https://video.connectcdk.com/embed/record",e.VOICE_RECORDER="https://video.connectcdk.com/embed/voice-recorder",e))(Ct||{}),St=(e=>(e.SHARE="Share",e.OVERVIEW="Overview",e.RECORD="Record",e.RECORDER="Recorder",e.DETAILS="Details",e.VOICE_RECORDER="Voice Recorder",e))(St||{});function yl(e,o="ms",r=2){if(!Number.isFinite(e)||e<0)return 0;const n=(o==="ms"?e/1e3:e)/60,a=10**r;return Math.round(n*a)/a}function no(e){return e?{video_id:Number(e.videoId),video_title:(e==null?void 0:e.videoTitle)||void 0,video_type:(e==null?void 0:e.videoType)??void 0,video_customer_name:!!(e!=null&&e.videoCustomerName),video_length:yl(Number(e==null?void 0:e.videoLength))||0}:{}}function Jt(e){var r;return e?{vehicle:(e==null?void 0:e.title)||void 0,price:e!=null&&e.price?parseFloat(e==null?void 0:e.price.toString()):void 0,vin:(e==null?void 0:e.vin)||void 0,stock_number:((r=e==null?void 0:e.stockNumber)==null?void 0:r.toString())||void 0,condition:(e==null?void 0:e.itemCondition)||void 0,engine:(e==null?void 0:e.engine)||void 0,make:(e==null?void 0:e.make)||void 0,model:(e==null?void 0:e.model)||void 0,trim:(e==null?void 0:e.trim)||void 0,year:e!=null&&e.year?parseInt(e==null?void 0:e.year.toString(),10):void 0,mileage:e!=null&&e.mileage?parseInt(e==null?void 0:e.mileage.toString(),10):void 0,ext_color:(e==null?void 0:e.exteriorColor)||void 0,int_color:(e==null?void 0:e.interiorColor)||void 0,transmission:(e==null?void 0:e.transmission)||void 0}:{}}const vt={SEND_SHARE:{pageUrl:Ct.SEND_SHARE,pageLocation:yt.SEND_SHARE,pageSection:St.SHARE},VIDEOS_OVERVIEW:{pageUrl:Ct.HOME,pageLocation:yt.VIDEOS,pageSection:St.OVERVIEW},VIDEOS_MERGE:{pageUrl:Ct.MERGE,pageLocation:yt.MERGE,pageSection:St.DETAILS},VIDEOS_RECORD:{pageUrl:Ct.RECORD,pageLocation:yt.RECORD,pageSection:St.RECORDER},VIDEOS_RECORDER:{pageUrl:Ct.RECORD,pageLocation:yt.RECORD,pageSection:St.RECORDER},RECORD_VIDEOS_DETAILS:{pageUrl:Ct.RECORD,pageLocation:yt.RECORD,pageSection:St.DETAILS},VIDEOS_VOICE_RECORDER:{pageUrl:Ct.VOICE_RECORDER,pageSection:yt.DETAILS,pageLocation:St.VOICE_RECORDER}};function Cl(){return typeof window<"u"&&Array.isArray(window.dataLayer)}function et(e){var o;Cl()&&((o=window.dataLayer)==null||o.push({...e}))}function ln({action:e,videoIds:o,videoAttributes:r,vehicleData:s}){const n={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_INTERACTION},a=no(r);et({...n,action:e,video_ids:o,...a,...s})}function Sl(e){return e?{customer_id:(e==null?void 0:e.customerId)||void 0,sms:(e==null?void 0:e.sms)||void 0,email:(e==null?void 0:e.email)||void 0,notification_viewed:(e==null?void 0:e.notificationViewed)||!1,landing_page:(e==null?void 0:e.landingPage)||void 0,call_to_action:(e==null?void 0:e.callToAction)||void 0,thumbnails:(e==null?void 0:e.thumbnails)||void 0}:{}}function jl(e,o=8e3){return new Promise((r,s)=>{const n=URL.createObjectURL(e),a=document.createElement("video");a.preload="metadata",a.muted=!0,a.playsInline=!0;let c=!1;const d=setTimeout(()=>g(new Error("Timed out reading video duration")),o),l=()=>{clearTimeout(d),a.removeEventListener("loadedmetadata",y),a.removeEventListener("canplay",m),a.removeEventListener("timeupdate",h),a.removeEventListener("error",w),URL.revokeObjectURL(n),a.removeAttribute("src");try{a.load()}catch{}},u=f=>{c||(c=!0,l(),r(Math.round(f)))},g=f=>{c||(c=!0,l(),s(f))},h=()=>{isFinite(a.duration)&&a.duration>0&&u(a.duration*1e3)},x=()=>{a.addEventListener("timeupdate",h);try{a.currentTime=1e101}catch{setTimeout(()=>{try{a.currentTime=Number.MAX_VALUE}catch{}},0)}},y=()=>{isFinite(a.duration)&&a.duration>0?u(a.duration*1e3):x()},m=()=>{isFinite(a.duration)&&a.duration>0&&u(a.duration*1e3)},w=()=>g(new Error("Failed to load video metadata"));a.addEventListener("loadedmetadata",y),a.addEventListener("canplay",m),a.addEventListener("error",w),a.src=n;try{a.load()}catch{}})}function dr(e,o,r,s=""){return Object.entries(e).reduce((n,[a,c])=>{const d=s?`${s}.${a}`:a,l=d.split(".")[0];if(!s){const u=o.some(h=>h===a||h.startsWith(`${a}.`)),g=a in r;if(!u&&!g)return n}if(Array.isArray(c)){const u=r[a]??r[l];u?c.forEach((g,h)=>{u.forEach(x=>{n[`${d}.${h}.${x}`]=String(g[x]??"")})}):n[d]=String(c)}else if(c!==null&&typeof c=="object"){if(r[l])return n;Object.assign(n,dr(c,o,r,d))}else{const u=o.some(h=>h.includes(".")),g=o.some(h=>d===h||d.startsWith(`${h}.`));(!u||g)&&(n[d]=String(c??""))}return n},{})}function El({initialValues:e,currentValues:o,trackedFields:r=[],trackedArrayFields:s={},onlyChangedList:n=!1}){const a=dr(e,r,s),c=dr(o,r,s),d=[],l={};for(const u in c)a[u]!==c[u]&&(d.push(u),n||(l[`${u}_before`]=a[u]??"",l[`${u}_after`]=c[u]));return{changed_fields:d,...l}}function Tl({action:e,videoMessageProperties:o,video:r,vehicleData:s}){const n={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_MESSAGE_INTERACTION},a=Sl(o),c=no(r);et({...n,action:e,...c,...a,...s})}function kl({videoAttributes:e,vehicleData:o}){const r={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_ATTRIBUTE_INTERACTION},s=no(e);et({...r,...s,...o})}function Il({videoAttributes:e,type:o,vehicleData:r,mergedIds:s,changedFieldKeys:n,changes:a}){const c={event:qe.COVIDEO_EVENT,event_name:Je.SAVED_NEW_VIDEO},d=no(e);et({...c,type:o,...s?{merge_ids:s}:{},...d,...r,changed_fields:n&&n.length>0?n:void 0,...a})}var zt=(e=>(e.VIEW="View",e.SEND_AND_SHARE="Send & Share (Insert)",e.COPY_VIDEO_URL="Copy Video URL",e.MERGE="Merge",e.VOICE_OVER="Voice Over",e))(zt||{}),So=(e=>(e.RECORD="Record",e.UPLOAD="Upload",e.MERGE="Merge",e.VOICE_RECORD="Voice Record",e))(So||{}),ur=(e=>(e.INSERT="Insert",e.COPY="Copy",e))(ur||{});function Al({type:e}){const o={event:qe.COVIDEO_EVENT,event_name:Je.SELECT_RECORDING_TYPE};et({...o,type:e})}function Rl({action:e}){const o={event:qe.COVIDEO_EVENT,event_name:Je.RECORDING_TOOL_INTERACTION};et({...o,type:"Telepromter",action:e})}function $l(){const e={event:qe.COVIDEO_EVENT,event_name:Je.DISCARD_VIDEO};et({...e})}function Vl(){const e={event:qe.COVIDEO_EVENT,event_name:Je.START_RECORDING};et({...e})}function Ll(){const e={event:qe.COVIDEO_EVENT,event_name:Je.STOP_RECORDING};et({...e})}function Ml(){const e={event:qe.COVIDEO_EVENT,event_name:Je.ADD_VIDEO_ATTRIBUTES};et({...e})}function Dl({action:e}){const o={event:qe.COVIDEO_EVENT,event_name:Je.VIDEO_PLAYER_INTERACTION};et({...o,action:e})}function Ge(){const{isCdkEnviroment:e}=i.useTheme(),o=p.useCallback(async({vehicle:a,...c})=>{const d=Jt(a);return Array.isArray(c.videoIds)&&c.videoIds.length>0?ln({action:c.action,videoIds:c.videoIds}):ln({action:c.action,videoAttributes:c.videoAttributes,vehicleData:d})},[]),r=p.useCallback(async({vehicle:a,videoAttributes:c})=>{const d=Jt(a);return kl({vehicleData:d,videoAttributes:c})},[]),s=p.useCallback(async({vehicle:a,...c})=>{const d=Jt(a);return Il({vehicleData:d,...c})},[]),n=p.useCallback(async({vehicle:a,...c})=>{const d=Jt(a);return Tl({...c,vehicleData:d})},[]);return{trackGTMVideoInteractionEvent:e?o:void 0,trackGTMVideoMessageInteractionEvent:e?n:void 0,trackGTMSaveNewVideoInteractionEvent:e?s:void 0,trackGTMVideoAttributeInteractionInteractionEvent:e?r:void 0,trackGTMRecordingToolIntearctionEvent:e?Rl:void 0,trackGTMSelectRecordingTypeEvent:e?Al:void 0,trackGTMStopRecordingEvent:e?Ll:void 0,trackGTMStartRecordingEvent:e?Vl:void 0,trackGTMAddVideoAttributeEvent:e?Ml:void 0,trackGTMDiscardVideoEvent:e?$l:void 0,trackVideoPlayerInteractionsEvent:e?Dl:void 0}}const Ol=i.div`
|
|
834
834
|
box-sizing: border-box;
|
|
835
835
|
overflow: overlay;
|
|
836
836
|
display: flex;
|
|
@@ -842,7 +842,7 @@
|
|
|
842
842
|
${({disablePointerEvents:e})=>e&&i.css`
|
|
843
843
|
pointer-events: none;
|
|
844
844
|
`}
|
|
845
|
-
`,
|
|
845
|
+
`,Nl=i.figure`
|
|
846
846
|
border-radius: 4px;
|
|
847
847
|
${e=>e.borderBottomRadius?`
|
|
848
848
|
border-bottom-left-radius: ${e.borderBottomRadius};
|
|
@@ -861,19 +861,19 @@
|
|
|
861
861
|
width: 720px;
|
|
862
862
|
}
|
|
863
863
|
`}
|
|
864
|
-
`,
|
|
864
|
+
`,Pl=i(wi.FullScreen)`
|
|
865
865
|
width: 100%;
|
|
866
866
|
position: relative;
|
|
867
867
|
box-sizing: border-box;
|
|
868
868
|
background-color: ${e=>e.backgroundColor?e.backgroundColor:""};
|
|
869
|
-
`,
|
|
869
|
+
`,Fl=i.video`
|
|
870
870
|
border-radius: ${e=>e.borderBottomRadius||"4px"};
|
|
871
871
|
position: relative;
|
|
872
872
|
width: 100%;
|
|
873
873
|
height: ${e=>e.isFullScreen?"100%":e.height};
|
|
874
874
|
object-fit: contain; /*object-fit: contain to fix the issue of vertical video SUS-687*/
|
|
875
875
|
max-height: ${e=>e.isFullScreen?"100%":"unset"};
|
|
876
|
-
`,
|
|
876
|
+
`,zl=i.div`
|
|
877
877
|
display: block;
|
|
878
878
|
position: absolute;
|
|
879
879
|
top: 0;
|
|
@@ -882,7 +882,7 @@
|
|
|
882
882
|
right: 0;
|
|
883
883
|
background-color: ${E.whiteRgb85};
|
|
884
884
|
z-index: 4;
|
|
885
|
-
`,
|
|
885
|
+
`,_l=i.div`
|
|
886
886
|
transition: all 0.15s;
|
|
887
887
|
position: absolute;
|
|
888
888
|
opacity: ${e=>e.isVisible?1:0};
|
|
@@ -891,11 +891,11 @@
|
|
|
891
891
|
bottom: ${e=>e.isFullScreen?"0px":"7px"};
|
|
892
892
|
background-color: ${e=>e.hex};
|
|
893
893
|
padding: ${e=>`${e.small?"0px 2px 1px":"8px"}`};
|
|
894
|
-
`,
|
|
894
|
+
`,Bl=1e3,Nt=e=>{const{videoSource:o,thumbnail:r,small:s,videoRef:n,autoplay:a,playlist:c,preventWideSize:d,hideContext:l=!1,startWithControls:u=!0,height:g,width:h,margin:x,disableControls:y=!1,borderBottomRadius:m,FullscreenVideoWrapperBackgroundColor:w,setIsVideoLoading:f,setVideoDuration:b,setVideoIsProcessing:S}=e,{trackVideoPlayerInteractionsEvent:T}=Ge(),{colors:V}=i.useTheme(),{t:I}=W.useTranslation(),L=V.primary[80],v=V.white[100],[C,$]=k.useState(!0),[R,j]=k.useState(!1),[A,P]=k.useState(!1),[M,N]=k.useState(1),[D,O]=k.useState(0),[U,Y]=k.useState(0),[ne,K]=k.useState(u),[G,q]=k.useState(!1),[ee,B]=k.useState(0),{userData:de}=me(),te=Xe(de),se=k.useRef(ne);let ae=k.useRef(0);const[xe,Ie]=k.useState(0),X=k.createRef(),ce=()=>{const J=n.current;J&&(C?J.play():J.pause(),T==null||T({action:C?Xt.PLAY:Xt.PAUSE}))},Q=J=>{l&&J.preventDefault()},_=wi.useFullScreenHandle(),ue=()=>_.active?_.exit():_.enter();k.useEffect(()=>{U===D&&U!==0&&D!==0&&(T==null||T({action:Xt.COMPLETE}))},[U,D]),k.useEffect(()=>{a&&(T==null||T({action:Xt.PLAY}))},[a]),k.useEffect(()=>{setTimeout(()=>window.dispatchEvent(new Event("resize")),200)},[_.active]),k.useEffect(()=>{const J=n.current;if(J.textTracks.length&&J.textTracks[0]){const ke=ne?-4:-1;let Re=J.textTracks[0].cues;for(var fe=0;fe<Re.length;fe++)Re[fe].line=ke;J.textTracks[0].activeCues[0]&&(J.textTracks[0].activeCues[0].line=ke)}},[ne]);const Ee=()=>{const J=n.current;J&&(A?(N(1),P(!1),J.volume=1):(N(0),P(!0),J.volume=0))},Ae=(J,fe)=>{const ke=fe.current&&fe.current.offsetWidth;let Re=J.target.value;if(Re>100&&(Re=100),Re<0&&(Re=0),n.current&&ke){let Ve=Number((Re/ke).toFixed(2));if(Math.floor(n.current.volume*100)==J.target.valueAsNumber)return;N(Ve),Ve<0&&(Ve=0,N(0)),Ve>1&&(N(1),Ve=1),Ve===0&&P(!0),Ve!==1&&P(!1),n.current.volume=Ve}},Z=(J,fe)=>{const ke=fe.current?fe.current.offsetWidth:640;if(n.current){const Re=J.nativeEvent.offsetX/ke*n.current.duration;n.current.currentTime=Re}},oe=()=>{n.current&&isFinite(n.current.duration)&&(O(n.current.duration),b&&b(n.current.duration))},be=()=>{n.current&&n.current.networkState==HTMLMediaElement.NETWORK_NO_SOURCE&&!G&&(console.log("error loading mp4"),q(!0),S==null||S(!0))},Le=()=>{q(!1),S==null||S(!1),clearTimeout(ee),n.current&&n.current.duration===1/0&&(n.current.currentTime=1e101,n.current.ontimeupdate=function(){this.ontimeupdate=()=>{},n.current&&(n.current.currentTime=0)})};k.useEffect(()=>{f&&f(G),G&&Ie(xe+1)},[G]),k.useEffect(()=>{var J;if(xe>0&&G){clearTimeout(ee);const fe=setTimeout(Ie,Bl*xe,xe+1);B(fe),(J=n.current)==null||J.load()}},[xe]),k.useEffect(()=>(n.current&&(n.current.addEventListener("durationchange",oe,!0),n.current.addEventListener("loadedmetadata",Le,!0),n.current.addEventListener("error",be,!0),n.current.addEventListener("pause",()=>$(!0),!0),n.current.addEventListener("play",()=>$(!1),!0)),()=>{n.current&&(n.current.removeEventListener("durationchange",oe,!0),n.current.removeEventListener("loadedmetadata",Le,!0),n.current.removeEventListener("error",be,!0))}),[n,X]),k.useEffect(()=>{const J=n.current,fe=X==null?void 0:X.current;if(!(!J||!fe||R))return J.addEventListener("mouseenter",ot),J.addEventListener("mouseleave",Pe),fe.addEventListener("mouseenter",ot),fe.addEventListener("mouseleave",Pe),()=>{J.removeEventListener("mouseenter",ot),J.removeEventListener("mouseleave",Pe),fe.removeEventListener("mouseenter",ot),fe.removeEventListener("mouseleave",Pe)}},[n,X,R]);const Pe=()=>{n.current&&(K(!1),se.current=!1)},ot=()=>{y||(K(!0),se.current=!0)};k.useEffect(()=>{c&&c.length>0&&(ae.current=0,Y(0),$(!0))},[c]),k.useEffect(()=>{const J=()=>{if(n.current&&(Y(n.current.currentTime),ae&&c&&c[ae.current]&&n.current.currentTime>=c[ae.current].endTime)){const ke=new Event("ended");n.current.dispatchEvent(ke)}},fe=()=>{if(n.current&&c&&(ae.current++,ae.current<c.length&&c[ae.current].videoSource)){n.current.poster=c[ae.current].autogeneratedThumbnail;let ke="";const Re=c[ae.current].startTime,Ve=c[ae.current].endTime;(Re||Ve)&&(ke=`#t=${Re||0}${Ve?","+Ve:""}`);let Ye=(""+c[ae.current].videoSource).split("#t=")[0]+ke;n.current.src=Ye,n.current.play()}};return n.current&&n.current.addEventListener("timeupdate",J,!0),n.current&&n.current.addEventListener("ended",fe,!0),n.current&&a&&(n.current.play(),$(!1)),()=>{n.current&&(n.current.removeEventListener("timeupdate",J,!0),n.current.removeEventListener("ended",fe,!0))}},[n]),k.useEffect(()=>{const J=n.current;return!J||!o?void 0:((async()=>{try{J.src=o,J.muted=!0,J.oncanplay=async()=>{try{a&&await J.play(),J.muted=!1}catch(ke){console.error("Autoplay failed:",ke)}},J.load()}catch(ke){console.error("Error in playVideo:",ke)}})(),()=>{J&&(J.pause(),J.src="")})},[o]);const ye=J=>{n.current.playbackRate=J},De=bi.hex.rgb(L)||[];return t.jsx(Ol,{small:s,height:g,width:h,margin:x,disablePointerEvents:y,children:t.jsx(Nl,{small:s,preventWideSize:d,borderBottomRadius:m,children:t.jsxs(Pl,{handle:_,backgroundColor:w,children:[t.jsx(Fl,{onContextMenu:Q,poster:G?"":r,preload:Dt?"auto":"metadata",ref:n,onClick:ce,isFullScreen:_.active,height:g||"auto",borderBottomRadius:m,playsInline:!0,controls:!1,children:t.jsx("source",{src:o,type:"video/mp4"},xe+ae.current+o)},o),G&&t.jsx(zl,{children:t.jsx(Ue,{height:"100%",isLoading:G,text:I("processing...")})}),!y&&t.jsx(_l,{ref:X,r:De[0],g:De[1],b:De[2],hex:L,small:s,isVisible:ne,isFullScreen:_.active,children:t.jsx(wl,{isVideoPaused:C,togglePlay:ce,isVideoMuted:A,handleMute:Ee,handleFullScreen:ue,setPlayBack:ye,setTranslate:()=>{},duration:D,currentTime:U,handleVolumeControl:Ae,volumeRange:M,playerIconsColor:v,small:s,scrub:Z,playerBackgroundColor:L,captionsEnabled:!1,captions:"",isVisible:ne,videoRef:n,isAutomotive:te,hideControls:Pe,setShowPlaybackSpeed:j,showPlaybackSpeed:R})})]})})})},Ul=i.div`
|
|
895
895
|
display: flex;
|
|
896
896
|
flex-direction: column;
|
|
897
897
|
align-items: center;
|
|
898
|
-
`,
|
|
898
|
+
`,Wl=i.div`
|
|
899
899
|
background-color: ${E.themeDark};
|
|
900
900
|
display: flex;
|
|
901
901
|
justify-content: center;
|
|
@@ -913,7 +913,7 @@
|
|
|
913
913
|
opacity: 0.7;
|
|
914
914
|
cursor: pointer;
|
|
915
915
|
}
|
|
916
|
-
`,
|
|
916
|
+
`,Hl=i.div`
|
|
917
917
|
display: block;
|
|
918
918
|
position: relative;
|
|
919
919
|
background-color: black;
|
|
@@ -926,7 +926,7 @@
|
|
|
926
926
|
min-width: unset;
|
|
927
927
|
max-width: unset;
|
|
928
928
|
`}
|
|
929
|
-
`,
|
|
929
|
+
`,ql=({handleModalClose:e,video:o})=>{const{t:r}=W.useTranslation(),s=p.createRef();return t.jsx(Co,{maxHeight:"fit-content",onOutsideClick:e,children:t.jsxs(Hl,{children:[t.jsx(Wl,{title:r("Close video preview"),onClick:e,children:t.jsx(Et,{})}),t.jsx(Ul,{children:t.jsx(Nt,{videoSource:o.videoSource,videoId:o.id,thumbnail:o.autogeneratedThumbnail,videoRef:s,autoplay:!0,height:"405px",width:"100%"})})]})})},dn=i.div`
|
|
930
930
|
background: ${({theme:e})=>e.colors.white[100]};
|
|
931
931
|
box-shadow:
|
|
932
932
|
0px 0px 2px rgba(66, 79, 104, 0.08),
|
|
@@ -973,7 +973,7 @@
|
|
|
973
973
|
background-color: ${({backgroundColor:e})=>e||"transparent"};
|
|
974
974
|
width: ${({width:e})=>e||"auto"};
|
|
975
975
|
border-radius: 6px;
|
|
976
|
-
`,
|
|
976
|
+
`,Gl=i.div`
|
|
977
977
|
position: absolute;
|
|
978
978
|
left: 12px;
|
|
979
979
|
bottom: 12px;
|
|
@@ -985,7 +985,7 @@
|
|
|
985
985
|
line-height: 16px;
|
|
986
986
|
padding: 4px 8px;
|
|
987
987
|
min-width: 50px;
|
|
988
|
-
`,
|
|
988
|
+
`,Yl=i.div`
|
|
989
989
|
display: flex;
|
|
990
990
|
justify-content: space-between;
|
|
991
991
|
position: absolute;
|
|
@@ -993,21 +993,21 @@
|
|
|
993
993
|
padding: 8px;
|
|
994
994
|
top: 0;
|
|
995
995
|
width: 100%;
|
|
996
|
-
`,
|
|
996
|
+
`,Ql=i.div`
|
|
997
997
|
display: flex;
|
|
998
998
|
flex-direction: row;
|
|
999
999
|
gap: 10px;
|
|
1000
|
-
`,
|
|
1000
|
+
`,Zl=i.div`
|
|
1001
1001
|
position: absolute;
|
|
1002
1002
|
top: 10px;
|
|
1003
1003
|
left: 10px;
|
|
1004
|
-
`,
|
|
1004
|
+
`,Wi=({video:e,isMerge:o,selectedVideosData:r,setSelectedVideosData:s})=>{var G,q,ee;const{t:n,i18n:a}=W.useTranslation(),c=(e==null?void 0:e.folder)===Ft.COMPANY,{showQuickshareFeature:d,showVoiceoverFeature:l,showInsertFeature:u,showAiAssistFeature:g,env:h,onVideoInsert:x}=Se(),{userData:y}=me(),m=st(y),w=pt(y),f=Lt(y),b=!!(y!=null&&y.customer.isIMSEnabled),{trackGTMVideoInteractionEvent:S}=Ge(),T=Xe(y),V=it.useHistory(),[I,L]=p.useState(!1),[v,C]=p.useState(!1),[$,R]=p.useState(!1),[j,A]=p.useState(!1),{toast:P}=Te(),{onQuickShareMutationHandler:M,isQuickshareLoading:N,onQuickShareButtonClick:D}=Ir({video:e,videoRequest:e==null?void 0:e.videoRequest,setShowModalQuickShareMarkAsSent:A}),O=e?ca(e.recordDate,y,"MM/DD/YYYY hh:mm:ss A"):"",U=B=>{let{checked:de}=B.target;s(de?[...r,e]:r.filter(te=>te.id!=e.id))},Y=async()=>{if(e){C(!0);try{await Ca(e.id,`${e.title}.mp4`)}catch{P({message:n("Download failed, please try again later.")})}C(!1)}},ne=({action:B})=>{var te,se,ae;if(!e)return;const de={videoId:Number(e.id),videoType:(te=e==null?void 0:e.videoRequest)==null?void 0:te.videoType,videoCustomerName:!!((se=e==null?void 0:e.videoRequest)!=null&&se.customerName),videoLength:e==null?void 0:e.videoLength,videoTitle:e==null?void 0:e.title};S==null||S({videoAttributes:de,action:B,vehicle:(ae=e==null?void 0:e.videoRequest)==null?void 0:ae.inventoryItem})},K=async()=>{if(e){L(!0);try{await Sa(e.id),P({message:n("Video copied successfully.")})}catch{P({message:n("Copy failed, please try again later.")})}L(!1)}};return e?t.jsxs(dn,{children:[t.jsxs(un,{backgroundColor:E.black,children:[t.jsx(_i,{videoId:e.id,thumbnail:e.thumbnail,duration:e.videoLength||0,processing:e.processing,onClick:()=>{ne({action:zt.VIEW}),R(!0)}}),!o&&t.jsxs(Yl,{children:[t.jsxs(Ql,{children:[!c&&t.jsxs(t.Fragment,{children:[u&&t.jsx(F.Button,{onClick:()=>{ne({action:zt.SEND_AND_SHARE}),V.push(`/insert-video/${e==null?void 0:e.id}`)},icon:t.jsx(ve.IoMdAdd,{size:18}),variant:"white",iconPosition:"middle",size:"small",title:n("Insert")}),d&&t.jsx(F.Button,{onClick:()=>{ne({action:zt.COPY_VIDEO_URL}),D({videoActivityType:Mt.QUICKSHARE,toastType:"quickshare"})},icon:N?t.jsx(rt,{size:12}):t.jsx(ve.IoIosShareAlt,{size:18}),disabled:N,variant:"white",title:n("Copy Video"),size:"small"}),g&&t.jsx(fi.CovideoMagicButton,{defaultPromptType:kr.CRM_MESSAGE,handleSubmitGeneratedContent:(B,de,te,se)=>{const ae={url:de||"",thumbnail:te||"",image:e.thumbnail||"",html:B,token:He};x==null||x(ae),setTimeout(()=>{se||f===nt.ALWAYS.value&&P({message:n("Video marked as Sent")})},100),P({message:n("Inserting video...")})},handleOnCopySuccess:(B,de,te,se)=>{setTimeout(()=>{se||f===nt.ALWAYS.value&&P({message:n("Video marked as Sent")})},100),P({message:n("Link copied to clipboard!")})},margin:"0",iconColor:"gradient",videoId:e?e.id:"",defaultVin:((G=e==null?void 0:e.videoRequest)==null?void 0:G.vin)||"",token:He,userData:{customer:{business:y.customer.business,hasCovideoMagic:((ee=(q=y==null?void 0:y.customer)==null?void 0:q.hasCovideoMagic)==null?void 0:ee.toString())==="1",markVideosAsSent:Lt(y)},firstName:y.firstName,isAutomotiveSalesRole:w,isAutomotiveServiceRole:m,isIMSEnabled:b,isCompanyAdmin:y.isCompanyAdmin,isAutomotive:T,preferredLanguage:a.language},aiAssistTheme:"branding",env:h,apiKey:mt,variant:"white",size:"small"})]}),c&&t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{onClick:K,icon:I?t.jsx(rt,{size:12}):t.jsx(H.MdCreateNewFolder,{size:18}),disabled:I,variant:"white",title:n("Copy to Primary"),size:"small"}),t.jsx(F.Button,{onClick:Y,title:n("Download"),icon:v?t.jsx(rt,{size:12}):t.jsx(H.MdDownload,{size:18}),disabled:v,variant:"white",size:"small"})]})]}),l&&!c&&t.jsx(F.Button,{title:n("Voiceover"),onClick:()=>{ne({action:zt.VOICE_OVER}),V.push(`/voiceover/${e.id}`)},icon:t.jsx(ve.IoIosMic,{size:18}),variant:"white",size:"small"})]}),o&&t.jsx(Zl,{children:t.jsx(Oi,{width:"24px",checked:r.find(B=>B.id===e.id),onChange:B=>U(B)})})]}),t.jsxs(pn,{children:[t.jsx(hn,{children:e.title}),t.jsxs(gn,{children:[t.jsx(ve.IoMdCalendar,{size:16,color:E.gray40,style:{marginRight:6}}),O]})]}),j&&t.jsx(Tr,{markAsSentPayload:{toastType:"quickshare"},isQuickShareLoading:N,quickShareMarkAsSentHandler:M,handleModalClose:async()=>{A(!1)}}),$&&t.jsx(ql,{video:e,handleModalClose:()=>R(!1)})]}):t.jsxs(dn,{opacity:".3",children:[t.jsx(un,{backgroundColor:E.gray20,children:t.jsx(Gl,{children:" "})}),t.jsxs(pn,{children:[t.jsx(hn,{backgroundColor:E.gray20,width:"100%",children:" "}),t.jsx(gn,{backgroundColor:E.gray20,width:"70%",children:" "})]})]})},Kl=i.div`
|
|
1005
1005
|
position: relative;
|
|
1006
1006
|
width: 190px;
|
|
1007
1007
|
${({theme:e})=>e.containerWidth<z.cmd&&i.css`
|
|
1008
1008
|
width: 100%;
|
|
1009
1009
|
`}
|
|
1010
|
-
`,
|
|
1010
|
+
`,Xl=i.div`
|
|
1011
1011
|
position: absolute;
|
|
1012
1012
|
left: 12px;
|
|
1013
1013
|
top: 12px;
|
|
@@ -1016,7 +1016,7 @@
|
|
|
1016
1016
|
&:hover {
|
|
1017
1017
|
color: ${E.gray100};
|
|
1018
1018
|
}
|
|
1019
|
-
`,
|
|
1019
|
+
`,Jl=i.div`
|
|
1020
1020
|
position: absolute;
|
|
1021
1021
|
right: 12px;
|
|
1022
1022
|
top: 12px;
|
|
@@ -1025,7 +1025,7 @@
|
|
|
1025
1025
|
&:hover {
|
|
1026
1026
|
color: ${E.gray100};
|
|
1027
1027
|
}
|
|
1028
|
-
`,
|
|
1028
|
+
`,ed=({prevSearch:e,handleSearch:o})=>{const{t:r}=W.useTranslation(),{containerWidth:s}=Se(),[n,a]=p.useState(e||""),c=g=>{g.key==="Enter"&&o(n)},d=()=>{a(""),o("")},l=g=>{a(g.currentTarget.value)},u=s>=z.mb?r("Search Videos..."):r("Search...");return t.jsxs(Kl,{children:[t.jsx(Xl,{children:t.jsx(ve.IoMdSearch,{onClick:()=>o(n),size:17})}),t.jsx(Gt,{width:"100%",type:"text",padding:"8px 8px 8px 40px",value:n,placeholder:u||void 0,onKeyUp:c,onChange:l}),n!==""&&t.jsx(Jl,{children:t.jsx(H.MdClear,{onClick:()=>d(),size:17})})]})},td=i.div`
|
|
1029
1029
|
position: relative;
|
|
1030
1030
|
display: grid;
|
|
1031
1031
|
gap: 24px;
|
|
@@ -1035,7 +1035,7 @@
|
|
|
1035
1035
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
1036
1036
|
grid-template-columns: 1fr;
|
|
1037
1037
|
`}
|
|
1038
|
-
`,
|
|
1038
|
+
`,od=i.div`
|
|
1039
1039
|
position: absolute;
|
|
1040
1040
|
top: 50%;
|
|
1041
1041
|
left: 50%;
|
|
@@ -1050,7 +1050,7 @@
|
|
|
1050
1050
|
width: 100%;
|
|
1051
1051
|
text-align: center;
|
|
1052
1052
|
`}
|
|
1053
|
-
`,mn=({size:e,message:o})=>t.jsxs(
|
|
1053
|
+
`,mn=({size:e,message:o})=>t.jsxs(td,{children:[t.jsx(od,{children:o}),[...Array(e)].map((r,s)=>t.jsx(Wi,{},s))]}),rd={all:e=>["LOCATION",e]},nd=async e=>(await ie.get(`/locations/user/${e}`)).data,id=(e,o)=>{const{data:r,isLoading:s,refetch:n}=Ce.useQuery(rd.all(e),()=>nd(e),{enabled:!!e&&o,refetchOnMount:!1,refetchOnWindowFocus:!1});return{data:r||[],isLoading:s,refetch:n}},sd=async({locationId:e})=>(await ie.post("/locations/sign-in",{locationId:e})).data,ad=e=>Ce.useMutation(sd,{onSuccess:o=>{if(e){const r=new URL(window.location.href);r.searchParams.set("token",o.accessToken),window.location.href=r.toString();return}bo(o.accessToken)},onError:o=>{console.log(o)}});i.div`
|
|
1054
1054
|
font-style: normal;
|
|
1055
1055
|
font-weight: 600;
|
|
1056
1056
|
font-size: ${e=>e.fontSize??"12px"};
|
|
@@ -1065,7 +1065,7 @@
|
|
|
1065
1065
|
flex-direction: row;
|
|
1066
1066
|
justify-content: center;
|
|
1067
1067
|
align-items: center;
|
|
1068
|
-
`;const
|
|
1068
|
+
`;const Hi=i.span`
|
|
1069
1069
|
display: flex;
|
|
1070
1070
|
align-items: center;
|
|
1071
1071
|
justify-content: center;
|
|
@@ -1075,19 +1075,19 @@
|
|
|
1075
1075
|
svg {
|
|
1076
1076
|
${e=>e.menuIsOpen&&"transform: rotate(180deg);"}
|
|
1077
1077
|
}
|
|
1078
|
-
`,
|
|
1078
|
+
`,cd=i.div`
|
|
1079
1079
|
width: 100%;
|
|
1080
1080
|
display: flex;
|
|
1081
1081
|
flex-direction: row;
|
|
1082
1082
|
flex-wrap: nowrap;
|
|
1083
1083
|
justify-content: center;
|
|
1084
1084
|
align-items: center;
|
|
1085
|
-
`,
|
|
1085
|
+
`,ld=i.div`
|
|
1086
1086
|
text-align: center;
|
|
1087
|
-
`,
|
|
1087
|
+
`,qi=e=>{const{isDisabled:o,menuIsOpen:r,selectProps:s}=e;return o?{borderColor:E.transparent}:s.error?{borderColor:E.error}:{borderColor:E.covideoGray40}},Gi=(e,o,r)=>{const{isFocused:s,isSelected:n,isDisabled:a}=e;return a?{color:E.gray40,backgroundColor:E.gray10,cursor:"not-allowed"}:s||n?r?{color:E.black_1_100,backgroundColor:"rgb(222, 235, 255)"}:{color:o.colors.primary[100],backgroundColor:o.colors.secondary[5]}:{color:E.covideoGray100,backgroundColor:E.white}},Ne=e=>{const{ariaLabel:o="Aria label is missing",name:r,options:s,value:n,defaultValue:a=void 0,placeholder:c="No Folders",onChange:d,getOptionLabel:l,getOptionValue:u,menuPosition:g="absolute",menuPlacement:h="auto",menuPortalTarget:x,inputId:y,className:m,dropdownHeight:w="auto",height:f=48,width:b,disabled:S=!1,creatable:T=!0,error:V=!1,onMenuScrollToBottom:I,onMenuClose:L,extendStyles:v,icon:C,showIndicator:$=!0,chipValueSelected:R=!1,isClearable:j=!1,onInputChange:A,onCreateOption:P,isMulti:M=!1,isShareVideoModal:N=!1,zIndexProp:D=9999,menuZIndexProp:O=2,isSearchable:U,formatCreateLabel:Y,closeMenuOnScroll:ne=void 0,menuShouldBlockScroll:K=!1,isLoading:G=!1,filterOption:q,formatOptionLabel:ee,customComponents:B,onMenuOpen:de,maxMenuHeight:te,controlShouldRenderValue:se,createOptionPosition:ae,autoFocus:xe}=e,Ie=i.useTheme(),X={icon:C,error:V,options:s,className:m,name:r,placeholder:c,value:n,defaultValue:a,getOptionLabel:l,getOptionValue:u,onChange:d,menuPlacement:h,menuPosition:g,isDisabled:S,menuPortalTarget:x,"aria-label":o,onMenuScrollToBottom:I,onMenuClose:L,isClearable:j,onInputChange:A,onCreateOption:P,isMulti:M,isSearchable:U,filterOption:q},ce=_=>$?t.jsx(Hi,{menuIsOpen:_.selectProps.menuIsOpen,children:t.jsx(H.MdArrowDropDown,{size:18,opacity:.5})}):t.jsx(t.Fragment,{}),Q={container:_=>({..._,...(v==null?void 0:v.container)||{}}),control:(_,ue)=>({..._,width:b,boxShadow:"none",borderRadius:6,minHeight:"40px",cursor:"pointer",...qi(ue),...(v==null?void 0:v.control)||{},"&:hover":{borderColor:N?"rgb(128, 189, 255)":Ie.colors.primary[100]},"&:focus-within":{borderColor:N?"rgb(128, 189, 255)":Ie.colors.primary[100]}}),singleValue:_=>({..._,width:"95%",...(v==null?void 0:v.singleValue)||{}}),valueContainer:_=>({..._,...(v==null?void 0:v.valueContainer)||{}}),input:_=>({..._,...(v==null?void 0:v.input)||{}}),menuPortal:_=>({..._,zIndex:D||9999}),menuList:_=>({..._,...(v==null?void 0:v.menuList)||{},height:w}),menu:_=>({..._,...(v==null?void 0:v.menu)||{},marginTop:2,zIndex:O||2,color:E.primaryDarkBlue}),option:(_,ue)=>({..._,height:N?35:f,display:"flex",alignItems:"center",padding:"0 16px",cursor:"pointer",transition:"all 0.3s",fontWeight:N?"normal":600,fontSize:15,...Gi(ue,Ie,N),...(v==null?void 0:v.option)||{}})};return T?t.jsx(Ks,{...X,isLoading:!1,components:{DropdownIndicator:ce,IndicatorSeparator:()=>null,...B},styles:Q,isSearchable:U,formatCreateLabel:Y,formatOptionLabel:ee,createOptionPosition:ae}):t.jsx(Ze,{...X,inputId:y,maxMenuHeight:te||220,menuShouldScrollIntoView:!1,menuPortalTarget:x,isLoading:G,components:{DropdownIndicator:ce,IndicatorSeparator:()=>null,...B},styles:Q,isSearchable:U,closeMenuOnScroll:ne,menuShouldBlockScroll:K,filterOption:q,formatOptionLabel:ee,onMenuOpen:de,controlShouldRenderValue:se,autoFocus:xe})},dd=i.div`
|
|
1088
1088
|
position: relative;
|
|
1089
1089
|
display: flex;
|
|
1090
|
-
`,
|
|
1090
|
+
`,ud=i.div`
|
|
1091
1091
|
position: absolute;
|
|
1092
1092
|
cursor: pointer;
|
|
1093
1093
|
top: 40px;
|
|
@@ -1099,19 +1099,19 @@
|
|
|
1099
1099
|
0px 6px 12px rgba(66, 79, 104, 0.06);
|
|
1100
1100
|
border-radius: 8px;
|
|
1101
1101
|
background: ${E.white};
|
|
1102
|
-
`,
|
|
1102
|
+
`,pd=t.jsx("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 640 480",width:"20",height:"15",children:t.jsxs("g",{fillRule:"evenodd",children:[t.jsx("path",{fill:"#aa151b",d:"M0 0h640v480H0z"}),t.jsx("path",{fill:"#f1bf00",d:"M0 120h640v240H0z"})]})}),hd=t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 60 30",width:"20",height:"15",children:[t.jsx("clipPath",{id:"t",children:t.jsx("path",{d:"M0,0 v30 h60 v-30 z"})}),t.jsx("clipPath",{id:"s",children:t.jsx("path",{d:"M30,15 h30 v15 z v15 h-30 z h-30 v-15 z v-15 h30 z"})}),t.jsxs("g",{clipPath:"url(#t)",children:[t.jsx("path",{d:"M0,0 v30 h60 v-30 z",fill:"#012169"}),t.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#fff",strokeWidth:"6"}),t.jsx("path",{d:"M0,0 L60,30 M60,0 L0,30",stroke:"#C8102E",strokeWidth:"4",clipPath:"url(#s)"}),t.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#fff",strokeWidth:"10"}),t.jsx("path",{d:"M30,0 v30 M0,15 h60",stroke:"#C8102E",strokeWidth:"6"})]})]}),gd=t.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 3 2",width:"20",height:"15",children:[t.jsx("rect",{width:"1",height:"2",x:"0",y:"0",fill:"#0055a4"}),t.jsx("rect",{width:"1",height:"2",x:"1",y:"0",fill:"#fff"}),t.jsx("rect",{width:"1",height:"2",x:"2",y:"0",fill:"#ef4135"})]}),Yi=p.memo(({handleUpdateToken:e})=>{var M,N;const{i18n:o,t:r}=W.useTranslation(),{colors:s,isCdkEnviroment:n}=i.useTheme(),a=Ce.useQueryClient(),{hasExternalJwt:c,reRender:d,showMultiLocationFeature:l,showLanguageDropdownFeature:u}=Se(),{mutateAsync:g,isLoading:h}=ad(c),{userData:x}=me(),y=((N=(M=x==null?void 0:x.customer)==null?void 0:M.hasMultiLocation)==null?void 0:N.toString())==="1",{data:m}=id(parseInt(x==null?void 0:x.userId,10),l&&y),w=!!(m&&m.length&&m.find(D=>{var O,U;return D.locationId.toString()===((U=(O=x==null?void 0:x.customer)==null?void 0:O.locationId)==null?void 0:U.toString())})),f=l&&y&&w,[b,S]=p.useState(!1),{ref:T}=Ar(()=>S(!1)),V=he.useHistory(),I=()=>{S(D=>!D)},L=()=>{e(""),ki(),a.clear(),V.go(0)};let v=x.firstName||x.lastName||r("Welcome");const C=(m||[]).find(D=>{var O;return((O=x==null?void 0:x.customer)==null?void 0:O.locationId)&&D.locationId.toString()===x.customer.locationId.toString()}),$=m.filter(D=>D.locationId!==(C==null?void 0:C.locationId)),R=async D=>{await g({locationId:D}),d()},j=[{value:"es",label:t.jsxs(t.Fragment,{children:[pd," ES"]})},{value:"en",label:t.jsxs(t.Fragment,{children:[hd," EN"]})},{value:"fr",label:t.jsxs(t.Fragment,{children:[gd," FR"]})}],A=[...f?($||[]).map(D=>({key:`loc-${D.locationId}`,label:t.jsx(Do,{text:D.name,textColor:"black",backgroundColor:"transparent",borderColor:"transparent",onClick:()=>R(D.locationId),disabled:h},D.locationId)})):[],...c?[]:[{key:"logout",label:t.jsx(Do,{text:r("Log Out"),textColor:n?s.primary[100]:s.danger[80],backgroundColor:"transparent",borderColor:"transparent",icon:t.jsx(H.MdLogout,{size:18,color:n?s.primary[100]:s.danger[40]}),onClick:()=>L(),disabled:h})}]],P=A.length>0;return t.jsxs(dd,{ref:T,children:[t.jsx(Do,{text:v,subtext:f?C==null?void 0:C.name:"",backgroundColor:b?E.black25:"transparent",borderColor:"transparent",textColor:"white",icon:t.jsx(ve.IoMdPerson,{size:18,color:"white"}),iconOther:P?b?t.jsx(ve.IoMdArrowDropup,{}):t.jsx(ve.IoMdArrowDropdown,{}):t.jsx(t.Fragment,{}),onClick:()=>P?I():()=>null}),b&&t.jsx(ud,{children:A.map(D=>t.jsx("div",{children:D.label},D.key))}),u&&t.jsx(Ne,{isSearchable:!1,isClearable:!1,width:90,options:j,onChange:D=>{o.changeLanguage(D.value)},formatOptionLabel:D=>t.jsx("div",{style:{display:"flex",gap:4,alignItems:"center"},children:D.label}),value:j.find(D=>D.value===o.language)})]})}),md=i.div`
|
|
1103
1103
|
font-weight: 400;
|
|
1104
1104
|
font-size: 14px;
|
|
1105
1105
|
line-height: 20px;
|
|
1106
1106
|
color: ${E.gray80};
|
|
1107
|
-
`,
|
|
1107
|
+
`,xd=({page:e,size:o,count:r})=>{const s=e*o+1;let n=e*o+o;return n>r&&(n=r),t.jsxs(md,{children:[s,"-",n," of ",r]})};var Rr=(e=>(e.NoType="",e.Marketing="Marketing",e.Prospecting="Prospecting",e.RespondToInquiry="Respond to Inquiry",e.ThanksForYourBusiness="Thanks For Your Business",e))(Rr||{}),$r=(e=>(e.NoType="",e.AdditionalRepair="Additional Repair",e.RepairInquiry="Repair inquiry",e.RegularService="Regular service",e.ServiceReminder="Service reminder",e.QuoteRequest="Quote request",e))($r||{});const fd="~~~external-video~~~";var pr=(e=>(e[e.LEGACY=0]="LEGACY",e[e.FREE=1]="FREE",e[e.PRO=2]="PRO",e[e.TEAMS=3]="TEAMS",e[e.ENTERPRISE=4]="ENTERPRISE",e))(pr||{});const vd={data:null,error:null,loading:!0,progress:0},bd=e=>Math.floor(Math.random()*Math.floor(e)),wd=(e,o)=>{switch(o.type){case"REQUEST":return{...e,loading:!0,error:null};case"PROGRESS":return{...e,progress:Math.min(e.progress+bd(25),100)};case"SUCCESS":return{...e,data:o.data,loading:!1,error:null,progress:100};case"FAILURE":return{...e,data:null,loading:!1,error:o.error,progress:100};default:return e}},yd=e=>{const[o,r]=p.useReducer(wd,e||vd);return{state:o,dispatch:r}},Vr=({method:e,pathname:o,params:r,autoFetch:s=!1,showToastMessage:n=!0})=>{const{state:a,dispatch:c}=yd({data:null,error:"",loading:!1}),{data:d,error:l,loading:u,progress:g}=a,{toast:h}=Te(),x=async(y,m)=>{c({type:"REQUEST"});const w=setInterval(()=>{c({type:"PROGRESS"})},200);let f=y==null?void 0:y.baseURL;f||(f=$t),ro({...{url:o,baseURL:f,method:typeof e<"u"?e:"get",params:r},headers:Sr.headers,...y}).then(S=>{let{data:T,success:V}=S;T&&T.message&&n&&h({title:T.message}),T.id&&(T.video_id=T.id),e==="patch"&&(Array.isArray(T)&&(T=T.length>0?"SUCCESS":V),T=T===!0?"SUCCESS":"ERROR"),m>=0&&(T.id=m,T.data&&(T.data.id=m)),c({type:"SUCCESS",data:T}),clearInterval(w)}).catch(S=>{c({type:"FAILURE",error:S.message}),n&&h({title:S.message}),clearInterval(w)})};return s&&d==null&&u===!1&&!l&&x(),{data:d,loading:u,error:l,fetchData:x,progress:g}},Qi=()=>{const{data:e,error:o,loading:r,fetchData:s,progress:n}=Vr({pathname:""});return{videoData:e||null,loading:r,error:o,fetch:d=>{s({method:"post",url:"/videos",baseURL:$t,data:{filename:d.filename,title:d.title}},d.hasOwnProperty("id")?d.id:void 0)},progress:n}},Zi=()=>{const{data:e,error:o,loading:r,fetchData:s,progress:n}=Vr({pathname:""}),a=d=>{const{videoId:l}=d;return s({method:"post",url:`videos/${l}/encode`,baseURL:$t})};return{encodeData:e&&(e.data||e.jobId)||null,loading:r,error:o,fetch:a,progress:n}},Ki=()=>{const{data:e,error:o,loading:r,fetchData:s}=Vr({});return{presignedUrl:e,loading:r,error:o,fetch:c=>{s({method:"get",url:`aws/signedurl?filename=${c.fileName}&filetype=${c.type}`,baseURL:$t},c.hasOwnProperty("id")?c.id:void 0)}}},Lr=p.createContext({}),Cd=({children:e})=>{const[o,r]=p.useState({}),s={action:o,setAction:r};return t.jsx(Lr.Provider,{value:s,children:e})},Sd=()=>p.useContext(Lr),Xi=({type:e,meta:o})=>({type:e,meta:o}),Ji=({type:e,payload:o,meta:r})=>({type:e,payload:o,meta:r}),es=({type:e,payload:o,meta:r,error:s=!0})=>({type:e,payload:o,meta:r,error:s});function jd(e,o){switch(o.type){case"FETCH_REQUEST":return{...e,loading:!0,error:null};case"FETCH_SUCCESS":return{...e,data:o.payload,loading:!1,error:null};case"FETCH_FAILURE":return{...e,loading:!1,error:o.payload};default:return e}}const Ed=e=>{const{action:o}=p.useContext(Lr);p.useEffect(()=>{e(o)},[o,e])},Td={data:void 0,loading:!1,error:null},ts=()=>{const[e,o]=p.useReducer(jd,Td),{error:r,loading:s,data:n}=e,{toast:a}=Te(),c=()=>{var l;return((l=navigator==null?void 0:navigator.userAgent)==null?void 0:l.indexOf("Firefox"))!==-1};Ed(o);const d=p.useCallback(async l=>{o(Xi({type:"FETCH_REQUEST"}));const u=g=>{l.onUploadProgress(g,l.hasOwnProperty("id")?l.id:void 0)};try{const g=c();await ro.put(l.url,l.file,{headers:{"content-type":!g&&l.contentType?l.contentType:l.file.type},onUploadProgress:u}),o(Ji({type:"FETCH_SUCCESS",payload:{success:!0,id:l.hasOwnProperty("id")?l.id:void 0}}));return}catch(g){if(g instanceof Error)throw a({message:g==null?void 0:g.message}),o(es({type:"FETCH_FAILURE",payload:"Something wen wrong"})),new Error(g.message)}},[]);return{data:n,loading:s,error:r,uploadVideo:d}};function kd(e,o){switch(o.type){case"FETCH_REQUEST":return{...e,loading:!0,error:null};case"FETCH_SUCCESS":return{...e,data:o.payload,loading:!1,error:null};case"FETCH_FAILURE":return{...e,data:void 0,loading:!1,error:o.payload};default:return e}}const Id=()=>{const{setAction:e}=Sd(),{toast:o}=Te(),{t:r}=W.useTranslation(),s={data:void 0,loading:!1,error:null,isValid:!1},[n,a]=p.useReducer(kd,s),c=async g=>{a(Xi({type:"FETCH_REQUEST"}));try{const h=await ja(g);return a(Ji({type:"FETCH_SUCCESS",payload:h})),o({title:r("Transcription Started.")}),{data:d,loading:!1,error:null}}catch(h){return o({message:h}),a(es({type:"FETCH_FAILURE",payload:"Something went wrong"})),e({type:"START_VIDEO_TRANSCRIPTION"}),Promise.reject({loading:!1,error:"Something went wrong"})}},{data:d,error:l,loading:u}=n;return{start:c,data:d,loading:u,error:l}},Ad=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("g",{fill:"#272A32"},k.createElement("path",{id:"bqn2hmlmqa",d:"M18 13h-5v5c0 .55-.45 1-1 1s-1-.45-1-1v-5H6c-.55 0-1-.45-1-1s.45-1 1-1h5V6c0-.55.45-1 1-1s1 .45 1 1v5h5c.55 0 1 .45 1 1s-.45 1-1 1z"}))),os=i(Ad)`
|
|
1108
1108
|
width: ${e=>e.width||"24px"};
|
|
1109
1109
|
height: ${e=>e.height||"24px"};
|
|
1110
1110
|
path {
|
|
1111
1111
|
fill: ${e=>e.color||"currentColor"};
|
|
1112
1112
|
opacity: ${e=>e.opacity||"1"};
|
|
1113
1113
|
}
|
|
1114
|
-
`,
|
|
1114
|
+
`,Rd=i.div`
|
|
1115
1115
|
margin-top: ${e=>e.marginTop}px;
|
|
1116
1116
|
text-align: center;
|
|
1117
1117
|
width: ${e=>e.width}px;
|
|
@@ -1175,7 +1175,7 @@
|
|
|
1175
1175
|
.file {
|
|
1176
1176
|
display: none;
|
|
1177
1177
|
}
|
|
1178
|
-
|
|
1178
|
+
`,$d=i.div`
|
|
1179
1179
|
height: 100%;
|
|
1180
1180
|
width: 100%;
|
|
1181
1181
|
float: left;
|
|
@@ -1186,18 +1186,18 @@
|
|
|
1186
1186
|
flex-direction: column;
|
|
1187
1187
|
z-index: -1;
|
|
1188
1188
|
background-color: ${e=>e.backgroundColor?e.backgroundColor:e.isActive?"#f6f7f9":"#fff"};
|
|
1189
|
-
`,
|
|
1189
|
+
`,Vd=i.div`
|
|
1190
1190
|
svg {
|
|
1191
1191
|
opacity: 1 !important;
|
|
1192
1192
|
}
|
|
1193
|
-
|
|
1193
|
+
`,Ld=i.p`
|
|
1194
1194
|
width: 317px;
|
|
1195
1195
|
margin: 0 0 21px;
|
|
1196
1196
|
font-size: 16px;
|
|
1197
1197
|
line-height: 1.5;
|
|
1198
1198
|
text-align: center;
|
|
1199
1199
|
color: ${E.black_1_100};
|
|
1200
|
-
`,
|
|
1200
|
+
`,Md=({accept:e=".csv, text/csv",inputStyle:o={},onDrop:r,width:s=528,height:n=100,marginTop:a=0,disabled:c=!1,textStyle:d,backgroundColor:l})=>{const{t:u}=W.useTranslation(),g=(b,S)=>{switch(S.type){case"SET_DROP_DEPTH":return{...b,dropDepth:S.dropDepth};case"SET_IN_DROP_ZONE":return{...b,inDropZone:S.inDropZone};case"ADD_FILE_TO_LIST":let T=!0;for(let V of S.files)T=e.includes(V.name.substr(-4));return T?{...b,fileList:b.fileList.concat(S.files)}:b;default:return b}},[h,x]=p.useReducer(g,{dropDepth:0,inDropZone:!1,fileList:[]}),y=b=>{b.preventDefault(),b.stopPropagation(),x({type:"SET_DROP_DEPTH",dropDepth:h.dropDepth+1})},m=b=>{b.preventDefault(),b.stopPropagation(),!(b.target&&b.target.id.includes("text-"))&&(x({type:"SET_DROP_DEPTH",dropDepth:h.dropDepth-1}),x({type:"SET_IN_DROP_ZONE",inDropZone:!1}))},w=b=>{b.preventDefault(),b.stopPropagation(),b.dataTransfer.dropEffect="copy",x({type:"SET_IN_DROP_ZONE",inDropZone:!0})},f=()=>{const b=document.getElementById("file");!b||!b.click||b.click()};return t.jsx(Rd,{width:s,height:n,marginTop:a,backgroundColor:l,children:t.jsx("div",{className:h.inDropZone?"drag-drop-zone inside-drag-area":"drag-drop-zone outside-drag-area",onDrop:b=>r(b),onDragOver:b=>w(b),onDragEnter:b=>y(b),onDragLeave:b=>m(b),children:t.jsxs($d,{id:"text-browse",isActive:h.inDropZone,backgroundColor:l,children:[!h.inDropZone&&h.fileList.length===0&&t.jsxs(t.Fragment,{children:[t.jsx(Ld,{style:d,children:u("Drag and drop your files here or")}),h.inDropZone?t.jsx("input",{type:"button",value:"browse your files...",onClick:f}):t.jsx(Vd,{children:t.jsx(F.Button,{text:u("Browse files..."),icon:t.jsx(os,{color:"#fff"}),disabled:c,onClick:f})})]}),h.inDropZone&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),t.jsx("p",{id:"text-drop",children:"Drop file here"})]}),h.fileList[0]&&t.jsxs(t.Fragment,{children:[t.jsx("br",{}),t.jsxs("p",{children:[h.fileList[0][0].name," is ready"]})]}),t.jsx("input",{className:"file",id:"file",type:"file",style:o,accept:e,onChange:b=>r(b),disabled:c})]})})})},xn=i.div`
|
|
1201
1201
|
min-height: 400px;
|
|
1202
1202
|
position: relative;
|
|
1203
1203
|
`,No=i.div`
|
|
@@ -1227,11 +1227,11 @@
|
|
|
1227
1227
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
1228
1228
|
justify-content: space-between;
|
|
1229
1229
|
`}
|
|
1230
|
-
`,
|
|
1230
|
+
`,Dd=i.div`
|
|
1231
1231
|
margin-bottom: 24px;
|
|
1232
|
-
`,
|
|
1232
|
+
`,Od=i.div`
|
|
1233
1233
|
display: flex;
|
|
1234
|
-
`,
|
|
1234
|
+
`,Nd=i.div`
|
|
1235
1235
|
width: 0%;
|
|
1236
1236
|
color: white;
|
|
1237
1237
|
background-color: transparent;
|
|
@@ -1239,7 +1239,7 @@
|
|
|
1239
1239
|
text-align: right;
|
|
1240
1240
|
font-size: 1px;
|
|
1241
1241
|
border-radius: 15px;
|
|
1242
|
-
`,
|
|
1242
|
+
`,Pd=i.div`
|
|
1243
1243
|
width: 50%;
|
|
1244
1244
|
color: black;
|
|
1245
1245
|
padding: 1%;
|
|
@@ -1250,10 +1250,10 @@
|
|
|
1250
1250
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
1251
1251
|
font-size: 15px;
|
|
1252
1252
|
`}
|
|
1253
|
-
`,
|
|
1253
|
+
`,Fd=i.div`
|
|
1254
1254
|
display: flex;
|
|
1255
1255
|
background: ${E.gray10};
|
|
1256
|
-
`,
|
|
1256
|
+
`,zd=i.div`
|
|
1257
1257
|
flex-grow: 1;
|
|
1258
1258
|
color: black;
|
|
1259
1259
|
padding: 1%;
|
|
@@ -1264,7 +1264,7 @@
|
|
|
1264
1264
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
1265
1265
|
font-size: 15px;
|
|
1266
1266
|
`}
|
|
1267
|
-
`,
|
|
1267
|
+
`,_d=i.div`
|
|
1268
1268
|
position: absolute;
|
|
1269
1269
|
top: -47px;
|
|
1270
1270
|
left: 0;
|
|
@@ -1277,25 +1277,25 @@
|
|
|
1277
1277
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
1278
1278
|
font-size: 16px;
|
|
1279
1279
|
`}
|
|
1280
|
-
`,
|
|
1280
|
+
`,Bd=i.div`
|
|
1281
1281
|
display: flex;
|
|
1282
1282
|
height: 249px;
|
|
1283
1283
|
padding: 32px;
|
|
1284
1284
|
align-items: center;
|
|
1285
|
-
`,
|
|
1285
|
+
`,Ud=i.div`
|
|
1286
1286
|
font-size: 14px;
|
|
1287
1287
|
color: ${({theme:e})=>e.colors.danger[100]};
|
|
1288
1288
|
height: 20px;
|
|
1289
1289
|
margin-top: 15px;
|
|
1290
|
-
`,fn=({progress:e,uploadingData:o,setUploadingData:r})=>{const s=[];let n=[],a=[],c=[];const{colors:d}=i.useTheme(),{t:l}=W.useTranslation(),[u,g]=p.useState([{elementId:0,isTitleNotEmpty:!0}]);for(let m in o)s.push(o[m]),c=s.filter(
|
|
1290
|
+
`,fn=({progress:e,uploadingData:o,setUploadingData:r})=>{const s=[];let n=[],a=[],c=[];const{colors:d}=i.useTheme(),{t:l}=W.useTranslation(),[u,g]=p.useState([{elementId:0,isTitleNotEmpty:!0}]);for(let m in o)s.push(o[m]),c=s.filter(w=>w.showActiveVideo===1),n=c.filter(w=>w.status===1),a=c.reduce((w,f)=>f.progressEvent.total+w,0);const h=(m,w)=>{u.filter(b=>b.elementId===m).forEach(b=>{const S=u.indexOf(b);S>=0&&g(u.splice(S,1))}),g([...u,{elementId:m,isTitleNotEmpty:!!w.trimStart()}]),r(b=>({...b,[m]:{...b[m],title:w}}))},x=m=>m.status>=1,y=m=>l(m===0?"Waiting...":m===1?"Uploading...":"Encoding...");return t.jsxs("div",{children:[!!e&&t.jsxs(_d,{children:[t.jsx("span",{children:t.jsxs("b",{children:[n.length," of ",c.length]})})," ",l("videos uploading")," (",Lo(a)," MB)"]}),s.map(m=>t.jsxs(Dd,{children:[" ",m.showActiveVideo?t.jsxs(t.Fragment,{children:[t.jsxs(Od,{style:{...x(m)&&{flexDirection:"column"}},children:[t.jsx(Gt,{maxLength:100,type:"text",value:m.title,readOnly:!!e,width:"100%",onChange:w=>h(m.id,w.target.value)}),x(m)&&t.jsxs("div",{style:{width:"100%",marginTop:"18px",backgroundColor:"white"},children:[t.jsx(Nd,{style:{width:m.progressEvent.percentage+"%",backgroundColor:d.primary[100]}}),t.jsxs(Fd,{children:[t.jsx(Pd,{children:y(m.status)}),t.jsx(zd,{children:Lo(m.progressEvent.loaded)+" MB/"+Lo(m.progressEvent.total)+" MB"})]})]})]}),u.map(w=>w.elementId===m.id&&!w.isTitleNotEmpty?t.jsx(Ud,{children:l("Video title is required!")},`error-${w.elementId}`):t.jsx("div",{},`el-${w.elementId}`))]}):""]},`Video-list-${m.id}`))]})},Wd={accept:"video/*,.mkv"},Hd=({handleModalClose:e,onSuccess:o})=>{const{toast:r}=Te(),{userData:s}=me(),{start:n}=Id(),{isCdkEnviroment:a}=i.useTheme(),[c,d]=p.useState(0),[l,u]=p.useState({}),[g,h]=p.useState(!1),[x,y]=p.useState(!1),[m,w]=p.useState(!1),[f,b]=p.useState(0),[S,T]=p.useState([]),[V,I]=p.useState({loaded:0,total:0,percentage:0}),{presignedUrl:L,fetch:v,loading:C,error:$}=Ki(),{uploadVideo:R,loading:j,data:A,error:P}=ts(),{fetch:M,loading:N,videoData:D,error:O}=Qi(),{fetch:U,loading:Y,encodeData:ne}=Zi();p.useEffect(()=>{if(!C&&!$&&Object.keys(l).length){d(1),b(1);const{id:Q}=L||{id:-1};if(Q===void 0)return;Object.keys(l).length&&(l[Q].status=1,u(l)),R({url:L.url,file:l[Q].file,onUploadProgress:B,id:L.id})}},[L]),p.useEffect(()=>{if(!j&&!P&&A&&Object.keys(l).length){const{id:Q}=A||{id:-1};if(Q===void 0)return;Object.keys(l).length&&(l[Q].status=2,u(l));const _=l[Q];b(2),M({filename:_.file.name,title:_.title,id:A.id})}},[j,A]),p.useEffect(()=>{c!==0&&(!l||!Object.keys(l).length)&&d(0);const Q=[],_=[];Object.keys(l).forEach(ue=>{Q.push(!!(l[ue].title&&l[ue].title.trimStart())),_.push(l[ue].title.length>100)}),Q.includes(!1)?h(!0):_.includes(!0)?(r({title:lt.t("Video title can not be more than 100 characters!")}),h(!0)):h(!1)},[l]),p.useEffect(()=>{if(!N&&!O&&D&&Object.keys(l).length){b(3);const{id:Q}=D||{id:-1};if(Q===void 0)return;Object.keys(l).length&&(l[Q].status=3,u(l)),T([Number(D.video_id)]),U({videoId:D.video_id,customerId:s.customerId})}},[N,D]),p.useEffect(()=>{!Y&&ne&&S.length===Object.keys(l).length&&!Object.values(l).some(Q=>Q.status<3)&&(de(),o(S),e())},[N,ne,S]);const K=async Q=>{for(let _=0;_<Q.length;_++){if(!/.*\.(avchd|swf|flv|mov|qt|wmv|mkv|m4v|m4p|mpv|mp2|mpe|mpg|ogg|mp4|avi|webm|mpeg)/i.test(Q[_].name)){r({title:lt.t("{{name}} is of invalid type and won't be uploaded.",{name:Q[_].name})});continue}const Ee=Q[_].name.split("."),Ae=Ee[1]==="mkv"?"video/x-matroska":Q[_].type,Z=new File([Q[_]],Ei(s,Ee[Ee.length-1]),{type:Ae,lastModified:Q[_].lastModified});u(oe=>{const be={...oe};let Le=0;if(Object.keys(oe).length){const Pe=Object.keys(oe);Le=parseInt(Pe[Pe.length-1],10)+1}return be[Le]={id:Le,file:Z,title:Ee[0],progressEvent:{loaded:0,total:0,percentage:0},status:0,showActiveVideo:1},be})}},G=async Q=>{Q.preventDefault(),Q.stopPropagation();const _=Q.dataTransfer||Q.target;_&&_.files&&_.files.length?await K(_.files):r({title:lt.t("Oops! Something went wrong, try again in a few moments.")})},q=()=>{if(f===0)return e();w(!0)},ee=()=>{y(!0),Object.keys(l).forEach(Q=>{const _=l[Q].file;v({fileName:_.name,type:_.type,id:parseInt(Q,10)})})},B=(Q,_)=>{const ue=Math.round(Q.loaded*100/Q.total);if(_===void 0||!l[_])return;const Ee={...l};Ee[_].progressEvent={loaded:Math.floor(Q.loaded/1024),total:Math.floor(Q.total/1024),percentage:ue},u(Ee),I({loaded:Math.floor(Q.loaded/1024),total:Math.floor(Q.total/1024),percentage:ue})},de=()=>{if(s.autoTranscribe&&D&&D.id)try{setTimeout(()=>{n(D.id)},5e3)}catch(Q){console.log(Q)}},te=!!Object.keys(l).length,se=({disabled:Q=!1,onClick:_=ee,title:ue})=>{const Ee=ue||lt.t("Upload");return t.jsx(F.Button,{text:Ee,onClick:_,disabled:Q})},ae=t.jsxs(xn,{children:[t.jsx(No,{style:{...!te&&{backgroundColor:"transparent",marginTop:0,maxHeight:"400px"}},children:te?t.jsx(fn,{uploadingData:l,setUploadingData:u,progress:f}):t.jsx(Md,{onDrop:G,marginTop:0,height:350,width:440,accept:Wd.accept})}),te&&t.jsxs(Po,{children:[t.jsx(F.Button,{text:lt.t("Cancel"),variant:a?"text":"secondary",onClick:q}),t.jsx(se,{disabled:g||x})]})]}),xe=t.jsxs(t.Fragment,{children:[t.jsx(No,{children:t.jsx(fn,{uploadingData:l,setUploadingData:u,progress:f})}),t.jsxs(Po,{style:{justifyContent:"right"},children:[t.jsx(F.Button,{text:lt.t("Cancel"),variant:a?"text":"secondary",onClick:q}),t.jsx(se,{disabled:!0})]})]}),Ie=t.jsxs(t.Fragment,{children:[t.jsx(No,{children:t.jsx(Bd,{children:lt.t("You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?")})}),t.jsxs(Po,{children:[t.jsx(F.Button,{text:lt.t("Cancel"),variant:a?"text":"secondary",onClick:e}),t.jsx(se,{title:lt.t("Continue Upload"),onClick:()=>w(!1)})]})]});return[ae,t.jsx(xn,{children:m?Ie:xe})][c]},qd=i.div`
|
|
1291
1291
|
display: flex;
|
|
1292
1292
|
justify-content: space-between;
|
|
1293
1293
|
align-items: center;
|
|
1294
1294
|
padding: 25px 30px 5px 30px;
|
|
1295
|
-
`,
|
|
1295
|
+
`,Gd=i.div`
|
|
1296
1296
|
font-weight: bold;
|
|
1297
1297
|
font-size: 18px;
|
|
1298
|
-
`,
|
|
1298
|
+
`,Yd=({handleModalClose:e,disabled:o,onSuccess:r})=>{const{t:s}=W.useTranslation();return t.jsxs(Co,{disableFullScreen:!0,children:[t.jsxs(qd,{children:[t.jsx(Gd,{children:s("Upload new video")}),t.jsx(mc,{style:{position:"static",padding:0,height:"fit-content",width:"fit-content"},disabled:o,onClick:e})]}),t.jsx(Hd,{handleModalClose:e,onSuccess:r})]})},Qd=({vin:e=""})=>Ce.useQuery(["GTM_VIN",e],async()=>jr({search:e,soldFilter:"2"}),{refetchOnWindowFocus:!1,staleTime:0,enabled:!!e});function bt({vin:e}){var g,h,x,y,m;const{isCdkEnviroment:o}=i.useTheme(),{data:r,isSuccess:s}=Qd({vin:o?e:""}),{userData:n}=me(),a=he.useLocation(),c=e?(g=r==null?void 0:r.items)==null?void 0:g[0]:void 0,d={user_id:(n==null?void 0:n.eleadDMSEmployeeID)||void 0,enterprise_id:((h=n==null?void 0:n.customer)==null?void 0:h.cdkEnterpriseId)||void 0,store_id:((x=n==null?void 0:n.customer)==null?void 0:x.cdkStoreId)||void 0,store_name:((y=n==null?void 0:n.customer)==null?void 0:y.business)||void 0,is_internal_user:(m=n==null?void 0:n.email)==null?void 0:m.includes("cdk")},l=Jt(c),u=p.useCallback(({pageLocation:w,pageSection:f,videoAttributes:b,excludeVehicleData:S=!1,vehicle:T,mergeIds:V,pageUrl:I})=>{const L=no(b),C={...{event:qe.COVIDEO_PAGEVIEW,application:Ui.CRM_VIDEO_EMBED,page_url:I,page_location:w||void 0,page_section:f||void 0},...d,...L,...S?{}:l,...T,...V?{merge_ids:V}:{}};et(C)},[a.pathname,n,l.vin]);return{trackVideoSpecificPagesManually:o?u:void 0,vehiceReady:s}}const rs="lastSelectedFolderEmbed",Zd=()=>{const e=localStorage.getItem(rs);return e?JSON.parse(e):null},Kd=e=>{localStorage.setItem(rs,JSON.stringify(e))},Xd=e=>{const r=Zd();return!(r&&Number(r.userId)===e)||r.folderId===void 0?-2:(r==null?void 0:r.folderId)===_e.value?_e.value:Number(r.folderId)},Jd=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.isUsingVinReels)},eu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.spotlightEnabled)&&!!Number(e==null?void 0:e.spotlightEnabled)},tu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.spotlightEnabled)},ou=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.quickVideosEnabled)},ru=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.suggestedContentEnabled)},nu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.quickVideoAvatarEnabled)&&!!Number(e==null?void 0:e.quickVideoAvatarEnabled)},iu=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.quickVideoAvatarEnabled)},su=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.aiMusicEnabled)},au=e=>{var o;return!!Number((o=e==null?void 0:e.customer)==null?void 0:o.hasCovideoMagic)},cu=()=>{const{userData:e}=me();return p.useMemo(()=>({isAIScriptsEnabled:au(e),isAIAssistantEnabled:nu(e),isAIAssistantEnabledForCustomer:iu(e),isVinReelsEnabled:Jd(e),isAISpotlightEnabled:eu(e),isAISpotlightEnabledForCustomer:tu(e),isQuickVideosEnabled:ou(e),isSuggestedContentEnabled:ru(e),isAIMusicEnabled:su(e)}),[e])},lu=()=>{const{isVinReelsEnabled:e,isQuickVideosEnabled:o,isAISpotlightEnabled:r,isAIAssistantEnabled:s}=cu();return p.useMemo(()=>{const n=s||e||r,a=e||o,c=n||a,d=r||s,l=o;return{isPronunciationAvailable:n,isDealershipHighlightsAvailable:a,isPersonalizationAvailable:c,isAIAssistantsAvailable:d,isQuickVideosAvailable:l,isVinReelsAvailable:e,isAIConfigurationAvailable:c||d||l}},[e,o,r,s])},du=i.div`
|
|
1299
1299
|
position: absolute;
|
|
1300
1300
|
top: calc(100% + 6px); // space below the trigger
|
|
1301
1301
|
right: 0;
|
|
@@ -1311,7 +1311,7 @@
|
|
|
1311
1311
|
${({theme:e})=>e.containerWidth<=z.xs&&i.css`
|
|
1312
1312
|
right: -32px;
|
|
1313
1313
|
`}
|
|
1314
|
-
`,
|
|
1314
|
+
`,uu=i.button`
|
|
1315
1315
|
display: flex;
|
|
1316
1316
|
align-items: center;
|
|
1317
1317
|
justify-content: flex-start;
|
|
@@ -1333,7 +1333,7 @@
|
|
|
1333
1333
|
opacity: 0.5;
|
|
1334
1334
|
cursor: not-allowed;
|
|
1335
1335
|
}
|
|
1336
|
-
`,
|
|
1336
|
+
`,pu=e=>{const{dropdownItems:o}=e,r=i.useTheme();return t.jsx(du,{children:o.map((s,n)=>{const a=t.jsxs(uu,{bgColor:r.colors.secondary[5],onHoverBgColor:r.colors.secondary[5],color:r.colors.secondary[100],onClick:s.onClick,children:[s.icon,s.label]},n);return s.showItem?a:null})})},tt=i.h1`
|
|
1337
1337
|
margin: ${({m:e})=>e||0};
|
|
1338
1338
|
|
|
1339
1339
|
color: ${({color:e})=>e||E.gray100};
|
|
@@ -1348,14 +1348,14 @@
|
|
|
1348
1348
|
overflow: hidden;
|
|
1349
1349
|
text-overflow: ellipsis;
|
|
1350
1350
|
`}
|
|
1351
|
-
`,
|
|
1351
|
+
`,hu=i.css`
|
|
1352
1352
|
font-weight: 800;
|
|
1353
1353
|
font-size: 24px;
|
|
1354
1354
|
line-height: 40px;
|
|
1355
1355
|
line-break: anywhere; /*** SUS-797 changes ***/
|
|
1356
|
-
`,
|
|
1357
|
-
${
|
|
1358
|
-
`,
|
|
1356
|
+
`,ns=i(tt).attrs({as:"h1"})`
|
|
1357
|
+
${hu}
|
|
1358
|
+
`,gu=i(tt).attrs({as:"h2"})`
|
|
1359
1359
|
font-size: 18px;
|
|
1360
1360
|
line-height: 24px;
|
|
1361
1361
|
font-weight: 700;
|
|
@@ -1375,7 +1375,7 @@
|
|
|
1375
1375
|
font-size: 16px;
|
|
1376
1376
|
line-height: 24px;
|
|
1377
1377
|
font-weight: 500;
|
|
1378
|
-
`;const
|
|
1378
|
+
`;const mu=i(tt).attrs({as:"p"})`
|
|
1379
1379
|
font-size: 12px;
|
|
1380
1380
|
line-height: 16px;
|
|
1381
1381
|
font-weight: 400;
|
|
@@ -1395,7 +1395,7 @@
|
|
|
1395
1395
|
font-size: 15px;
|
|
1396
1396
|
font-weight: 500;
|
|
1397
1397
|
line-height: 24px;
|
|
1398
|
-
`;const
|
|
1398
|
+
`;const xu=i.div`
|
|
1399
1399
|
position: relative;
|
|
1400
1400
|
display: inline-flex;
|
|
1401
1401
|
align-items: center;
|
|
@@ -1408,9 +1408,9 @@
|
|
|
1408
1408
|
border-width: 1px;
|
|
1409
1409
|
padding: 7px;
|
|
1410
1410
|
gap: 12px;
|
|
1411
|
-
`,
|
|
1411
|
+
`,fu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M16.8318 10.0099V10.9675C16.7829 10.9675 16.7387 10.9675 16.6946 10.9675C15.5974 10.9675 14.5003 10.9663 13.4025 10.9693C13.2903 10.9693 13.1746 10.9824 13.0666 11.0122C12.9079 11.0564 12.8303 11.181 12.8321 11.3475C12.8345 11.5217 12.9073 11.6196 13.0809 11.6667C13.1537 11.6864 13.2295 11.7013 13.3046 11.7043C14.0289 11.7299 14.7538 11.7502 15.4781 11.7771C15.7018 11.7854 15.9267 11.7962 16.1469 11.8302C16.5908 11.8982 16.8551 12.1655 16.947 12.6022C17.0215 12.9584 17.0251 13.3163 16.947 13.6719C16.8402 14.1569 16.4983 14.4451 15.9828 14.4898C15.8206 14.5036 15.6571 14.5113 15.4942 14.5119C14.2562 14.5137 13.0189 14.5131 11.7809 14.5131C11.7356 14.5131 11.6902 14.5131 11.6341 14.5131V13.5484C11.6807 13.5484 11.7248 13.5484 11.769 13.5484C12.8661 13.5484 13.9633 13.5496 15.0611 13.5466C15.181 13.5466 15.3039 13.5329 15.4196 13.5031C15.5765 13.4625 15.6535 13.3563 15.6613 13.2107C15.6714 13.0335 15.607 12.9005 15.4501 12.8474C15.3194 12.8032 15.178 12.7764 15.0396 12.7704C14.3344 12.74 13.6286 12.7227 12.9234 12.6923C12.7045 12.6827 12.4825 12.6666 12.2689 12.6207C11.8215 12.5246 11.587 12.2466 11.5214 11.7371C11.4808 11.4209 11.488 11.1017 11.5661 10.7897C11.6944 10.2748 12.0124 10.0117 12.5678 10.0081C13.9764 9.99857 15.385 10.0051 16.7936 10.0051C16.8008 10.0051 16.8085 10.0075 16.8306 10.0117L16.8318 10.0099Z",fill:"#214099"}),t.jsx("path",{d:"M6.16772 10.0088H11.0426V11.035H7.54053C7.54053 11.2873 7.53933 11.5248 7.54291 11.7622C7.54291 11.7801 7.57692 11.807 7.59959 11.8135C7.63121 11.8225 7.66701 11.8171 7.70161 11.8171C8.69258 11.8171 9.68355 11.8171 10.6751 11.8171C10.7809 11.8171 10.834 11.8714 10.8344 11.98C10.8344 12.1805 10.8296 12.3815 10.8362 12.582C10.8398 12.6864 10.8058 12.7168 10.7002 12.7168C9.70145 12.7132 8.70272 12.7144 7.704 12.7144C7.65507 12.7144 7.60615 12.7144 7.53993 12.7144C7.53993 12.9554 7.53874 13.1887 7.54232 13.422C7.54232 13.4405 7.57513 13.4679 7.5972 13.4745C7.62882 13.484 7.66462 13.4781 7.69922 13.4781C8.76238 13.4781 9.82554 13.4781 10.8893 13.4781H11.0426V14.5048H6.16832V10.0088H6.16772Z",fill:"#214099"}),t.jsx("path",{d:"M16.8557 14.5122C16.981 14.2801 17.0973 14.0641 17.2143 13.8488C17.8878 12.6084 18.5626 11.3693 19.232 10.1271C19.2851 10.0287 19.3424 9.99884 19.451 10C19.9635 10.006 20.4759 10.0036 20.9884 10.0018C21.0523 10.0018 21.0905 10.0173 21.1227 10.0776C21.9024 11.5309 22.684 12.9837 23.4656 14.4364C23.4757 14.4555 23.4841 14.4764 23.5002 14.5128C23.4184 14.5128 23.3486 14.5128 23.2788 14.5128C22.8803 14.5128 22.4817 14.511 22.0832 14.5146C22.0062 14.5152 21.9615 14.4967 21.9251 14.4227C21.8249 14.2193 21.7127 14.0218 21.6083 13.8201C21.5785 13.7629 21.5421 13.7396 21.4759 13.7396C20.6144 13.742 19.7523 13.742 18.8907 13.7396C18.8233 13.7396 18.7881 13.7646 18.7589 13.8207C18.6497 14.0283 18.5399 14.236 18.4236 14.4394C18.4045 14.4734 18.352 14.5092 18.315 14.5098C17.8371 14.5146 17.3587 14.5128 16.8569 14.5128L16.8557 14.5122ZM21.0541 12.7749C20.7611 12.2236 20.4771 11.689 20.18 11.1306C19.8835 11.689 19.5989 12.2248 19.306 12.7749H21.0535H21.0541Z",fill:"#214099"}),t.jsx("path",{d:"M5.88986 14.509H1.5V10.0088H2.87041V10.1412C2.87041 11.1787 2.87041 12.2168 2.87041 13.2543C2.87041 13.456 2.84834 13.4321 3.04343 13.4327C3.94312 13.4333 4.84341 13.4327 5.74309 13.4327C5.78844 13.4327 5.83378 13.4327 5.88867 13.4327V14.5084L5.88986 14.509Z",fill:"#214099"})]}),vu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{d:"M8.01135 7.31074L8.13763 16.7994C8.15144 17.8372 9.27808 18.4745 10.1758 17.9536L18.1748 13.3109C19.0686 12.792 19.0765 11.5016 18.1886 10.9728L10.0634 6.12688C9.1518 5.58428 7.99754 6.24922 8.01135 7.31074Z",fill:"#E91524"}),t.jsx("path",{d:"M12.5 23C18.5751 23 23.5 18.0751 23.5 12C23.5 5.92487 18.5751 1 12.5 1C6.42487 1 1.5 5.92487 1.5 12C1.5 18.0751 6.42487 23 12.5 23Z",stroke:"#231F20","stroke-width":"1.18386","stroke-miterlimit":"10"})]}),bu=t.jsxs("svg",{width:"25",height:"24",viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",children:[t.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M2.5 4C2.5 3.44772 2.94772 3 3.5 3H21.5C22.0523 3 22.5 3.44772 22.5 4V14C22.5 14.5523 22.0523 15 21.5 15H3.5C2.94772 15 2.5 14.5523 2.5 14V4ZM14.3216 8.576C14.6349 8.77183 14.6349 9.22817 14.3216 9.424L11.765 11.0219C11.432 11.23 11 10.9906 11 10.5979V7.40212C11 7.00941 11.432 6.76998 11.765 6.97812L14.3216 8.576Z",fill:"#272A32"}),t.jsx("path",{d:"M3.5 17C2.94772 17 2.5 17.4477 2.5 18V20C2.5 20.5523 2.94772 21 3.5 21H21.5C22.0523 21 22.5 20.5523 22.5 20V18C22.5 17.4477 22.0523 17 21.5 17H3.5Z",fill:"#272A32"})]}),wu=()=>{var I,L,v,C;const{colors:e}=i.useTheme(),[o,r]=p.useState(!1),{showWheelsTVFeature:s,showLesaTVFeature:n,showVinReelsFeature:a}=Se(),{t:c}=W.useTranslation(),{userData:d}=me(),l=he.useHistory(),{isVinReelsAvailable:u}=lu(),g=st(d),h=()=>{r(!1)},{ref:x}=Ar(h),y=!g&&!!Number(d.customer.wheelsTV),m=!!Number(d.customer.lesaAccess),w=[y?c("Wheels TV"):"",m?c("Lesa"):"",u?c("VINReels"):""].filter(Boolean),b=($=>{const R=$.pop();return`${$.join(", ")} & ${R}`})([...w]),T=w.length>=2,V=[{label:t.jsx(ft,{children:c("Wheels TV")}),icon:vu,onClick:()=>{r(!1),l.push("/wheels-tv")},showItem:y&&s},{label:t.jsx(ft,{children:c("Lesa")}),icon:fu,onClick:()=>{r(!1),l.push("/lesa-tv")},showItem:m&&n},{label:t.jsx(ft,{children:c("VINReels")}),icon:bu,onClick:()=>{r(!1),l.push("/vinreels")},showItem:u&&a}];return!n&&!s&&!a?t.jsx(t.Fragment,{}):t.jsxs(t.Fragment,{children:[T&&t.jsxs("div",{ref:x,style:{position:"relative",display:"inline-block"},children:[t.jsx(F.Tooltip,{extendStyles:{element:{width:"100%",maxWidth:"200px"},popup:{padding:"10px"}},popup:t.jsx(ht,{children:b}),children:t.jsxs(xu,{onClick:()=>r($=>!$),children:[t.jsx(yi.IoCarSport,{size:24,color:((L=(I=e.secondary)==null?void 0:I.text)==null?void 0:L.color)||e.secondary[100]}),t.jsx(Xs.BiChevronDown,{size:20,color:((C=(v=e.secondary)==null?void 0:v.text)==null?void 0:C.color)||e.secondary[100]})]})}),!!o&&t.jsx(pu,{dropdownItems:V})]}),s?!T&&y&&t.jsx(F.Button,{onClick:()=>l.push("/wheels-tv"),icon:t.jsx(ve.IoMdCar,{size:18}),text:"WheelsTV",variant:"white"}):null,n?!T&&m&&t.jsx(F.Button,{onClick:()=>l.push("/lesa-tv"),icon:t.jsx(ve.IoMdCar,{size:18}),text:"LesaTV",variant:"white"}):null,a?!T&&u&&t.jsx(F.Button,{onClick:()=>l.push("/vinreels"),icon:t.jsx(ve.IoMdCar,{size:18}),text:"VinReels",variant:"white"}):null]})},yu=i.div`
|
|
1412
1412
|
background: ${E.gray10};
|
|
1413
|
-
`,
|
|
1413
|
+
`,Cu=i.div`
|
|
1414
1414
|
display: flex;
|
|
1415
1415
|
justify-content: space-between;
|
|
1416
1416
|
gap: 16px;
|
|
@@ -1429,7 +1429,7 @@
|
|
|
1429
1429
|
${({theme:e})=>e.containerWidth<z.cmd&&i.css`
|
|
1430
1430
|
justify-content: flex-end;
|
|
1431
1431
|
`}
|
|
1432
|
-
`,
|
|
1432
|
+
`,Su=i.div`
|
|
1433
1433
|
display: flex;
|
|
1434
1434
|
gap: 8px;
|
|
1435
1435
|
justify-content: flex-end;
|
|
@@ -1437,12 +1437,12 @@
|
|
|
1437
1437
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
1438
1438
|
width: 100%;
|
|
1439
1439
|
`}
|
|
1440
|
-
`,
|
|
1440
|
+
`,ju=i.div`
|
|
1441
1441
|
width: 190px;
|
|
1442
1442
|
${({theme:e})=>e.containerWidth<z.cmd&&i.css`
|
|
1443
1443
|
width: 100%;
|
|
1444
1444
|
`}
|
|
1445
|
-
`,
|
|
1445
|
+
`,Eu=i.div`
|
|
1446
1446
|
display: grid;
|
|
1447
1447
|
gap: 24px;
|
|
1448
1448
|
margin: 24px 0;
|
|
@@ -1453,10 +1453,10 @@
|
|
|
1453
1453
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
1454
1454
|
grid-template-columns: 1fr;
|
|
1455
1455
|
`}
|
|
1456
|
-
`,Kt={folderId:-2,name:"Primary",isDeletable:!1},zo=0,
|
|
1456
|
+
`,Kt={folderId:-2,name:"Primary",isDeletable:!1},zo=0,Tu=6,ku="cds-folders",Iu=({handleUpdateToken:e})=>{const{trackVideoSpecificPagesManually:o}=bt({vin:""}),{trackGTMVideoInteractionEvent:r}=Ge(),{colors:s,isCdkEnviroment:n}=i.useTheme(),{userData:a}=me(),{toast:c}=Te(),{showMergeFeature:d,showWheelsTVFeature:l,showLesaTVFeature:u,showRecordFeature:g,showUploadFeature:h,showFolderFeature:x,containerWidth:y,onUploadButtonClick:m,onRecordButtonClick:w}=Se(),[f,b]=p.useState(!1),[S,T]=p.useState([]),[V,I]=p.useState(!1);Xe(a),pt(a);const[L,v]=p.useState(0),{t:C}=W.useTranslation(),$=he.useHistory(),[R,j]=p.useState({page:zo,size:Tu,folderId:Kt.folderId,searchQuery:""}),{data:A,isLoading:P}=Ce.useQuery(ku,fa,{refetchOnWindowFocus:!1,staleTime:5e8,select:X=>{let ce=[...X];return a.automotiveRole===xt.TECHNICIAN&&(ce=X.filter(Q=>Q.name!==Ft.VAULT&&Q.name!==Ft.PRIVATE)),ce}}),M=A?Wt.keyBy(A,"folderId"):{},N=M[R.folderId]||Kt,D=!!(N!=null&&N.access);let O=M[R.folderId]?M[R.folderId].name:Kt.name;D&&(O=`${xa}${R.folderId}`),O=O===_e.label?_e.value:O;const{data:U,isLoading:Y}=Ce.useQuery(["cds-videos",R],async()=>va({folder:O,search:R.searchQuery,size:R.size,page:R.page}),{refetchOnWindowFocus:!1,enabled:!!(A!=null&&A.length)}),{count:ne,videos:K}=U||{count:0,videos:[]},G=Object.values(Ft),q=(A==null?void 0:A.filter(Boolean).filter(X=>X.folderId!==_e.value).map(X=>({value:X.folderId,label:G.includes(X.name)?C(`${X.name}`):X.name})).concat([{value:_e.value,label:C("All folders")}]))||[],ee=X=>{const ce=X.toLowerCase();j(Q=>({...Q,page:zo,searchQuery:ce}))},B=()=>{b(!1),localStorage.removeItem(ze.merge),T([])},de=X=>{X.toString()===ma.toString()&&B(),Kd({folderId:X,userId:a.userId}),j(ce=>({...ce,page:zo,folderId:X}))},te=X=>{X==="left"&&j(ce=>({...ce,page:ce.page-1})),X==="right"&&j(ce=>({...ce,page:ce.page+1}))},se=()=>{localStorage.setItem(ze.merge,JSON.stringify(S));const X=S.map(ce=>ce.id).filter(Boolean).join(",");r==null||r({action:zt.MERGE,videoIds:S.map(ce=>Number(ce.id))}),$.push(`/merge/?videos=${X}`)},ae=async X=>{X.length&&v(X[0])};p.useEffect(()=>{var ce;const X=(ce=a.customer)==null?void 0:ce.packageId;(Number(X)===pr.FREE||Number(X)===pr.PRO)&&(c({message:C("Please upgrade you account to use eLead integration.")}),e(""),$.go(0))},[]),p.useEffect(()=>{const X=localStorage.getItem(ze.merge);if(X)try{const ce=JSON.parse(X)||[];T(ce),b(!!ce.length)}catch{localStorage.removeItem(ze.merge)}},[]),p.useEffect(()=>{o==null||o({...vt.VIDEOS_OVERVIEW})},[]),p.useEffect(()=>{if(!a.userId)return;const X=Xd(Number(a.userId));j(ce=>({...ce,folderId:X}))},[a.userId]),p.useEffect(()=>{L&&$.push(`/preview-upload/${L}`)},[L]);const xe=Y||P,Ie=(N==null?void 0:N.name)===Ft.COMPANY;return t.jsxs(yu,{children:[t.jsx(Ke,{left:t.jsx(Yi,{handleUpdateToken:e}),center:t.jsx(mo,{}),right:t.jsxs(t.Fragment,{children:[h&&t.jsx(F.Button,{onClick:m?()=>m(He):()=>I(!0),variant:n?"white":"secondary",text:y>z.sm?C("Upload"):"",icon:t.jsx(H.MdUpload,{size:22})}),g&&t.jsx(F.Button,{onClick:w?()=>w(He):()=>$.push("/record/home"),text:y>z.sm?C("Record"):"",icon:t.jsx(H.MdVideocam,{size:22}),variant:n?"white":"red"})]})}),t.jsxs(ut,{children:[t.jsxs(Cu,{children:[t.jsxs(Fo,{children:[t.jsx(ed,{handleSearch:ee,prevSearch:R.searchQuery}),x&&t.jsx(ju,{children:t.jsx(Ne,{options:q,value:q.find(X=>X.value===(R==null?void 0:R.folderId))||Kt,placeholder:C("All folders"),onChange:X=>de((X==null?void 0:X.value)??Kt.folderId),isLoading:P,isSearchable:!1,creatable:!1,disabled:P})})]}),(l||d||u)&&t.jsxs(t.Fragment,{children:[!f&&t.jsxs(Fo,{children:[t.jsx(wu,{}),d&&t.jsx(F.Button,{onClick:()=>Ie?{}:b(!0),text:C("Merge Videos"),variant:"white",disabled:Ie})]}),f&&t.jsxs(Fo,{children:[t.jsx(F.Button,{onClick:B,text:C("Cancel"),variant:"white"}),t.jsx(F.Tooltip,{position:"top",hoverable:!(S.length>=2&&S.length<=9),children:t.jsx(F.Button,{onClick:se,text:C("Merge Videos"),disabled:Ie||S.length<2||S.length>9}),popup:t.jsxs(t.Fragment,{children:[S.length<2&&C("Select 2+ videos to merge"),S.length>9&&C("Select maximum 9 videos")]}),extendStyles:{popup:{left:40,...n?{color:s.white[100],background:s.black[100]}:{}}}})]})]})]}),t.jsxs(t.Fragment,{children:[!xe&&!!K.length&&t.jsxs(t.Fragment,{children:[t.jsx(Eu,{children:K.map((X,ce)=>t.jsx(Wi,{video:X,isMerge:f,selectedVideosData:S,setSelectedVideosData:T},X.id))}),t.jsxs(Su,{children:[t.jsx(xd,{page:R.page,size:R.size,count:ne}),t.jsx(F.Button,{onClick:()=>te("left"),icon:t.jsx(H.MdChevronLeft,{size:22}),disabled:R.page===0,variant:"white",size:"small"}),t.jsx(F.Button,{onClick:()=>te("right"),icon:t.jsx(H.MdChevronRight,{size:22}),disabled:K.length<R.size||(R.page+1)*R.size>=ne,variant:"white",size:"small"})]})]}),xe&&t.jsx(mn,{message:C("Loading..."),size:R.size}),!xe&&!K.length&&t.jsx(mn,{message:C("No videos match your query"),size:R.size})]})]}),V&&t.jsx(Yd,{handleModalClose:()=>I(!1),onSuccess:ae})]})},Mr=i.keyframes`
|
|
1457
1457
|
from { opacity: 0; transform: translateY(10px); }
|
|
1458
1458
|
to { opacity: 1; transform: translateY(0); }
|
|
1459
|
-
`,
|
|
1459
|
+
`,Au=i.keyframes`
|
|
1460
1460
|
to { transform: rotate(360deg); }
|
|
1461
1461
|
`,vn=i.div`
|
|
1462
1462
|
display: flex;
|
|
@@ -1479,11 +1479,11 @@
|
|
|
1479
1479
|
color: ${({theme:e})=>e.colors.neutral[100]};
|
|
1480
1480
|
margin: 0 0 6px;
|
|
1481
1481
|
line-height: 1.3;
|
|
1482
|
-
`,
|
|
1482
|
+
`,Ru=i.p`
|
|
1483
1483
|
font-size: 14px;
|
|
1484
1484
|
color: ${({theme:e})=>e.colors.neutral[60]};
|
|
1485
1485
|
margin: 0 0 24px;
|
|
1486
|
-
|
|
1486
|
+
`,$u=i.div`
|
|
1487
1487
|
text-align: center;
|
|
1488
1488
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
1489
1489
|
font-size: 12px;
|
|
@@ -1511,18 +1511,18 @@
|
|
|
1511
1511
|
&:hover {
|
|
1512
1512
|
text-decoration: underline;
|
|
1513
1513
|
}
|
|
1514
|
-
`,
|
|
1514
|
+
`,is=i.div`
|
|
1515
1515
|
display: flex;
|
|
1516
1516
|
align-items: stretch;
|
|
1517
1517
|
gap: 8px;
|
|
1518
|
-
`,
|
|
1518
|
+
`,ss=i.div`
|
|
1519
1519
|
width: 16px;
|
|
1520
1520
|
height: 16px;
|
|
1521
1521
|
border: 2px solid rgba(255, 255, 255, 0.35);
|
|
1522
1522
|
border-top-color: #fff;
|
|
1523
1523
|
border-radius: 50%;
|
|
1524
|
-
animation: ${
|
|
1525
|
-
`,
|
|
1524
|
+
animation: ${Au} 0.65s linear infinite;
|
|
1525
|
+
`,Vu=i.p`
|
|
1526
1526
|
text-align: center;
|
|
1527
1527
|
font-size: 14px;
|
|
1528
1528
|
color: ${({theme:e})=>e.colors.neutral[60]};
|
|
@@ -1532,9 +1532,9 @@
|
|
|
1532
1532
|
align-items: center;
|
|
1533
1533
|
justify-content: center;
|
|
1534
1534
|
gap: 8px;
|
|
1535
|
-
|
|
1535
|
+
`,Lu=i.div`
|
|
1536
1536
|
position: relative;
|
|
1537
|
-
`,
|
|
1537
|
+
`,Mu=i.div`
|
|
1538
1538
|
position: absolute;
|
|
1539
1539
|
right: 12px;
|
|
1540
1540
|
top: calc(50% - 8px);
|
|
@@ -1546,26 +1546,26 @@
|
|
|
1546
1546
|
&:hover {
|
|
1547
1547
|
color: ${E.gray100};
|
|
1548
1548
|
}
|
|
1549
|
-
`,Fr=({meta:e,extendStyles:o})=>{const r=F.useCovideoTheme();return t.jsx("div",{style:{height:16,...o==null?void 0:o.errorWrapper},children:e.error&&e.touched?t.jsx(
|
|
1549
|
+
`,Fr=({meta:e,extendStyles:o})=>{const r=F.useCovideoTheme();return t.jsx("div",{style:{height:16,...o==null?void 0:o.errorWrapper},children:e.error&&e.touched?t.jsx(mu,{color:r.colors.danger[80],children:e.error}):null})},as=i.css`
|
|
1550
1550
|
font-weight: 500;
|
|
1551
1551
|
font-size: 14px;
|
|
1552
1552
|
line-height: 20px;
|
|
1553
1553
|
margin: 0;
|
|
1554
1554
|
display: flex;
|
|
1555
1555
|
gap: 2px;
|
|
1556
|
-
`,
|
|
1557
|
-
${
|
|
1556
|
+
`,Du=i.label`
|
|
1557
|
+
${as}
|
|
1558
1558
|
color: ${({theme:e})=>e.colors.neutral[60]};
|
|
1559
1559
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
1560
|
-
`,
|
|
1561
|
-
${
|
|
1560
|
+
`,Ou=i.p`
|
|
1561
|
+
${as}
|
|
1562
1562
|
color: ${({theme:e})=>e.colors.neutral[60]};
|
|
1563
1563
|
opacity: ${({disabled:e})=>e?.5:1};
|
|
1564
|
-
`,
|
|
1564
|
+
`,Nu=i.div`
|
|
1565
1565
|
position: relative;
|
|
1566
1566
|
display: inline-block;
|
|
1567
1567
|
cursor: pointer;
|
|
1568
|
-
`,yn=({info:e})=>{const{colors:o}=i.useTheme();return t.jsx(
|
|
1568
|
+
`,yn=({info:e})=>{const{colors:o}=i.useTheme();return t.jsx(Nu,{children:t.jsx(F.Tooltip,{popup:e,position:"bottom",extendStyles:{popup:{width:"310px",fontSize:"14px",lineHeight:"24px",color:o.neutral[80],padding:"8px 12px",zIndex:9999},element:{display:"flex",justifyContent:"center",alignItems:"center",cursor:"pointer"}},children:t.jsx(H.MdInfo,{size:18,style:{display:"inline"}})})})},jo=({name:e,label:o,isRequired:r,disabled:s,info:n,labelStyles:a})=>{const c=i.useTheme();return e?t.jsxs(Du,{htmlFor:e,disabled:s,style:a,children:[o," ",r&&t.jsx("span",{style:{color:c.colors.primary[100]},children:"*"})," ",n&&t.jsx(yn,{info:n})]}):t.jsxs(Ou,{disabled:s,style:a,children:[o," ",r&&t.jsx("span",{style:{color:c.colors.primary[100]},children:"*"})," ",n&&t.jsx(yn,{info:n})]})},je=i.div`
|
|
1569
1569
|
display: flex;
|
|
1570
1570
|
flex-wrap: ${({flexWrap:e})=>e||"wrap"};
|
|
1571
1571
|
margin: ${({m:e})=>e||"0px"};
|
|
@@ -1637,7 +1637,7 @@
|
|
|
1637
1637
|
${e?`background-color: ${e};`:""}
|
|
1638
1638
|
${o?`white-space: ${o};`:""}
|
|
1639
1639
|
`}
|
|
1640
|
-
`,
|
|
1640
|
+
`,cs=i.input`
|
|
1641
1641
|
font-style: normal;
|
|
1642
1642
|
font-weight: normal;
|
|
1643
1643
|
font-size: 16px;
|
|
@@ -1660,22 +1660,22 @@
|
|
|
1660
1660
|
color: ${({theme:e})=>e.colors.neutral[40]};
|
|
1661
1661
|
font-size: 16px;
|
|
1662
1662
|
}
|
|
1663
|
-
`,dt=p.forwardRef(({label:e,isRequired:o,extendStyles:r,info:s,...n},a)=>{const[c,d]=$e.useField(n);return t.jsxs(Cn,{...r==null?void 0:r.mainWrapper,gap:"4px",children:[e&&t.jsx(jo,{label:e,name:n.name,isRequired:o,disabled:!!n.disabled,info:s,labelStyles:r==null?void 0:r.labelStyles}),t.jsxs(Cn,{...r==null?void 0:r.inputWrapper,gap:"4px",children:[t.jsx(
|
|
1663
|
+
`,dt=p.forwardRef(({label:e,isRequired:o,extendStyles:r,info:s,...n},a)=>{const[c,d]=$e.useField(n);return t.jsxs(Cn,{...r==null?void 0:r.mainWrapper,gap:"4px",children:[e&&t.jsx(jo,{label:e,name:n.name,isRequired:o,disabled:!!n.disabled,info:s,labelStyles:r==null?void 0:r.labelStyles}),t.jsxs(Cn,{...r==null?void 0:r.inputWrapper,gap:"4px",children:[t.jsx(cs,{...c,...n,id:n.name,ref:a}),t.jsx(Fr,{meta:d,extendStyles:r})]})]})});dt.displayName="FormikInputField";const Pu=Oe.object({username:Oe.string().trim().required("Username is required")}),Fu=Oe.object({username:Oe.string().required(),password:Oe.string().required("Password is required")}),zu=(e,o)=>{const r=o?`?relayState=${encodeURIComponent(o)}`:"";return`${e}${r}`},_u=async e=>(await ie.post("/auth/username-check-sso",e)).data,Bu=()=>Ce.useMutation({mutationFn:_u,onError:e=>{console.error("Username check error",e)}}),Uu=({onVerified:e,onSso:o})=>{const{t:r}=W.useTranslation(),{mutateAsync:s}=Bu();return t.jsx($e.Formik,{initialValues:{username:""},validationSchema:Pu,onSubmit:async(n,{setFieldError:a})=>{const c=n.username.trim();try{const{userExist:d,ssoLoginUrl:l}=await s({username:c});if(!d){a("username",r("Username not found. Please try again."));return}if(l){if(window.location.origin.includes("localhost:6006")){console.log("[SSO MOCK] Redirect to:",l);return}const u=window.location.href,g=zu(l,u);o(c),setTimeout(()=>{window.location.assign(g)},1500)}else e(c)}catch{a("username",r("Could not verify username. Please try again."))}},children:({values:n,isSubmitting:a})=>t.jsx($e.Form,{children:t.jsxs(Dr,{children:[t.jsxs(Or,{children:[t.jsx(Nr,{htmlFor:"username",children:r("Username")}),t.jsx(Pr,{href:"https://www.covideo.com/forgot-username/",target:"_blank",children:r("Forgot username?")})]}),t.jsxs(is,{children:[t.jsx(dt,{name:"username",isRequired:!0,placeholder:r("Username"),autoFocus:!0,type:"text",extendStyles:{mainWrapper:{flex:1}}}),t.jsx(F.Button,{type:"submit",disabled:!n.username.trim()||a,"aria-label":"Next",icon:a?t.jsx(ss,{}):t.jsx(H.MdArrowForward,{size:18})})]})]})})})},Wu=i.keyframes`
|
|
1664
1664
|
from {
|
|
1665
1665
|
transform: rotate(0deg);
|
|
1666
1666
|
}
|
|
1667
1667
|
to {
|
|
1668
1668
|
transform: rotate(360deg);
|
|
1669
1669
|
}
|
|
1670
|
-
`,
|
|
1671
|
-
animation: ${
|
|
1670
|
+
`,Hu=i.svg`
|
|
1671
|
+
animation: ${Wu} 2s linear infinite;
|
|
1672
1672
|
will-change: transform;
|
|
1673
|
-
`,
|
|
1673
|
+
`,qu=()=>t.jsx(Hu,{width:"20",height:"20",viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",className:"spinner",children:t.jsx("path",{"fill-rule":"evenodd","clip-rule":"evenodd",d:"M5.83317 10.0003C5.83317 9.54033 5.45984 9.16699 4.99984 9.16699H2.49984C2.03984 9.16699 1.6665 9.54033 1.6665 10.0003C1.6665 10.4603 2.03984 10.8337 2.49984 10.8337H4.99984C5.45984 10.8337 5.83317 10.4603 5.83317 10.0003V10.0003ZM17.4998 9.16699H14.9998C14.5398 9.16699 14.1665 9.54033 14.1665 10.0003C14.1665 10.4603 14.5398 10.8337 14.9998 10.8337H17.4998C17.9598 10.8337 18.3332 10.4603 18.3332 10.0003C18.3332 9.54033 17.9598 9.16699 17.4998 9.16699V9.16699ZM9.99984 14.167C9.53984 14.167 9.1665 14.5403 9.1665 15.0003V17.5003C9.1665 17.9612 9.53984 18.3337 9.99984 18.3337C10.4598 18.3337 10.8332 17.9612 10.8332 17.5003V15.0003C10.8332 14.5403 10.4598 14.167 9.99984 14.167V14.167ZM9.99984 1.66699C9.53984 1.66699 9.1665 2.04033 9.1665 2.50033V5.00033C9.1665 5.46033 9.53984 5.83366 9.99984 5.83366C10.4598 5.83366 10.8332 5.46033 10.8332 5.00033V2.50033C10.8332 2.04033 10.4598 1.66699 9.99984 1.66699V1.66699ZM6.9715 3.08866C6.7415 2.69033 6.23234 2.55283 5.83317 2.78366C5.434 3.01366 5.29817 3.52366 5.52817 3.92199L6.77817 6.08699C7.00817 6.48533 7.51734 6.62199 7.9165 6.39199C8.31567 6.16199 8.4515 5.65199 8.2215 5.25366L6.9715 3.08866ZM13.2215 13.9137C12.9915 13.5153 12.4823 13.3787 12.0832 13.6087C11.684 13.8387 11.5482 14.3487 11.7782 14.747L13.0282 16.912C13.2582 17.3103 13.7673 17.4478 14.1665 17.217C14.5657 16.987 14.7015 16.477 14.4715 16.0787L13.2215 13.9137ZM6.3915 12.0837C6.1615 11.6845 5.6515 11.5487 5.25317 11.7787L3.08817 13.0287C2.68984 13.2587 2.55234 13.7678 2.78317 14.167C3.01317 14.5662 3.52317 14.702 3.9215 14.472L6.0865 13.222C6.48484 12.992 6.6215 12.4828 6.3915 12.0837V12.0837ZM13.6082 7.91699C13.8382 8.31616 14.3482 8.45199 14.7465 8.22199L16.9115 6.97199C17.3098 6.74199 17.4473 6.23283 17.2165 5.83366C16.9865 5.43449 16.4765 5.29866 16.0782 5.52866L13.9132 6.77866C13.5148 7.00866 13.3782 7.51783 13.6082 7.91699V7.91699ZM3.08817 6.97199L5.25317 8.22199C5.6515 8.45199 6.1615 8.31616 6.3915 7.91699C6.6215 7.51783 6.48484 7.00866 6.0865 6.77866L3.9215 5.52866C3.52317 5.29866 3.01317 5.43449 2.78317 5.83366C2.55234 6.23283 2.68984 6.74199 3.08817 6.97199V6.97199ZM16.9115 13.0287L14.7465 11.7787C14.3482 11.5487 13.8382 11.6845 13.6082 12.0837C13.3782 12.4828 13.5148 12.992 13.9132 13.222L16.0782 14.472C16.4765 14.702 16.9865 14.5662 17.2165 14.167C17.4473 13.7678 17.3098 13.2587 16.9115 13.0287V13.0287ZM7.9165 13.6087C7.51734 13.3787 7.00817 13.5153 6.77817 13.9137L5.52817 16.0787C5.29817 16.477 5.434 16.987 5.83317 17.217C6.23234 17.4478 6.7415 17.3103 6.9715 16.912L8.2215 14.747C8.4515 14.3487 8.31567 13.8387 7.9165 13.6087V13.6087ZM12.0832 6.39199C12.4823 6.62199 12.9915 6.48533 13.2215 6.08699L14.4715 3.92199C14.7015 3.52366 14.5657 3.01366 14.1665 2.78366C13.7673 2.55283 13.2582 2.69033 13.0282 3.08866L11.7782 5.25366C11.5482 5.65199 11.684 6.16199 12.0832 6.39199V6.39199Z",fill:"#9297A2"})}),Gu=({username:e})=>{const{t:o}=W.useTranslation();return t.jsxs(t.Fragment,{children:[t.jsxs(Dr,{children:[t.jsxs(Or,{children:[t.jsx(Nr,{children:o("Username")}),t.jsx(Pr,{href:"https://www.covideo.com/forgot-username/",target:"_blank",children:o("Forgot username?")})]}),t.jsxs(is,{children:[t.jsx(cs,{value:e,disabled:!0,type:"text",readOnly:!0}),t.jsx(F.Button,{type:"button",disabled:!0,"aria-label":"Verifying",icon:t.jsx(ss,{})})]})]}),t.jsxs(Vu,{children:[t.jsx(qu,{}),o("Verifying SSO...")]})]})},Yu=async e=>(await ie.post("/auth",e)).data,Qu=()=>Ce.useMutation(Yu,{onError:e=>{console.log(e)}}),Zu=({username:e,handleUpdateToken:o,onPreviousStepHandler:r})=>{const{colors:s}=i.useTheme(),{t:n}=W.useTranslation(),[a,c]=p.useState(!1),{mutateAsync:d}=Qu();return t.jsxs(t.Fragment,{children:[t.jsx($e.Formik,{initialValues:{username:e,password:""},validationSchema:Fu,onSubmit:async(l,{setFieldError:u})=>{try{const{accessToken:g}=await d({username:l.username,password:l.password});await o(g)}catch{u("password",n("Incorrect login. Please try again."))}},children:({values:l,isSubmitting:u})=>t.jsxs($e.Form,{children:[t.jsx(dt,{name:"username",isRequired:!0,placeholder:n("Username"),type:"text",disabled:!0,extendStyles:{mainWrapper:{flex:1}}}),t.jsxs(Dr,{children:[t.jsxs(Or,{children:[t.jsx(Nr,{htmlFor:"password",children:n("Password")}),t.jsx(Pr,{href:"https://www.covideo.com/reset-password/",target:"_blank",children:n("Forgot Password?")})]}),t.jsxs(Lu,{children:[t.jsx(dt,{name:"password",isRequired:!0,placeholder:n("Password"),autoFocus:!0,type:a?"text":"password",style:{paddingRight:40}}),t.jsx(Mu,{onClick:()=>c(g=>!g),children:a?t.jsx(ve.IoMdEyeOff,{size:20}):t.jsx(ve.IoMdEye,{size:20})})]})]}),t.jsx(F.Button,{style:{width:"100%"},type:"submit",disabled:!l.password||u,icon:t.jsx(H.MdArrowForward,{size:16}),text:n("Log In"),iconPosition:"right"})]})}),t.jsx(F.Button,{text:n("Back to username"),variant:"text",onClick:r,icon:t.jsx(H.MdArrowBack,{size:16}),style:{textDecoration:"underline",color:s.primary[100],marginTop:16}})]})},Sn=({handleUpdateToken:e})=>{const{t:o}=W.useTranslation(),{hasExternalJwt:r}=Se(),[s,n]=p.useState("username"),[a,c]=p.useState("");return r?t.jsxs(t.Fragment,{children:[t.jsx(Ke,{center:t.jsx(mo,{})}),t.jsx(vn,{children:t.jsxs(bn,{children:[t.jsx(wn,{children:o("Login failed")}),t.jsx($u,{children:o("External token invalid.")})]})})]}):t.jsxs(t.Fragment,{children:[t.jsx(Ke,{center:t.jsx(mo,{})}),t.jsx(vn,{children:t.jsxs(bn,{children:[t.jsxs(wn,{children:[o("Welcome back")," 👋"]}),(s==="username"||s==="sso")&&t.jsx(Ru,{children:o("Enter username to continue")}),s==="username"&&t.jsx(Uu,{onVerified:d=>{c(d),n("password")},onSso:d=>{c(d),n("sso")}}),s==="sso"&&t.jsx(Gu,{username:a}),s==="password"&&t.jsx(Zu,{username:a,handleUpdateToken:e,onPreviousStepHandler:()=>n("username")})]})})]})},jn="-1",_t=19,hr=20,ls=-2,gr=-1;var ds=(e=>(e.VIDMAILS="vidmails",e.AUTOMOTIVE="automotive",e))(ds||{});const us={value:0,label:"",landingPageType:"vidmails",id:0},Ku=e=>{const o=st(e);return{value:ls,label:`${o?"Service":"Sales"} page`,landingPageType:"automotive",typeId:_t}},Xu=({userData:e,templatesResponse:o,sendVehicle:r,sendQuote:s})=>{var y,m;const{customer:n}=e,a=Xe(e);st(e);const c=pt(e);if(n.isUsingLandingPageDesign.toString()==="1")return{autoSelectedOption:{...o.default,value:o.default.id,label:o.default.title,landingPageType:"automotive"},options:o.templates.map(w=>({...w,value:w.id,label:w.title,landingPageType:"automotive"}))};const d=!a,l=Ku(e),u=c&&r;let g=d?us:l;const h=o==null?void 0:o.default;let x=((o==null?void 0:o.templates)||[]).filter(w=>!u||w.typeId===_t||w.typeId===hr).map(w=>({label:w.title,value:w.id,typeId:w.typeId,landingPageType:w.typeId!==_t?"vidmails":"automotive"}));if(d||(x=[...x,l]),h!=null&&h.id&&(!u||(h==null?void 0:h.typeId)===_t||(h==null?void 0:h.typeId)===hr)){const w={label:(y=o==null?void 0:o.default)==null?void 0:y.title,value:(m=o==null?void 0:o.default)==null?void 0:m.id,landingPageType:(h==null?void 0:h.typeId)===_t?"automotive":"vidmails",typeId:h==null?void 0:h.typeId};g=w,x=[...x,w]}return x=Wt.uniqBy(x,"value"),{options:x,autoSelectedOption:g}},so=i.div`
|
|
1674
1674
|
display: flex;
|
|
1675
1675
|
justify-content: space-between;
|
|
1676
1676
|
align-items: center;
|
|
1677
1677
|
margin-bottom: ${e=>e.marginBottom?e.marginBottom:"0"};
|
|
1678
|
-
`,
|
|
1678
|
+
`,Ju=i.div`
|
|
1679
1679
|
display: flex;
|
|
1680
1680
|
align-items: center;
|
|
1681
1681
|
margin-bottom: 16px;
|
|
@@ -1688,13 +1688,13 @@
|
|
|
1688
1688
|
line-height: 20px;
|
|
1689
1689
|
color: ${E.gray60};
|
|
1690
1690
|
margin: 0 0 8px 0;
|
|
1691
|
-
`,
|
|
1691
|
+
`,ep=i.label`
|
|
1692
1692
|
margin-left: 12px;
|
|
1693
1693
|
font-weight: normal;
|
|
1694
1694
|
font-size: 16px;
|
|
1695
1695
|
line-height: 24px;
|
|
1696
1696
|
color: ${E.gray100};
|
|
1697
|
-
`,
|
|
1697
|
+
`,tp=i.a`
|
|
1698
1698
|
max-height: 24px;
|
|
1699
1699
|
font-size: 15px;
|
|
1700
1700
|
font-weight: 500;
|
|
@@ -1705,7 +1705,7 @@
|
|
|
1705
1705
|
&:hover {
|
|
1706
1706
|
cursor: pointer;
|
|
1707
1707
|
}
|
|
1708
|
-
`,
|
|
1708
|
+
`,op=i.input`
|
|
1709
1709
|
width: 100%;
|
|
1710
1710
|
border-radius: 4px;
|
|
1711
1711
|
font-size: 15px;
|
|
@@ -1714,18 +1714,18 @@
|
|
|
1714
1714
|
border: solid 1px ${E.gray10};
|
|
1715
1715
|
outline: none;
|
|
1716
1716
|
padding: 8px 12px;
|
|
1717
|
-
`,
|
|
1717
|
+
`,rp=({linksetsData:e,templatesOptions:o,overlaysData:r,insertVideoData:s,setInsertVideoData:n,reactionsCustomerEnabled:a})=>{const{t:c}=W.useTranslation(),{showCTAFeature:d,showLandingPageFeature:l,showWebsiteOverlayFeature:u,showReactionsFeature:g}=Se(),[h,x]=p.useState(!1),y=s.templateId===gr,m=p.useMemo(()=>(r||[]).map(({id:C,title:$})=>({value:C.toString(),label:$})),[r,u]),w=p.useMemo(()=>{const v=(e||[]).some($=>$.id.toString()===jn),C=(e||[]).map(({id:$,title:R})=>({value:$.toString(),label:R}));return v?C:[{value:jn,label:"None"},...C]},[e]),f=Wt.debounce(v=>{n(y?{...s,overlayId:v}:{...s,linksetId:v})},1e3),b=o.find(v=>v.value===s.templateId),S=(b==null?void 0:b.typeId)===hr,T=!h&&y,V=!h&&!y,I=m.find(v=>{var C;return v.value===((C=s.overlayId)==null?void 0:C.toString())}),L=w.find(v=>{var C;return v.value===((C=s.linksetId)==null?void 0:C.toString())});return t.jsxs(t.Fragment,{children:[l&&t.jsx(so,{children:t.jsxs(_o,{width:"100%",children:[t.jsx(En,{children:c("Landing Page")}),t.jsx(Ne,{value:b,options:o,onChange:v=>{n({...s,templateId:parseInt(v.value)}),v.value!==gr&&x(!1)},placeholder:c("Select Landing Page"),isSearchable:!0,creatable:!1})]})}),S?null:(d||y)&&t.jsx(so,{children:t.jsxs(_o,{width:"100%",marginBottom:"35px",children:[t.jsxs(so,{children:[t.jsx(En,{children:c(y?"Websites":"CTAs")}),y&&t.jsx(tp,{onClick:()=>x(v=>!v),children:c(h?"Use Existing":"Add New")})]}),T&&t.jsx(Ne,{"aria-label":"Website Overlay",className:"dropdown",value:I,isClearable:!0,placeholder:c("No Websites"),options:m,onChange:v=>{n(C=>({...C,overlayId:(v==null?void 0:v.value)||""}))},isSearchable:!0,creatable:!1}),V&&t.jsx(Ne,{"aria-label":"CTA",className:"dropdown",value:L,placeholder:c("No CTAs"),options:w,onChange:v=>{n(C=>({...C,linksetId:(v==null?void 0:v.value)||""}))},isSearchable:!0,creatable:!1}),S?null:h&&t.jsx(op,{type:"text",placeholder:c("Enter website"),onChange:v=>{f(v.target.value)}})]})}),S?null:t.jsx(_o,{width:"100%",marginBottom:"15px",children:t.jsx(so,{children:g?a&&t.jsxs(Ju,{children:[t.jsx(Oi,{name:"allowReactions",width:"24px",checked:s.allowReactions,onChange:v=>{const{checked:C}=v.target;n($=>({...$,allowReactions:C}))}}),t.jsx(ep,{children:c("Enable video reactions & comments")})]}):null})})]})},np=({size:e=10,page:o=0,sort:r="",searchQuery:s="",soldFilter:n="",videosRecordedFilter:a="",countRecorded:c=!1,enabled:d=!0})=>{const{userData:l}=me();return Ce.useQuery(["inventoryItems",l==null?void 0:l.id,e,o,r,s,n,a,d,c],async()=>jr({limit:e,start:o*e,sort:r,search:s||"",soldFilter:n,videosRecordedFilter:a,countRecorded:c}),{refetchOnWindowFocus:!1,staleTime:c?0:36e5,enabled:d,refetchOnMount:!1,refetchOnReconnect:!1})},ip=i.div`
|
|
1718
1718
|
display: flex;
|
|
1719
1719
|
align-items: center;
|
|
1720
1720
|
padding-left: 12px;
|
|
1721
|
-
`,
|
|
1721
|
+
`,sp=i.div`
|
|
1722
1722
|
margin-left: 0px;
|
|
1723
1723
|
width: 100%;
|
|
1724
|
-
`,
|
|
1724
|
+
`,ap=i.div`
|
|
1725
1725
|
display: flex;
|
|
1726
1726
|
justify-content: flex-end;
|
|
1727
1727
|
align-items: center;
|
|
1728
|
-
`,
|
|
1728
|
+
`,cp=i.div`
|
|
1729
1729
|
max-width: 100%;
|
|
1730
1730
|
font-weight: 500;
|
|
1731
1731
|
font-size: 14px;
|
|
@@ -1736,15 +1736,15 @@
|
|
|
1736
1736
|
overflow: hidden;
|
|
1737
1737
|
text-overflow: ellipsis;
|
|
1738
1738
|
color: ${E.gray100};
|
|
1739
|
-
`,
|
|
1739
|
+
`,lp=i.div`
|
|
1740
1740
|
font-weight: 400;
|
|
1741
1741
|
font-size: 14px;
|
|
1742
1742
|
line-height: 24px;
|
|
1743
1743
|
color: ${E.gray60};
|
|
1744
1744
|
text-align: right;
|
|
1745
|
-
`,
|
|
1745
|
+
`,dp=i.div`
|
|
1746
1746
|
padding-left: 6px;
|
|
1747
|
-
`,
|
|
1747
|
+
`,up=i.div`
|
|
1748
1748
|
display: flex;
|
|
1749
1749
|
flex-direction: row;
|
|
1750
1750
|
justify-content: center;
|
|
@@ -1756,7 +1756,7 @@
|
|
|
1756
1756
|
&:hover {
|
|
1757
1757
|
cursor: pointer;
|
|
1758
1758
|
}
|
|
1759
|
-
`,
|
|
1759
|
+
`,pp=i.div`
|
|
1760
1760
|
display: flex;
|
|
1761
1761
|
flex-direction: column;
|
|
1762
1762
|
justify-content: flex-start;
|
|
@@ -1768,7 +1768,7 @@
|
|
|
1768
1768
|
0px 0px 2px rgba(66, 79, 104, 0.08),
|
|
1769
1769
|
0px 4px 8px rgba(66, 79, 104, 0.03);
|
|
1770
1770
|
border-radius: 6px;
|
|
1771
|
-
`,
|
|
1771
|
+
`,hp=i.div`
|
|
1772
1772
|
display: flex;
|
|
1773
1773
|
flex-direction: row;
|
|
1774
1774
|
justify-content: space-between;
|
|
@@ -1777,17 +1777,17 @@
|
|
|
1777
1777
|
height: 36px;
|
|
1778
1778
|
margin-bottom: 5px;
|
|
1779
1779
|
padding: 0 8px;
|
|
1780
|
-
`,
|
|
1780
|
+
`,gp=i.div`
|
|
1781
1781
|
display: flex;
|
|
1782
1782
|
align-items: center;
|
|
1783
1783
|
gap: 8px;
|
|
1784
1784
|
width: 50%;
|
|
1785
|
-
`,
|
|
1785
|
+
`,mp=i.div`
|
|
1786
1786
|
display: flex;
|
|
1787
1787
|
flex-direction: row;
|
|
1788
1788
|
justify-content: flex-start;
|
|
1789
1789
|
gap: 4px;
|
|
1790
|
-
`,
|
|
1790
|
+
`,xp=i.div`
|
|
1791
1791
|
background-color: ${E.white};
|
|
1792
1792
|
box-shadow:
|
|
1793
1793
|
0px 0px 2px rgba(66, 79, 104, 0.08),
|
|
@@ -1802,7 +1802,7 @@
|
|
|
1802
1802
|
overflow: hidden;
|
|
1803
1803
|
white-space: nowrap;
|
|
1804
1804
|
text-overflow: ellipsis;
|
|
1805
|
-
`,
|
|
1805
|
+
`,fp=e=>t.jsx(t.Fragment,{}),vp=(e,o)=>{const r=e.label.toLowerCase(),s=e.data.vin?e.data.vin.toLowerCase():"",n=e.data.stockNumber?e.data.stockNumber.toLowerCase():"";return`${r} ${s} ${n}`.includes(o.toLowerCase())},bp=e=>t.jsx(ip,{children:t.jsx(sp,{children:t.jsx(Ze.components.Option,{...e})})}),wp=({label:e,vin:o})=>t.jsxs(ap,{children:[t.jsx(cp,{children:e}),t.jsxs(lp,{children:[" ",o]})]}),yp=({children:e,...o})=>t.jsx(dp,{children:o.data.label}),Cp=e=>{const{t:o}=W.useTranslation();return t.jsx(Ze.components.NoOptionsMessage,{...e,children:o(" No vehicles found, try entering a different name or VIN.")})},ps=({onChangeVehicle:e,handleChangeVehicleButtonPress:o,handleRemoveVehicleButtonPress:r,setAddingVehicle:s,selectedVin:n="",placeholder:a,fetchSold:c=!0,addingVehicle:d=!0})=>{const{t:l}=W.useTranslation(),{userData:u}=me(),{colors:g,isCdkEnviroment:h}=i.useTheme(),x=!!(u!=null&&u.customer.isIMSEnabled),[y,m]=p.useState(""),[w,f]=p.useState(n),{showUpgradeMessageFeature:b}=Se(),S={control:(C,$)=>({...C,height:"40px",boxShadow:"none",borderColor:$.isFocused?g.primary[100]:E.gray40,":hover":{borderColor:g.primary[100]},":focus":{borderColor:g.primary[100]},":active":{borderColor:g.primary[100]}}),option:C=>({...C,backgroundColor:"transparent",color:E.gray100,padding:"8px",cursor:"pointer",":hover":{backgroundColor:"transparent",opacity:".8"},":focus":{backgroundColor:"transparent",opacity:".8"}}),indicatorSeparator:()=>({display:"none"}),valueContainer:C=>({...C,padding:4,overflow:"show"})},{data:T}=np({searchQuery:w,countRecorded:!1,enabled:x,soldFilter:c?"2":"0"}),V=T?T.items:[];p.useEffect(()=>{f(n)},[n]),p.useEffect(()=>{if(!(!T||n==="")&&V){const C=V.filter($=>$.vin===n);if(!C.length){r==null||r(),m("");return}m(C[0].title)}},[V,n]);const I=p.useRef(Wt.debounce(C=>f(C),500)).current,L=C=>{C.length<2||I(C)},v=V.map(C=>({...C,value:C.vin,label:C.title}));return x?d?t.jsx(xp,{children:t.jsx(Ze,{components:{Option:bp,DropdownIndicator:fp,SingleValue:yp,NoOptionsMessage:Cp},styles:S,options:v,value:v.find(C=>C.value===n),onChange:C=>{e(C||void 0),m((C==null?void 0:C.title)||"")},autoFocus:!0,isSearchable:!0,isClearable:!0,placeholder:a,filterOption:vp,formatOptionLabel:wp,onInputChange:L})}):n?t.jsxs(pp,{children:[t.jsxs(hp,{children:[t.jsxs(gp,{children:[t.jsx(ve.IoMdCar,{size:20,color:g.primary[40]}),t.jsx(Tn,{children:y})]}),t.jsx(Tn,{color:g.primary[40],fontWeight:"400",children:n})]}),t.jsxs(mp,{children:[t.jsx(F.Button,{onClick:()=>{o==null||o(),m("")},text:l("Change"),variant:"primary",size:"small"}),t.jsx(F.Button,{onClick:()=>{r==null||r(),m("")},text:l("Remove"),variant:h?"text":"destructive",size:"small"})]})]}):t.jsxs(up,{onClick:()=>s==null?void 0:s(!0),children:[t.jsx(ve.IoMdCar,{size:20,color:g.primary[100]}),l("Add Vehicle")]}):b?t.jsxs(t.Fragment,{children:[l("To enable the integration with your Inventory Management System, please call us at")," ",t.jsx("br",{}),t.jsx("a",{href:"tel:8003061445",children:"800-306-1445"})]}):null},Sp=e=>{var o;return!!((o=e.customer)!=null&&o.reactionsPreference&&e.customer.reactionsPreference.toString()!=="0")},jp=e=>{var o;return!!(e.reactionsPreference&&e.reactionsPreference.toString()==="1"||e.reactionsPreference===null&&((o=e.customer)!=null&&o.reactionsPreference)&&e.customer.reactionsPreference.toString()==="1")},Ep=i.video`
|
|
1806
1806
|
height: auto;
|
|
1807
1807
|
width: ${e=>e.width};
|
|
1808
1808
|
object-fit: cover;
|
|
@@ -1813,7 +1813,7 @@
|
|
|
1813
1813
|
&:nth-child(${({numberOfStills:e})=>e}) {
|
|
1814
1814
|
border-radius: 0 6px 6px 0;
|
|
1815
1815
|
}
|
|
1816
|
-
`,
|
|
1816
|
+
`,Tp=i.div`
|
|
1817
1817
|
position: absolute;
|
|
1818
1818
|
left: 0;
|
|
1819
1819
|
right: 0;
|
|
@@ -1821,19 +1821,19 @@
|
|
|
1821
1821
|
overflow: hidden;
|
|
1822
1822
|
display: flex;
|
|
1823
1823
|
flex-wrap: nowrap;
|
|
1824
|
-
`,
|
|
1824
|
+
`,kp=({videoSource:e,videoDuration:o,numberOfStills:r})=>{let s=[];const n=100/r;for(let a=0;a<r;a++)s.push(p.createRef());return p.useEffect(()=>{s.forEach((a,c)=>{a.current&&(a.current.currentTime=o*(c/r))})},[s]),t.jsx(Tp,{children:s.map((a,c)=>t.jsx(Ep,{ref:a,src:e,width:`${n}%`,numberOfStills:r,playsInline:!0,controls:!1},`previewvideoRef-${c}`))})},Ip=i.div`
|
|
1825
1825
|
position: absolute;
|
|
1826
1826
|
width: 100%;
|
|
1827
1827
|
height: 48px;
|
|
1828
1828
|
cursor: pointer;
|
|
1829
|
-
`,
|
|
1829
|
+
`,Ap=i.div`
|
|
1830
1830
|
position: absolute;
|
|
1831
1831
|
width: 100%;
|
|
1832
1832
|
height: 48px;
|
|
1833
1833
|
pointer-events: none;
|
|
1834
1834
|
background-color: rgba(0, 27, 83, 0.15);
|
|
1835
1835
|
border-radius: 6px;
|
|
1836
|
-
`,
|
|
1836
|
+
`,Rp=({getRailProps:e})=>t.jsxs(p.Fragment,{children:[t.jsx(Ip,{...e()}),t.jsx(Ap,{})]}),$p=i.div`
|
|
1837
1837
|
left: ${e=>e.percent};
|
|
1838
1838
|
position: absolute;
|
|
1839
1839
|
transform: ${e=>e.transform};
|
|
@@ -1841,7 +1841,7 @@
|
|
|
1841
1841
|
width: 24px;
|
|
1842
1842
|
height: 48px;
|
|
1843
1843
|
cursor: pointer;
|
|
1844
|
-
`,
|
|
1844
|
+
`,Vp=i.div`
|
|
1845
1845
|
left: ${e=>e.percent};
|
|
1846
1846
|
background-color: ${e=>e.isDisabled?"#666":e.theme.colors.primary[100]};
|
|
1847
1847
|
position: absolute;
|
|
@@ -1861,11 +1861,11 @@
|
|
|
1861
1861
|
background: ${E.white};
|
|
1862
1862
|
border-radius: 4px;
|
|
1863
1863
|
}
|
|
1864
|
-
|
|
1864
|
+
`,Lp=e=>{const{colors:o}=i.useTheme(),{domain:[r,s],handle:{id:n,value:a,percent:c},showFloatingPreview:d=!0,isActive:l,disabled:u,getHandleProps:g,videoRef:h,changeVideoPosition:x=!0,nChild:y}=e,[m,w]=p.useState(!1),f=p.createRef(),b=()=>{w(!0)},S=()=>{w(!1)};p.useEffect(()=>{l&&(d&&(f.current.currentTime=a||0),x&&(h.current.currentTime=a||0))},[a,f,x,h]);const T=Vt(a).split(".")[0],V=Vt(a).split(".")[1];return t.jsxs(p.Fragment,{children:[d&&t.jsxs(t.Fragment,{children:[(m||l)&&!u?t.jsxs("div",{style:{left:`${c}%`,position:"absolute",marginLeft:"-15px",marginTop:"52px",zIndex:1},children:[t.jsx("div",{style:{width:0,height:0,marginLeft:21,borderLeft:"6px solid transparent",borderRight:"6px solid transparent",borderBottom:"6px solid "}}),t.jsxs("div",{style:{width:"auto",padding:4,fontSize:12,fontWeight:500,letterSpacing:.34,backgroundColor:o.primary[100],color:"#fff",textAlign:"center",zIndex:99999},children:[T,t.jsx("span",{style:{fontSize:9,fontWeight:400,letterSpacing:.34,color:"#fff",opacity:.7},children:"."+V})]})]}):null,t.jsx("div",{style:{left:`${c}%`,position:"absolute",marginLeft:"-38px",marginTop:"-92px",zIndex:3,visibility:(m||l)&&!u?"visible":"hidden"},children:t.jsx("div",{style:{width:141,height:80,border:`solid 2px ${o.primary[100]}`,backgroundColor:E.themeDark75Percent,display:"flex",justifyContent:"center"},children:t.jsx("video",{ref:f,height:"100%",src:e.videoSource,playsInline:!0,controls:!1},"previewvideoRef")})})]}),t.jsx($p,{percent:`${c}%`,...g(n),onMouseEnter:b,onMouseLeave:S,transform:y===0?"translate(0px,0%)":"translate(-15px,0%)"}),t.jsx(Vp,{role:"slider","aria-valuemin":r,"aria-valuemax":s,"aria-valuenow":a,percent:`${c}%`,borderRadius:y===0?"5px 0px 0px 5px;":"0px 5px 5px 0px",isDisabled:u,transform:y===0?"translate(0px,0%)":"translate(-15px,0%)"})]})},Mp=({source:e,target:o,getTrackProps:r,disabled:s})=>t.jsxs(t.Fragment,{children:[t.jsx("div",{style:{position:"absolute",height:48,zIndex:1,backgroundColor:s?"#999":"rgba(0,0,0,.7)",cursor:"pointer",left:"0",width:`${e.percent+1}%`,borderRadius:"6px 0 0 6px"},...r()}),t.jsx("div",{style:{position:"absolute",height:48,zIndex:1,backgroundColor:s?"#999":"transparent",cursor:"pointer",left:`${e.percent}%`,width:`${o.percent-e.percent}%`,borderRadius:6},...r()}),t.jsx("div",{style:{position:"absolute",height:48,zIndex:1,backgroundColor:s?"#999":"rgba(0,0,0,.7)",cursor:"pointer",left:`${o.percent}%`,width:`${100-o.percent}%`,borderRadius:"0 6px 6px 0"},...r()})]}),Dp=({tick:e,count:o})=>t.jsxs("div",{children:[t.jsx("div",{style:{position:"absolute",width:2,height:48,opacity:.4,backgroundColor:E.blackRgb60,left:`${e.percent}%`,zIndex:1}}),t.jsx("div",{style:{position:"absolute",marginTop:52,fontSize:10,textAlign:"center",marginLeft:`${-(100/o)/2}%`,width:`${100/o}%`,left:`${e.percent}%`},children:Vt(e.value).split(".")[0]})]}),Op=i.div`
|
|
1865
1865
|
position: relative;
|
|
1866
1866
|
width: ${e=>e.width};
|
|
1867
1867
|
height: 48px;
|
|
1868
|
-
`,
|
|
1868
|
+
`,Np=k.memo(kp),zr=e=>{const{colors:o}=i.useTheme(),{videoDuration:r,videoSource:s,setTrimDuration:n=()=>{},setStart:a=()=>{},value:c,setValue:d,addHistory:l=()=>{},onSlideEnd:u=()=>{},valueRef:g,videoRef:h,showTickTime:x=!0,changeVideoPosition:y=!0,showFloatingPreview:m=!0,width:w,showPreviewTrack:f=!0}=e,b=[0,r];k.useEffect(()=>{const A=[0,r||0];c[1]||d(A)},[r]),k.useEffect(()=>(h&&h.current&&(h.current.addEventListener("play",j=>T(j)),h.current.addEventListener("timeupdate",j=>S(j))),()=>{h&&h.current&&(h.current.removeEventListener("play",j=>T(j)),h.current.removeEventListener("timeupdate",j=>S(j)))}),[h]);const S=j=>{const A=j.target;A.currentTime>g.current[1]&&g.current[1]!=0&&A.pause()},T=j=>{const A=j.target;(A.currentTime>=g.current[1]||A.currentTime<g.current[0])&&(A.currentTime=g.current[0])},V=j=>{if(!isNaN(j[0])&&!isNaN(j[1])){const A=j.slice();l(A),d(A),g.current=A}},I=j=>{n(j[1]-j[0]),a(j[0])},L=j=>{u(j)},v=14,C=10,$=k.useMemo(()=>r,[r]),R={position:"relative",width:"100%",backgroundColor:o.primary[40]};return t.jsx(Op,{width:w,children:t.jsxs(Zt.Slider,{rootStyle:R,mode:1,step:1e-7,domain:b,reversed:!1,onChange:V,onUpdate:I,values:c,onSlideEnd:L,children:[f&&t.jsx(Np,{numberOfStills:v,videoSource:s,videoDuration:$}),t.jsx(Zt.Rail,{children:j=>t.jsx(Rp,{...j})}),t.jsx(Zt.Handles,{children:({handles:j,activeHandleID:A,getHandleProps:P})=>t.jsx("div",{className:"slider-handles",children:j.map((M,N)=>t.jsx(Lp,{showFloatingPreview:m,nChild:N,handle:M,domain:b,isActive:M.id===A,getHandleProps:P,videoSource:s,videoRef:h,changeVideoPosition:y},M.id))})}),t.jsx(Zt.Tracks,{left:!1,right:!1,children:({tracks:j,getTrackProps:A})=>t.jsx("div",{className:"slider-tracks",children:j.map(({id:P,source:M,target:N})=>t.jsx(Mp,{source:M,target:N,getTrackProps:A},P))})}),x&&t.jsx(Zt.Ticks,{count:C,children:({ticks:j})=>t.jsx("div",{className:"slider-ticks",children:j.map(A=>t.jsx(Dp,{tick:A,count:j.length},A.id))})})]})})},Pp=i.div`
|
|
1869
1869
|
margin-top: 8px;
|
|
1870
1870
|
font-weight: 400;
|
|
1871
1871
|
color: ${E.covideoGray100};
|
|
@@ -1874,26 +1874,26 @@
|
|
|
1874
1874
|
text-decoration: underline;
|
|
1875
1875
|
cursor: pointer;
|
|
1876
1876
|
}
|
|
1877
|
-
`,
|
|
1877
|
+
`,Fp=i(zr)`
|
|
1878
1878
|
height: 48px;
|
|
1879
1879
|
width: 100%;
|
|
1880
1880
|
background-color: ${E.gray10};
|
|
1881
|
-
`,
|
|
1881
|
+
`,zp=({videoRef:e,videoDuration:o,videoSource:r,setValue:s,value:n,isVideoTrimmed:a,valueRef:c,isVideoLoading:d=!0})=>{const{t:l}=W.useTranslation();return t.jsxs(t.Fragment,{children:[d?t.jsx(Fp,{width:"100%",videoRef:null,videoDuration:0,videoSource:"",setValue:s,value:[0,0],valueRef:c,showTickTime:!1,showFloatingPreview:!1}):t.jsx(zr,{width:"100%",videoRef:e,videoDuration:o,videoSource:r,setValue:s,value:n,valueRef:c,showTickTime:!1,showFloatingPreview:!1}),a&&t.jsxs(Pp,{children:[l("Trimmed."),t.jsx("span",{style:{marginLeft:8},onClick:()=>{s([0,o]),c.current&&(c.current=[0,o]),e.current&&(e.current.currentTime=0)},children:l("Revert to Original")})]})]})},_p=({video:e,getMarkAsSentPayload:o,disable:r,onCRMClick:s})=>{const{t:n}=W.useTranslation(),{isCdkEnviroment:a}=i.useTheme(),{userData:c}=me(),d=Lt(c),[l,u]=p.useState(!1),[g,h]=p.useState(!1),x=()=>{u(!1)},{onQuickShareMutationHandler:y,isQuickshareLoading:m,onQuickShareButtonClick:w}=Ir({video:e,videoRequest:e==null?void 0:e.videoRequest,setShowModalQuickShareMarkAsSent:h,handleOnMarkAsSentSuccessCallback:x}),f=()=>{if(s==null||s(),d===nt.ASK_VERY_TIME.value){w({videoActivityType:Mt.QUICKSHARE,toastType:"insert"});return}u(!0);const S=o();w({videoActivityType:Mt.QUICKSHARE,toastType:"insert",...S.videoShareSetData,useAutomotive:S.useAutomotive})},b=async()=>(u(!0),o());return t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{onClick:f,text:n("Insert"),variant:a?"white":"primary",disabled:r||l,icon:l?t.jsx(rt,{size:12}):t.jsx(ve.IoMdAdd,{size:18})}),g&&t.jsx(Tr,{markAsSentPayload:{toastType:"insert"},isQuickShareLoading:m,quickShareMarkAsSentHandler:y,handleModalClose:async()=>{h(!1)},getMarkAsSentPayload:b})]})},Bp=({video:e,getMarkAsSentPayload:o,disable:r,onCRMClick:s})=>{const{t:n}=W.useTranslation(),{isCdkEnviroment:a}=i.useTheme(),{containerWidth:c}=Se(),{userData:d}=me(),l=Lt(d),[u,g]=p.useState(!1),[h,x]=p.useState(!1),y=()=>{g(!1)},{onQuickShareMutationHandler:m,isQuickshareLoading:w,onQuickShareButtonClick:f}=Ir({video:e,videoRequest:e==null?void 0:e.videoRequest,setShowModalQuickShareMarkAsSent:x,handleOnMarkAsSentSuccessCallback:y}),b=async()=>{if(s==null||s(),l===nt.ASK_VERY_TIME.value){f({videoActivityType:Mt.QUICKSHARE,toastType:"quickshare"});return}g(!0);const T=o();f({videoActivityType:Mt.QUICKSHARE,toastType:"quickshare",...T.videoShareSetData,useAutomotive:T.useAutomotive})},S=async()=>(g(!0),o());return t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{variant:a?"white":"secondary",onClick:b,text:c>z.sm?n("Copy Video"):n("Copy"),disabled:r||u,icon:u?t.jsx(rt,{size:12}):t.jsx(ve.IoIosShareAlt,{size:18})}),h&&t.jsx(Tr,{markAsSentPayload:{toastType:"quickshare"},isQuickShareLoading:w,quickShareMarkAsSentHandler:m,handleModalClose:async()=>{x(!1)},getMarkAsSentPayload:S})]})},Up=async e=>(await ie.get("/templates",{params:e})).data,Wp=(e,o)=>{const{userData:r}=me();return Ce.useQuery(["TEMPLATES",e,r==null?void 0:r.id],()=>Up(e),{enabled:!0,refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1})},Hp=async e=>(await ie.get(`/videos/${e}`)).data,qp=e=>Ce.useQuery(["VIDEO",e],()=>Hp(e),{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),Gp=async e=>{const{search:o="",start:r=0,limit:s=0}=e;return(await ie.get("/exitlinksets",{params:{search:o,start:r,limit:s}})).data},Yp=e=>Ce.useQuery(["EXIT_LINKSETS"],()=>Gp(e),{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),Qp=async e=>(await ie.get("/overlays",{params:e})).data,Zp=e=>Ce.useQuery(["WEBSITE_OVERLAY"],()=>Qp(e),{refetchOnWindowFocus:!1,refetchOnMount:!1,refetchOnReconnect:!1}),Kp=i.div`
|
|
1882
1882
|
background: ${E.gray10};
|
|
1883
|
-
`,
|
|
1883
|
+
`,Xp=i.div`
|
|
1884
1884
|
display: flex;
|
|
1885
1885
|
box-sizing: border-box;
|
|
1886
1886
|
justify-content: center;
|
|
1887
1887
|
align-items: flex-start;
|
|
1888
1888
|
flex-wrap: wrap;
|
|
1889
1889
|
gap: 16px;
|
|
1890
|
-
`,
|
|
1890
|
+
`,Jp=i.div`
|
|
1891
1891
|
box-sizing: border-box;
|
|
1892
1892
|
width: 100%;
|
|
1893
1893
|
${({theme:e})=>e.containerWidth>=z.sm&&i.css`
|
|
1894
1894
|
width: calc(50% - 8px);
|
|
1895
1895
|
`}
|
|
1896
|
-
`,
|
|
1896
|
+
`,eh=i.div`
|
|
1897
1897
|
box-sizing: border-box;
|
|
1898
1898
|
width: 100%;
|
|
1899
1899
|
margin-top: 16px;
|
|
@@ -1901,7 +1901,7 @@
|
|
|
1901
1901
|
margin-top: 0;
|
|
1902
1902
|
width: calc(50% - 8px);
|
|
1903
1903
|
`}
|
|
1904
|
-
`,
|
|
1904
|
+
`,th=i.div`
|
|
1905
1905
|
margin-bottom: 24px;
|
|
1906
1906
|
background: ${E.white};
|
|
1907
1907
|
box-shadow:
|
|
@@ -1911,14 +1911,14 @@
|
|
|
1911
1911
|
.fullscreen {
|
|
1912
1912
|
height: auto;
|
|
1913
1913
|
}
|
|
1914
|
-
`,
|
|
1914
|
+
`,oh=i.div`
|
|
1915
1915
|
background-color: ${E.white};
|
|
1916
1916
|
padding: 16px;
|
|
1917
1917
|
display: flex;
|
|
1918
1918
|
flex-direction: column;
|
|
1919
1919
|
gap: 12px;
|
|
1920
1920
|
border-radius: 6px;
|
|
1921
|
-
`,
|
|
1921
|
+
`,rh=i.div`
|
|
1922
1922
|
font-weight: 600;
|
|
1923
1923
|
font-size: 14px;
|
|
1924
1924
|
line-height: 20px;
|
|
@@ -1927,7 +1927,7 @@
|
|
|
1927
1927
|
width: ${({width:e})=>e||"auto"};
|
|
1928
1928
|
border-radius: 6px;
|
|
1929
1929
|
word-break: break-word;
|
|
1930
|
-
`,
|
|
1930
|
+
`,nh=i.div`
|
|
1931
1931
|
font-weight: 400;
|
|
1932
1932
|
font-size: 14px;
|
|
1933
1933
|
line-height: 20px;
|
|
@@ -1937,13 +1937,13 @@
|
|
|
1937
1937
|
background-color: ${({backgroundColor:e})=>e||"transparent"};
|
|
1938
1938
|
width: ${({width:e})=>e||"auto"};
|
|
1939
1939
|
border-radius: 6px;
|
|
1940
|
-
`,ao="pending",
|
|
1940
|
+
`,ao="pending",ih=e=>e?String(e):void 0,sh=()=>{var Pe,ot;const{showInsertFeature:e,showQuickshareFeature:o,containerWidth:r,showTrimFeature:s,showCTAFeature:n,showLandingPageFeature:a,showReactionsFeature:c,showWebsiteOverlayFeature:d}=Se(),{t:l}=W.useTranslation(),{colors:u,isCdkEnviroment:g}=i.useTheme(),{videoId:h}=it.useParams(),{toast:x}=Te(),{userData:y}=me(),{isLoading:m,data:w}=Wp({start:0,limit:2e3,search:""}),{data:f,isLoading:b}=qp(h),{data:S,isLoading:T}=Zp({start:0,limit:100,search:""}),{data:V,isLoading:I}=Yp({start:0,limit:100,search:""}),L=p.useRef(null),v=st(y),C=pt(y),$=Sp(y),R=jp(y),{trackGTMVideoMessageInteractionEvent:j}=Ge(),A=it.useHistory(),[P,M]=p.useState(!1),[N,D]=p.useState(!1),[O,U]=p.useState({videoId:Number(h),templateId:us.id,linksetId:"",overlayId:"",vin:ao,allowReactions:R}),{trackVideoSpecificPagesManually:Y,vehiceReady:ne}=bt({vin:O.vin!==ao?O.vin:""}),[K,G]=p.useState([]),[q,ee]=p.useState(!1),[B,de]=p.useState(!1),[te,se]=p.useState([0,0]),[ae,xe]=p.useState(0),Ie=p.useRef([0,0]),X=(V==null?void 0:V.linksets)??[],ce=(S==null?void 0:S.websiteUrls)??[],Q=()=>A.push("/");p.useEffect(()=>{se([0,ae])},[ae]);const _=b||m||m||I||T,ue=ye=>{var Ve;if(m||!w)return;const{autoSelectedOption:De,options:J}=Xu({userData:y,templatesResponse:w,sendVehicle:!!ye,sendQuote:!1}),fe=J.filter(Ye=>d?!0:Ye.id!==gr),ke=(Ve=fe.find(Ye=>Number(Ye.value)===O.templateId))==null?void 0:Ve.value,Re=J.some(Ye=>Ye.value===ls&&Ye.typeId===_t);G(fe),U(Ye=>({...Ye,templateId:Re?Number(De.value)||w.default.id:Number(ke)||w.default.id,vin:ye}))};p.useEffect(()=>{!f&&!w||ue((f==null?void 0:f.videoRequest.vin)||"")},[w,m,f]),p.useEffect(()=>{T||!ce.length||ce.length>0&&U(ye=>({...ye,overlayId:ce[0].id}))},[S,T]),p.useEffect(()=>{if(I||!X.length)return;const ye=X.find(De=>De.defaultLinks)??X[0];ye&&U(De=>({...De,linksetId:ye.id}))},[V,I]),p.useEffect(()=>{!b&&!f||U(ye=>{var De;return{...ye,vin:((De=f==null?void 0:f.videoRequest)==null?void 0:De.vin)||""}})},[f,b]),p.useEffect(()=>{const ye=Ti({trimStart:te[0],trimEnd:te[1],videoDuration:ae});return ee(ye),()=>{ee(!1)}},[te,ae]),p.useEffect(()=>{ne&&O.vin!==ao&&(Y==null||Y({...vt.SEND_SHARE}))},[ne]);const Ee=async()=>{try{return await Ai(h,{duration:te[1],start:te[0],title:f==null?void 0:f.title})}catch{x({message:l("Something went wrong while trimming the video, try again later!")})}},Ae=()=>{const ye=K.find(fe=>fe.value===O.templateId),De=v||(ye==null?void 0:ye.landingPageType)===ds.AUTOMOTIVE||!1;return{videoShareSetData:{videoId:Number(h),vin:O.vin!==ao?O.vin:"",templateId:Number(O.templateId)||0,overlayId:O.overlayId||0,linksetId:O.linksetId||0,allowReactions:O.allowReactions},useAutomotive:De}},Z=async()=>{if(q){de(!0);const ye=await Ee();de(!1),ee(!1),A.replace(`/insert-video/${ye.id}`)}},oe={videoId:Number(f==null?void 0:f.id),videoTitle:f==null?void 0:f.title,videoLength:f==null?void 0:f.videoLength,videoCustomerName:!!((Pe=f==null?void 0:f.videoRequest)!=null&&Pe.customerName),videoType:((ot=f==null?void 0:f.videoRequest)==null?void 0:ot.videoType)||void 0},be=({action:ye})=>{var fe,ke,Re;const De=Ae(),J={notificationViewed:void 0,landingPage:(fe=K.find(Ve=>Ve.value===De.videoShareSetData.templateId))==null?void 0:fe.label,callToAction:((ke=X.find(Ve=>Ve.id===De.videoShareSetData.linksetId))==null?void 0:ke.title)??void 0,thumbnails:void 0,customerId:ih(y.customerId),sms:void 0,email:void 0};j==null||j({action:ye,video:oe,videoMessageProperties:J,vehicle:(Re=f==null?void 0:f.videoRequest)==null?void 0:Re.inventoryItem})},Le=m||I||T||O.templateId===-1&&!O.overlayId||P;return _||!f?t.jsx(Ue,{isLoading:b}):t.jsxs(Kp,{children:[t.jsx(Ke,{left:t.jsx(F.Button,{text:l("Back"),icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>Q(),variant:"transparent",style:{color:"white"}}),center:t.jsx(t.Fragment,{}),right:t.jsxs(t.Fragment,{children:[q&&t.jsx(F.Button,{variant:g?"white":"secondary",onClick:Z,text:r>z.sm?l("Trim Video"):l("Trim"),disabled:B,icon:B?t.jsx(rt,{size:12}):t.jsx(H.MdContentCut,{size:18})}),o&&!q&&t.jsx(Bp,{video:f,disable:Le,getMarkAsSentPayload:Ae,onCRMClick:()=>{be({action:ur.COPY})}}),e&&!q&&t.jsx(_p,{video:f,disable:Le,getMarkAsSentPayload:Ae,onCRMClick:async()=>{be({action:ur.INSERT})}})]})}),t.jsx(ut,{children:t.jsxs(Xp,{children:[t.jsxs(Jp,{children:[t.jsxs(th,{children:[t.jsx(Nt,{videoId:h,videoRef:L,autoplay:!1,height:"247px",FullscreenVideoWrapperBackgroundColor:u.black[100],borderBottomRadius:"0px",videoSource:(f==null?void 0:f.videoSource)||"",playerBackgroundColor:(f==null?void 0:f.playerBackgroundColor)||"",setVideoDuration:xe,setVideoIsProcessing:M}),t.jsxs(oh,{children:[t.jsx(rh,{children:f==null?void 0:f.title}),t.jsxs(nh,{children:[t.jsx(ve.IoMdCalendar,{size:16,color:u.neutral[40],style:{marginRight:6}}),f==null?void 0:f.recordDate]})]})]}),s&&t.jsx(zp,{isVideoTrimmed:q,setValue:se,value:te,videoDuration:ae,videoRef:L,isVideoLoading:b,videoSource:(f==null?void 0:f.videoSource)||"",valueRef:Ie})]}),(a||n||c)&&t.jsxs(eh,{children:[t.jsx(rp,{insertVideoData:O,setInsertVideoData:U,overlaysData:ce,templatesOptions:K,linksetsData:X,reactionsCustomerEnabled:$}),C&&t.jsx(ps,{onChangeVehicle:ye=>{ue(ye==null?void 0:ye.vin),D(!1)},placeholder:l("Search vehicle by name, VIN or stock number..."),selectedVin:O.vin,fetchSold:!1,addingVehicle:N,handleChangeVehicleButtonPress:()=>{ue(""),D(!0)},handleRemoveVehicleButtonPress:()=>ue(""),setAddingVehicle:D})]})]})})]})},ah=i.div`
|
|
1941
1941
|
display: flex;
|
|
1942
1942
|
justify-content: center;
|
|
1943
1943
|
align-items: flex-start;
|
|
1944
1944
|
gap: 32px;
|
|
1945
1945
|
margin: ${({margin:e})=>e};
|
|
1946
|
-
`,
|
|
1946
|
+
`,ch=i.div`
|
|
1947
1947
|
width: ${({width:e})=>`${e}px`};
|
|
1948
1948
|
> video {
|
|
1949
1949
|
display: block;
|
|
@@ -1953,14 +1953,14 @@
|
|
|
1953
1953
|
object-fit: contain;
|
|
1954
1954
|
background: ${({theme:e})=>e.colors.primary[100]};
|
|
1955
1955
|
}
|
|
1956
|
-
`,
|
|
1956
|
+
`,lh=({video:e,videoRef:o,width:r=696,margin:s="0",useCovideoPlayer:n=!1})=>t.jsxs(ah,{margin:s,children:[!n&&t.jsx(ch,{width:r,children:t.jsx("video",{ref:o,...!Dt&&{preload:"metadata"},width:r,playsInline:!0,controls:!1,children:t.jsx("source",{src:e.videoSource,type:"video/mp4"})})}),n&&t.jsx(Nt,{width:`${r}px`,playerBackgroundColor:e.playerBackgroundColor||"",videoSource:e.videoSource,videoId:e.id,playButtonPosition:e.playButtonPosition||"",playerIconsColor:e.playerIconsAndTextColor||"",videoRef:o,autoplay:!1,disableControls:!0,startWithControls:!1})]}),mr="video/webm",fo="webm",Bo=e=>{try{e.getTracks().forEach(o=>o.stop())}catch{}};var hs=(e=>(e.AbortError="media_aborted",e.NotAllowedError="permission_denied",e.NotFoundError="no_specified_media_found",e.NotReadableError="media_in_use",e.OverconstrainedError="invalid_media_constraints",e.TypeError="no_constraints",e.NONE="",e.NO_RECORDER="recorder_error",e))(hs||{});const kn={low:1e6,standard:25e5,high:5e6,ultra:8e6};function dh({audio:e=!0,video:o=!1,onStop:r=()=>null,blobPropertyBag:s,screen:n=!1,mediaRecorderOptions:a=null,mimeType:c="",quality:d="low"}){const l=p.useRef(null),u=p.useRef([]),g=p.useRef(null),[h,x]=p.useState("idle"),[y,m]=p.useState(!1),[w,f]=p.useState(null),[b,S]=p.useState("NONE"),T=p.useRef(!1),V=kn[d]||kn.low;window.streams||(window.streams=[]),window.streams=window.streams.filter(Boolean);const I=p.useCallback(async()=>{x("acquiring_media");const D={audio:typeof e=="boolean"?!!e:e,video:typeof o=="boolean"?!!o:o};let O,U;try{if(n?(O=await window.navigator.mediaDevices.getDisplayMedia({video:o||!0}),window.streams.push(O),O&&e&&(U=await window.navigator.mediaDevices.getUserMedia({audio:{echoCancellation:!0,noiseSuppression:!0}}),window.streams.push(U),U.getAudioTracks().forEach(Y=>O.addTrack(Y))),g.current=O):(O=await window.navigator.mediaDevices.getUserMedia(D),window.streams.push(O),g.current=O),!T.current){Bo(O);return}O&&x("idle")}catch(Y){Bo(O),Bo(U),S(Y.name),x("idle")}},[e,o,n]);p.useEffect(()=>(T.current=!0,()=>{T.current=!1}),[]),p.useEffect(()=>{if(!window.MediaRecorder)throw new Error("Unsupported Browser");if(n&&!window.navigator.mediaDevices.getDisplayMedia)throw new Error("This browser doesn't support screen capturing");const D=O=>{const U=navigator.mediaDevices.getSupportedConstraints(),Y=Object.keys(O).filter(ne=>!U[ne]);Y.length>0&&console.error(`The constraints ${Y.join(",")} doesn't support on this browser. Please check your ReactMediaRecorder component.`)};typeof e=="object"&&D(e),typeof o=="object"&&D(o),a&&a.mimeType&&(MediaRecorder.isTypeSupported(a.mimeType)||console.error("The specified MIME type you supplied for MediaRecorder doesn't support this browser")),g.current||I()},[e,n,o,I,a]);const L=async()=>{S("NONE"),g.current||await I(),g.current&&(g.current.getTracks().some(O=>O.readyState==="ended")&&await I(),l.current=new MediaRecorder(g.current,{mimeType:c,videoBitsPerSecond:V}),l.current.ondataavailable=C,l.current.onstop=$,l.current.onerror=()=>{S("NO_RECORDER"),x("idle")},l.current.start(),x("recording"))},v=async D=>{if(!D){S("NO_RECORDER");return}if(e){let O=await window.navigator.mediaDevices.getUserMedia({audio:e});window.streams.push(O),O.getAudioTracks().forEach(U=>D.addTrack(U))}l.current=new MediaRecorder(D,{mimeType:c,videoBitsPerSecond:V}),l.current.ondataavailable=C,l.current.onstop=$,l.current.onerror=()=>{S("NO_RECORDER"),x("idle")},l.current.start(),x("recording")},C=({data:D})=>{u.current.push(D)},$=()=>{const[D]=u.current,O=Object.assign({type:D.type},s||(o?{type:"video/mp4"}:{type:"audio/wav"})),U=new Blob(u.current,O),Y=URL.createObjectURL(U);x("stopped"),f(Y),r(Y,U)},R=D=>{m(D),g.current&&g.current.getAudioTracks().forEach(O=>O.enabled=!D)},j=()=>{l.current&&l.current.state==="recording"&&l.current.pause()},A=()=>{l.current&&l.current.state==="paused"&&l.current.resume()},P=()=>{l.current&&l.current.state!=="inactive"&&(x("stopping"),l.current.stop(),g.current&&g.current.getTracks().forEach(D=>D.stop()),u.current=[])},M=g.current?new MediaStream(g.current.getVideoTracks()):null;window.streams.push(M);const N=g.current?new MediaStream(g.current.getAudioTracks()):null;return window.streams.push(N),{error:hs[b],muteAudio:()=>R(!0),unMuteAudio:()=>R(!1),startRecording:L,startRecordingForCanvas:v,pauseRecording:j,resumeRecording:A,stopRecording:P,mediaBlobUrl:w,status:h,isAudioMuted:y,previewStream:M,previewAudioStream:N,clearBlobUrl:()=>f(null)}}const uh=i.div`
|
|
1957
1957
|
box-sizing: border-box;
|
|
1958
1958
|
width: 400px;
|
|
1959
1959
|
max-width: 100%;
|
|
1960
1960
|
padding: 32px;
|
|
1961
1961
|
min-height: 208px;
|
|
1962
1962
|
background-color: ${E.white};
|
|
1963
|
-
`,
|
|
1963
|
+
`,ph=i.div`
|
|
1964
1964
|
display: flex;
|
|
1965
1965
|
color: ${E.black_1_100};
|
|
1966
1966
|
align-items: center;
|
|
@@ -1968,7 +1968,7 @@
|
|
|
1968
1968
|
font-weight: 700;
|
|
1969
1969
|
font-size: 18px;
|
|
1970
1970
|
line-height: 24px;
|
|
1971
|
-
`,
|
|
1971
|
+
`,hh=i.label`
|
|
1972
1972
|
display: flex;
|
|
1973
1973
|
align-items: center;
|
|
1974
1974
|
margin: 0;
|
|
@@ -1977,15 +1977,15 @@
|
|
|
1977
1977
|
&:hover {
|
|
1978
1978
|
cursor: pointer;
|
|
1979
1979
|
}
|
|
1980
|
-
`,
|
|
1980
|
+
`,gh=i.div`
|
|
1981
1981
|
margin-top: 32px;
|
|
1982
|
-
`,
|
|
1982
|
+
`,mh=i.section`
|
|
1983
1983
|
display: flex;
|
|
1984
1984
|
flex-direction: row-reverse;
|
|
1985
1985
|
margin-top: 48px;
|
|
1986
1986
|
gap: 8px;
|
|
1987
1987
|
gap: 12px;
|
|
1988
|
-
`,
|
|
1988
|
+
`,xh=({title:e,content:o,primaryButtonText:r,secondaryButtonText:s,handleModalClose:n,handleSubmit:a,primaryButtonType:c="primary"})=>{const{isCdkEnviroment:d}=i.useTheme();return t.jsx(Ot,{children:t.jsxs(uh,{children:[t.jsxs(ph,{children:[e,t.jsx(hh,{children:t.jsx(Et,{width:"24px",height:"24px",onClick:n})})]}),t.jsxs(gh,{children:[o,t.jsxs(mh,{children:[t.jsx(F.Button,{text:r,variant:c,onClick:a}),t.jsx(F.Button,{text:s,variant:d?"text":"primary",onClick:n})]})]})]})})},fh=i.div`
|
|
1989
1989
|
display: flex;
|
|
1990
1990
|
align-items: center;
|
|
1991
1991
|
justify-content: space-between;
|
|
@@ -2002,7 +2002,7 @@
|
|
|
2002
2002
|
justify-content: center;
|
|
2003
2003
|
gap: 8px;
|
|
2004
2004
|
flex-shrink: 0;
|
|
2005
|
-
`,
|
|
2005
|
+
`,vh=i.div`
|
|
2006
2006
|
position: relative;
|
|
2007
2007
|
width: 100%;
|
|
2008
2008
|
height: 40px;
|
|
@@ -2015,7 +2015,7 @@
|
|
|
2015
2015
|
${({disabled:e})=>e&&i.css`
|
|
2016
2016
|
cursor: not-allowed;
|
|
2017
2017
|
`}
|
|
2018
|
-
`,
|
|
2018
|
+
`,bh=i.div`
|
|
2019
2019
|
position: relative;
|
|
2020
2020
|
height: 12px;
|
|
2021
2021
|
width: 100%;
|
|
@@ -2025,7 +2025,7 @@
|
|
|
2025
2025
|
justify-content: space-between;
|
|
2026
2026
|
background: #ffffff;
|
|
2027
2027
|
border-radius: 8px;
|
|
2028
|
-
`,
|
|
2028
|
+
`,wh=i.div`
|
|
2029
2029
|
position: absolute;
|
|
2030
2030
|
top: 2px;
|
|
2031
2031
|
bottom: 2px;
|
|
@@ -2033,7 +2033,7 @@
|
|
|
2033
2033
|
width: ${({position:e})=>`${e}%`};
|
|
2034
2034
|
background: ${({background:e})=>e};
|
|
2035
2035
|
border-radius: 8px;
|
|
2036
|
-
`,
|
|
2036
|
+
`,yh=i.div`
|
|
2037
2037
|
box-sizing: border-box;
|
|
2038
2038
|
width: 100px;
|
|
2039
2039
|
flex-grow: 0;
|
|
@@ -2042,17 +2042,17 @@
|
|
|
2042
2042
|
align-items: center;
|
|
2043
2043
|
justify-content: space-between;
|
|
2044
2044
|
padding: 0 13px;
|
|
2045
|
-
`,
|
|
2045
|
+
`,Ch=i.div`
|
|
2046
2046
|
flex-grow: 0;
|
|
2047
2047
|
flex-shrink: 0;
|
|
2048
2048
|
margin-right: 17px;
|
|
2049
2049
|
padding-top: 4px;
|
|
2050
|
-
`,
|
|
2050
|
+
`,Sh=i.div`
|
|
2051
2051
|
font-weight: 500;
|
|
2052
2052
|
font-size: 14px;
|
|
2053
2053
|
line-height: 24px;
|
|
2054
2054
|
color: ${({theme:e})=>e.colors.neutral[100]};
|
|
2055
|
-
`,
|
|
2055
|
+
`,jh=i.div`
|
|
2056
2056
|
font-weight: 500;
|
|
2057
2057
|
font-size: 14px;
|
|
2058
2058
|
line-height: 24px;
|
|
@@ -2060,7 +2060,7 @@
|
|
|
2060
2060
|
padding-left: 12px;
|
|
2061
2061
|
margin-right: 12px;
|
|
2062
2062
|
color: ${({theme:e})=>e.colors.neutral[60]};
|
|
2063
|
-
`,
|
|
2063
|
+
`,Eh=i.input`
|
|
2064
2064
|
-webkit-appearance: none;
|
|
2065
2065
|
width: 100%;
|
|
2066
2066
|
background: transparent;
|
|
@@ -2111,16 +2111,16 @@
|
|
|
2111
2111
|
border-color: transparent;
|
|
2112
2112
|
color: transparent;
|
|
2113
2113
|
}
|
|
2114
|
-
`,
|
|
2114
|
+
`,Th=i.audio`
|
|
2115
2115
|
display: none;
|
|
2116
|
-
`,
|
|
2116
|
+
`,kh={audioSource:{value:"default"}},Ih=({video:e,videoRef:o,onChangeVoiceoverValid:r,onRecordingUrlGeneration:s,handleShowCard:n,margin:a="0",width:c=696,disabled:d=!1})=>{var Q;const{t:l}=W.useTranslation(),{containerWidth:u}=Se(),{colors:g,isCdkEnviroment:h}=i.useTheme(),{toast:x}=Te(),y=p.createRef(),[m,w]=p.useState("NotRecording"),[f,b]=p.useState("NotPreviewing"),[S,T]=p.useState(0),[V,I]=p.useState(),[L,v]=p.useState(!1),C=it.useHistory(),$={audioSource:JSON.parse(localStorage.getItem(ze.recordSettings)||JSON.stringify(kh)).audioSource};let R;try{R={deviceId:$.audioSource.value}}catch{}(!$||!$.audioSource||!$.audioSource.value)&&(R=!1);const{error:j,startRecording:A,stopRecording:P,pauseRecording:M,resumeRecording:N,mediaBlobUrl:D}=dh({audio:R});(!R||j)&&(x({message:l("Please enable audio in your recording settings and try again!")}),C.push("/record/home"));const O=async()=>{o.current&&(n==null||n(!1),o.current.volume=0,o.current.play(),A(),w("Recording"))},U=()=>{o.current&&(M(),o.current.pause(),w("RecordingPaused"))},Y=()=>{var _;o.current&&(N(),(_=o.current)==null||_.play(),w("Recording"))},ne=()=>{!o.current||!V||(V.pause(),o.current.pause(),f!=="NotPreviewing"&&b("PreviewingPaused"),m!=="Finished"&&w("RecordingPaused"),v(!0))},K=()=>{!o.current||!V||(v(!1),P(),o.current.pause(),o.current.currentTime=0,V.pause(),V.currentTime=0,w("NotRecording"),b("NotPreviewing"))},G=()=>{!o.current||!V||(b("Previewing"),o.current.currentTime=0,o.current.play(),V.play())},q=()=>{!o.current||!V||(V.pause(),o.current.pause(),b("PreviewingPaused"))},ee=()=>{!o.current||!V||(V.play(),o.current.play(),b("Previewing"))},B=_=>{!o.current||!V||(o.current.currentTime=parseFloat(_),V.currentTime=parseFloat(_),V.play(),o.current.play(),b("Previewing"))},de=()=>{[...window.streams].filter(Boolean).forEach(ue=>te(ue)),window.streams=[],w("NotRecording"),b("NotPreviewing")},te=_=>{try{_.getTracks().forEach(ue=>ue.stop())}catch{}};p.useEffect(()=>()=>{de()},[]),p.useEffect(()=>{const _=()=>{var be;let oe=0;o.current&&(oe=((be=o==null?void 0:o.current)==null?void 0:be.currentTime)||0,o.current.currentTime>=o.current.duration&&(oe=o.current.duration)),T(oe)},ue=()=>{P(),w("Finished"),b("NotPreviewing")},Ee=()=>{w(oe=>oe==="Finished"?oe:"Recording"),b(oe=>oe==="PreviewingPaused"?"Previewing":oe)},Ae=()=>{w(oe=>oe==="Finished"?oe:"RecordingPaused"),b(oe=>oe==="Previewing"?"PreviewingPaused":oe)},Z=()=>{!o.current||!V||(V.currentTime=o.current.currentTime)};return o.current&&(o.current.addEventListener("timeupdate",_,!0),o.current.addEventListener("ended",ue,!0),o.current.addEventListener("pause",Ae,!0),o.current.addEventListener("play",Ee,!0),o.current.addEventListener("seeked",Z,!0)),()=>{o.current&&(o.current.removeEventListener("timeupdate",_,!0),o.current.removeEventListener("ended",ue,!0),o.current.removeEventListener("pause",Ae,!0),o.current.removeEventListener("play",Ee,!0),o.current.removeEventListener("seeked",Z,!0))}},[o]),p.useEffect(()=>{r(m==="Finished")},[m]),p.useEffect(()=>{s(D||""),!(!D||!y.current)&&y.current.load()},[D]),p.useEffect(()=>{y.current&&I(y.current)},[y.current]);const se=m==="Finished",ae=m==="Recording",xe=((Q=o==null?void 0:o.current)==null?void 0:Q.duration)||(e!=null&&e.videoLength?(e==null?void 0:e.videoLength)/1e3:0),Ie=xe?S?parseFloat(S.toString())/parseFloat(xe.toString())*100:0:100,X=_=>{const ue=_.target.value.toString(),Ee=xe*(ue/100);B(Ee.toString())},ce=new Date(S*1e3).toISOString().substring(14,19);return t.jsxs(fh,{margin:a,width:c,disabled:d,children:[t.jsx(Th,{ref:y,children:t.jsx("source",{src:D||""})}),t.jsxs(In,{children:[m==="NotRecording"&&t.jsx(F.Button,{variant:h?"primary":"red",icon:t.jsx(vi.BsRecordCircle,{size:12}),text:l("Record"),onClick:()=>O()}),m==="Recording"&&t.jsx(t.Fragment,{children:t.jsx(F.Button,{icon:t.jsx(H.MdPause,{}),text:l("Pause"),variant:"secondary",onClick:()=>U()})}),m==="RecordingPaused"&&t.jsx(F.Button,{icon:t.jsx(H.MdPlayArrow,{}),text:l("Resume"),variant:"primary",onClick:()=>Y()}),m==="Finished"&&f==="NotPreviewing"&&t.jsx(F.Button,{icon:t.jsx(H.MdPlayArrow,{}),onClick:()=>G()}),f==="Previewing"&&t.jsx(F.Button,{icon:t.jsx(H.MdPause,{}),onClick:()=>q()}),f==="PreviewingPaused"&&t.jsx(F.Button,{icon:t.jsx(H.MdPlayArrow,{}),onClick:()=>ee()})]}),t.jsxs(vh,{disabled:!se,title:se?"":l("Controls disabled before preview."),children:[t.jsxs(yh,{children:[t.jsx(Ch,{children:t.jsx(H.MdMic,{size:22,color:ae?g.primary[100]:g.neutral[60]})}),t.jsx(Sh,{children:ce})]}),t.jsxs(bh,{children:[t.jsx(Eh,{disabled:!se,type:"range",min:"0",max:"100",value:Ie,onChange:_=>X(_),step:"1"}),t.jsx(wh,{background:g.primary[100],position:Ie})]}),t.jsx(jh,{children:Vt(xe,0)})]}),["RecordingPaused","Finished"].includes(m)&&t.jsx(In,{children:t.jsx(F.Button,{variant:h?"text":"destructive",icon:t.jsx(H.MdRefresh,{}),text:u>z.mb?l("Start Over"):"",onClick:()=>ne()})}),L&&t.jsx(xh,{title:l("Start Over?"),content:t.jsx(t.Fragment,{children:l("Your voiceover recording will be erased.")}),secondaryButtonText:l("Back"),primaryButtonText:l("Start Over"),primaryButtonType:"primary",handleSubmit:()=>K(),handleModalClose:()=>v(!1)})]})},Ah=i.div`
|
|
2117
2117
|
box-sizing: border-box;
|
|
2118
2118
|
width: 400px;
|
|
2119
2119
|
max-width: 100%;
|
|
2120
2120
|
padding: 32px;
|
|
2121
2121
|
min-height: 208px;
|
|
2122
2122
|
background-color: ${E.white};
|
|
2123
|
-
`,
|
|
2123
|
+
`,Rh=i.div`
|
|
2124
2124
|
display: flex;
|
|
2125
2125
|
color: ${E.black_1_100};
|
|
2126
2126
|
align-items: center;
|
|
@@ -2128,7 +2128,7 @@
|
|
|
2128
2128
|
font-weight: 700;
|
|
2129
2129
|
font-size: 18px;
|
|
2130
2130
|
line-height: 24px;
|
|
2131
|
-
|
|
2131
|
+
`,$h=i.label`
|
|
2132
2132
|
display: flex;
|
|
2133
2133
|
align-items: center;
|
|
2134
2134
|
margin: 0;
|
|
@@ -2137,26 +2137,26 @@
|
|
|
2137
2137
|
&:hover {
|
|
2138
2138
|
cursor: pointer;
|
|
2139
2139
|
}
|
|
2140
|
-
`,
|
|
2140
|
+
`,Vh=i.div`
|
|
2141
2141
|
margin-top: 32px;
|
|
2142
|
-
|
|
2142
|
+
`,Lh=i.div`
|
|
2143
2143
|
font-weight: 500;
|
|
2144
2144
|
font-size: 14px;
|
|
2145
2145
|
line-height: 20px;
|
|
2146
2146
|
color: ${E.gray80};
|
|
2147
2147
|
margin-bottom: 8px;
|
|
2148
|
-
`,
|
|
2148
|
+
`,Mh=i.section`
|
|
2149
2149
|
display: flex;
|
|
2150
2150
|
flex-direction: row-reverse;
|
|
2151
2151
|
margin-top: 48px;
|
|
2152
2152
|
gap: 8px;
|
|
2153
|
-
`,
|
|
2153
|
+
`,gs=({title:e,label:o,defaultValue:r,primaryButtonText:s,secondaryButtonText:n,handleModalClose:a,handleSubmit:c})=>{const[d,l]=p.useState(r),{isCdkEnviroment:u}=i.useTheme();return t.jsx(Ot,{children:t.jsxs(Ah,{children:[t.jsxs(Rh,{children:[e,t.jsx($h,{children:t.jsx(Et,{width:"24px",height:"24px",onClick:a})})]}),t.jsxs(Vh,{children:[t.jsx(Lh,{children:o}),t.jsx(Gt,{autoFocus:!0,value:d,onChange:g=>l(g.currentTarget.value),width:"100%"}),t.jsxs(Mh,{children:[t.jsx(F.Button,{text:n,variant:u?"text":"secondary",onClick:a}),t.jsx(F.Button,{text:s,onClick:()=>c(d),disabled:d===""})]})]})]})})},Dh=(e,o)=>e+"_"+(Math.random()+1).toString(36).substring(2)+"."+o,Oh=i.div`
|
|
2154
2154
|
position: relative;
|
|
2155
2155
|
width: 216px;
|
|
2156
2156
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
2157
2157
|
width: 100%;
|
|
2158
2158
|
`}
|
|
2159
|
-
`,
|
|
2159
|
+
`,Nh=i.div`
|
|
2160
2160
|
position: absolute;
|
|
2161
2161
|
left: 12px;
|
|
2162
2162
|
top: 12px;
|
|
@@ -2165,7 +2165,7 @@
|
|
|
2165
2165
|
&:hover {
|
|
2166
2166
|
color: ${E.gray100};
|
|
2167
2167
|
}
|
|
2168
|
-
`,
|
|
2168
|
+
`,Ph=i.div`
|
|
2169
2169
|
position: absolute;
|
|
2170
2170
|
right: 12px;
|
|
2171
2171
|
top: 12px;
|
|
@@ -2174,12 +2174,12 @@
|
|
|
2174
2174
|
&:hover {
|
|
2175
2175
|
color: ${E.gray100};
|
|
2176
2176
|
}
|
|
2177
|
-
`,
|
|
2177
|
+
`,ms=({prevSearch:e,handleSearch:o})=>{const{t:r}=W.useTranslation(),[s,n]=p.useState(e||""),a=l=>{l.key==="Enter"&&o(s)},c=()=>{n(""),o("")},d=l=>{n(l.currentTarget.value)};return t.jsxs(Oh,{children:[t.jsx(Nh,{children:t.jsx(ve.IoMdSearch,{onClick:()=>o(s),size:17})}),t.jsx(Gt,{width:"100%",type:"text",padding:"8px 40px 8px 40px",value:s,placeholder:r("Search..."),onKeyUp:a,onChange:d}),s!==""&&t.jsx(Ph,{children:t.jsx(H.MdClear,{onClick:()=>c(),size:17})})]})},Fh=i.div`
|
|
2178
2178
|
font-weight: 400;
|
|
2179
2179
|
font-size: 14px;
|
|
2180
2180
|
line-height: 20px;
|
|
2181
2181
|
color: ${E.gray80};
|
|
2182
|
-
`,
|
|
2182
|
+
`,xs=({page:e,size:o,count:r})=>{const s=e*o+1;let n=e*o+o;return n>r&&(n=r),t.jsxs(Fh,{children:[s,"-",n," of ",r]})},zh={all:({page:e,search:o})=>["LESA_LIST",e,o]},_h=async e=>{const r={start:((e.page||1)-1)*(e.limit||12),limit:e.limit,search:e.search,page:e.page};return(await ie.get("/lesa/videos",{params:r})).data},Bh=e=>{var r;const{toast:o}=Te();return Ce.useQuery(zh.all({page:e.page,search:e.search||""}),()=>_h(e),{refetchOnMount:!0,refetchOnWindowFocus:!1,enabled:e.search===""||(((r=e.search)==null?void 0:r.length)||0)>2,onError:()=>{o({message:"We're currently experiencing difficulties fetching Lesa videos."})}})},Uh=async e=>await ie.post("/lesa/videos",{...e}),Wh=({onSuccesCallback:e})=>{const{toast:o}=Te(),{t:r}=W.useTranslation();return Ce.useMutation(Uh,{onSuccess:()=>{o({message:r("Video has been added!")}),e()},onError:()=>o({message:r("An error occured while trying to add the video!")})})},Hh=e=>e.filter(Boolean).join(" "),qh=i.div`
|
|
2183
2183
|
background: ${E.gray10};
|
|
2184
2184
|
`,Yt=i.div`
|
|
2185
2185
|
font-style: normal;
|
|
@@ -2188,7 +2188,7 @@
|
|
|
2188
2188
|
line-height: 24px;
|
|
2189
2189
|
text-align: center;
|
|
2190
2190
|
color: white;
|
|
2191
|
-
`,
|
|
2191
|
+
`,Gh=i.div`
|
|
2192
2192
|
display: flex;
|
|
2193
2193
|
flex-direction: row;
|
|
2194
2194
|
flex-direction: flex-start;
|
|
@@ -2197,25 +2197,25 @@
|
|
|
2197
2197
|
flex-direction: column;
|
|
2198
2198
|
width: 100%;
|
|
2199
2199
|
`}
|
|
2200
|
-
`,
|
|
2200
|
+
`,Yh=i.div`
|
|
2201
2201
|
width: 216px;
|
|
2202
2202
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
2203
2203
|
width: 100%;
|
|
2204
2204
|
`}
|
|
2205
|
-
`,
|
|
2205
|
+
`,Qh=i.div`
|
|
2206
2206
|
background: ${E.white};
|
|
2207
|
-
`,
|
|
2207
|
+
`,Zh=i.div`
|
|
2208
2208
|
display: flex;
|
|
2209
2209
|
flex-wrap: wrap;
|
|
2210
2210
|
width: 100%;
|
|
2211
2211
|
max-width: 925px;
|
|
2212
|
-
`,
|
|
2212
|
+
`,Kh=i.div`
|
|
2213
2213
|
width: 100%;
|
|
2214
2214
|
display: flex;
|
|
2215
2215
|
align-items: center;
|
|
2216
2216
|
height: 56px;
|
|
2217
2217
|
border-bottom: 1px solid rgb(223, 227, 230);
|
|
2218
|
-
`,
|
|
2218
|
+
`,Xh=i.div`
|
|
2219
2219
|
width: 100%;
|
|
2220
2220
|
display: flex;
|
|
2221
2221
|
align-items: top;
|
|
@@ -2283,7 +2283,7 @@
|
|
|
2283
2283
|
-webkit-line-clamp: 1; /* number of lines to show */
|
|
2284
2284
|
-webkit-box-orient: vertical;
|
|
2285
2285
|
width: inherit;
|
|
2286
|
-
`,
|
|
2286
|
+
`,Jh=i.div`
|
|
2287
2287
|
height: 40px;
|
|
2288
2288
|
width: inherit;
|
|
2289
2289
|
text-align-last: end;
|
|
@@ -2298,19 +2298,19 @@
|
|
|
2298
2298
|
max-width: 173px;
|
|
2299
2299
|
-webkit-line-clamp: 1; /* number of lines to show */
|
|
2300
2300
|
-webkit-box-orient: vertical;
|
|
2301
|
-
`,
|
|
2301
|
+
`,e1=i.div`
|
|
2302
2302
|
margin-top: 100px;
|
|
2303
2303
|
`,Ln=i.div`
|
|
2304
2304
|
font-size: 14px;
|
|
2305
2305
|
font-weight: bold;
|
|
2306
2306
|
text-align: center;
|
|
2307
|
-
`,
|
|
2307
|
+
`,t1=i.div`
|
|
2308
2308
|
display: flex;
|
|
2309
2309
|
flex-direction: row;
|
|
2310
2310
|
align-items: center;
|
|
2311
2311
|
justify-content: flex-end;
|
|
2312
2312
|
margin-top: 16px;
|
|
2313
|
-
`,
|
|
2313
|
+
`,o1=i.span`
|
|
2314
2314
|
color: ${E.gray80};
|
|
2315
2315
|
height: 20px;
|
|
2316
2316
|
font-size: 14px;
|
|
@@ -2320,7 +2320,7 @@
|
|
|
2320
2320
|
line-height: 20px;
|
|
2321
2321
|
letter-spacing: normal;
|
|
2322
2322
|
color: #4e5461;
|
|
2323
|
-
`,
|
|
2323
|
+
`,r1=i.input`
|
|
2324
2324
|
height: 40px;
|
|
2325
2325
|
width: 50px;
|
|
2326
2326
|
margin-right: 16px;
|
|
@@ -2329,7 +2329,7 @@
|
|
|
2329
2329
|
font-size: 15px;
|
|
2330
2330
|
border: 1px solid ${({theme:e})=>e.colors.primary[20]};
|
|
2331
2331
|
border-radius: 6px;
|
|
2332
|
-
`,
|
|
2332
|
+
`,n1=i.div`
|
|
2333
2333
|
display: flex;
|
|
2334
2334
|
gap: 8px;
|
|
2335
2335
|
justify-content: flex-end;
|
|
@@ -2337,9 +2337,9 @@
|
|
|
2337
2337
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
2338
2338
|
width: 100%;
|
|
2339
2339
|
`}
|
|
2340
|
-
`,Mn=1,Uo=8,
|
|
2340
|
+
`,Mn=1,Uo=8,i1=1,s1=()=>{const e=it.useHistory(),{containerWidth:o}=Se(),[r,s]=p.useState(""),[n,a]=p.useState(Mn),c=()=>e.push("/"),{t:d}=W.useTranslation(),{data:l,refetch:u,isLoading:g}=Bh({limit:Uo,page:n,search:r}),h=()=>{c()},{mutateAsync:x,isLoading:y}=Wh({onSuccesCallback:h}),m=()=>{a(1)},w=g||y,f=r.length>0&&r.length<3;p.useEffect(()=>{f||u()},[r]);const b=async(I="")=>{s(I),m()},S=I=>{var v;if(!I.video)return;const L=Hh([I==null?void 0:I.year.toString(),I.make,I.model,I.stockNumber]);x({url:(v=I.video)==null?void 0:v.url,fileName:L,lesaVehicleId:I.lesaVehicleId})},T=I=>{I==="left"&&a(L=>L-1),I==="right"&&a(L=>L+1)},V=Math.ceil(((l==null?void 0:l.count)||0)/Uo);return t.jsxs(t.Fragment,{children:[t.jsxs(qh,{children:[t.jsx(Ke,{left:t.jsx(F.Button,{text:d("Back"),icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>c(),variant:"transparent",style:{color:"white"}}),center:t.jsx(Yt,{children:d("Lesa TV Import")})}),t.jsx(ut,{children:t.jsxs(Gh,{children:[t.jsx(ms,{handleSearch:b,prevSearch:r}),t.jsx(Yh,{})]})})]}),t.jsx(Qh,{children:t.jsx(ut,{extendStyle:{wrapper:{padding:o>=z.xs?"32px 16px":"16px 0px"}},children:w?t.jsx(e1,{children:t.jsx(Ue,{isLoading:w})}):f?t.jsx(Ln,{children:t.jsx("p",{children:d("Please enter at least three characters to search")})}):l!=null&&l.videos.length?t.jsxs(t.Fragment,{children:[t.jsxs(Xh,{children:[t.jsx($n,{children:t.jsxs(co,{children:[d("Stock")," #"]})}),o>=z.xs&&t.jsx(An,{children:t.jsx(co,{children:d("Year")})}),t.jsx(Rn,{children:t.jsx(co,{children:d("Make")})}),t.jsx(Vn,{children:t.jsx(co,{children:d("Model")})})]}),t.jsx(Zh,{children:l==null?void 0:l.videos.map(I=>t.jsxs(Kh,{onClick:()=>{},children:[t.jsx($n,{children:I.stockNumber}),o>=z.xs&&t.jsx(An,{children:I.year}),t.jsx(Rn,{children:I.make}),t.jsx(Vn,{children:I.model}),t.jsx(Jh,{children:t.jsx(F.Button,{variant:"secondary",onClick:()=>S(I),text:d("Add")})})]},I.stockNumber))}),t.jsx(t1,{children:t.jsxs(n1,{children:[t.jsx(o1,{children:d("Go to:")}),t.jsx(r1,{type:"number",min:i1,value:n,onChange:I=>{if(!I.currentTarget||!I.currentTarget.value)return;const L=parseInt(I.currentTarget.value);if(L<=0){m();return}if(L>V){a(V);return}a(L)}}),t.jsx(xs,{page:n-1,size:Uo,count:(l==null?void 0:l.count)||0}),t.jsx(F.Button,{onClick:()=>T("left"),icon:t.jsx(H.MdChevronLeft,{size:20}),disabled:n===Mn,size:"small",variant:"secondary"}),t.jsx(F.Button,{onClick:()=>T("right"),icon:t.jsx(H.MdChevronRight,{size:20}),disabled:n===V,size:"small",variant:"secondary"})]})})]}):t.jsxs(Ln,{children:[t.jsx("p",{children:d("Oops! It looks like there are no videos matching your search terms.")}),t.jsx("p",{children:d("Try using different search term")})]})})})]})},a1=i.div`
|
|
2341
2341
|
background: ${E.white};
|
|
2342
|
-
`,
|
|
2342
|
+
`,c1=i.div`
|
|
2343
2343
|
width: 78%;
|
|
2344
2344
|
margin-left: auto;
|
|
2345
2345
|
margin-right: auto;
|
|
@@ -2355,30 +2355,30 @@
|
|
|
2355
2355
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
2356
2356
|
width: 100%;
|
|
2357
2357
|
`}
|
|
2358
|
-
`,
|
|
2358
|
+
`,l1=i.div`
|
|
2359
2359
|
width: 20px;
|
|
2360
2360
|
flex-grow: 0;
|
|
2361
2361
|
flex-shrink: 0;
|
|
2362
|
-
`,
|
|
2362
|
+
`,d1=i.div`
|
|
2363
2363
|
width: auto;
|
|
2364
|
-
`,
|
|
2364
|
+
`,u1=i.div`
|
|
2365
2365
|
font-weight: 600;
|
|
2366
2366
|
font-size: 16px;
|
|
2367
2367
|
line-height: 24px;
|
|
2368
2368
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
2369
|
-
`,
|
|
2369
|
+
`,p1=i.div`
|
|
2370
2370
|
font-weight: 400;
|
|
2371
2371
|
font-size: 14px;
|
|
2372
2372
|
line-height: 20px;
|
|
2373
2373
|
color: ${E.blackRgb60};
|
|
2374
2374
|
margin-top: 2%;
|
|
2375
|
-
`,
|
|
2375
|
+
`,h1=()=>{const{trackVideoSpecificPagesManually:e}=bt({vin:""}),{trackGTMSaveNewVideoInteractionEvent:o}=Ge(),{t:r}=W.useTranslation(),{toast:s}=Te(),{colors:n,isCdkEnviroment:a}=i.useTheme(),{videoId:c}=it.useParams(),d=it.useHistory(),[l,u]=p.useState({}),[g,h]=p.useState(!0),[x,y]=p.useState(!1),[m,w]=p.useState(!1),[f,b]=p.useState(!1),[S,T]=p.useState(""),V=p.createRef(),I=async()=>{h(!0);const C=await wo(c);C&&u(C),h(!1)},L=()=>{b(!0)};if(p.useEffect(()=>{I()},[]),p.useEffect(()=>{var C,$;g||e==null||e({...vt.VIDEOS_VOICE_RECORDER,videoAttributes:{videoId:Number(l.id),videoType:(C=l.videoRequest)==null?void 0:C.videoType,videoCustomerName:!!(($=l.videoRequest)!=null&&$.customerName)||!1,videoLength:l.videoLength||0,videoTitle:l==null?void 0:l.title}})},[g]),g)return t.jsx(Ue,{isLoading:g});const v=async C=>{var N,D,O,U;b(!1),y(!0);const $=await fetch(S||"").then(Y=>Y.blob()),R=Dh(l.id,fo),j=new File([$],R),A={fileName:j.name,mimeType:"audio/webm",folder:""},P=await Ta(A);if(!P||P instanceof Error){y(!1),s({message:r("Server is currently unavailable, try again later!")});return}const M={file:j,uploadURL:P.uploadUrl,mimeType:A.mimeType};try{await ka({data:M}),await Ia({videoId:l.id,newVideoTitle:C,audioFileName:R});const Y={videoId:Number(l.id),videoType:(N=l==null?void 0:l.videoRequest)==null?void 0:N.videoType,videoCustomerName:!!((D=l==null?void 0:l.videoRequest)!=null&&D.customerName),videoLength:l.videoLength,videoTitle:l.title};o==null||o({type:So.VOICE_RECORD,vehicle:((O=l==null?void 0:l.videoRequest)==null?void 0:O.inventoryItem)||((U=l==null?void 0:l.videoRequest)==null?void 0:U.vehicle),videoAttributes:Y})}catch{y(!1),s({message:r("Creating voiceover failed, try again later!")});return}s({message:r("Voiceover successfully created!")}),y(!1),w(!1),d.push("/")};return t.jsxs(a1,{children:[t.jsx(Ke,{left:t.jsx(F.Button,{text:r("Back"),variant:"transparent",icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>d.push("/"),style:{color:"white"}}),center:t.jsx(Yt,{children:r("Voiceover")}),right:t.jsx(F.Button,{onClick:L,text:r("Save Video"),variant:a?"white":"primary",disabled:!m||x})}),t.jsx(ut,{children:!x&&t.jsxs(t.Fragment,{children:[t.jsxs(c1,{children:[t.jsx(l1,{children:t.jsx(H.MdInfo,{size:22,color:n.primary[60]})}),t.jsxs(d1,{children:[t.jsx(u1,{children:r("Duplicated video ready for voiceover")}),t.jsx(p1,{children:r("The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.")})]})]}),t.jsx(lh,{video:l,videoRef:V,margin:"32px 0 0"}),t.jsx(Ih,{videoRef:V,video:l,onChangeVoiceoverValid:w,onRecordingUrlGeneration:C=>{T(C)},margin:"32px auto 0"})]})}),x&&t.jsx(Ue,{isLoading:!0}),f&&t.jsx(gs,{title:r("Name new video"),label:r("Give your new video a name"),defaultValue:l.title,secondaryButtonText:r("Back"),primaryButtonText:r("Save Video"),handleSubmit:v,handleModalClose:()=>b(!1)})]})},g1=i.div`
|
|
2376
2376
|
position: relative;
|
|
2377
2377
|
width: 216px;
|
|
2378
2378
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
2379
2379
|
width: 100%;
|
|
2380
2380
|
`}
|
|
2381
|
-
`,
|
|
2381
|
+
`,m1=i.div`
|
|
2382
2382
|
position: absolute;
|
|
2383
2383
|
left: 12px;
|
|
2384
2384
|
top: 12px;
|
|
@@ -2387,7 +2387,7 @@
|
|
|
2387
2387
|
&:hover {
|
|
2388
2388
|
color: ${E.gray100};
|
|
2389
2389
|
}
|
|
2390
|
-
`,
|
|
2390
|
+
`,x1=i.div`
|
|
2391
2391
|
position: absolute;
|
|
2392
2392
|
right: 12px;
|
|
2393
2393
|
top: 12px;
|
|
@@ -2396,14 +2396,14 @@
|
|
|
2396
2396
|
&:hover {
|
|
2397
2397
|
color: ${E.gray100};
|
|
2398
2398
|
}
|
|
2399
|
-
`,
|
|
2399
|
+
`,f1=({prevSearch:e,handleSearch:o})=>{const{t:r}=W.useTranslation(),[s,n]=p.useState(e||""),a=l=>{l.key==="Enter"&&o(s)},c=()=>{n(""),o("")},d=l=>{n(l.currentTarget.value)};return t.jsxs(g1,{children:[t.jsx(m1,{children:t.jsx(ve.IoMdSearch,{onClick:()=>o(s),size:17})}),t.jsx(Gt,{width:"100%",type:"text",padding:"8px 40px 8px 40px",value:s,placeholder:r("Search Videos..."),onKeyUp:a,onChange:d}),s!==""&&t.jsx(x1,{children:t.jsx(H.MdClear,{onClick:()=>c(),size:17})})]})},v1=i.div`
|
|
2400
2400
|
font-weight: 400;
|
|
2401
2401
|
font-size: 14px;
|
|
2402
2402
|
line-height: 20px;
|
|
2403
2403
|
color: ${E.gray80};
|
|
2404
|
-
`,
|
|
2404
|
+
`,b1=({page:e,size:o,count:r})=>{const{t:s}=W.useTranslation(),n=e*o+1;let a=e*o+o;return a>r&&(a=r),t.jsxs(v1,{children:[n,"-",a," ",s("of")," ",r]})},w1=i.div`
|
|
2405
2405
|
background: ${E.gray10};
|
|
2406
|
-
`,
|
|
2406
|
+
`,y1=i.div`
|
|
2407
2407
|
display: flex;
|
|
2408
2408
|
flex-direction: row;
|
|
2409
2409
|
flex-direction: flex-start;
|
|
@@ -2412,25 +2412,25 @@
|
|
|
2412
2412
|
flex-direction: column;
|
|
2413
2413
|
width: 100%;
|
|
2414
2414
|
`}
|
|
2415
|
-
`,
|
|
2415
|
+
`,C1=i.div`
|
|
2416
2416
|
width: 216px;
|
|
2417
2417
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
2418
2418
|
width: 100%;
|
|
2419
2419
|
`}
|
|
2420
|
-
`,
|
|
2420
|
+
`,S1=i.div`
|
|
2421
2421
|
background: ${E.white};
|
|
2422
|
-
`,
|
|
2422
|
+
`,j1=i.div`
|
|
2423
2423
|
display: flex;
|
|
2424
2424
|
flex-wrap: wrap;
|
|
2425
2425
|
width: 100%;
|
|
2426
2426
|
max-width: 925px;
|
|
2427
|
-
`,
|
|
2427
|
+
`,E1=i.div`
|
|
2428
2428
|
width: 100%;
|
|
2429
2429
|
display: flex;
|
|
2430
2430
|
align-items: center;
|
|
2431
2431
|
height: 56px;
|
|
2432
2432
|
border-bottom: 1px solid rgb(223, 227, 230);
|
|
2433
|
-
`,
|
|
2433
|
+
`,T1=i.div`
|
|
2434
2434
|
width: 100%;
|
|
2435
2435
|
display: flex;
|
|
2436
2436
|
align-items: top;
|
|
@@ -2487,7 +2487,7 @@
|
|
|
2487
2487
|
-webkit-line-clamp: 1; /* number of lines to show */
|
|
2488
2488
|
-webkit-box-orient: vertical;
|
|
2489
2489
|
width: inherit;
|
|
2490
|
-
`,
|
|
2490
|
+
`,k1=i.div`
|
|
2491
2491
|
height: 40px;
|
|
2492
2492
|
width: inherit;
|
|
2493
2493
|
text-align-last: end;
|
|
@@ -2502,19 +2502,19 @@
|
|
|
2502
2502
|
max-width: 173px;
|
|
2503
2503
|
-webkit-line-clamp: 1; /* number of lines to show */
|
|
2504
2504
|
-webkit-box-orient: vertical;
|
|
2505
|
-
`,
|
|
2505
|
+
`,I1=i.div`
|
|
2506
2506
|
margin-top: 100px;
|
|
2507
|
-
`,
|
|
2507
|
+
`,A1=i.div`
|
|
2508
2508
|
font-size: 14px;
|
|
2509
2509
|
font-weight: bold;
|
|
2510
2510
|
text-align: center;
|
|
2511
|
-
`,
|
|
2511
|
+
`,R1=i.div`
|
|
2512
2512
|
display: flex;
|
|
2513
2513
|
flex-direction: row;
|
|
2514
2514
|
align-items: center;
|
|
2515
2515
|
justify-content: flex-end;
|
|
2516
2516
|
margin-top: 16px;
|
|
2517
|
-
|
|
2517
|
+
`,$1=i.span`
|
|
2518
2518
|
color: ${E.gray80};
|
|
2519
2519
|
height: 20px;
|
|
2520
2520
|
font-size: 14px;
|
|
@@ -2524,7 +2524,7 @@
|
|
|
2524
2524
|
line-height: 20px;
|
|
2525
2525
|
letter-spacing: normal;
|
|
2526
2526
|
color: #4e5461;
|
|
2527
|
-
`,
|
|
2527
|
+
`,V1=i.input`
|
|
2528
2528
|
height: 40px;
|
|
2529
2529
|
width: 50px;
|
|
2530
2530
|
margin-right: 16px;
|
|
@@ -2533,7 +2533,7 @@
|
|
|
2533
2533
|
font-size: 15px;
|
|
2534
2534
|
border: 1px solid ${({theme:e})=>e.colors.primary[20]};
|
|
2535
2535
|
border-radius: 6px;
|
|
2536
|
-
|
|
2536
|
+
`,L1=i.div`
|
|
2537
2537
|
display: flex;
|
|
2538
2538
|
gap: 8px;
|
|
2539
2539
|
justify-content: flex-end;
|
|
@@ -2541,7 +2541,7 @@
|
|
|
2541
2541
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
2542
2542
|
width: 100%;
|
|
2543
2543
|
`}
|
|
2544
|
-
`,kt=1,
|
|
2544
|
+
`,kt=1,M1=10,Pn=1,D1=1,Fn=new Date().getFullYear(),O1=()=>{const{t:e}=W.useTranslation(),o=it.useHistory(),{containerWidth:r}=Se(),[s,n]=p.useState(""),[a,c]=p.useState(kt),[d,l]=p.useState(D1),[u,g]=p.useState(Fn),[h,x]=p.useState(Pn),[y,m]=p.useState(kt),[w,f]=p.useState([]),{toast:b}=Te(),S=M1,[T,V]=p.useState(!0),I=()=>o.push("/");let L=()=>{};p.useEffect(()=>{(async()=>{V(!0);try{const A=await on({limit:S,page:a,year:u,search:s});x(A.count),f(A.videos);let P=A.count<S?A.count:S;m(Math.ceil(A.count/P)),V(!1)}catch{V(!1)}})()},[S,a,u]);const v=async(j="",A=0,P=0)=>{j.length<2&&j!==""||(j!==s&&(n(j),A=kt,c(kt)),d>0&&clearTimeout(d),L(),new Promise((M,N)=>{L=N,l(setTimeout(M,j!==s?500:0))}).then(async()=>{V(!0),P===0&&(P=u);try{const M=await on({limit:S,search:j,page:A,year:P});x(M.count),f(M.videos),m(Math.ceil(M.count/S)),V(!1)}catch{V(!1)}}))},C=async j=>{V(!0);try{await Ra({title:j.year+" "+j.make+" "+j.model,flvName:j.wtvVideoId,animatedGifPath:j.animatedGifPath,year:parseInt(j.year),make:j.make,model:j.model,wtvId:j.wtvId}),V(!1),b({message:e("Video has been added!")}),I()}catch{V(!1),b({message:e("An error occured while trying to add the video!")})}},$=j=>{j==="left"&&(v(s,a-1,u),c(A=>A-1)),j==="right"&&(v(s,a+1,u),c(A=>A+1))};let R=[];for(let j=Fn;j>2007;j--)R.push({value:j.toString(),label:j.toString()});return t.jsxs(t.Fragment,{children:[t.jsxs(w1,{children:[t.jsx(Ke,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>I(),style:{color:"white"}}),center:t.jsx(Yt,{children:e("Wheels TV Import")})}),t.jsx(ut,{children:t.jsxs(y1,{children:[t.jsx(f1,{handleSearch:v,prevSearch:s}),t.jsx(C1,{children:t.jsx(Ne,{value:{value:u.toString()||"",label:u.toString()||""},onChange:j=>{g(j.value),c(kt),v(s,kt,j.value)},options:R,isSearchable:!1,creatable:!1})})]})})]}),t.jsx(S1,{children:t.jsx(ut,{extendStyle:{wrapper:{padding:r>=z.xs?"32px 16px":"16px 0px"}},children:T?t.jsx(I1,{children:t.jsx(Ue,{isLoading:T})}):w.length?t.jsxs(t.Fragment,{children:[t.jsxs(T1,{children:[r>=z.xs&&t.jsx(Dn,{children:t.jsx(Wo,{children:e("Year")})}),t.jsx(On,{children:t.jsx(Wo,{children:e("Make")})}),t.jsx(Nn,{children:t.jsx(Wo,{children:e("Model")})})]}),t.jsx(j1,{children:w.map(j=>t.jsxs(E1,{onClick:()=>{},children:[r>=z.xs&&t.jsx(Dn,{children:j.year}),t.jsx(On,{children:j.make}),t.jsx(Nn,{children:j.model}),t.jsx(k1,{children:t.jsx(F.Button,{onClick:async()=>{C(j)},text:e("Add"),variant:"secondary"})})]},j.wtvVideoId))}),t.jsx(R1,{children:t.jsxs(L1,{children:[t.jsx($1,{children:e("Go to:")}),t.jsx(V1,{type:"number",min:Pn,value:a,onChange:j=>{if(!j.currentTarget||!j.currentTarget.value)return;const A=parseInt(j.currentTarget.value);if(A<=0){c(1),v(s,1,u);return}if(A>y){c(y),v(s,y,u);return}c(A),v(s,A,u)}}),t.jsx(b1,{page:a-1,size:S,count:h}),t.jsx(F.Button,{onClick:()=>$("left"),icon:t.jsx(H.MdChevronLeft,{size:20}),disabled:a===kt,variant:"secondary",size:"small"}),t.jsx(F.Button,{onClick:()=>$("right"),icon:t.jsx(H.MdChevronRight,{size:20}),disabled:a===y,variant:"secondary",size:"small"})]})})]}):t.jsxs(A1,{children:[t.jsx("p",{children:e("Oops! It looks like there are no videos matching your search terms.")}),t.jsx("p",{children:e("Try using a different search terms")})]})})})]})},N1=i.div`
|
|
2545
2545
|
padding-left: 2px;
|
|
2546
2546
|
padding-right: 2px;
|
|
2547
2547
|
padding-top: 2px;
|
|
@@ -2549,18 +2549,18 @@
|
|
|
2549
2549
|
flex-direction: column;
|
|
2550
2550
|
margin-left: 20px;
|
|
2551
2551
|
height: 85px;
|
|
2552
|
-
`,
|
|
2552
|
+
`,P1=i.div`
|
|
2553
2553
|
position: relative;
|
|
2554
2554
|
left: ${e=>e.offset};
|
|
2555
2555
|
width: ${e=>e.width};
|
|
2556
|
-
`,
|
|
2556
|
+
`,F1=({index:e,totalDuration:o,offset:r,width:s,video:n={},setVideos:a=()=>{},hasProcessingVideos:c,showPreviewTrack:d=!0})=>{const l=k.useRef([0,0]),[u,g]=p.useState([0,n.duration]);p.useEffect(()=>{a(x=>{const y=[...x],m=u[0],w=u[1],f=`#t=${m||0}${w?","+w:""}`;return y[e]={...y[e],start:tn(u[0]),end:tn(u[1]),startSec:m,endSec:w,source:(""+n.source).split("#t=")[0]+f},y})},[u]);const h=x=>{const y=x[1]-x[0];a(m=>{const w=[...m];return w[e]={...w[e],width:y*100/o,trimDuration:y},w})};return p.useEffect(()=>{o&&a(x=>{const y=[...x];return y[e]={...y[e],width:n.trimDuration*100/o},y})},[o]),p.useMemo(()=>t.jsx(N1,{children:t.jsx(P1,{offset:`${r||0}px`,width:`${s||0}px`,children:!!n.duration&&n.ref&&!c&&t.jsx(zr,{videoRef:n.ref,videoDuration:n.duration,videoSource:n.videoSource,setValue:g,showTickTime:!1,value:u,valueRef:l,width:"100%",onSlideEnd:h,showPreviewTrack:d})})},n.id),[n.width,n.ref,u,r,s,n.processing])},z1=e=>k.createElement("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M21 17C21.5523 17 22 16.5523 22 16C22 15.4477 21.5523 15 21 15H3C2.44772 15 2 15.4477 2 16C2 16.5523 2.44772 17 3 17H21ZM21 13C21.5523 13 22 12.5523 22 12C22 11.4477 21.5523 11 21 11H3C2.44772 11 2 11.4477 2 12C2 12.5523 2.44772 13 3 13H21ZM2 8C2 8.55228 2.44772 9 3 9H21C21.5523 9 22 8.55228 22 8C22 7.44772 21.5523 7 21 7H3C2.44772 7 2 7.44772 2 8Z",fill:"#001B53",fillOpacity:.4})),_1=i(z1)`
|
|
2557
2557
|
width: ${e=>e.width||"24px"};
|
|
2558
2558
|
height: ${e=>e.height||"24px"};
|
|
2559
2559
|
g {
|
|
2560
2560
|
fill: ${e=>e.color||"currentColor"};
|
|
2561
2561
|
opacity: ${e=>e.opacity||"inherit"};
|
|
2562
2562
|
}
|
|
2563
|
-
`,
|
|
2563
|
+
`,B1=i.div`
|
|
2564
2564
|
background-color: ${E.themeDark};
|
|
2565
2565
|
max-height: 80px;
|
|
2566
2566
|
align-self: center;
|
|
@@ -2608,7 +2608,7 @@
|
|
|
2608
2608
|
border-radius: 6px;
|
|
2609
2609
|
width: 120px;
|
|
2610
2610
|
object-fit: contain;
|
|
2611
|
-
`,
|
|
2611
|
+
`,U1=i.div`
|
|
2612
2612
|
padding-right: 32px;
|
|
2613
2613
|
border-top-left-radius: 16px;
|
|
2614
2614
|
border-bottom-left-radius: 16px;
|
|
@@ -2617,7 +2617,7 @@
|
|
|
2617
2617
|
display: flex;
|
|
2618
2618
|
flex-direction: row;
|
|
2619
2619
|
margin-bottom: 8px;
|
|
2620
|
-
`,
|
|
2620
|
+
`,W1=i.div`
|
|
2621
2621
|
display: flex;
|
|
2622
2622
|
justify-content: center;
|
|
2623
2623
|
height: 80px;
|
|
@@ -2628,7 +2628,7 @@
|
|
|
2628
2628
|
cursor: ${e=>e.disabled?"not-allowed":"grab"};
|
|
2629
2629
|
opacity: 1;
|
|
2630
2630
|
}
|
|
2631
|
-
`,
|
|
2631
|
+
`,H1=i.div`
|
|
2632
2632
|
background-color: ${E.themeDark};
|
|
2633
2633
|
|
|
2634
2634
|
aspect-ratio: 16 / 9;
|
|
@@ -2641,21 +2641,21 @@
|
|
|
2641
2641
|
display: flex;
|
|
2642
2642
|
justify-content: center;
|
|
2643
2643
|
align-items: center;
|
|
2644
|
-
`,
|
|
2644
|
+
`,q1=({video:e={},setVideos:o=()=>{},setVideoRef:r,index:s,isDragDisabled:n,setShouldFetch:a})=>{const c=k.createRef(),[d,l]=p.useState(0),u=!!(e!=null&&e.id)&&(e==null?void 0:e.id.toString().includes(fd)),{videoData:g,retryCount:h}=zi({videoId:(e==null?void 0:e.id)||0,enabled:!u&&(e==null?void 0:e.processing)===At.PROCESSING}),{imgRef:x}=Fi({src:(g==null?void 0:g.autogeneratedThumbnail)||(e==null?void 0:e.autoGeneratedGifPath)}),y=()=>{if(c.current){const w=c.current.duration;l(w)}};p.useEffect(()=>{d&&o(w=>{const f=[...w];return f[s]={...f[s],duration:d,trimDuration:d},f})},[d]),p.useEffect(()=>{c&&c.current&&(c.current.onloadedmetadata=()=>y(),r(s,c))},[c]),p.useEffect(()=>{g&&h!==0&&a(!0)},[g,h]);const m=e.processing===At.FAILED||e.processing===At.READY;return p.useMemo(()=>t.jsxs(U1,{children:[t.jsx(W1,{disabled:n,children:t.jsx(_1,{})}),m?t.jsxs(B1,{children:[x.current?t.jsx(zn,{ref:x}):t.jsx(zn,{src:e.autogeneratedThumbnail}),t.jsx(Nt,{videoSource:e.videoSource,videoId:e.id,thumbnail:e.autogeneratedThumbnail,videoRef:c,autoplay:!1})]}):t.jsx(H1,{children:t.jsx(rt,{})})]},e.id),[e.videoSource,e.processing,g])},G1=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("defs",null,k.createElement("path",{id:"p1bfbm3cda",d:"M15.5 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.79 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.26 4.25c.41.41 1.07.41 1.48 0l.01-.01c.41-.41.41-1.07 0-1.48L15.5 14zm-6 0C7.01 14 5 11.99 5 9.5S7.01 5 9.5 5 14 7.01 14 9.5 11.99 14 9.5 14zm-2-5h4c.28 0 .5.22.5.5s-.22.5-.5.5h-4c-.28 0-.5-.22-.5-.5s.22-.5.5-.5z"})),k.createElement("g",{fill:"none",fillRule:"evenodd",opacity:.2},k.createElement("g",null,k.createElement("g",null,k.createElement("g",{transform:"translate(-1112 -640) translate(1104 632) translate(8 8)"},k.createElement("mask",{id:"98kq0pmrgb",fill:"#fff"},k.createElement("use",{xlinkHref:"#p1bfbm3cda"})),k.createElement("use",{fill:"#000",fillRule:"nonzero",xlinkHref:"#p1bfbm3cda"}),k.createElement("g",{fill:"#272A32",mask:"url(#98kq0pmrgb)"},k.createElement("path",{d:"M0 0H24V24H0z"}))))))),Y1=i(G1)`
|
|
2645
2645
|
width: ${e=>e.width||"24px"};
|
|
2646
2646
|
height: ${e=>e.height||"24px"};
|
|
2647
2647
|
g {
|
|
2648
2648
|
fill: ${e=>e.color||"currentColor"};
|
|
2649
2649
|
opacity: ${e=>e.opacity||"inherit"};
|
|
2650
2650
|
}
|
|
2651
|
-
`,
|
|
2651
|
+
`,Q1=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("defs",null,k.createElement("path",{id:"eekoyvk17a",d:"M15.499 14h-.79l-.28-.27c1.2-1.4 1.82-3.31 1.48-5.34-.47-2.78-2.79-5-5.59-5.34-4.23-.52-7.78 3.04-7.27 7.27.34 2.8 2.56 5.12 5.34 5.59 2.03.34 3.94-.28 5.34-1.48l.27.28v.79l4.26 4.25c.41.41 1.07.41 1.48 0l.01-.01c.41-.41.41-1.07 0-1.48L15.499 14zm-6 0c-2.49 0-4.5-2.01-4.5-4.5S7.009 5 9.499 5s4.5 2.01 4.5 4.5-2.01 4.5-4.5 4.5zm0-7c-.28 0-.5.22-.5.5V9h-1.5c-.28 0-.5.22-.5.5s.22.5.5.5h1.5v1.5c0 .28.22.5.5.5s.5-.22.5-.5V10h1.5c.28 0 .5-.22.5-.5s-.22-.5-.5-.5h-1.5V7.5c0-.28-.22-.5-.5-.5z"})),k.createElement("g",{fill:"none",fillRule:"evenodd"},k.createElement("g",null,k.createElement("g",null,k.createElement("g",null,k.createElement("g",{transform:"translate(-1376 -640) translate(1104 632) translate(264) translate(8 8)"},k.createElement("mask",{id:"4qknrgzsbb",fill:"#fff"},k.createElement("use",{xlinkHref:"#eekoyvk17a"})),k.createElement("g",{fill:"#272A32",mask:"url(#4qknrgzsbb)"},k.createElement("path",{d:"M0 0H24V24H0z"})))))))),Z1=i(Q1)`
|
|
2652
2652
|
width: ${e=>e.width||"24px"};
|
|
2653
2653
|
height: ${e=>e.height||"24px"};
|
|
2654
2654
|
g {
|
|
2655
2655
|
fill: ${e=>e.color||"currentColor"};
|
|
2656
2656
|
opacity: ${e=>e.opacity||"inherit"};
|
|
2657
2657
|
}
|
|
2658
|
-
`,
|
|
2658
|
+
`,K1=i.div`
|
|
2659
2659
|
display: ${e=>e.isVideoPaused?"flex":"none"};
|
|
2660
2660
|
justify-content: center;
|
|
2661
2661
|
align-items: center;
|
|
@@ -2697,7 +2697,7 @@
|
|
|
2697
2697
|
${e=>e.playButtonPosition==="none"&&i.css`
|
|
2698
2698
|
display: none;
|
|
2699
2699
|
`}
|
|
2700
|
-
`,
|
|
2700
|
+
`,X1=e=>{const{playerBackgroundColor:o,playButtonPosition:r,isVideoPaused:s,togglePlay:n,playerIconsColor:a,small:c}=e,d=bi.hex.rgb(o);return t.jsx(K1,{isVideoPaused:s,onClick:n,r:d[0],g:d[1],b:d[2],hex:o,playButtonPosition:r,small:c,children:t.jsx(H.MdPlayArrow,{color:a})})},J1=i.div`
|
|
2701
2701
|
position: relative;
|
|
2702
2702
|
background-color: ${E.themeDark75Percent};
|
|
2703
2703
|
border-radius: 6px;
|
|
@@ -2707,11 +2707,11 @@
|
|
|
2707
2707
|
${({theme:e})=>e.containerWidth<=z.mb&&i.css`
|
|
2708
2708
|
border-radius: 0;
|
|
2709
2709
|
`}
|
|
2710
|
-
`,
|
|
2710
|
+
`,eg=i.div`
|
|
2711
2711
|
width: 100%;
|
|
2712
2712
|
justify-content: center;
|
|
2713
2713
|
display: flex;
|
|
2714
|
-
`;i.input``;const
|
|
2714
|
+
`;i.input``;const tg=i.div`
|
|
2715
2715
|
background-color: ${E.themeDark};
|
|
2716
2716
|
|
|
2717
2717
|
height: ${e=>e.height?e.height+"px":"332px"};
|
|
@@ -2720,7 +2720,7 @@
|
|
|
2720
2720
|
display: flex;
|
|
2721
2721
|
justify-content: center;
|
|
2722
2722
|
align-items: center;
|
|
2723
|
-
`,
|
|
2723
|
+
`,og=({width:e,height:o,displayVideos:r,hasProcessingVideos:s})=>{const n=p.useRef(null),{colors:a}=i.useTheme(),c=p.useRef(0),[d,l]=p.useState(!0),[u,g]=p.useState(!1),[h,x]=p.useState(0),[y,m]=p.useState(0),[w,f]=p.useState(0);p.useEffect(()=>{c.current=0;let j=0;for(let A=0;A<r.length;A++){let P=r[A].startSec?r[A].startSec:0,N=(r[A].endSec?r[A].endSec:r[A].duration)-P;j+=N}x(j||1)},[r]);const b=()=>{l(!1)},S=()=>{if(n.current){const j=c.current,A=n.current;let P=A.currentTime,M=r[j].startSec?r[j].startSec:0;P=P-M,P=P<0?0:P;for(let N=0;N<j;N++){let D=r[N].startSec?r[N].startSec:0,U=(r[N].endSec?r[N].endSec:r[N].duration)-D;P+=U}r[j].endSec<=A.currentTime&&T(),m(P)}},T=()=>{if(n.current){const j=n.current;l(!0);const A=++c.current;if(r.length>A){j.src=r[A].source;let P=r[A].startSec?r[A].startSec:0;j.currentTime=P}else c.current=0,j.src=r[0].source,j.pause(),g(!1)}},V=j=>{const A=parseFloat(j.currentTarget.value);if(n.current){const P=n.current,M=c.current;let N=0,D=0;for(let O=0;O<r.length;O++){let U=r[O].startSec?r[O].startSec:0,ne=(r[O].endSec?r[O].endSec:r[O].duration)-U;if(D+=ne,A>=N&&A<D){M!==O&&(l(!0),c.current=O,P.src=r[O].source),P.currentTime=A-N+U;break}N=D}}},I=()=>{n.current&&c.current>0&&u&&n.current.play()},L=()=>{const j=n.current;j&&(u?j.pause():j.play(),g(!u))},C=!!(r[c.current]?r[c.current].source:"")&&!s,$=100*(w-0)/(h-0),R={background:`linear-gradient(90deg, ${a.primary[100]} 0%, ${a.primary[100]} ${$}%, #d0d3d9 ${$}%, #d0d3d9 100%)`};return t.jsx(J1,{width:e,height:o,children:C?t.jsxs(t.Fragment,{children:[t.jsx("video",{...!Dt&&{preload:"metadata"},width:e,height:o,ref:n,onTimeUpdate:S,onLoadedMetadata:b,onEnded:T,onCanPlayThrough:I,src:`${r[c.current].source}`,onClick:L,style:{maxWidth:"100%"},playsInline:!0,controls:!1}),t.jsx(X1,{playerBackgroundColor:"#fff",playButtonPosition:"center",isVideoPaused:!u,togglePlay:L,playerIconsColor:E.themeDark75Percent}),t.jsx(eg,{children:t.jsx(vs,{onChange:j=>{f(+j.target.value),V(j)},value:y,max:h,min:"0",type:"range",step:"0.01",color:"red",style:{width:"100%",marginTop:"-25px",zIndex:2,height:"4px",...R,boxShadow:"0px 0px 4px rgba(66, 79, 104, 0.08),0px 6px 12px rgba(66, 79, 104, 0.06)"}})})]}):t.jsx(tg,{children:t.jsx(rt,{size:30})})})},rg=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("path",{className:"bg",fill:"white",d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2z"}),k.createElement("path",{className:"icon",fill:"#E84C3D",d:"M16.3 16.3c-.39.39-1.02.39-1.41 0L12 13.41 9.11 16.3c-.39.39-1.02.39-1.41 0-.187-.187-.292-.44-.292-.705 0-.265.105-.518.292-.705L10.59 12 7.7 9.11c-.187-.187-.292-.44-.292-.705 0-.265.105-.518.292-.705.39-.39 1.02-.39 1.41 0L12 10.59l2.89-2.89c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 12l2.89 2.89c.38.38.38 1.02 0 1.41z"})),ng=i(rg)`
|
|
2724
2724
|
width: ${e=>e.width||"16px"};
|
|
2725
2725
|
height: ${e=>e.height||"16px"};
|
|
2726
2726
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -2734,7 +2734,7 @@
|
|
|
2734
2734
|
opacity: ${e=>e.opacity||"inherit"};
|
|
2735
2735
|
}
|
|
2736
2736
|
|
|
2737
|
-
`,
|
|
2737
|
+
`,ig=i.div`
|
|
2738
2738
|
display: flex;
|
|
2739
2739
|
align-items: center;
|
|
2740
2740
|
|
|
@@ -2744,14 +2744,14 @@
|
|
|
2744
2744
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
2745
2745
|
border-radius: 6px;
|
|
2746
2746
|
padding: 12px;
|
|
2747
|
-
`,
|
|
2747
|
+
`,sg=i.div`
|
|
2748
2748
|
flex-shrink: 0;
|
|
2749
2749
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
2750
|
-
`,
|
|
2750
|
+
`,fs=({text:e,width:o})=>t.jsxs(ig,{style:{width:o},children:[t.jsx(sg,{children:t.jsx(xi.AiFillInfoCircle,{size:24,color:"inherit",opacity:.6})}),t.jsx("div",{children:e})]}),ag=i.div`
|
|
2751
2751
|
background-color: ${E.gray10};
|
|
2752
2752
|
height: 100%;
|
|
2753
2753
|
width: 100%;
|
|
2754
|
-
`,
|
|
2754
|
+
`,cg=i.div`
|
|
2755
2755
|
background-color: #f6f7f9;
|
|
2756
2756
|
display: flex;
|
|
2757
2757
|
flex-direction: column;
|
|
@@ -2759,7 +2759,7 @@
|
|
|
2759
2759
|
min-height: 400px;
|
|
2760
2760
|
width: 100%;
|
|
2761
2761
|
margin-top: 15px;
|
|
2762
|
-
`,
|
|
2762
|
+
`,lg=i.div`
|
|
2763
2763
|
background-color: #f6f7f9;
|
|
2764
2764
|
display: flex;
|
|
2765
2765
|
flex-direction: row;
|
|
@@ -2773,7 +2773,7 @@
|
|
|
2773
2773
|
-ms-user-select: none;
|
|
2774
2774
|
user-select: none;
|
|
2775
2775
|
margin-top: 10px;
|
|
2776
|
-
`,
|
|
2776
|
+
`,dg=i.div`
|
|
2777
2777
|
padding-top: 67px;
|
|
2778
2778
|
margin-top: ${e=>e.marginTop||0}px;
|
|
2779
2779
|
display: flex;
|
|
@@ -2785,19 +2785,19 @@
|
|
|
2785
2785
|
padding-top: 0px;
|
|
2786
2786
|
margin-top: 16px;
|
|
2787
2787
|
`}
|
|
2788
|
-
`,
|
|
2788
|
+
`,ug=i.div`
|
|
2789
2789
|
float: left;
|
|
2790
2790
|
flex-direction: column;
|
|
2791
2791
|
width: ${e=>e.width?`${e.width}px`:"100%"};
|
|
2792
2792
|
div {
|
|
2793
2793
|
margin-top: 3.5px;
|
|
2794
2794
|
}
|
|
2795
|
-
`,
|
|
2795
|
+
`,pg=i.div`
|
|
2796
2796
|
display: flex;
|
|
2797
2797
|
flex-direction: column;
|
|
2798
2798
|
width: ${e=>e.width?`${e.width}px`:"100%"};
|
|
2799
2799
|
margin-bottom: 8px;
|
|
2800
|
-
`,
|
|
2800
|
+
`,hg=i.div`
|
|
2801
2801
|
height: ${e=>e.height?`${e.height+20}px`:""};
|
|
2802
2802
|
min-height: ${e=>e.height?`${e.height+20}px`:""};
|
|
2803
2803
|
overflow-x: auto;
|
|
@@ -2830,16 +2830,16 @@
|
|
|
2830
2830
|
::-webkit-scrollbar-thumb:hover {
|
|
2831
2831
|
background-color: ${({theme:e})=>e.colors.primary[40]};
|
|
2832
2832
|
}
|
|
2833
|
-
`,
|
|
2833
|
+
`,gg=i.div`
|
|
2834
2834
|
position: absolute;
|
|
2835
2835
|
width: calc(100% - 210px);
|
|
2836
|
-
`,
|
|
2836
|
+
`,mg=i.div`
|
|
2837
2837
|
padding: 32px 12px;
|
|
2838
2838
|
height: 10px; /* SUS-905 changes */
|
|
2839
2839
|
width: calc(100%-24px);
|
|
2840
2840
|
display: flex;
|
|
2841
2841
|
justify-content: space-between;
|
|
2842
|
-
`,
|
|
2842
|
+
`,xg=i.div`
|
|
2843
2843
|
display: flex;
|
|
2844
2844
|
justify-content: center;
|
|
2845
2845
|
margin-bottom: 32px;
|
|
@@ -2850,22 +2850,22 @@
|
|
|
2850
2850
|
border-radius: 0;
|
|
2851
2851
|
margin-bottom: 0;
|
|
2852
2852
|
`}
|
|
2853
|
-
`,
|
|
2853
|
+
`,fg=i.div`
|
|
2854
2854
|
display: flex;
|
|
2855
2855
|
flex-direction: row;
|
|
2856
2856
|
width: 100%;
|
|
2857
2857
|
height: 20px;
|
|
2858
|
-
`,
|
|
2858
|
+
`,vg=i.div`
|
|
2859
2859
|
display: flex;
|
|
2860
2860
|
flex-direction: row;
|
|
2861
2861
|
width: 100%;
|
|
2862
2862
|
height: 8px;
|
|
2863
|
-
`,
|
|
2863
|
+
`,bg=i.div`
|
|
2864
2864
|
width: ${e=>e.width||20}px;
|
|
2865
2865
|
height: ${e=>e.inside?4:8}px;
|
|
2866
2866
|
border-left: 1px solid ${({theme:e})=>e.colors.primary[20]};
|
|
2867
2867
|
border-right: ${e=>e.rightBorder&&`1px solid ${e.theme.colors.primary[20]}`};
|
|
2868
|
-
`,
|
|
2868
|
+
`,wg=i.div`
|
|
2869
2869
|
font-size: 12px;
|
|
2870
2870
|
line-height: 1.43;
|
|
2871
2871
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
@@ -2873,7 +2873,7 @@
|
|
|
2873
2873
|
height: 20px;
|
|
2874
2874
|
display: flex;
|
|
2875
2875
|
justify-content: space-between;
|
|
2876
|
-
`,
|
|
2876
|
+
`,yg=i.div`
|
|
2877
2877
|
background: #ffffff;
|
|
2878
2878
|
border-top-right-radius: 16px;
|
|
2879
2879
|
border-bottom-right-radius: 16px;
|
|
@@ -2899,7 +2899,7 @@
|
|
|
2899
2899
|
border-radius: 4px;
|
|
2900
2900
|
transition: width 0.2s ease;
|
|
2901
2901
|
overflow: hidden;
|
|
2902
|
-
`,
|
|
2902
|
+
`,Cg=i.div`
|
|
2903
2903
|
display: block;
|
|
2904
2904
|
height: 40px;
|
|
2905
2905
|
border-radius: 4px;
|
|
@@ -2907,7 +2907,7 @@
|
|
|
2907
2907
|
button {
|
|
2908
2908
|
border-radius: 4px;
|
|
2909
2909
|
}
|
|
2910
|
-
`,
|
|
2910
|
+
`,Sg=i.div`
|
|
2911
2911
|
width: 200px;
|
|
2912
2912
|
height: 40px;
|
|
2913
2913
|
padding: 12px;
|
|
@@ -2918,7 +2918,7 @@
|
|
|
2918
2918
|
background: #ffffff;
|
|
2919
2919
|
border: 1px solid rgba(0, 27, 83, 0.1);
|
|
2920
2920
|
border-radius: 6px;
|
|
2921
|
-
`,
|
|
2921
|
+
`,jg=i.div`
|
|
2922
2922
|
position: absolute;
|
|
2923
2923
|
right: 15px;
|
|
2924
2924
|
height: 100%;
|
|
@@ -2926,12 +2926,12 @@
|
|
|
2926
2926
|
align-items: center;
|
|
2927
2927
|
justify-content: center;
|
|
2928
2928
|
cursor: pointer;
|
|
2929
|
-
`,
|
|
2929
|
+
`,Eg=i.div`
|
|
2930
2930
|
margin: 30px auto 0 auto;
|
|
2931
2931
|
max-width: 578px;
|
|
2932
2932
|
margin-bottom: 10px;
|
|
2933
2933
|
box-sizing: border-box;
|
|
2934
|
-
`,
|
|
2934
|
+
`,vs=i.input`
|
|
2935
2935
|
-webkit-appearance: none;
|
|
2936
2936
|
width: 100%;
|
|
2937
2937
|
background: transparent;
|
|
@@ -2980,21 +2980,21 @@
|
|
|
2980
2980
|
border-color: transparent;
|
|
2981
2981
|
color: transparent;
|
|
2982
2982
|
}
|
|
2983
|
-
`,
|
|
2983
|
+
`,Tg=(e,o)=>e>0?Math.ceil(e/o)*o:o,kg=({videos:e=[],setVideos:o=()=>{},hasProcessingVideos:r,setShouldFetch:s})=>{const{t:n}=W.useTranslation(),{colors:a,isCdkEnviroment:c}=i.useTheme(),{containerWidth:d}=Se(),l=he.useHistory(),[u,g]=p.useState(0),[h,x]=p.useState(0),[y,m]=p.useState(0),[w,f]=p.useState(0),[b,S]=p.useState(10),[T,V]=p.useState(20);p.useEffect(()=>{g(e.reduce(($,R)=>$+R.duration,0)||0),x(e.reduce(($,R)=>$+R.trimDuration,0)||0)},[e]),p.useEffect(()=>{f(60+e.length*100)},[e]),p.useEffect(()=>{function $(){const R=Math.max(Tg(u*b,b),d-223);m(R),V(Math.round(R/b))}$()},[u,b,d]);const I=$=>{if(e.length===1){l.push("/");return}try{const R=localStorage.getItem(ze.merge),j=e[$],P=(JSON.parse(R||"")||[]).filter(M=>M.id.toString()!==j.id.toString());localStorage.setItem(ze.merge,JSON.stringify(P))}catch(R){console.log(R)}o(R=>{const j=[...R];return j.splice($,1),j})},L=($,R)=>{o(j=>{const A=[...j];return A[$].ref=R,A})},v=$=>{if($===0)return 0;const R=e[$-1],j=e[$];return $===1?R.endSec*b-j.startSec*b:R.trimDuration*b+R.startSec*b-j.startSec*b+v($-1)},C=async $=>{if(!$.destination)return;const R=la(e,$.source.index,$.destination.index);o(R)};return t.jsxs(ag,{children:[r&&t.jsx(Eg,{children:t.jsx(fs,{text:"Some of the videos are still processing. Please wait until they are done, and then proceed with merging."})}),t.jsx(xg,{children:e&&!!e.length&&t.jsx(og,{width:592,height:332,displayVideos:e,hasProcessingVideos:r})}),t.jsxs(cg,{children:[t.jsxs(mg,{children:[t.jsx(Cg,{children:t.jsx(F.Button,{variant:"white",icon:t.jsx(os,{height:21,width:21}),text:n("Add More Videos"),onClick:()=>{l.push("/?add-more")}})}),d>z.mb&&t.jsxs(Sg,{children:[t.jsx(_n,{onClick:()=>!r&&b>10&&S(b-5),disabled:r||b===10,children:t.jsx(Y1,{width:24,height:24,color:a.primary[100]})}),t.jsx(vs,{type:"range",onChange:$=>S($.target.value),min:10,max:200,value:b,disabled:r,style:{width:"100px",height:"4px",backgroundColor:"#d0d3d9",boxShadow:"0px 0px 4px rgba(66, 79, 104, 0.08),0px 6px 12px rgba(66, 79, 104, 0.06)"}}),t.jsx(_n,{onClick:()=>!r&&b<200&&S(b+5),disabled:b===200||r,children:t.jsx(Z1,{width:24,height:24,color:a.primary[100]})})]})]}),t.jsxs(lg,{children:[t.jsx(dg,{children:t.jsx(Ro.DragDropContext,{onDragEnd:C,children:t.jsx(Ro.Droppable,{droppableId:"videos",children:$=>t.jsxs("div",{ref:$.innerRef,...$.droppableProps,children:[e.map((R,j)=>t.jsx(Ro.Draggable,{draggableId:R.id.toString(),index:j,isDragDisabled:r,children:A=>t.jsx("div",{ref:A.innerRef,...A.draggableProps,...A.dragHandleProps,children:t.jsx(q1,{index:j,video:R,setVideos:o,removeVideo:I,setVideoRef:L,isDragDisabled:r,setShouldFetch:s},`${R.id}${j}thumb`)})},R.id)),$.placeholder]})})})}),t.jsxs(hg,{height:w,id:"row-container",children:[d>z.mb&&t.jsxs(pg,{width:y,children:[t.jsx(fg,{children:[...Array(Math.round(T/12)).keys()].map($=>t.jsxs(wg,{width:12*b,children:[t.jsx("span",{children:Vt($*12,0)}),$+1===Math.round(T/12)&&t.jsx("span",{children:Vt(($+1)*12,0)})]},$))}),t.jsx(vg,{children:[...Array(T).keys()].map($=>t.jsx(bg,{width:b,rightBorder:$+1===T,inside:$>=e[0].startSec&&$<=e[0].startSec+h},$))})]}),t.jsx(gg,{children:e.map(($,R)=>t.jsx(yg,{children:t.jsx(jg,{children:t.jsx(ng,{onClick:()=>I(R),height:20,width:20,color:c?a.primary[100]:a.white[100],bgColor:c?a.white[100]:a.danger[40]})})},`${$.id}${R}`))}),d>z.mb&&t.jsx(ug,{children:e.map(($,R)=>t.jsx(F1,{index:R,totalDuration:u,offset:v(R),width:$.duration*b,video:$,setVideos:o,hasProcessingVideos:r,showPreviewTrack:!1},`${$.id}${R}row`))})]})]})]})]})},Ig=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",width:24,height:24,viewBox:"3 3 18 18",...e},k.createElement("path",{fill:"#001B53",fillRule:"evenodd",d:"M17 3H3v18h18V7l-4-4zm-5 16c-1.66 0-3-1.34-3-3s1.34-3 3-3 3 1.34 3 3-1.34 3-3 3zm3-10H5V5h10v4z"})),bs=i(Ig)`
|
|
2984
2984
|
width: ${e=>e.width||"24px"};
|
|
2985
2985
|
height: ${e=>e.height||"24px"};
|
|
2986
2986
|
path {
|
|
2987
2987
|
fill: ${e=>e.color||"currentColor"};
|
|
2988
2988
|
opacity: ${e=>e.opacity||"inherit"};
|
|
2989
2989
|
}
|
|
2990
|
-
`,
|
|
2990
|
+
`,Ag=e=>k.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",xmlnsXlink:"http://www.w3.org/1999/xlink",width:24,height:24,viewBox:"0 0 24 24",...e},k.createElement("g",{fill:"#E84C3D"},k.createElement("path",{d:"M6 19c0 1.1.9 2 2 2h8c1.1 0 2-.9 2-2V9c0-1.1-.9-2-2-2H8c-1.1 0-2 .9-2 2v10zm3.17-7.83c.39-.39 1.02-.39 1.41 0L12 12.59l1.42-1.42c.39-.39 1.02-.39 1.41 0 .39.39.39 1.02 0 1.41L13.41 14l1.42 1.42c.39.39.39 1.02 0 1.41-.39.39-1.02.39-1.41 0L12 15.41l-1.42 1.42c-.39.39-1.02.39-1.41 0-.187-.187-.293-.44-.293-.705 0-.265.106-.518.293-.705L10.59 14l-1.42-1.42c-.39-.38-.39-1.02 0-1.41zM15.5 4l-.71-.71c-.18-.18-.44-.29-.7-.29H9.91c-.26 0-.52.11-.7.29L8.5 4H6c-.55 0-1 .45-1 1s.45 1 1 1h12c.55 0 1-.45 1-1s-.45-1-1-1h-2.5z"}))),Rg=i(Ag)`
|
|
2991
2991
|
width: ${e=>e.width||"24px"};
|
|
2992
2992
|
height: ${e=>e.height||"24px"};
|
|
2993
2993
|
g {
|
|
2994
2994
|
fill: ${e=>e.color||"currentColor"};
|
|
2995
2995
|
opacity: ${e=>e.opacity||"inherit"};
|
|
2996
2996
|
}
|
|
2997
|
-
|
|
2997
|
+
`,$g=i.label`
|
|
2998
2998
|
display: flex;
|
|
2999
2999
|
align-items: center;
|
|
3000
3000
|
margin: 0;
|
|
@@ -3003,17 +3003,17 @@
|
|
|
3003
3003
|
&:hover {
|
|
3004
3004
|
cursor: pointer;
|
|
3005
3005
|
}
|
|
3006
|
-
`,
|
|
3006
|
+
`,Vg=i.div`
|
|
3007
3007
|
display: flex;
|
|
3008
3008
|
flex-direction: column;
|
|
3009
3009
|
justify-content: space-between;
|
|
3010
3010
|
position: relative;
|
|
3011
3011
|
background-color: ${E.white};
|
|
3012
|
-
|
|
3012
|
+
`,Lg=i.div`
|
|
3013
3013
|
display: flex;
|
|
3014
3014
|
flex-direction: column;
|
|
3015
3015
|
padding: 32px;
|
|
3016
|
-
`,
|
|
3016
|
+
`,Mg=i.div`
|
|
3017
3017
|
display: flex;
|
|
3018
3018
|
flex-direction: row;
|
|
3019
3019
|
font-size: 18px;
|
|
@@ -3024,11 +3024,11 @@
|
|
|
3024
3024
|
p {
|
|
3025
3025
|
margin: 0;
|
|
3026
3026
|
}
|
|
3027
|
-
`,
|
|
3027
|
+
`,Dg=i.p`
|
|
3028
3028
|
font-size: 14px;
|
|
3029
3029
|
line-height: 1.43;
|
|
3030
3030
|
color: ${E.black_1_100};
|
|
3031
|
-
`,
|
|
3031
|
+
`,Og=i.section`
|
|
3032
3032
|
display: flex;
|
|
3033
3033
|
flex-direction: row;
|
|
3034
3034
|
width: 528px;
|
|
@@ -3037,22 +3037,22 @@
|
|
|
3037
3037
|
justify-content: flex-end;
|
|
3038
3038
|
align-items: right;
|
|
3039
3039
|
padding: 0 32px 32px;
|
|
3040
|
-
`,
|
|
3040
|
+
`,Ng=({open:e=!1,disableSave:o=!1,infoBoxText:r,title:s="",text:n="",discardButtonText:a="Keep video",confirmButtonText:c="Delete video",onClickDiscardButton:d,onClickConfirmButton:l,showDiscardIcon:u=!0,showSaveIcon:g=!0,handleModalClose:h=()=>{}})=>{const{isCdkEnviroment:x}=i.useTheme();return e?t.jsx(Co,{disableFullScreen:!0,style:{position:"fixed",zIndex:999},children:t.jsxs(Vg,{children:[t.jsxs(Lg,{children:[t.jsxs(Mg,{children:[t.jsx("p",{children:s}),t.jsx($g,{children:t.jsx(Et,{width:"24px",height:"24px",onClick:h})})]}),t.jsx(Dg,{children:n}),r&&t.jsx(fs,{text:r,width:"430px"})]}),t.jsxs(Og,{children:[t.jsx(F.Button,{...!!u&&{icon:t.jsx(Rg,{height:24,width:24})},text:a,onClick:d,variant:x?"text":"secondary"}),t.jsx(F.Button,{...!!g&&{icon:t.jsx(bs,{height:16,width:16})},text:c,onClick:l,disabled:o})]})]})}):null},Eo=({when:e,navigate:o=()=>{},shouldBlockNavigation:r,onConfirm:s=()=>{},onDiscard:n=()=>{},onStay:a=()=>{},stay:c=!1,title:d,text:l,discardButtonText:u,confirmButtonText:g,showDiscardIcon:h=!0,showSaveIcon:x=!0,infoBoxText:y,disableSave:m})=>{const{t:w}=W.useTranslation(),f=d||w("Leave without saving changes?"),b=l||w("Your updates will not be saved. This action can’t be undone."),S=u||w("Discard Changes"),T=g||w("Save Changes"),[V,I]=p.useState(!1),[L,v]=p.useState(null),[C,$]=p.useState(!1),R=()=>{I(!1)},j=N=>!C&&r(N)?(I(!0),v(N),!1):!0,A=()=>{s(),I(!1),$(!0)},P=()=>{n(),I(!1),$(!0)},M=()=>{R(),a()};return p.useEffect(()=>{C&&L&&o(L.pathname)},[C,L]),t.jsxs(t.Fragment,{children:[t.jsx(he.Prompt,{when:e,message:j}),t.jsx(Ng,{open:V,title:f,text:b,discardButtonText:S,confirmButtonText:T,showDiscardIcon:h,showSaveIcon:x,handleModalClose:R,onClickDiscardButton:P,onClickConfirmButton:c?M:A,infoBoxText:y,disableSave:m})]})};var ws=(e=>(e.ORGANIZATION_VIDEO="ORGANIZATION_VIDEO",e.LESA_VEHICLE="LESA_VEHICLE",e.VIDEO="VIDEO",e.WHEELS_TV="WHEELS_TV",e))(ws||{});const Pg=i.main`
|
|
3041
3041
|
background: ${E.gray10};
|
|
3042
|
-
`,
|
|
3042
|
+
`,Fg=()=>{const{t:e}=W.useTranslation(),{trackGTMSaveNewVideoInteractionEvent:o}=Ge(),{isCdkEnviroment:r}=i.useTheme(),{trackVideoSpecificPagesManually:s}=bt({vin:""}),n=he.useLocation(),c=(new URLSearchParams(n.search).get("videos")||"").split(",").filter(Boolean),[d,l]=p.useState({}),[u,g]=p.useState(c.map(v=>({id:v}))),h=he.useHistory(),[x,y]=k.useState(!1),[m,w]=k.useState(!1),[f,b]=k.useState(!0),[S,T]=p.useState(!0),V=v=>v.pathname==="/"&&(v.search==="?add-more"||v.search==="?merged")?!1:!m;p.useEffect(()=>{f||s==null||s({...vt.VIDEOS_MERGE,mergeIds:c.map(v=>Number(v))})},[f]),p.useEffect(()=>{if(S){const v=localStorage.getItem(ze.merge),C=JSON.parse(v);let $={};C==null||C.forEach(R=>{$[R.id]=R}),l($),T(!1)}},[S]),p.useEffect(()=>{b(!0),Object.values(d).forEach(async v=>{const C=await wo(v.id);g($=>[...$].map(j=>{const A={sourceType:ws.VIDEO,sourceId:Number(j.id)};return j.id.toString()===v.id.toString()?{...j,...v,source:C.videoSource,flvName:C.flvName+".mp4",start:"00:00:00:00",sourceType:A}:{...j,sourceType:A}}))}),b(!1)},[d]);const I=async v=>{var A,P;window.localStorage.removeItem(ze.merge);const C=1e3*u.reduce((M,N)=>M+N.trimDuration,0),$=u.filter(M=>M.sourceType!==void 0).map(M=>M.sourceType),R=await wa({videos:u.map(M=>({start:M.start,end:M.end,id:M.id,flvName:M.flvName})),videoName:v,duration:C,...$.length>0&&{sources:$}}),j={videoId:Number(R.id),videoType:((A=R==null?void 0:R.videoRequest)==null?void 0:A.videoType)||void 0,videoCustomerName:!!((P=R==null?void 0:R.videoRequest)!=null&&P.customerName),videoLength:R.videoLength,videoTitle:R.title};o==null||o({type:So.MERGE,videoAttributes:j,mergedIds:u.map(M=>Number(M.id))}),w(!0),h.push("/?merged")};if(f)return t.jsx(Ue,{isLoading:f});const L=!!u.find(v=>(v==null?void 0:v.processing)===At.PROCESSING);return t.jsxs(Pg,{children:[u.length>=2&&t.jsx(Eo,{when:!0,navigate:v=>{h.push(v)},stay:!0,onStay:()=>y(!0),onConfirm:()=>{},shouldBlockNavigation:v=>V(v),disableSave:L,infoBoxText:L?e("Some of the videos are still processing. Please wait until they are done, and then proceed with merging."):""}),t.jsx(Ke,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>{window.localStorage.removeItem(ze.merge),h.push("/")},extendStyles:{container:{color:"white"}}}),center:t.jsx(Yt,{children:e("Merge Videos")}),right:t.jsx(F.Button,{variant:r?"white":"primary",onClick:()=>y(!0),text:e("Save"),disabled:!u||u.length<2||L})}),t.jsx(kg,{videos:u,setVideos:g,hasProcessingVideos:L,setShouldFetch:T}),x&&t.jsx(gs,{title:e("Name new video"),label:e("Give your new video a name"),defaultValue:"",secondaryButtonText:e("Back"),primaryButtonText:e("Save Video"),handleSubmit:v=>I(v),handleModalClose:()=>y(!1)})]})},zg=({onSaveVideo:e,isSaveDisabled:o,setInsertAfterSave:r,uploadLoading:s})=>{const{t:n}=W.useTranslation(),{isCdkEnviroment:a,colors:c}=i.useTheme(),d=he.useHistory(),{showInsertFeature:l,containerWidth:u}=Se();return t.jsx(Ke,{left:t.jsx(F.Button,{text:n("Back"),variant:"transparent",icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>{d.push("/")},style:{color:"white"}}),center:t.jsx(Yt,{children:""}),right:t.jsxs(t.Fragment,{children:[t.jsx(F.Button,{onClick:()=>{e()},text:n("Save"),variant:a?"white":"secondary",disabled:o||s,icon:s?t.jsx(rt,{size:12}):t.jsx(bs,{height:"15px"})}),l&&t.jsx(F.Button,{onClick:()=>{r(!0),e()},text:u>z.sm?n("Continue to Insert"):n("Insert"),disabled:o||s,variant:a?"white":"primary"})]})})},ct={all:[],user:[]},_g=async({page:e=0,size:o=50,search:r="",all:s=!1,sort:n,refresh:a=!0})=>{var l,u;const c={start:e*o,limit:o,search:r,sort:n,all:""};if(s&&(c.all="true"),!a){if(s&&((l=ct==null?void 0:ct.all)!=null&&l.length))return ct.all;if(!s&&((u=ct==null?void 0:ct.user)!=null&&u.length))return ct.user}const{data:d}=await ie.get("/video-tags",{params:c});return s?ct.all=d:ct.user=d,d},Bg=async(e,o)=>({videoTags:(await ie.put(`/videos/${e}/video-tags`,o)).data}),Ug=i.div`
|
|
3043
3043
|
font-style: normal;
|
|
3044
3044
|
font-weight: 500;
|
|
3045
3045
|
font-size: 14px;
|
|
3046
3046
|
line-height: 20px;
|
|
3047
3047
|
color: ${e=>e.color||E.gray60};
|
|
3048
|
-
`,Pt=({text:e,color:o})=>t.jsx(
|
|
3048
|
+
`,Pt=({text:e,color:o})=>t.jsx(Ug,{color:o,children:e}),Wg=e=>k.createElement("svg",{width:16,height:14,viewBox:"0 0 16 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.5833 0.333252C13.1333 0.333252 13.6 0.683252 13.7667 1.17492L15.4083 5.89992C15.4667 6.07492 15.5 6.26659 15.5 6.44992V12.4166C15.5 13.1083 14.9333 13.6666 14.25 13.6666C13.5583 13.6666 13 13.0999 13 12.4166V11.9999H3V12.4166C3 13.1083 2.44167 13.6666 1.75 13.6666C1.05833 13.6666 0.5 13.1083 0.5 12.4166V6.44992C0.5 6.25825 0.533333 6.07492 0.591667 5.89992L2.23333 1.17492C2.40833 0.683252 2.86667 0.333252 3.41667 0.333252H12.5833ZM2.16667 8.24992C2.16667 8.94159 2.725 9.49992 3.41667 9.49992C4.10833 9.49992 4.66667 8.94159 4.66667 8.24992C4.66667 7.55825 4.10833 6.99992 3.41667 6.99992C2.725 6.99992 2.16667 7.55825 2.16667 8.24992ZM12.5833 9.49992C11.8917 9.49992 11.3333 8.94159 11.3333 8.24992C11.3333 7.55825 11.8917 6.99992 12.5833 6.99992C13.275 6.99992 13.8333 7.55825 13.8333 8.24992C13.8333 8.94159 13.275 9.49992 12.5833 9.49992ZM3.225 2.14992L2.16667 5.33325H13.8333L12.775 2.14992C12.6583 1.81659 12.3417 1.58325 11.9833 1.58325H4.01667C3.65833 1.58325 3.34167 1.81659 3.225 2.14992Z",fill:"#001B53",fillOpacity:.4})),Hg=i(Wg)`
|
|
3049
3049
|
width: ${e=>e.width||"24px"};
|
|
3050
3050
|
height: ${e=>e.height||"24px"};
|
|
3051
3051
|
g {
|
|
3052
3052
|
fill: ${e=>e.color||"currentColor"};
|
|
3053
3053
|
opacity: ${e=>e.opacity||"inherit"};
|
|
3054
3054
|
}
|
|
3055
|
-
`,
|
|
3055
|
+
`,qg=e=>k.createElement("svg",{width:12,height:12,viewBox:"0 0 12 12",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",null,k.createElement("path",{d:"M11.3327 3.99935C11.3327 3.63268 11.0327 3.33268 10.666 3.33268H8.66602V1.33268C8.66602 0.966016 8.36602 0.666016 7.99935 0.666016C7.63268 0.666016 7.33268 0.966016 7.33268 1.33268V3.33268H4.66602V1.33268C4.66602 0.966016 4.36602 0.666016 3.99935 0.666016C3.63268 0.666016 3.33268 0.966016 3.33268 1.33268V3.33268H1.33268C0.966016 3.33268 0.666016 3.63268 0.666016 3.99935C0.666016 4.36602 0.966016 4.66602 1.33268 4.66602H3.33268V7.33268H1.33268C0.966016 7.33268 0.666016 7.63268 0.666016 7.99935C0.666016 8.36602 0.966016 8.66602 1.33268 8.66602H3.33268V10.666C3.33268 11.0327 3.63268 11.3327 3.99935 11.3327C4.36602 11.3327 4.66602 11.0327 4.66602 10.666V8.66602H7.33268V10.666C7.33268 11.0327 7.63268 11.3327 7.99935 11.3327C8.36602 11.3327 8.66602 11.0327 8.66602 10.666V8.66602H10.666C11.0327 8.66602 11.3327 8.36602 11.3327 7.99935C11.3327 7.63268 11.0327 7.33268 10.666 7.33268H8.66602V4.66602H10.666C11.0327 4.66602 11.3327 4.36602 11.3327 3.99935ZM7.33268 7.33268H4.66602V4.66602H7.33268V7.33268Z",fill:"#001B53"}))),ys=i(qg)`
|
|
3056
3056
|
width: ${e=>e.width||"14px"};
|
|
3057
3057
|
height: ${e=>e.height||"14px"};
|
|
3058
3058
|
path {
|
|
@@ -3060,7 +3060,7 @@
|
|
|
3060
3060
|
fill-opacity: ${e=>e.opacity||"currentColor"};
|
|
3061
3061
|
opacity: ${e=>e.opacity||"inherit"};
|
|
3062
3062
|
}
|
|
3063
|
-
`,
|
|
3063
|
+
`,Gg=i.div`
|
|
3064
3064
|
margin-top: 16px;
|
|
3065
3065
|
background-color: #f6f7f9;
|
|
3066
3066
|
border-radius: 4px;
|
|
@@ -3069,7 +3069,7 @@
|
|
|
3069
3069
|
display: flex;
|
|
3070
3070
|
justify-content: center;
|
|
3071
3071
|
flex-direction: column;
|
|
3072
|
-
`,
|
|
3072
|
+
`,Yg=i.div`
|
|
3073
3073
|
display: flex;
|
|
3074
3074
|
justify-content: space-between;
|
|
3075
3075
|
`,Ho=i.div`
|
|
@@ -3108,8 +3108,8 @@
|
|
|
3108
3108
|
border-radius: 50px;
|
|
3109
3109
|
position: absolute;
|
|
3110
3110
|
}
|
|
3111
|
-
`,
|
|
3112
|
-
${
|
|
3111
|
+
`,Qg=i.div`
|
|
3112
|
+
${Ri}
|
|
3113
3113
|
font-size: ${yo.m};
|
|
3114
3114
|
color: ${E.blackRgb75};
|
|
3115
3115
|
margin: 0;
|
|
@@ -3117,7 +3117,7 @@
|
|
|
3117
3117
|
margin-bottom: 32px;
|
|
3118
3118
|
min-height: 190px;
|
|
3119
3119
|
position: relative;
|
|
3120
|
-
`,
|
|
3120
|
+
`,Zg=i.progress`
|
|
3121
3121
|
z-index: 1;
|
|
3122
3122
|
margin-top: -14.5px;
|
|
3123
3123
|
width: 100%;
|
|
@@ -3144,7 +3144,7 @@
|
|
|
3144
3144
|
background: ${({color:e})=>e};
|
|
3145
3145
|
border-radius: 15px;
|
|
3146
3146
|
}
|
|
3147
|
-
`,
|
|
3147
|
+
`,Kg=i.div`
|
|
3148
3148
|
width: 100%;
|
|
3149
3149
|
text-align: left;
|
|
3150
3150
|
margin-bottom: 16px;
|
|
@@ -3156,7 +3156,7 @@
|
|
|
3156
3156
|
`,qo=i.div`
|
|
3157
3157
|
position: absolute;
|
|
3158
3158
|
top: 30px;
|
|
3159
|
-
`,Go={width:"24px",zIndex:2,backgroundColor:"f6f7f9"},
|
|
3159
|
+
`,Go={width:"24px",zIndex:2,backgroundColor:"f6f7f9"},Xg=({title:e,beginUploadProcess:o,afterUpload:r,setSavedVideoId:s,file:n,fileName:a})=>{const{t:c}=W.useTranslation(),{colors:d}=i.useTheme(),{userData:l}=me(),[u,g]=p.useState(1),[h,x]=p.useState({loaded:0,total:0,percentage:0}),{presignedUrl:y,fetch:m,loading:w,error:f}=Ki(),{uploadVideo:b,loading:S,data:T,error:V}=ts(),{fetch:I,loading:L,videoData:v,error:C,progress:$}=Qi(),{fetch:R,loading:j,encodeData:A,error:P,progress:M}=Zi(),N=async()=>{n&&m({fileName:a,type:mr})};p.useEffect(()=>{if(o){if(y&&y.url||!e)return;N()}},[o]),p.useEffect(()=>{y&&!w&&!f&&n&&(g(1),b({url:y.url,file:n,contentType:mr,onUploadProgress:O}))},[y]),p.useEffect(()=>{!S&&!V&&T&&n&&(g(2),I({filename:a,title:e}))},[S,T]),p.useEffect(()=>{!L&&!C&&v&&n&&(g(3),s(v.video_id),R({videoId:v.video_id,customerId:l.customerId}))},[L,v]),p.useEffect(()=>{!j&&!P&&A&&n&&r&&r()},[j,A]);const D=()=>u?u==1?h.percentage*50/100:u==2?50+($||0):100:0,O=Y=>{var ne=Math.round(Y.loaded*100/Y.total);x({loaded:Math.floor(Y.loaded/1024),total:Math.floor(Y.total/1024),percentage:ne})},U=Y=>(Y/1e3).toFixed(2);return t.jsx(Qg,{children:t.jsxs(Gg,{children:[t.jsxs(Yg,{children:[t.jsxs(Ho,{isActive:S,children:[t.jsx("span",{children:c(S?"Uploading":"Uploaded")}),h.percentage<100&&t.jsx(qo,{children:t.jsx($o.MoonLoader,{size:19.5,color:d.primary[100],loading:!0})}),(!h.percentage||h.percentage===100)&&t.jsx(Vo.Circle,{style:Go,percent:0,trailWidth:10,strokeWidth:10,strokeColor:d.primary[100]})]}),t.jsxs(Ho,{isActive:L,children:[t.jsx("span",{children:c(L?"Creating":"Created")}),$<100&&t.jsx(qo,{children:t.jsx($o.MoonLoader,{size:19.5,color:d.primary[100],loading:!0})}),(!$||$===100)&&t.jsx(Vo.Circle,{style:Go,percent:0,trailWidth:10,strokeWidth:10,strokeColor:d.primary[100]})]}),t.jsxs(Ho,{isActive:j,children:[t.jsx("span",{children:c(j?"Encoding":"Encoded")}),M<100&&t.jsx(qo,{children:t.jsx($o.MoonLoader,{size:19.5,color:d.primary[100],loading:!0})}),(!M||M===100)&&t.jsx(Vo.Circle,{style:Go,percent:0,trailWidth:10,strokeWidth:10,strokeColor:d.primary[100]})]})]}),t.jsx(Zg,{value:D(),max:100,color:d.primary[100]}),t.jsx(Kg,{children:U(h.loaded)+" MB/"+U(h.total)+" MB"})]})})},Jg=i.div`
|
|
3160
3160
|
width: auto;
|
|
3161
3161
|
margin-top: 8px;
|
|
3162
3162
|
.error {
|
|
@@ -3171,11 +3171,11 @@
|
|
|
3171
3171
|
background-color: #eeeff2;
|
|
3172
3172
|
cursor: not-allowed;
|
|
3173
3173
|
}
|
|
3174
|
-
`,
|
|
3174
|
+
`,e0=i.div`
|
|
3175
3175
|
margin: 24px 0;
|
|
3176
3176
|
display: flex;
|
|
3177
3177
|
flex-direction: column;
|
|
3178
|
-
`,
|
|
3178
|
+
`,t0=i.div`
|
|
3179
3179
|
height: 20px;
|
|
3180
3180
|
font-size: 14px;
|
|
3181
3181
|
font-weight: 500;
|
|
@@ -3185,7 +3185,7 @@
|
|
|
3185
3185
|
letter-spacing: normal;
|
|
3186
3186
|
color: ${E.label};
|
|
3187
3187
|
margin-bottom: 8px;
|
|
3188
|
-
`,
|
|
3188
|
+
`,o0=i.input`
|
|
3189
3189
|
padding-left: 8px;
|
|
3190
3190
|
height: 40px;
|
|
3191
3191
|
width: 100%;
|
|
@@ -3203,7 +3203,7 @@
|
|
|
3203
3203
|
&:focus {
|
|
3204
3204
|
outline: 0;
|
|
3205
3205
|
}
|
|
3206
|
-
`,
|
|
3206
|
+
`,r0=i.textarea`
|
|
3207
3207
|
padding-left: 8px;
|
|
3208
3208
|
width: 242px;
|
|
3209
3209
|
min-width: 242px;
|
|
@@ -3221,14 +3221,14 @@
|
|
|
3221
3221
|
min-width: 368px;
|
|
3222
3222
|
max-width: 368px;
|
|
3223
3223
|
`}
|
|
3224
|
-
`,
|
|
3224
|
+
`,n0=({attributes:e,initValues:o,setIsSaveDisabled:r})=>{const{colors:s}=i.useTheme(),{userData:n}=me(),a=Xe(n),c=st(n),d=pt(n),l=Di(n),[u,g]=k.useState(),{errors:h,validateForm:x,setFieldValue:y}=$e.useFormikContext();k.useEffect(()=>{x(),m()},[e]),k.useEffect(()=>{(u==null?void 0:u.length)!==0?r(!0):r(!1)},[u]);const m=()=>{let f=0;const b=[];return e.forEach(S=>{S&&S.isRequired&&(S.default===""||S.default===null)&&(++f,b.push(S))}),g(b),d&&l&&(f+=1),c&&l&&(f+=2),f},w=(f,b)=>{f!==""&&b.isRequired&&u.find(T=>T.attributeId===b.attributeId)&&g(u.filter(T=>T.attributeId!==b.attributeId)),f===""&&b.isRequired&&!u.find(T=>T.attributeId===b.attributeId)&&g([...u,b])};return!a&&!e.length?null:t.jsx(Jg,{children:e.map((f,b)=>{const S=(!!f.isReadOnly||!!f.isLocked)&&!!o[b],T=!!h[`attributes${b}`],V=!!f.isRequired;let I="";return S&&(I="disabled"),T&&(I+=" error"),t.jsxs(e0,{children:[t.jsxs(t0,{children:[f.title,V&&t.jsx("span",{style:{color:s.primary[100]},children:"*"})]}),f.type==="text"&&t.jsxs(t.Fragment,{children:[t.jsx($e.Field,{name:`attributes${b}`,disabled:S,as:o0,type:"text",required:V,className:I,defaultValue:f.default,onChange:L=>{w(L.target.value,f),y(`attributes${b}`,L.target.value)},onFocus:()=>{x()}}),T?t.jsx("div",{style:{color:"#E84C3D",marginTop:"3px"},children:h[`attributes${b}`]}):t.jsx(t.Fragment,{})]}),f.type==="textarea"&&t.jsxs(t.Fragment,{children:[t.jsx($e.Field,{disabled:S,name:`attributes${b}`,as:r0,defaultValue:f.default,className:I,required:V,type:"text",onChange:L=>{w(L.target.value,f),y(`attributes${b}`,L.target.value)}}),T?t.jsx("div",{style:{color:"#E84C3D",marginTop:"3px"},children:h[`attributes${b}`]}):t.jsx(t.Fragment,{})]}),f.type==="dropdown"&&t.jsx($e.Field,{name:`attributes${b}`,disabled:S,required:V,className:I,children:({field:L,form:v})=>{const{value:C}=L,$=f.dropdownValues.map(R=>({value:R.value,label:R.value}));return t.jsx(Ne,{creatable:!1,isSearchable:!0,disabled:S,maxMenuHeight:100,options:$,defaultValue:$.find(R=>R.value===f.default)||"",value:$.find(R=>R.value==C),onChange:R=>{w(R.value,f),(f.isReadOnly||f.isLocked)&&o[b]?v.setFieldValue(`attributes${b}`,o[b]):v.setFieldValue(`attributes${b}`,R.value)}})}})]},b)})})},i0=i.div`
|
|
3225
3225
|
display: flex;
|
|
3226
3226
|
justify-content: space-between;
|
|
3227
3227
|
box-sizing: border-box;
|
|
3228
3228
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
3229
3229
|
flex-direction: column;
|
|
3230
3230
|
`}
|
|
3231
|
-
`,
|
|
3231
|
+
`,s0=i.div`
|
|
3232
3232
|
box-sizing: border-box;
|
|
3233
3233
|
width: 100%;
|
|
3234
3234
|
${({theme:e})=>e.containerWidth>=z.xs&&i.css`
|
|
@@ -3237,14 +3237,14 @@
|
|
|
3237
3237
|
${({theme:e})=>e.containerWidth<z.xs&&i.css`
|
|
3238
3238
|
margin-top: 8px;
|
|
3239
3239
|
`}
|
|
3240
|
-
`,
|
|
3240
|
+
`,a0=i.div`
|
|
3241
3241
|
box-sizing: border-box;
|
|
3242
3242
|
width: 100%;
|
|
3243
3243
|
${({theme:e})=>e.containerWidth>=z.xs&&i.css`
|
|
3244
3244
|
padding-right: 52px;
|
|
3245
3245
|
width: 50%;
|
|
3246
3246
|
`}
|
|
3247
|
-
`,
|
|
3247
|
+
`,c0=i.div`
|
|
3248
3248
|
box-shadow:
|
|
3249
3249
|
0px 0px 2px rgba(66, 79, 104, 0.08),
|
|
3250
3250
|
0px 4px 8px rgba(66, 79, 104, 0.03);
|
|
@@ -3253,7 +3253,7 @@
|
|
|
3253
3253
|
margin-bottom: ${e=>e.marginBottom||"16px"};
|
|
3254
3254
|
display: grid;
|
|
3255
3255
|
gap: 8px;
|
|
3256
|
-
`,
|
|
3256
|
+
`,l0=i.div`
|
|
3257
3257
|
background-color: ${E.white};
|
|
3258
3258
|
padding: 18px;
|
|
3259
3259
|
display: flex;
|
|
@@ -3261,27 +3261,27 @@
|
|
|
3261
3261
|
border-bottom-left-radius: 6px;
|
|
3262
3262
|
border-bottom-right-radius: 6px;
|
|
3263
3263
|
margin-top: -7px;
|
|
3264
|
-
`,
|
|
3264
|
+
`,d0=i.div`
|
|
3265
3265
|
display: flex;
|
|
3266
3266
|
justify-content: space-between;
|
|
3267
|
-
`,
|
|
3267
|
+
`,u0=i.div`
|
|
3268
3268
|
color: ${({theme:e})=>e.colors.primary[40]};
|
|
3269
|
-
`,
|
|
3269
|
+
`,Cs=i.div`
|
|
3270
3270
|
font-weight: 600;
|
|
3271
3271
|
color: ${({theme:e})=>e.colors.primary[100]};
|
|
3272
3272
|
display: flex;
|
|
3273
3273
|
align-items: center;
|
|
3274
|
-
`,
|
|
3274
|
+
`,p0=i.div`
|
|
3275
3275
|
display: flex;
|
|
3276
3276
|
flex-wrap: wrap;
|
|
3277
3277
|
gap: 4px;
|
|
3278
|
-
`,u0=[0,0],p0=({children:e,...o})=>{var n;const r=o.data.label,s=!((n=o.data)!=null&&n.__isNew__);return t.jsx(Ze.components.Option,{...o,children:t.jsxs(ws,{children:[s&&t.jsx(bs,{style:{marginRight:"8px"},width:15,height:15,color:"inherit"}),r]})})},h0=({recordingBlobUrl:e,recordDate:o,setSaveFunction:r,insertAfterSave:s=!1,setIsSaveDisabled:n,skipUploadProcess:a=!1,videoId:c,initialTitle:d,updateUploadLoading:l})=>{const{t:u}=W.useTranslation(),g=u("Search tags or create new..."),h=!1,{userData:x}=me(),{showTrimFeature:w}=Se(),m=p.useMemo(()=>Si(x,fo),[x,fo]),y=pt(x),f=st(x),b=p.createRef(),[S,T]=p.useState(d||o),[L,I]=p.useState([]),[V,v]=p.useState({value:"",label:u("Select vehicle")}),[C,$]=p.useState({value:"",label:u("Select video type")}),[R,j]=p.useState([]),[A,P]=p.useState(),[M,N]=p.useState([]),[D,O]=p.useState([]),[B,Z]=p.useState({value:"",label:g}),[re,K]=p.useState(!1),[G,H]=p.useState(!1),[U,J]=p.useState({title:"",tags:""}),[ue,ie]=p.useState(),[le,ce]=p.useState(0),[we,Ie]=p.useState({}),[X,se]=p.useState(!0);p.useRef([0,0]);const[Y,_]=p.useState(u0),[de,Ee]=p.useState(!1),[Ae,Q]=p.useState(c||""),[te,ve]=p.useState(),Le=he.useHistory(),Pe=p.useRef(null),{toast:ot}=Te(),De=Object.values(y?Rr:$r).filter(Boolean).map(oe=>({value:oe,label:u(oe)})),ee={};ee.covideoName=S,ee.saveToCompanyFolder=!1;const xe=()=>{let oe={title:"",tags:""};return(!S||!S.length)&&(oe.title=u("Title cannot be empty.")),J(oe),Object.values(oe).every(ge=>ge==="")},ke=()=>{const oe=Pe.current.values;Ie(oe),K(!1),xe()&&(l==null||l(!0),a?Kr(oe):H(!0))},Re=oe=>oe.sort((pe,ge)=>{var Me;return(Me=pe.labelField)==null?void 0:Me.localeCompare(ge.labelField)}),Ve=oe=>{if(!oe||!oe.value)return;const pe=M.some(be=>be.value==oe.value),ge=pe?oe:{value:oe.value,label:oe.label,labelField:oe.label,__isNew__:!0};D.find(be=>be.value===ge.value)||O(be=>[...be||[],ge]),pe||N(Re([...M,ge])),Z(ge)},Ye=(oe,pe)=>{const ge=[...D];if(ge.splice(pe,1),O(ge),Z({value:"",label:g}),B.__isNew__){const Me=[...M],be=M.findIndex(Tt=>Tt.value===oe.value);be>-1&&(Me.splice(be,1),N(Me))}},Ms=async()=>{try{const oe=await Fg({}),pe=[];oe.forEach(Me=>{pe.push({label:Me.tag,value:Me.tagId,labelField:Me.tag})});const ge=Re(pe);N(ge)}catch(oe){console.log(oe)}},Ds=async()=>{try{const oe=await Aa({});j(oe.attributes||[]);const pe=oe.attributes.map((ge,Me)=>{if(ge.type==="dropdown"){const be=ge.dropdownValues.find(Tt=>Tt.default);return be&&be.value?(ee[`attributes${Me}`]=be.value,be.value):(ee[`attributes${Me}`]="","")}return ee[`attributes${Me}`]=ge.default||"",ge.default||""});Pe.current.values=ee,ve(ee),P(pe)}catch(oe){console.log(oe)}},Os=async()=>{try{const oe=await jr({});if(oe.items){const pe=[];oe.items.forEach(ge=>{pe.push({label:t.jsxs(c0,{children:[t.jsxs(ws,{children:[t.jsx(Ug,{style:{marginRight:"8px"},width:15,height:15}),ge.title]}),t.jsx(l0,{children:ge.vin})]}),value:ge.vin,labelField:ge.vin})}),I(pe)}}catch(oe){console.log(oe)}},Ns=async()=>{const oe=D.map(pe=>({value:pe.value,label:pe.labelField,__isNew__:pe.__isNew__}));await zg(Ae,oe)},Ps=async()=>{if(!Xe(x))return 0;const oe={videoId:parseInt(Ae),videoType:(C==null?void 0:C.value)||"",...!!y&&{vin:(V==null?void 0:V.value)||""}};return(await Sa({data:oe})).videoRequestId},Fs=async oe=>{const pe=oe||we,ge=R.map((Me,be)=>({attributeId:Me.attributeId,value:pe[`attributes${be}`]||"",videoId:parseInt(Ae)}));ge&&ge.length&&await Ra(Ae,ge).catch(Me=>Me)},Kr=async oe=>{try{if(D.length&&await Ns(),await Fs(oe),await Ps(),de){const pe=await Bs(Ae);pe&&Q(pe.id)}d&&c&&d!==S&&await ba({videoId:c,videoBody:{title:S}}),K(!0),ot({message:u("Successfully saved video!")})}catch{ot({message:u("There was an error while creating your video request. Please try again.")})}},zs=async()=>{await Ds(),await Ms(),await Os()},_s=async oe=>{try{const pe=await fetch(oe||"").then(ge=>ge.blob());ie(pe)}catch(pe){console.log(pe)}},Bs=async oe=>{const pe=Math.floor(Y[0]*100)/100,ge=Math.floor(Y[1]*100)/100;try{return await ki(oe,{duration:ge,start:pe})}catch{ot({message:u("Something went wrong while trimming the video, try again later!")})}};p.useEffect(()=>{zs()},[]),p.useEffect(()=>{e&&_s(e)},[e]),p.useEffect(()=>{re&&setTimeout(()=>{if(l==null||l(!1),s&&Ae){Le.push(`/insert-video/${Ae}`);return}Le.push("/")},400)},[re,Ae]),p.useEffect(()=>{_([0,le])},[le]),p.useEffect(()=>{const oe=ji({trimStart:Y[0],trimEnd:Y[1],videoDuration:le});return Ee(oe),()=>{Ee(!1)}},[Y,le]),p.useEffect(()=>{n(S==="")},[S]),p.useEffect(()=>{r&&r(()=>ke)},[S,Y,le,V,de]);const Us=async()=>{c&&await fa({videoIds:[c],deleteMultiple:!1})};return t.jsxs("div",{children:[t.jsx(Eo,{when:!0,stay:!0,onConfirm:()=>{},navigate:oe=>{c&&Us(),Le.push(oe)},shouldBlockNavigation:()=>!re,title:u("Delete Current Video?"),text:u("Do you want to go back? The current video will be deleted."),confirmButtonText:u("No, Keep Video "),discardButtonText:u("Yes, Delete Video"),showDiscardIcon:!1,showSaveIcon:!1}),G?t.jsx(Zg,{title:S,beginUploadProcess:G,afterUpload:Kr,setSavedVideoId:Q,file:ue,fileName:m}):t.jsxs(r0,{children:[t.jsxs(i0,{children:[t.jsxs(s0,{children:[t.jsx(Nt,{id:"",videoSource:e,videoRef:b,preventWideSize:!0,borderBottomRadius:"0px",setVideoDuration:ce,setIsVideoLoading:se}),t.jsxs(a0,{children:[t.jsx(fe.IoMdCalendar,{size:16,color:E.gray40,style:{marginRight:6}}),t.jsx("div",{children:ia()})]})]}),h]}),t.jsx(n0,{children:t.jsx($e.Formik,{enableReinitialize:!0,innerRef:Pe,initialValues:te,validateOnMount:!0,onSubmit:()=>{},children:({errors:oe,isValid:pe,values:ge,setFieldValue:Me})=>t.jsxs($e.Form,{children:[t.jsxs(lo,{children:[t.jsx(Pt,{text:u("Title")}),!!U.title&&t.jsx(Pt,{text:U.title,color:E.red100}),t.jsx(Gt,{type:"text",onChange:be=>T(be.target.value),value:S,...U.title&&{borderColor:E.red100}})]}),t.jsxs(lo,{marginBottom:"8px",children:[t.jsx(Pt,{text:u("Tags")}),!!U.tags&&t.jsx(Pt,{text:U.tags,color:E.red100}),t.jsx(Ne,{options:M.filter(be=>!be||!D.length||!D.some(Tt=>Tt.value===be.value)),placeholder:g,controlShouldRenderValue:!1,value:B,onChange:be=>Ve(be),isSearchable:!0,creatable:!0,extendStyles:{control:{...U.tags&&{borderColor:E.red100}}},customComponents:{Option:p0}}),t.jsx(d0,{children:D.map((be,Tt)=>t.jsx(F.Button,{icon:t.jsx(bs,{width:15,height:15}),text:be.label,onClick:()=>Ye(be,Tt),size:"small",variant:"white"},be.value))})]}),y&&t.jsxs(lo,{children:[t.jsx(Pt,{text:u("VIN / search vehicle")}),t.jsx(Ne,{options:L,value:V,onChange:be=>v(be),isSearchable:!0,isClearable:!!(V!=null&&V.value),creatable:!1})]}),(f||y)&&t.jsxs(lo,{marginBottom:"8px",children:[t.jsx(Pt,{text:u("Video Type")}),t.jsx(Ne,{options:De,value:C,onChange:be=>$(be),isSearchable:!0,isClearable:!!(C!=null&&C.value),creatable:!1})]}),t.jsx(o0,{attributes:R||[],initValues:A,setIsSaveDisabled:n})]})})})]})]})},g0={id:"",title:"",recordDate:"",views:"0",videoLength:0,thumbnail:"",videoSource:"",tags:[],videoRequest:{videoRequestId:"0"},folder:"",processing:0,autogeneratedThumbnail:""},m0=()=>{const{videoId:e}=he.useParams(),[o,r]=p.useState(g0),[s,n]=p.useState(!0),[a,c]=p.useState(),[d,l]=p.useState(!1),[u,g]=p.useState(!1),[h,x]=p.useState(!1),w=y=>x(y),m=async()=>{if(!e)return;const y=await wo(e);y&&(r(y),n(!1))};return p.useEffect(()=>{o.id||m()},[]),s?t.jsx(Ue,{isLoading:s}):t.jsxs("div",{children:[t.jsx(Pg,{onSaveVideo:a||(()=>{}),setInsertAfterSave:l,isSaveDisabled:u,uploadLoading:h}),t.jsx(ut,{children:t.jsx(h0,{recordingBlobUrl:o.videoSource,recordDate:o.recordDate,insertAfterSave:d,setSaveFunction:c,setIsSaveDisabled:g,skipUploadProcess:!0,videoId:e,initialTitle:o.title,updateUploadLoading:w})})]})},x0=(e,o)=>{const r=new AudioContext,s=r.createMediaStreamSource(e),n=r.createMediaStreamSource(o),a=r.createMediaStreamDestination(),c=r.createGain(),d=r.createGain();return c.gain.value=.7,d.gain.value=.7,s.connect(c).connect(a),n.connect(d).connect(a),a.stream.getTracks()},f0=async(e,o,r)=>{const s={video:{...r,displaySurface:"monitor"},audio:!0},n=await navigator.mediaDevices.getDisplayMedia(s);e.current=n;const a=n.getAudioTracks();if(o){const c=await navigator.mediaDevices.getUserMedia({audio:o});if(a.length>0){const l=[...n.getVideoTracks(),...x0(n,c)];return new MediaStream(l)}const d=[...n.getVideoTracks(),...c.getAudioTracks()];return new MediaStream(d)}return n},Bn=async(e,o,r)=>{const s=await navigator.mediaDevices.getUserMedia({audio:o,video:{...r,deviceId:{exact:r.deviceId}}});return e.current=s,e.current},v0=async(e,o,r,s,n)=>{const a={video:{displaySurface:"monitor",logicalSurface:!0,cursor:"always"}},c=await navigator.mediaDevices.getUserMedia({audio:r,video:s});n.current&&(n.current.srcObject=c,n.current.muted=!0,await n.current.play(),n.current.requestPictureInPicture());const d=await navigator.mediaDevices.getDisplayMedia(a);e.current=d,o.current=c;const l=new MediaStream;return c.getAudioTracks().forEach(u=>{l.addTrack(u)}),d.getVideoTracks().forEach(u=>{l.addTrack(u)}),l},b0=async(e,o,r,s,n)=>{const a={video:{displaySurface:"browser",logicalSurface:!0,cursor:"always"}},c=await navigator.mediaDevices.getDisplayMedia(a),d=await navigator.mediaDevices.getUserMedia({audio:r,video:s});e.current=c,o.current=d;const l=new MediaStream;return d.getAudioTracks().forEach(u=>{l.addTrack(u)}),c.getVideoTracks().forEach(u=>{l.addTrack(u)}),n.current&&(n.current.srcObject=d,n.current.muted=!0,await n.current.play()),l},w0=()=>new Promise(async(e,o)=>{let r=await navigator.mediaDevices.enumerateDevices();if(Wt.some(r,{label:""}))try{const s=await navigator.mediaDevices.getUserMedia({audio:!0,video:!0});r=await navigator.mediaDevices.enumerateDevices(),s.getTracks().forEach(n=>n.stop())}catch(s){o(s)}e(r)});var xr=(e=>(e.AUDIO_INPUT="audioinput",e.VIDEO_INPUT="videoinput",e))(xr||{}),Fe=(e=>(e.LOW="low",e.STANDARD="standard",e.HIGH="high",e))(Fe||{});const ys=p.createContext({}),Cs="record_settings",Un={audioSource:null,videoSource:null,videoQuality:Fe.STANDARD},y0=(e,o)=>{try{const r=localStorage.getItem(Cs);return r?JSON.parse(r):{videoQuality:Fe.STANDARD,videoSource:o,audioSource:e}}catch(r){return console.error("Error parsing user settings from localStorage:",r),{videoQuality:Fe.STANDARD,videoSource:o,audioSource:e}}},C0=({children:e})=>{const{t:o}=W.useTranslation(),r={label:o("No Audio"),value:!1},s={label:o("No Video"),value:!1},[n,a]=p.useState({audioSource:[],videoSource:[]}),[c,d]=p.useState(Un),[l,u]=p.useState(null),[g,h]=p.useState(Un),x=()=>{u(o("You do not have the necessary permissions to access this feature. Please check your browser permissions."))},w=async()=>{var y;try{const f=await w0(),S=(Array.isArray(f)?f:[]).reduce((V,v)=>(v.kind===xr.AUDIO_INPUT?V.audio.push({label:v.label,value:v.deviceId}):v.kind===xr.VIDEO_INPUT&&V.video.push({label:v.label,value:v.deviceId}),V),{audio:[],video:[]}),T=S.audio.find(V=>V.value==="default")||r,L=((y=S.video)==null?void 0:y[0])||s,I=y0(T,L);a({audioSource:[...S.audio,r],videoSource:S.video}),d(I),h(I),u(null)}catch{x(),a({audioSource:[r],videoSource:[s]})}},m=()=>{h(c),localStorage.setItem(Cs,JSON.stringify(c))};return p.useEffect(()=>{var f;const y=()=>{w()};if(((f=navigator==null?void 0:navigator.mediaDevices)==null?void 0:f.ondevicechange)!==void 0)return navigator.mediaDevices.addEventListener("devicechange",y),w(),()=>{navigator.mediaDevices.removeEventListener("devicechange",y)};console.log("The navigator.mediaDevices API is not supported in this browser."),y()},[]),t.jsx(ys.Provider,{value:{recorderSettings:n,userSettings:c,setUserSettings:d,recordingError:l,updateErrorMessage:x,initialUserSettings:g,onSubmitModalHandler:m},children:e})},_r=()=>{const e=p.useContext(ys);if(e===void 0)throw new Error("useRecordSettings must be used within a RecordSettingsProvider");return e},S0=i.div`
|
|
3278
|
+
`,h0=[0,0],g0=({children:e,...o})=>{var n;const r=o.data.label,s=!((n=o.data)!=null&&n.__isNew__);return t.jsx(Ze.components.Option,{...o,children:t.jsxs(Cs,{children:[s&&t.jsx(ys,{style:{marginRight:"8px"},width:15,height:15,color:"inherit"}),r]})})},m0=({recordingBlobUrl:e,recordDate:o,setSaveFunction:r,insertAfterSave:s=!1,setIsSaveDisabled:n,skipUploadProcess:a=!1,videoId:c,initialTitle:d,updateUploadLoading:l})=>{const{t:u}=W.useTranslation(),g=u("Search tags or create new..."),h=!1,{userData:x}=me(),{showTrimFeature:y}=Se(),m=p.useMemo(()=>Ei(x,fo),[x,fo]),w=pt(x),f=st(x),b=p.createRef(),[S,T]=p.useState(d||o),[V,I]=p.useState([]),[L,v]=p.useState({value:"",label:u("Select vehicle")}),[C,$]=p.useState({value:"",label:u("Select video type")}),[R,j]=p.useState([]),[A,P]=p.useState(),[M,N]=p.useState([]),[D,O]=p.useState([]),[U,Y]=p.useState({value:"",label:g}),[ne,K]=p.useState(!1),[G,q]=p.useState(!1),[ee,B]=p.useState({title:"",tags:""}),[de,te]=p.useState(),[se,ae]=p.useState(0),[xe,Ie]=p.useState({}),[X,ce]=p.useState(!0);p.useRef([0,0]);const[Q,_]=p.useState(h0),[ue,Ee]=p.useState(!1),[Ae,Z]=p.useState(c||""),[oe,be]=p.useState(),Le=he.useHistory(),Pe=p.useRef(null),{toast:ot}=Te(),De=Object.values(w?Rr:$r).filter(Boolean).map(re=>({value:re,label:u(re)})),J={};J.covideoName=S,J.saveToCompanyFolder=!1;const fe=()=>{let re={title:"",tags:""};return(!S||!S.length)&&(re.title=u("Title cannot be empty.")),B(re),Object.values(re).every(ge=>ge==="")},ke=()=>{const re=Pe.current.values;Ie(re),K(!1),fe()&&(l==null||l(!0),a?Kr(re):q(!0))},Re=re=>re.sort((pe,ge)=>{var Me;return(Me=pe.labelField)==null?void 0:Me.localeCompare(ge.labelField)}),Ve=re=>{if(!re||!re.value)return;const pe=M.some(we=>we.value==re.value),ge=pe?re:{value:re.value,label:re.label,labelField:re.label,__isNew__:!0};D.find(we=>we.value===ge.value)||O(we=>[...we||[],ge]),pe||N(Re([...M,ge])),Y(ge)},Ye=(re,pe)=>{const ge=[...D];if(ge.splice(pe,1),O(ge),Y({value:"",label:g}),U.__isNew__){const Me=[...M],we=M.findIndex(Tt=>Tt.value===re.value);we>-1&&(Me.splice(we,1),N(Me))}},Os=async()=>{try{const re=await _g({}),pe=[];re.forEach(Me=>{pe.push({label:Me.tag,value:Me.tagId,labelField:Me.tag})});const ge=Re(pe);N(ge)}catch(re){console.log(re)}},Ns=async()=>{try{const re=await $a({});j(re.attributes||[]);const pe=re.attributes.map((ge,Me)=>{if(ge.type==="dropdown"){const we=ge.dropdownValues.find(Tt=>Tt.default);return we&&we.value?(J[`attributes${Me}`]=we.value,we.value):(J[`attributes${Me}`]="","")}return J[`attributes${Me}`]=ge.default||"",ge.default||""});Pe.current.values=J,be(J),P(pe)}catch(re){console.log(re)}},Ps=async()=>{try{const re=await jr({});if(re.items){const pe=[];re.items.forEach(ge=>{pe.push({label:t.jsxs(d0,{children:[t.jsxs(Cs,{children:[t.jsx(Hg,{style:{marginRight:"8px"},width:15,height:15}),ge.title]}),t.jsx(u0,{children:ge.vin})]}),value:ge.vin,labelField:ge.vin})}),I(pe)}}catch(re){console.log(re)}},Fs=async()=>{const re=D.map(pe=>({value:pe.value,label:pe.labelField,__isNew__:pe.__isNew__}));await Bg(Ae,re)},zs=async()=>{if(!Xe(x))return 0;const re={videoId:parseInt(Ae),videoType:(C==null?void 0:C.value)||"",...!!w&&{vin:(L==null?void 0:L.value)||""}};return(await Ea({data:re})).videoRequestId},_s=async re=>{const pe=re||xe,ge=R.map((Me,we)=>({attributeId:Me.attributeId,value:pe[`attributes${we}`]||"",videoId:parseInt(Ae)}));ge&&ge.length&&await Va(Ae,ge).catch(Me=>Me)},Kr=async re=>{try{if(D.length&&await Fs(),await _s(re),await zs(),ue){const pe=await Ws(Ae);pe&&Z(pe.id)}d&&c&&d!==S&&await ya({videoId:c,videoBody:{title:S}}),K(!0),ot({message:u("Successfully saved video!")})}catch{ot({message:u("There was an error while creating your video request. Please try again.")})}},Bs=async()=>{await Ns(),await Os(),await Ps()},Us=async re=>{try{const pe=await fetch(re||"").then(ge=>ge.blob());te(pe)}catch(pe){console.log(pe)}},Ws=async re=>{const pe=Math.floor(Q[0]*100)/100,ge=Math.floor(Q[1]*100)/100;try{return await Ai(re,{duration:ge,start:pe})}catch{ot({message:u("Something went wrong while trimming the video, try again later!")})}};p.useEffect(()=>{Bs()},[]),p.useEffect(()=>{e&&Us(e)},[e]),p.useEffect(()=>{ne&&setTimeout(()=>{if(l==null||l(!1),s&&Ae){Le.push(`/insert-video/${Ae}`);return}Le.push("/")},400)},[ne,Ae]),p.useEffect(()=>{_([0,se])},[se]),p.useEffect(()=>{const re=Ti({trimStart:Q[0],trimEnd:Q[1],videoDuration:se});return Ee(re),()=>{Ee(!1)}},[Q,se]),p.useEffect(()=>{n(S==="")},[S]),p.useEffect(()=>{r&&r(()=>ke)},[S,Q,se,L,ue]);const Hs=async()=>{c&&await ba({videoIds:[c],deleteMultiple:!1})};return t.jsxs("div",{children:[t.jsx(Eo,{when:!0,stay:!0,onConfirm:()=>{},navigate:re=>{c&&Hs(),Le.push(re)},shouldBlockNavigation:()=>!ne,title:u("Delete Current Video?"),text:u("Do you want to go back? The current video will be deleted."),confirmButtonText:u("No, Keep Video "),discardButtonText:u("Yes, Delete Video"),showDiscardIcon:!1,showSaveIcon:!1}),G?t.jsx(Xg,{title:S,beginUploadProcess:G,afterUpload:Kr,setSavedVideoId:Z,file:de,fileName:m}):t.jsxs(i0,{children:[t.jsxs(a0,{children:[t.jsxs(c0,{children:[t.jsx(Nt,{id:"",videoSource:e,videoRef:b,preventWideSize:!0,borderBottomRadius:"0px",setVideoDuration:ae,setIsVideoLoading:ce}),t.jsxs(l0,{children:[t.jsx(ve.IoMdCalendar,{size:16,color:E.gray40,style:{marginRight:6}}),t.jsx("div",{children:aa()})]})]}),h]}),t.jsx(s0,{children:t.jsx($e.Formik,{enableReinitialize:!0,innerRef:Pe,initialValues:oe,validateOnMount:!0,onSubmit:()=>{},children:({errors:re,isValid:pe,values:ge,setFieldValue:Me})=>t.jsxs($e.Form,{children:[t.jsxs(lo,{children:[t.jsx(Pt,{text:u("Title")}),!!ee.title&&t.jsx(Pt,{text:ee.title,color:E.red100}),t.jsx(Gt,{type:"text",onChange:we=>T(we.target.value),value:S,...ee.title&&{borderColor:E.red100}})]}),t.jsxs(lo,{marginBottom:"8px",children:[t.jsx(Pt,{text:u("Tags")}),!!ee.tags&&t.jsx(Pt,{text:ee.tags,color:E.red100}),t.jsx(Ne,{options:M.filter(we=>!we||!D.length||!D.some(Tt=>Tt.value===we.value)),placeholder:g,controlShouldRenderValue:!1,value:U,onChange:we=>Ve(we),isSearchable:!0,creatable:!0,extendStyles:{control:{...ee.tags&&{borderColor:E.red100}}},customComponents:{Option:g0}}),t.jsx(p0,{children:D.map((we,Tt)=>t.jsx(F.Button,{icon:t.jsx(ys,{width:15,height:15}),text:we.label,onClick:()=>Ye(we,Tt),size:"small",variant:"white"},we.value))})]}),w&&t.jsxs(lo,{children:[t.jsx(Pt,{text:u("VIN / search vehicle")}),t.jsx(Ne,{options:V,value:L,onChange:we=>v(we),isSearchable:!0,isClearable:!!(L!=null&&L.value),creatable:!1})]}),(f||w)&&t.jsxs(lo,{marginBottom:"8px",children:[t.jsx(Pt,{text:u("Video Type")}),t.jsx(Ne,{options:De,value:C,onChange:we=>$(we),isSearchable:!0,isClearable:!!(C!=null&&C.value),creatable:!1})]}),t.jsx(n0,{attributes:R||[],initValues:A,setIsSaveDisabled:n})]})})})]})]})},x0={id:"",title:"",recordDate:"",views:"0",videoLength:0,thumbnail:"",videoSource:"",tags:[],videoRequest:{videoRequestId:"0"},folder:"",processing:0,autogeneratedThumbnail:""},f0=()=>{const{videoId:e}=he.useParams(),[o,r]=p.useState(x0),[s,n]=p.useState(!0),[a,c]=p.useState(),[d,l]=p.useState(!1),[u,g]=p.useState(!1),[h,x]=p.useState(!1),y=w=>x(w),m=async()=>{if(!e)return;const w=await wo(e);w&&(r(w),n(!1))};return p.useEffect(()=>{o.id||m()},[]),s?t.jsx(Ue,{isLoading:s}):t.jsxs("div",{children:[t.jsx(zg,{onSaveVideo:a||(()=>{}),setInsertAfterSave:l,isSaveDisabled:u,uploadLoading:h}),t.jsx(ut,{children:t.jsx(m0,{recordingBlobUrl:o.videoSource,recordDate:o.recordDate,insertAfterSave:d,setSaveFunction:c,setIsSaveDisabled:g,skipUploadProcess:!0,videoId:e,initialTitle:o.title,updateUploadLoading:y})})]})},v0=(e,o)=>{const r=new AudioContext,s=r.createMediaStreamSource(e),n=r.createMediaStreamSource(o),a=r.createMediaStreamDestination(),c=r.createGain(),d=r.createGain();return c.gain.value=.7,d.gain.value=.7,s.connect(c).connect(a),n.connect(d).connect(a),a.stream.getTracks()},b0=async(e,o,r)=>{const s={video:{...r,displaySurface:"monitor"},audio:!0},n=await navigator.mediaDevices.getDisplayMedia(s);e.current=n;const a=n.getAudioTracks();if(o){const c=await navigator.mediaDevices.getUserMedia({audio:o});if(a.length>0){const l=[...n.getVideoTracks(),...v0(n,c)];return new MediaStream(l)}const d=[...n.getVideoTracks(),...c.getAudioTracks()];return new MediaStream(d)}return n},Bn=async(e,o,r)=>{const s=await navigator.mediaDevices.getUserMedia({audio:o,video:{...r,deviceId:{exact:r.deviceId}}});return e.current=s,e.current},w0=async(e,o,r,s,n)=>{const a={video:{displaySurface:"monitor",logicalSurface:!0,cursor:"always"}},c=await navigator.mediaDevices.getUserMedia({audio:r,video:s});n.current&&(n.current.srcObject=c,n.current.muted=!0,await n.current.play(),n.current.requestPictureInPicture());const d=await navigator.mediaDevices.getDisplayMedia(a);e.current=d,o.current=c;const l=new MediaStream;return c.getAudioTracks().forEach(u=>{l.addTrack(u)}),d.getVideoTracks().forEach(u=>{l.addTrack(u)}),l},y0=async(e,o,r,s,n)=>{const a={video:{displaySurface:"browser",logicalSurface:!0,cursor:"always"}},c=await navigator.mediaDevices.getDisplayMedia(a),d=await navigator.mediaDevices.getUserMedia({audio:r,video:s});e.current=c,o.current=d;const l=new MediaStream;return d.getAudioTracks().forEach(u=>{l.addTrack(u)}),c.getVideoTracks().forEach(u=>{l.addTrack(u)}),n.current&&(n.current.srcObject=d,n.current.muted=!0,await n.current.play()),l},C0=()=>new Promise(async(e,o)=>{let r=await navigator.mediaDevices.enumerateDevices();if(Wt.some(r,{label:""}))try{const s=await navigator.mediaDevices.getUserMedia({audio:!0,video:!0});r=await navigator.mediaDevices.enumerateDevices(),s.getTracks().forEach(n=>n.stop())}catch(s){o(s)}e(r)});var xr=(e=>(e.AUDIO_INPUT="audioinput",e.VIDEO_INPUT="videoinput",e))(xr||{}),Fe=(e=>(e.LOW="low",e.STANDARD="standard",e.HIGH="high",e))(Fe||{});const Ss=p.createContext({}),js="record_settings",Un={audioSource:null,videoSource:null,videoQuality:Fe.STANDARD},S0=(e,o)=>{try{const r=localStorage.getItem(js);return r?JSON.parse(r):{videoQuality:Fe.STANDARD,videoSource:o,audioSource:e}}catch(r){return console.error("Error parsing user settings from localStorage:",r),{videoQuality:Fe.STANDARD,videoSource:o,audioSource:e}}},j0=({children:e})=>{const{t:o}=W.useTranslation(),r={label:o("No Audio"),value:!1},s={label:o("No Video"),value:!1},[n,a]=p.useState({audioSource:[],videoSource:[]}),[c,d]=p.useState(Un),[l,u]=p.useState(null),[g,h]=p.useState(Un),x=()=>{u(o("You do not have the necessary permissions to access this feature. Please check your browser permissions."))},y=async()=>{var w;try{const f=await C0(),S=(Array.isArray(f)?f:[]).reduce((L,v)=>(v.kind===xr.AUDIO_INPUT?L.audio.push({label:v.label,value:v.deviceId}):v.kind===xr.VIDEO_INPUT&&L.video.push({label:v.label,value:v.deviceId}),L),{audio:[],video:[]}),T=S.audio.find(L=>L.value==="default")||r,V=((w=S.video)==null?void 0:w[0])||s,I=S0(T,V);a({audioSource:[...S.audio,r],videoSource:S.video}),d(I),h(I),u(null)}catch{x(),a({audioSource:[r],videoSource:[s]})}},m=()=>{h(c),localStorage.setItem(js,JSON.stringify(c))};return p.useEffect(()=>{var f;const w=()=>{y()};if(((f=navigator==null?void 0:navigator.mediaDevices)==null?void 0:f.ondevicechange)!==void 0)return navigator.mediaDevices.addEventListener("devicechange",w),y(),()=>{navigator.mediaDevices.removeEventListener("devicechange",w)};console.log("The navigator.mediaDevices API is not supported in this browser."),w()},[]),t.jsx(Ss.Provider,{value:{recorderSettings:n,userSettings:c,setUserSettings:d,recordingError:l,updateErrorMessage:x,initialUserSettings:g,onSubmitModalHandler:m},children:e})},_r=()=>{const e=p.useContext(Ss);if(e===void 0)throw new Error("useRecordSettings must be used within a RecordSettingsProvider");return e},E0=i.div`
|
|
3279
3279
|
display: flex;
|
|
3280
3280
|
width: 90%;
|
|
3281
3281
|
align-items: center;
|
|
3282
3282
|
padding: 0 12px;
|
|
3283
3283
|
height: 38px;
|
|
3284
|
-
`,
|
|
3284
|
+
`,T0=i.div`
|
|
3285
3285
|
text-wrap: nowrap;
|
|
3286
3286
|
overflow: hidden;
|
|
3287
3287
|
text-overflow: ellipsis;
|
|
@@ -3294,7 +3294,7 @@
|
|
|
3294
3294
|
gap: 4px;
|
|
3295
3295
|
color: ${E.black_1_100};
|
|
3296
3296
|
cursor: pointer;
|
|
3297
|
-
`,
|
|
3297
|
+
`,k0=i.div`
|
|
3298
3298
|
box-sizing: border-box;
|
|
3299
3299
|
width: 592px;
|
|
3300
3300
|
padding: 32px;
|
|
@@ -3303,17 +3303,17 @@
|
|
|
3303
3303
|
${({theme:e})=>e.containerWidth<=z.xs&&i.css`
|
|
3304
3304
|
width: 100%;
|
|
3305
3305
|
`}
|
|
3306
|
-
`,
|
|
3306
|
+
`,I0=i.div`
|
|
3307
3307
|
display: flex;
|
|
3308
3308
|
align-items: center;
|
|
3309
3309
|
justify-content: space-between;
|
|
3310
3310
|
margin-bottom: 15px;
|
|
3311
|
-
`,
|
|
3311
|
+
`,A0=i.div`
|
|
3312
3312
|
color: ${E.gray100};
|
|
3313
3313
|
font-weight: bold;
|
|
3314
3314
|
font-size: 18px;
|
|
3315
3315
|
line-height: 24px;
|
|
3316
|
-
`,
|
|
3316
|
+
`,R0=i.label`
|
|
3317
3317
|
display: flex;
|
|
3318
3318
|
align-items: center;
|
|
3319
3319
|
margin: 0;
|
|
@@ -3322,7 +3322,7 @@
|
|
|
3322
3322
|
&:hover {
|
|
3323
3323
|
cursor: pointer;
|
|
3324
3324
|
}
|
|
3325
|
-
`,Wn=({children:e})=>t.jsx(
|
|
3325
|
+
`,Wn=({children:e})=>t.jsx(E0,{children:t.jsx(T0,{children:e})}),$0=({handleModalClose:e,onSave:o})=>{const{colors:r,isCdkEnviroment:s}=i.useTheme(),{t:n}=W.useTranslation(),{recorderSettings:a,setUserSettings:c,userSettings:d,onSubmitModalHandler:l,initialUserSettings:u}=_r(),g=()=>{l(),e(),o==null||o(d)},h=()=>{c(u),e()},x=w=>c({...d,videoSource:w}),y=w=>c({...d,audioSource:w}),m=w=>c({...d,videoQuality:w});return t.jsx(Ot,{children:t.jsxs(k0,{children:[t.jsxs(I0,{children:[t.jsx(A0,{children:n("Recording settings")}),t.jsx(R0,{children:t.jsx(Et,{width:"24px",height:"24px",onClick:e})})]}),t.jsxs(je,{children:[!!a.videoSource.length&&t.jsxs(Rt,{width:"100%",alignItems:"start",gap:"4px",children:[t.jsx(ht,{color:r.neutral[60],children:n("Video source")}),t.jsx(Ne,{creatable:!1,value:d.videoSource,placeholder:n("No settings"),options:a.videoSource,onChange:x,height:40,extendStyles:{container:{width:"100%"}},customComponents:{ValueContainer:Wn},isSearchable:!1})]}),!!a.audioSource.length&&t.jsxs(Rt,{width:"100%",alignItems:"start",gap:"4px",children:[t.jsx(ht,{color:r.neutral[60],children:n("Audio source")}),t.jsx(Ne,{creatable:!1,placeholder:n("No settings"),value:d.audioSource,options:a.audioSource,onChange:y,extendStyles:{container:{width:"100%"}},height:40,customComponents:{ValueContainer:Wn},isSearchable:!1})]}),t.jsxs(t.Fragment,{children:[t.jsx(ht,{color:r.neutral[60],children:n("Video quality")}),t.jsxs(Rt,{alignItems:"flex-start",width:"100%",gap:"8px",m:"0 0 16px 0",children:[t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsxs(Yo,{children:[t.jsx(Oo,{checked:d.videoQuality===Fe.LOW,name:"quality",value:Fe.LOW,onClick:()=>m(Fe.LOW),onChange:()=>m(Fe.LOW)}),t.jsx(ft,{color:r.neutral[100],children:n("Low")})]}),t.jsx(ht,{children:n("Faster Upload")})]}),t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsxs(Yo,{children:[t.jsx(Oo,{checked:d.videoQuality===Fe.STANDARD,name:"quality",value:Fe.STANDARD,onClick:()=>m(Fe.STANDARD),onChange:()=>m(Fe.STANDARD)}),t.jsx(ft,{color:r.neutral[100],children:n("Standard")})]}),t.jsxs(ht,{children:[" ",n("Fast Upload")]})]}),t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsxs(Yo,{children:[t.jsx(Oo,{checked:d.videoQuality===Fe.HIGH,name:"quality",value:Fe.HIGH,onClick:()=>m(Fe.HIGH),onChange:()=>m(Fe.HIGH)}),t.jsx(ft,{color:r.neutral[100],children:n("High")})]}),t.jsx(ht,{children:n("Slow Upload")})]})]})]})]}),t.jsxs(je,{width:"100%",justifyContent:"flex-end",children:[t.jsx(F.Button,{variant:s?"text":"secondary",text:n("Cancel"),onClick:h}),t.jsx(F.Button,{text:n("Save"),onClick:g})]})]})})};var le=(e=>(e.IDLE="IDLE",e.RECORDING="RECORDING",e.PAUSED="PAUSED",e.CAMERA_READY="CAMERA_READY",e.COUNTDOWN="COUNTDOWN",e.DONE="DONE",e))(le||{}),gt=(e=>(e[e.UPLOADING=1]="UPLOADING",e[e.CREATE=2]="CREATE",e[e.ENCODE=3]="ENCODE",e[e.UPLOAD_COMPLETED=4]="UPLOAD_COMPLETED",e[e.ERROR=5]="ERROR",e))(gt||{});const Qe={WAITING:"waiting",UPLOADING:"uploading",CANCELING:"canceling",CANCELED:"canceled",FINISHED:"finished",GENERATING_PREVIEW:"preview"},Br=({status:e,handleGoToRecordHome:o,teleprompterActions:r,onOpenRecordingSettings:s})=>{const n=e===le.RECORDING||e===le.PAUSED,a=Ht(),{t:c}=W.useTranslation(),{trackGTMDiscardVideoEvent:d}=Ge(),{flow:l,startupPage:u}=Se(),h=(l||(u===Qt.RECORD_CAMERA?Be.RECORD_CAMERA_ONLY:Be.FULL))===Be.RECORD_CAMERA_ONLY;return t.jsxs(t.Fragment,{children:[t.jsx(Eo,{when:!0,stay:!0,onConfirm:()=>{},navigate:()=>{d==null||d(),o()},shouldBlockNavigation:()=>e===le.RECORDING,title:c("Leave without saving the recording?"),text:c("Your recording will not be saved. This action can’t be undone."),confirmButtonText:c("Continue"),discardButtonText:c("Leave")}),t.jsxs(je,{m:a?"12px 0 12px 0":h?"12px 0 32px 0":"72px 0 32px 0",width:"100%",justifyContent:"space-between",children:[n?t.jsx("div",{style:{height:40}}):!a&&t.jsx(F.Button,{icon:h?t.jsx(H.MdSettings,{size:18}):t.jsx(H.MdMovie,{size:18}),variant:"secondary",text:c(h?"Recording settings":"Change recording option"),onClick:()=>{if(h&&s){s();return}d==null||d(),o()},disabled:e===le.COUNTDOWN}),r]})]})},V0=i.div`
|
|
3326
3326
|
display: ${e=>e.hide?"none":"flex"};
|
|
3327
3327
|
flex-direction: row;
|
|
3328
3328
|
justify-content: center;
|
|
@@ -3333,7 +3333,7 @@
|
|
|
3333
3333
|
left: 0;
|
|
3334
3334
|
right: 0;
|
|
3335
3335
|
z-index: 3;
|
|
3336
|
-
|
|
3336
|
+
`,L0=i.div`
|
|
3337
3337
|
display: flex;
|
|
3338
3338
|
flex-direction: row;
|
|
3339
3339
|
justify-content: center;
|
|
@@ -3350,7 +3350,7 @@
|
|
|
3350
3350
|
&:hover {
|
|
3351
3351
|
cursor: pointer;
|
|
3352
3352
|
}
|
|
3353
|
-
`,
|
|
3353
|
+
`,M0=({counter:e,willStart:o,onClick:r,hide:s,isFreemium:n})=>{const{colors:a}=i.useTheme(),c={3:a.primary[80],2:a.primary[40],1:a.primary[20]};return t.jsx(V0,{hide:s,children:t.jsx(L0,{counter:e,willStart:o,onClick:r,isFreemium:n,color:c[e],children:e})})},D0=i.div`
|
|
3354
3354
|
width: 770px;
|
|
3355
3355
|
height: 440px;
|
|
3356
3356
|
position: relative;
|
|
@@ -3362,14 +3362,14 @@
|
|
|
3362
3362
|
background: ${e.colors.neutral[40]};
|
|
3363
3363
|
max-height: 440px;
|
|
3364
3364
|
`}
|
|
3365
|
-
`,
|
|
3365
|
+
`,O0=i.video`
|
|
3366
3366
|
width: 100%;
|
|
3367
3367
|
height: 100%;
|
|
3368
3368
|
pointer-events: none;
|
|
3369
3369
|
border-radius: 8px;
|
|
3370
3370
|
max-height: 440px;
|
|
3371
3371
|
min-height: 440px;
|
|
3372
|
-
`,
|
|
3372
|
+
`,N0=i.canvas`
|
|
3373
3373
|
position: absolute;
|
|
3374
3374
|
top: 0;
|
|
3375
3375
|
left: 0;
|
|
@@ -3381,12 +3381,12 @@
|
|
|
3381
3381
|
max-height: 440px;
|
|
3382
3382
|
min-height: 440px;
|
|
3383
3383
|
`}
|
|
3384
|
-
`,Ur=({countdown:e,videoRef:o,teleprompter:r,status:s,canvasRef:n,toggleCamera:a})=>{const c=Ht(),d=s===
|
|
3384
|
+
`,Ur=({countdown:e,videoRef:o,teleprompter:r,status:s,canvasRef:n,toggleCamera:a})=>{const c=Ht(),d=s===le.CAMERA_READY||s===le.IDLE;return t.jsxs(D0,{children:[r,t.jsx(M0,{counter:e,willStart:e>0,hide:!e||s===le.CAMERA_READY}),t.jsx(O0,{ref:o,controls:!1,autoPlay:!0,playsInline:!0}),n&&t.jsx(N0,{ref:n}),c&&d&&t.jsx(F.Button,{variant:"secondary",icon:t.jsx(H.MdFlipCameraAndroid,{size:20}),style:{position:"absolute",right:16,bottom:16},onClick:a})]})},P0=e=>{const[o,r]=p.useState(e),s=p.useRef(null);return p.useEffect(()=>()=>{s.current&&clearInterval(s.current)},[]),{countdown:o,startRecordingCountdown:()=>{r(e),s.current=setInterval(()=>{r(c=>c<=1?(clearInterval(s.current),s.current=null,0):c-1)},1e3)},stopRecordingCountdown:()=>{s.current&&(clearInterval(s.current),s.current=null),r(e)}}},F0=()=>{const[e,o]=p.useState(0),r=p.useRef(null);return p.useEffect(()=>()=>{r.current&&clearInterval(r.current)},[]),{timeInSeconds:e,startRecordingTime:()=>{r.current=setInterval(()=>{o(a=>a+1)},1e3)},stopRecordingTime:()=>{r.current&&clearInterval(r.current)}}},uo={low:1e6,standard:25e5,high:5e6},z0=(e,o)=>{const r=new MediaStream;return e.getVideoTracks().forEach(a=>r.addTrack(a)),o.getAudioTracks().forEach(a=>r.addTrack(a)),r},_0=3,Wr=({screenStream:e,stopAllStreams:o,videoRef:r,canvasRef:s,isSegmenterActive:n,onStartUpladingVoiceOverHandler:a,shouldStartCountdown:c,handleGoToRecordHome:d,isCameraToggled:l})=>{const{trackGTMStartRecordingEvent:u,trackGTMStopRecordingEvent:g,trackGTMAddVideoAttributeEvent:h}=Ge(),{t:x}=W.useTranslation(),{toast:y}=Te(),{countdown:m,startRecordingCountdown:w,stopRecordingCountdown:f}=P0(_0),{startRecordingTime:b,stopRecordingTime:S,timeInSeconds:T}=F0(),{userSettings:V}=_r(),I=p.useRef(null),[L,v]=p.useState(le.IDLE),[C,$]=p.useState(null),R=(uo==null?void 0:uo[V==null?void 0:V.videoQuality])||uo.low;p.useEffect(()=>()=>{o==null||o(),I.current&&I.current.stopRecording(()=>{I.current.destroy(),I.current=null})},[]),p.useEffect(()=>{r.current&&e&&(r.current.srcObject=e,r.current.muted=!0,r.current.volume=0,r.current.onloadedmetadata=()=>{v(le.CAMERA_READY),c&&D()})},[e]),p.useEffect(()=>{if(r.current&&e){const U=e.getVideoTracks()[0];U.onended=()=>{if(L===le.RECORDING||L===le.PAUSED)return M();if(l)return v(le.IDLE);d==null||d()}}},[e,L]),p.useEffect(()=>{m===0&&L===le.COUNTDOWN&&(u==null||u(),P())},[m,L]);const j=U=>{var Y;if(n){const ne=(Y=s==null?void 0:s.current)==null?void 0:Y.captureStream(30);return ne?z0(ne,U):U}return U},A=MediaRecorder.isTypeSupported("video/webm")?"video/webm":"video/mp4",P=()=>{if(e){const U=j(e);try{I.current=new Xr(U,{videoBitsPerSecond:R,type:"video",mimeType:A,recorderType:Xr.MediaStreamRecorder}),I.current.startRecording(),v(le.RECORDING),b()}catch(Y){console.error("Failed to start recording:",Y),y({message:x("Failed to start recording.")})}}else y({message:"Something went wrong, try again later!"})},M=()=>{I.current&&(I.current.stopRecording(()=>{$(I.current.getBlob()),L===le.PAUSED||g==null||g(),h==null||h(),o==null||o(),v(le.DONE),a==null||a(I.current.getBlob()),I.current.destroy(),I.current=null}),S())},N=()=>{I.current&&L===le.RECORDING?(I.current.pauseRecording(),v(le.PAUSED),S()):I.current&&L===le.PAUSED&&(I.current.resumeRecording(),u==null||u(),v(le.RECORDING),b())},D=()=>{v(le.COUNTDOWN),w()};return{startRecording:P,stopRecording:M,pauseRecording:N,startCountDown:D,stopCountDown:()=>{v(le.CAMERA_READY),f()},setStatus:v,status:L,recordedBlob:C,countdown:m,timeInSeconds:T}},B0=i(je)`
|
|
3385
3385
|
${({theme:e})=>e.containerWidth<z.sm&&i.css`
|
|
3386
3386
|
width: 100%;
|
|
3387
3387
|
justify-content: space-between;
|
|
3388
3388
|
`}
|
|
3389
|
-
`,
|
|
3389
|
+
`,U0=i(je)`
|
|
3390
3390
|
position: absolute;
|
|
3391
3391
|
width: 100%;
|
|
3392
3392
|
|
|
@@ -3394,7 +3394,7 @@
|
|
|
3394
3394
|
position: initial;
|
|
3395
3395
|
width: unset;
|
|
3396
3396
|
`}
|
|
3397
|
-
`,Hr=({status:e,timeInSeconds:o,startCountDown:r,stopCountDown:s,pauseRecording:n,stopRecording:a,isLoadingVB:c})=>{const{isCdkEnviroment:d}=i.useTheme(),{t:l}=W.useTranslation(),u=e===
|
|
3397
|
+
`,Hr=({status:e,timeInSeconds:o,startCountDown:r,stopCountDown:s,pauseRecording:n,stopRecording:a,isLoadingVB:c})=>{const{isCdkEnviroment:d}=i.useTheme(),{t:l}=W.useTranslation(),u=e===le.CAMERA_READY||e===le.COUNTDOWN,g=e===le.PAUSED||e===le.RECORDING;return t.jsxs("div",{style:{width:"100%",position:"relative",paddingBottom:32},children:[u&&t.jsxs(je,{justifyContent:"center",width:"100%",m:"36px 0 0 0",children:[e===le.CAMERA_READY&&!c&&t.jsx(F.Button,{variant:d?"primary":"red",icon:t.jsx(H.MdVideocam,{size:24}),text:l("Start recording"),onClick:r}),e===le.COUNTDOWN&&t.jsx(F.Button,{variant:d?"text":"secondary",text:l("Cancel"),onClick:s})]}),g&&t.jsxs(B0,{m:"32px 0 0 0",children:[t.jsxs(je,{style:{position:"relative",zIndex:22},children:[t.jsx(F.Button,{variant:e===le.PAUSED?d?"text":"red":"secondary",icon:e===le.PAUSED?t.jsx(H.MdVideocam,{size:24}):t.jsx(H.MdOutlinePause,{}),text:e===le.PAUSED?l("Resume"):l("Pause"),onClick:n}),t.jsx("span",{style:{width:50},children:Vt(o,0)})]}),t.jsx(U0,{alignItems:"center",justifyContent:"center",children:t.jsx(F.Button,{icon:t.jsx(Bi,{}),variant:"primary",text:l("Finish"),onClick:a})})]})]})},Es=/^((?!chrome|android).)*safari/i.test(navigator.userAgent),W0=!!window.opr&&!!opr.addons||!!window.opera||navigator.userAgent.indexOf(" OPR/")>=0,H0=typeof InstallTrigger<"u",q0={all:e=>["VIDEO_ATTRIBUTES",e],detail:e=>["VIDEO_ATTRIBUTES",e]},G0=async({page:e=0,size:o=10,filterByDepartment:r=!1})=>{const n={start:e*o,limit:o,filterByDepartment:r},{data:a}=await ie.get("/video-attributes",{params:n}),{videoAttributes:c=[],count:d=0}=a||{};return{count:d,attributes:c}},Y0=e=>Ce.useQuery(q0.all(e),()=>G0(e)),Q0=({setContineToInsert:e,onDiscardHandler:o})=>{const{t:r}=W.useTranslation(),{isValid:s,submitForm:n}=$e.useFormikContext(),{userData:a}=me(),{showInsertFeature:c,containerWidth:d}=Se(),{colors:l,isCdkEnviroment:u}=i.useTheme(),g=()=>{e(!0),n()},h=pt(a);return t.jsx(t.Fragment,{children:t.jsxs(je,{width:"100%",justifyContent:"space-between",m:"0 0 32px 0",children:[t.jsx(ns,{color:l.black[100],children:r("Preview recorded video")}),t.jsxs(je,{gap:"8px",children:[t.jsx(F.Button,{icon:t.jsx(H.MdDeleteForever,{size:20}),text:r("Discard"),variant:u?"text":"destructive",onClick:o}),t.jsx(F.Button,{disabled:!s,icon:t.jsx(H.MdSave,{size:18}),text:r(h?"Save":"Save Recording"),onClick:n,variant:u?"secondary":"primary"}),c&&t.jsx(F.Button,{variant:"primary",disabled:!s,icon:t.jsx(H.MdEmail,{size:20}),text:d>z.sm?r("Continue to Insert"):r("Insert"),onClick:g})]})]})})},Z0=i.span`
|
|
3398
3398
|
font-size: 14px;
|
|
3399
3399
|
font-weight: 600;
|
|
3400
3400
|
line-height: 20px;
|
|
@@ -3420,14 +3420,14 @@
|
|
|
3420
3420
|
}
|
|
3421
3421
|
}
|
|
3422
3422
|
}
|
|
3423
|
-
`,
|
|
3423
|
+
`,Ts=({tag:e,showRemove:o=!1,onRemove:r=()=>{},onClick:s=()=>{},onMouseEnter:n=()=>{},onMouseLeave:a=()=>{},children:c})=>{const{colors:d}=i.useTheme();return t.jsxs(Z0,{onClick:s,onMouseEnter:n,onMouseLeave:a,className:"video-tag",children:[!!e.value&&t.jsx(vo.FaHashtag,{className:"hashtag-icon"}),e.label,o&&t.jsx(ve.IoMdCloseCircle,{onClick:()=>r(e),className:"close-icon",color:d.primary[40]}),c]},e.value)},Qo=50,K0=i.div`
|
|
3424
3424
|
display: flex;
|
|
3425
3425
|
flex-direction: column;
|
|
3426
3426
|
justify-content: space-between;
|
|
3427
3427
|
position: relative;
|
|
3428
3428
|
background-color: ${E.white};
|
|
3429
3429
|
padding: 32px;
|
|
3430
|
-
`,
|
|
3430
|
+
`,X0=i.section`
|
|
3431
3431
|
display: flex;
|
|
3432
3432
|
flex-direction: column;
|
|
3433
3433
|
width: 528px;
|
|
@@ -3435,7 +3435,7 @@
|
|
|
3435
3435
|
gap: 12px;
|
|
3436
3436
|
justify-content: flex-end;
|
|
3437
3437
|
align-items: right;
|
|
3438
|
-
`,
|
|
3438
|
+
`,J0=i(Ne)`
|
|
3439
3439
|
position: relative;
|
|
3440
3440
|
display: block;
|
|
3441
3441
|
font-size: 16px;
|
|
@@ -3451,27 +3451,27 @@
|
|
|
3451
3451
|
background-color: #fff;
|
|
3452
3452
|
outline: 0;
|
|
3453
3453
|
}
|
|
3454
|
-
`,
|
|
3454
|
+
`,em=i.div`
|
|
3455
3455
|
height: 150px;
|
|
3456
3456
|
display: flex;
|
|
3457
3457
|
flex-direction: row;
|
|
3458
3458
|
margin-top: 18px;
|
|
3459
3459
|
flex-flow: row wrap;
|
|
3460
3460
|
align-content: flex-start;
|
|
3461
|
-
`,
|
|
3461
|
+
`,tm=i.div`
|
|
3462
3462
|
display: flex;
|
|
3463
3463
|
justify-content: flex-end;
|
|
3464
|
-
`,
|
|
3464
|
+
`,om=i.div`
|
|
3465
3465
|
display: flex;
|
|
3466
3466
|
align-items: center;
|
|
3467
3467
|
justify-content: space-between;
|
|
3468
3468
|
margin-bottom: 15px;
|
|
3469
|
-
`,
|
|
3469
|
+
`,rm=i.div`
|
|
3470
3470
|
color: ${E.gray100};
|
|
3471
3471
|
font-weight: bold;
|
|
3472
3472
|
font-size: 18px;
|
|
3473
3473
|
line-height: 24px;
|
|
3474
|
-
`,
|
|
3474
|
+
`,nm=i.label`
|
|
3475
3475
|
display: flex;
|
|
3476
3476
|
align-items: center;
|
|
3477
3477
|
margin: 0;
|
|
@@ -3480,7 +3480,7 @@
|
|
|
3480
3480
|
&:hover {
|
|
3481
3481
|
cursor: pointer;
|
|
3482
3482
|
}
|
|
3483
|
-
`,
|
|
3483
|
+
`,im=({videoTags:e=[],handleModalClose:o,onSubmit:r,buttonTitle:s})=>{const{t:n}=W.useTranslation(),[a,c]=p.useState(""),[d,l]=p.useState([]),[u,g]=p.useState(e),[h,x]=p.useState(""),{colors:y}=i.useTheme(),m=v=>v.sort((C,$)=>{var R;return(R=C.label)==null?void 0:R.localeCompare($.label)}),w=async()=>{const v=await Aa({});l(m(v.map(C=>({value:C.tagId,label:C.tag})).filter(C=>!u.find($=>$.value===C.value))))};k.useEffect(()=>{w()},[]);const f=v=>{v==="Escape"&&o()};p.useEffect(()=>(document.addEventListener("keyup",v=>f(v.key)),()=>document.removeEventListener("keyup",v=>f(v.key),!0)),[]);const b=v=>{g(m(u.filter(C=>C.value!==v.value))),l(m([...d,v]))},S=v=>{v.length>Qo||c(v)},T=v=>{var R;if(!v||!v.length)return;const C=v[0];if(!C||!C.value||!((R=C==null?void 0:C.value)!=null&&R.toString().trim().length))return x(()=>n("Tag can not be empty.")),!1;if(C.value.length>Qo)return x(()=>n("Tag cannot contain more than {{count}} characters",{count:Qo})),!1;if(u.some(j=>j.label==C.value))return x(()=>n("Tag already exists.")),!1;x(""),g(m([...u,C])),l(m(d.filter(j=>j.value!==C.value)))},V=v=>Ze.components.DropdownIndicator&&t.jsx(Ze.components.DropdownIndicator,{...v,children:t.jsx(H.MdSearch,{})}),I=v=>v.data.__isNew__?t.jsxs(Ze.components.Option,{...v,children:[t.jsx(H.MdAdd,{className:"add-icon",color:y.primary[100]}),v.label]}):t.jsxs(Ze.components.Option,{...v,children:[t.jsx(vo.FaHashtag,{color:y.primary[60],className:"hashtag-icon",size:"14px"}),v.label]}),L=()=>{try{return JSON.stringify(e)===JSON.stringify(u)}catch{return!1}};return t.jsx(Ot,{disableFullScreen:!0,style:{position:"fixed",zIndex:999},children:t.jsxs(K0,{children:[t.jsxs(om,{children:[t.jsx(rm,{children:n("Manage Tags")}),t.jsx(nm,{children:t.jsx(Et,{width:"24px",height:"24px",onClick:o})})]}),t.jsxs(X0,{children:[t.jsx(J0,{defaultValue:a,onInputChange:S,customComponents:{IndicatorSeparator:()=>null,DropdownIndicator:V,Option:I},placeholder:n("Add tag(s)..."),value:[],createOptionPosition:"first",onChange:T,options:d,isMulti:!0}),h!=null&&t.jsx("span",{className:"error-message",children:h}),t.jsx(em,{children:u&&u.map(v=>t.jsx(Ts,{tag:v,showRemove:!0,onRemove:b},v.value))}),t.jsx(tm,{children:t.jsx(F.Button,{onClick:()=>r(u),text:s,type:"submit",disabled:L()})})]})]})})},sm=()=>{var g,h;const{t:e}=W.useTranslation(),{isCdkEnviroment:o}=i.useTheme(),r=it.useHistory(),{values:s,setFieldValue:n}=$e.useFormikContext(),[a,c]=p.useState(!1),d=()=>{c(!0)},l=()=>{c(!1)},u=x=>{n("videoTags",x),l()};return t.jsxs(Rt,{alignItems:"flex-start",width:"100%",m:"32px 0 32px 0",children:[t.jsxs(je,{width:"100%",justifyContent:"space-between",children:[t.jsx(F.Button,{variant:o?"text":"destructive",icon:t.jsx(H.MdDeleteForever,{size:18}),text:e("Remove this video"),onClick:()=>{r.push("/record/home")}}),t.jsx(F.Button,{variant:"secondary",icon:t.jsx(vo.FaHashtag,{size:"16px"}),text:e("Add Tags..."),onClick:d})]}),!!((g=s==null?void 0:s.videoTags)!=null&&g.length)&&t.jsx(je,{gap:"4px",m:"4px 0 0 0",children:(h=s==null?void 0:s.videoTags)==null?void 0:h.map(x=>t.jsx(Ts,{tag:x},x.value))}),a&&t.jsx(im,{videoTags:s==null?void 0:s.videoTags,handleModalClose:l,onSubmit:u,buttonTitle:e("Save Changes")})]})},am=i.textarea`
|
|
3484
3484
|
width: 100%;
|
|
3485
3485
|
height: 100px;
|
|
3486
3486
|
padding: 8px 12px;
|
|
@@ -3493,9 +3493,9 @@
|
|
|
3493
3493
|
outline: none;
|
|
3494
3494
|
border: solid 1px ${({theme:e})=>e.colors.primary[100]};
|
|
3495
3495
|
}
|
|
3496
|
-
`,
|
|
3496
|
+
`,ks=({label:e,isRequired:o,...r})=>{const[s,n]=$e.useField(r);return t.jsxs("div",{style:{width:"100%"},children:[t.jsx(jo,{label:e,name:r.name,isRequired:o}),t.jsx(am,{...s,...r,id:r.name}),t.jsx(Fr,{meta:n})]})},fr=({label:e,isRequired:o,options:r,disabled:s,...n})=>{const[a,c,d]=$e.useField(n),l=u=>{d.setValue(u?u.value:"")};return t.jsxs("div",{style:{width:"100%"},children:[t.jsx(jo,{label:e,isRequired:o}),t.jsx(Ne,{disabled:s,value:r.find(u=>u.value===a.value),onChange:l,placeholder:"Select...",onMenuOpen:()=>d.setTouched(!0),options:r,menuPortalTarget:document.body,creatable:!1,isSearchable:!1}),t.jsx(Fr,{meta:c})]})},cm=()=>{var o;const{values:e}=$e.useFormikContext();return(o=e==null?void 0:e.attributes)!=null&&o.length?t.jsx(Rt,{width:"100%",alignItems:"flex-start",children:t.jsx($e.FieldArray,{name:"attributes",children:()=>{var r;return t.jsx(t.Fragment,{children:(r=e==null?void 0:e.attributes)==null?void 0:r.map((s,n)=>{const a=!!s.isRequired,c=!!s.isReadOnly||!!s.isLocked;return t.jsxs(p.Fragment,{children:[s.type==="text"&&t.jsx(dt,{name:`attributes.${n}.value`,label:s.slug,disabled:c,isRequired:a}),s.type==="textarea"&&t.jsx(ks,{name:`attributes.${n}.value`,label:s.slug,disabled:c,isRequired:a}),s.type==="dropdown"&&t.jsx(fr,{name:`attributes.${n}.value`,label:s.slug,disabled:c,isRequired:a,options:(s==null?void 0:s.dropdownValues.map(d=>({value:d.value,label:d.value})))||[]})]},n)})})}})}):null};var oo=(e=>(e.NO_ROLE="0",e.TECHNICIAN="1",e.SERVICE_ADVISOR="2",e.SERVICE_MANAGER="3",e.SALESPERSON="4",e.SALES_MANAGER="5",e.BDC="6",e))(oo||{});const lm=i.div`
|
|
3497
3497
|
margin-top: 24px;
|
|
3498
|
-
`,
|
|
3498
|
+
`,dm=({fetchSoldVehiclesForAutomotive:e=!0,results:o})=>{var y,m;const{t:r}=W.useTranslation(),{userData:s}=me(),{setFieldValue:n,values:a}=$e.useFormikContext(),c=Xe(s),d=st(s),l=pt(s),u=s.automotiveRole===oo.TECHNICIAN,h=Object.values(l?Rr:$r).filter(Boolean).map(w=>({value:w,label:r(w)})),x=o.flatMap(w=>w.data?w.data.map(f=>({label:`${f.firstName} ${f.lastName}`,value:`${f.id}`})):[]);return c?t.jsxs(lm,{children:[t.jsx(fr,{name:"videoRequest.videoType",label:r("Video Type"),disabled:!1,isRequired:!1,options:h}),l&&t.jsxs(t.Fragment,{children:[t.jsxs("div",{style:{marginBottom:16},children:[t.jsx(jo,{label:r("Search vehicle"),isRequired:!1}),t.jsx(ps,{onChangeVehicle:w=>{n("videoRequest.vehicle",w)},selectedVin:((m=(y=a.videoRequest)==null?void 0:y.vehicle)==null?void 0:m.vin)||"",placeholder:r("Search vehicle by name, VIN or stock number..."),fetchSold:e})]}),t.jsx(dt,{name:"videoRequest.vehicle.vin",label:r("VIN"),isRequired:!1,disabled:!0}),t.jsx(dt,{name:"videoRequest.vehicle.stockNumber",label:r("Stock number"),isRequired:!1,disabled:!0})]}),d&&t.jsx(fr,{name:"videoRequest.advisorId",label:r("Assign To"),disabled:!1,isRequired:u,options:x}),d&&t.jsx(dt,{name:"videoRequest.repairOrderNumber",label:r("RO Number"),isRequired:u}),t.jsx(dt,{name:"videoRequest.customerName",label:r("Customer Name"),isRequired:!1}),d&&t.jsx(ks,{name:"videoRequest.note",label:r("Note"),isRequired:!1})]}):t.jsx(t.Fragment,{})},um=()=>{const{t:e}=W.useTranslation(),{userData:o}=me(),{colors:r}=i.useTheme(),{values:s}=$e.useFormikContext(),n=Di(o),c=(()=>{var l;let d=0;return(l=s==null?void 0:s.attributes)==null||l.forEach(u=>{u&&u.isRequired&&d++}),n&&(d+=2),d})();return t.jsxs(je,{justifyContent:"space-between",m:"0 0 16px 0",children:[t.jsx(gu,{children:e("Video Attributes")}),t.jsxs(ht,{color:r.primary[100],children:[c," ",e("required")]})]})},pm={user:()=>["USER_AUTOMOTIVE"],customer_user:(e,o)=>["USER_AUTOMOTIVE",e,o]},hm=async({customerId:e,role:o})=>(await ie.get(`/users/${e}/automotive-users`,{params:{role:o}})).data,gm=({params:e,enabled:o})=>{const r=e.map(({customerId:c,role:d})=>({queryKey:pm.customer_user(c,d),queryFn:()=>hm({customerId:c,role:d}),enabled:o})),s=Ce.useQueries(r),n=s.some(c=>c.isLoading),a=s.some(c=>c.isError);return{results:s,isLoading:n,isError:a}},mm=async e=>{const{fileName:o,type:r}=e;return(await ie.get("/aws/signedurl",{params:{filename:o,filetype:r}})).data},xm=(e,o)=>Ce.useQuery(["AWS_SIGNED_URL",e.fileName],()=>mm(e),{enabled:o,refetchOnMount:!0,refetchOnReconnect:!0,cacheTime:5e3}),fm=async(e,o)=>{var l;const{url:r,file:s,contentType:n}=e,a=((l=navigator==null?void 0:navigator.userAgent)==null?void 0:l.indexOf("Firefox"))!==-1,c={onUploadProgress:u=>{if(o){const g=u.loaded,h=u.total??0,x=Math.round(g*100/h);o({loaded:Math.floor(g/1024),total:Math.floor(h/1024),percentage:x})}}};return await ro.put(r,s,{headers:{"content-type":!a&&n?n:s.type},...c})},vm=()=>{const[e,o]=p.useState({loaded:0,total:0,percentage:0}),{toast:r}=Te();return{...Ce.useMutation(s=>fm(s,o),{onError:s=>r({message:s})}),progress:e}},bm=async(e,o)=>{const{title:r,filename:s,isFreemium:n,isGuide:a,folder:c,id:d,videoAttributeValues:l,videoRequest:u,videoTags:g}=e,h={onUploadProgress:y=>{if(o){const m=y.loaded,w=y.total??0,f=Math.round(m*100/w);o({loaded:Math.floor(m/1024),total:Math.floor(w/1024),percentage:f})}}},x=await ie.post("/videos",{filename:s,title:r,isFreemium:n,isGuide:!!a,folder:c||"Primary",videoAttributeValues:l,videoRequest:u,videoTags:g},h);return{...x.data,...d!==void 0?{id:d,videoId:x.data.id}:{}}},wm=()=>{const[e,o]=p.useState({loaded:0,total:0,percentage:0}),{toast:r}=Te(),{t:s}=W.useTranslation();return{...Ce.useMutation(n=>bm(n,o),{onSuccess:()=>{r({message:s("Video successfully created!")})},onError:()=>{r({message:s("Failed to create video. Please try again later.")})}}),progress:e}},ym=async(e,o)=>{const{videoId:r}=e,s={onUploadProgress:a=>{if(o){const c=a.loaded,d=a.total??0,l=Math.round(c*100/d);o({loaded:Math.floor(c/1024),total:Math.floor(d/1024),percentage:l})}}};return(await ie.post(`/videos/${r}/encode`,{},s)).data},Cm=()=>{const[e,o]=p.useState({loaded:0,total:0,percentage:0});return{...Ce.useMutation(r=>ym(r,o)),progress:e}},Sm=e=>Object.fromEntries(Object.entries(e).filter(([o,r])=>r!==null&&r!=="")),jm=({contineToInsert:e})=>{var K,G;const{flow:o,startupPage:r}=Se(),n=(o||(r===Qt.RECORD_CAMERA?Be.RECORD_CAMERA_ONLY:Be.FULL))===Be.RECORD_CAMERA_ONLY,{toast:a}=Te(),{t:c}=W.useTranslation(),{userData:d}=me(),l=Xe(d),u=it.useHistory(),[g,h]=p.useState(gt.UPLOADING),[x,y]=p.useState(!1),[m,w]=p.useState(null),[f,b]=p.useState({values:{title:"",folder:{label:"",value:""},videoTags:[],attributes:[],videoRequest:void 0},initialValues:{title:"",folder:{label:"",value:""},videoTags:[],attributes:[],videoRequest:void 0}}),{trackGTMSaveNewVideoInteractionEvent:S}=Ge(),{data:T,isLoading:V,error:I}=xm({fileName:((K=m==null?void 0:m.file)==null?void 0:K.name)||"",type:((G=m==null?void 0:m.file)==null?void 0:G.type)||""},!!(m!=null&&m.title)),{mutateAsync:L,isLoading:v,error:C,progress:$}=vm(),{mutateAsync:R,isLoading:j,error:A,progress:P}=wm(),{mutateAsync:M,progress:N,isLoading:D,isError:O}=Cm();p.useEffect(()=>{T!=null&&T.url&&m&&U()},[T,m]);const U=async()=>{var q,ee,B,de;y(!0);try{if(T!=null&&T.url&&m){h(gt.UPLOADING),await L({url:T.url,file:m.file,contentType:mr}),h(gt.CREATE);const te=await R({filename:m.file.name,title:m.title,folder:m.folder.label,isFreemium:!1,videoTags:m.videoTags,videoAttributeValues:m.attributes.map(se=>({attributeId:se.attributeId,value:se.value})),...l&&m.videoRequest&&{videoRequest:Sm({repairOrderNumber:m.videoRequest.repairOrderNumber,advisorId:m.videoRequest.advisorId?Number(m.videoRequest.advisorId):"",videoType:m.videoRequest.videoType,vin:m.videoRequest.vehicle.vin,note:m.videoRequest.note,customerName:m.videoRequest.customerName})}});if(te){const se=await jl(m.file),{changed_fields:ae,...xe}=El({initialValues:f.initialValues,currentValues:f.values,trackedFields:["title","folder.label","videoTags","videoRequest.customerName"],trackedArrayFields:{videoTags:["label"],attributes:["value"]}});console.log("changed_fields",ae),console.log("fields",xe),S==null||S({type:So.RECORD,vehicle:(q=m==null?void 0:m.videoRequest)==null?void 0:q.vehicle,videoAttributes:{videoId:Number(te.id),videoType:((ee=m.videoRequest)==null?void 0:ee.videoType)||void 0,videoCustomerName:!!((B=m.videoRequest)!=null&&B.customerName),videoTitle:m.title,videoLength:se},changedFieldKeys:ae,changes:xe}),h(gt.ENCODE),await M({videoId:(de=te==null?void 0:te.id)==null?void 0:de.toString(),customerId:d.customerId})}if(h(gt.UPLOAD_COMPLETED),e){u.push(`/insert-video/${te.id}/`);return}if(n){a({message:c("Successfully saved video!")}),u.push("/record/home"),y(!1);return}u.push("/"),y(!1)}}catch(te){console.error("Error during upload:",te),h(gt.ERROR),y(!1)}};return{isError:C||A||I||O,setRecordingFormData:w,isLoading:V||v||j||D||x,progressState:g,uploadToS3Progress:$,createProgress:P,encodeProgress:N,setCdkAmplitudeFields:b}},Em=i.div`
|
|
3499
3499
|
display: flex;
|
|
3500
3500
|
flex-direction: column;
|
|
3501
3501
|
&:nth-child(2) {
|
|
@@ -3523,14 +3523,14 @@
|
|
|
3523
3523
|
position: absolute;
|
|
3524
3524
|
top: 105px;
|
|
3525
3525
|
}
|
|
3526
|
-
`,
|
|
3526
|
+
`,Tm=i.span`
|
|
3527
3527
|
top: 0px;
|
|
3528
3528
|
font-size: 16px;
|
|
3529
3529
|
line-height: 1.5;
|
|
3530
3530
|
color: ${e=>e.isInProgressOrDone?`${e.theme.colors.primary[100]};`:"rgba(213,214,217,1);"}
|
|
3531
3531
|
|
|
3532
3532
|
margin-bottom: 8px;
|
|
3533
|
-
`,
|
|
3533
|
+
`,km=(e,o,r)=>{switch(e){case"encode":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Encoding");if(o===100)return r("Encoded");break;case"create":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Creating");if(o===100)return r("Created");break;case"upload":if(o===0)return r("Waiting...");if(o>1&&o<99)return r("Uploading");if(o===100)return r("Uploaded");break;default:return""}},Zo=({progress:e,progressType:o})=>{const{t:r}=W.useTranslation(),s=i.useTheme(),n={width:"24px",zIndex:2,backgroundColor:"f6f7f9"},{percentage:a}=e,c=a>1&&a<=100;return t.jsxs(Em,{children:[t.jsx(Tm,{isInProgressOrDone:c,children:km(o,a,r)}),t.jsx(ea.Circle,{style:n,percent:a,trailWidth:10,strokeWidth:10,strokeColor:s.colors.primary[100]})]})},Im=i.div`
|
|
3534
3534
|
margin-top: 16px;
|
|
3535
3535
|
background-color: #f6f7f9;
|
|
3536
3536
|
border-radius: 4px;
|
|
@@ -3539,11 +3539,11 @@
|
|
|
3539
3539
|
display: flex;
|
|
3540
3540
|
justify-content: center;
|
|
3541
3541
|
flex-direction: column;
|
|
3542
|
-
`,
|
|
3542
|
+
`,Am=i.div`
|
|
3543
3543
|
display: flex;
|
|
3544
3544
|
justify-content: space-between;
|
|
3545
|
-
`,
|
|
3546
|
-
${
|
|
3545
|
+
`,Rm=i.div`
|
|
3546
|
+
${Ri}
|
|
3547
3547
|
font-size: ${yo.m};
|
|
3548
3548
|
color: ${E.blackRgb75};
|
|
3549
3549
|
margin: 0;
|
|
@@ -3551,7 +3551,7 @@
|
|
|
3551
3551
|
margin-bottom: 32px;
|
|
3552
3552
|
min-height: 190px;
|
|
3553
3553
|
position: relative;
|
|
3554
|
-
|
|
3554
|
+
`,$m=i.progress`
|
|
3555
3555
|
z-index: 1;
|
|
3556
3556
|
margin-top: -14.5px;
|
|
3557
3557
|
width: 100%;
|
|
@@ -3578,7 +3578,7 @@
|
|
|
3578
3578
|
background: ${({color:e})=>e};
|
|
3579
3579
|
border-radius: 15px;
|
|
3580
3580
|
}
|
|
3581
|
-
`,
|
|
3581
|
+
`,Vm=i.div`
|
|
3582
3582
|
width: 100%;
|
|
3583
3583
|
text-align: left;
|
|
3584
3584
|
margin-bottom: 16px;
|
|
@@ -3587,22 +3587,22 @@
|
|
|
3587
3587
|
line-height: 1.5;
|
|
3588
3588
|
color: #4e5461;
|
|
3589
3589
|
margin-top: 32px;
|
|
3590
|
-
|
|
3590
|
+
`,Lm=(e,o)=>{const r=(e/1e3).toFixed(2),s=(o/1e3).toFixed(2);return`${r} MB/${s} MB`},Hn=({progressState:e,uploadToS3Progress:o,createProgress:r,encodeProgress:s})=>{const n=Ht(),{colors:a}=i.useTheme(),c=()=>e?e==gt.UPLOADING?o.percentage*50/100:e==gt.CREATE?50+(r.percentage||0):100:0;return t.jsx(Rm,{children:t.jsxs(Im,{style:{padding:n?0:32},children:[t.jsxs(Am,{children:[t.jsx(Zo,{progress:o,progressType:"upload"}),t.jsx(Zo,{progress:r,progressType:"create"}),t.jsx(Zo,{progress:s,progressType:"encode"})]}),t.jsx($m,{value:c(),max:100,color:a.primary[100]}),t.jsx(Vm,{children:Lm(o.loaded,o.total)})]})})},eo=(e,o=!1)=>{try{return o?decodeURIComponent(e).replaceAll(" "," "):decodeURIComponent(e)}catch{return e}},Mm=e=>e?"Initial Reach Out":"",Dm=e=>[{value:4e3,label:`160 ${e("words / min")}`},{value:2e3,label:`200 ${e("words / min")}`},{value:1e3,label:`240 ${e("words / min")}`}],vr=e=>[{value:6e3,label:`160 ${e("words / min")}`},{value:4e3,label:`200 ${e("words / min")}`},{value:2e3,label:`240 ${e("words / min")}`}],Om=e=>[{value:8e3,label:`160 ${e("words / min")}`},{value:6e3,label:`200 ${e("words / min")}`},{value:4e3,label:`240 ${e("words / min")}`}],Is=(e,o)=>{switch(e){case"small":return Om(o);case"large":return vr(o);case"x-large":return Dm(o);default:return vr(o)}},Nm=(e,o=2)=>{if(e===0)return"0 Bytes";const r=1024,s=o<0?0:o,n=["Bytes","KB","MB","GB","TB","PB","EB","ZB","YB"],a=Math.floor(Math.log(e)/Math.log(r));return Pm(parseFloat((e/Math.pow(r,a)).toFixed(s)))+" "+n[a]},Pm=(e,o=!1)=>e.toLocaleString("en",o?{minimumFractionDigits:2,maximumFractionDigits:2}:{}),Fm=e=>e===Qe.WAITING?"Waiting…":e===Qe.UPLOADING?"Uploading…":e===Qe.CANCELING?"Canceling…":e===Qe.CANCELED?"Canceled":e===Qe.GENERATING_PREVIEW?"Generating Preview URL...":"Finished",zm=e=>e===Qe.WAITING?"#9297A2":E.primaryDarkBlue,_m=e=>e.status===Qe.UPLOADING?`${e.currentUpload} / ${e.sizeText}`:e.sizeText,Bm=()=>{const e=We(new Date).date();let o="th";return e===1||e===21||e===31?o="st":e===2||e===22?o="nd":(e===3||e===23)&&(o="rd"),We(new Date).format(`MMM D[${o}] YYYY @ h:mm A`)},Um={all:()=>["FOLDERS"]},Wm=async e=>(await ie.get("folders/new",{params:e})).data,Hm=e=>Ce.useQuery(Um.all(),()=>Wm(e),{select:o=>[...o&&o.folders||[],{folderId:_e.value,name:_e.label,isDeletable:!1}]}),qn={MY_FOLDERS:"MY FOLDERS",SHARED_WITH_ME:"SHARED WITH ME"},qm=i.div`
|
|
3591
3591
|
display: flex;
|
|
3592
3592
|
align-items: center;
|
|
3593
3593
|
padding: 7px 16px 0px 16px;
|
|
3594
3594
|
gap: 12px;
|
|
3595
|
-
`,
|
|
3595
|
+
`,Gm=i(tt).attrs({as:"p"})`
|
|
3596
3596
|
font-size: 11px;
|
|
3597
3597
|
line-height: 16px;
|
|
3598
3598
|
font-weight: 600;
|
|
3599
3599
|
color: ${({theme:e})=>e.colors.primary[40]};
|
|
3600
|
-
`,
|
|
3600
|
+
`,Ym=i.div`
|
|
3601
3601
|
flex: 1;
|
|
3602
3602
|
width: 100%;
|
|
3603
3603
|
height: 1px;
|
|
3604
3604
|
background-color: ${({theme:e})=>e.colors.primary[5]};
|
|
3605
|
-
`,
|
|
3605
|
+
`,Qm=i.div`
|
|
3606
3606
|
display: -webkit-box;
|
|
3607
3607
|
-webkit-box-orient: vertical;
|
|
3608
3608
|
-webkit-line-clamp: 1;
|
|
@@ -3616,27 +3616,27 @@
|
|
|
3616
3616
|
font-style: normal;
|
|
3617
3617
|
font-weight: 500;
|
|
3618
3618
|
line-height: 16px; /* 133.333% */
|
|
3619
|
-
`,
|
|
3619
|
+
`,Zm=i.div`
|
|
3620
3620
|
display: block;
|
|
3621
3621
|
width: 100%;
|
|
3622
|
-
`,
|
|
3622
|
+
`,Km=i.div`
|
|
3623
3623
|
width: 100%;
|
|
3624
3624
|
overflow: hidden;
|
|
3625
3625
|
color: var(--covideo-grey-80, #4e5461);
|
|
3626
3626
|
text-overflow: ellipsis;
|
|
3627
3627
|
white-space: nowrap;
|
|
3628
|
-
`,
|
|
3628
|
+
`,Xm=(e,o,r,s)=>{if(typeof e>"u")return null;switch(e){case"folder":return r.includes("option-0")&&s!==_e.value?t.jsx("div",{style:{marginRight:"-6px",marginBottom:"-3px"},children:t.jsx(H.MdCreateNewFolder,{size:16})}):o&&t.jsx(ve.IoMdCheckmark,{size:20});case"sharedFolder":return o?o&&t.jsx(ve.IoMdCheckmark,{size:20}):t.jsx("div",{style:{marginRight:"-6px",marginBottom:"-3px"},children:t.jsx(H.MdFolderShared,{size:16})});case"accounts":return o?o&&t.jsx(ve.IoMdCheckmark,{size:20}):t.jsx("div",{style:{marginRight:"-6px",marginBottom:"-3px"},children:t.jsx(H.MdSupervisorAccount,{size:16})});default:return null}},Jm=({children:e,...o})=>{const{selectProps:r,isSelected:s,innerProps:n}=o;return e===qn.MY_FOLDERS||e===qn.SHARED_WITH_ME?t.jsxs(qm,{children:[t.jsx(Gm,{children:e}),t.jsx(Ym,{})]}):t.jsx(Ze.components.Option,{...o,children:t.jsxs(Zm,{children:[t.jsxs(cd,{children:[t.jsx(Km,{children:e}),t.jsx(ld,{children:Xm(o.data.isFolderShared||o.data.access?o.data.access?"accounts":"sharedFolder":r.icon,s,n.id??"",o.data.value)})]}),!!o.data.sharedBy&&t.jsxs(Qm,{children:["Shared by ",o.data.sharedBy]})]})})},ex=e=>{const{options:o,value:r,onChange:s}=e,n=i.useTheme(),a={options:o,value:r,onChange:s},c=u=>t.jsx(Hi,{menuIsOpen:u.selectProps.menuIsOpen,children:t.jsx(H.MdArrowDropDown,{size:18,opacity:.5})}),d=u=>u.children,l={container:u=>({...u}),control:(u,g)=>({...u,boxShadow:"none",borderRadius:6,minHeight:"40px",cursor:"pointer",...qi(g),"&:hover":{borderColor:n.colors.primary[100]},"&:focus-within":{borderColor:n.colors.primary[100]}}),singleValue:u=>({...u,width:"95%"}),valueContainer:u=>({...u,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",flexWrap:"nowrap"}),input:u=>({...u}),menuPortal:u=>({...u,zIndex:9999}),menuList:u=>({...u,height:"auto"}),menu:u=>({...u,marginTop:2,color:E.primaryDarkBlue}),option:(u,g)=>({...u,height:40,display:"flex",alignItems:"center",padding:"0 16px",cursor:"pointer",transition:"all 0.3s",fontWeight:600,fontSize:15,zIndex:1,...Gi(g,n)})};return t.jsx(Ze,{...a,icon:"folder",error:!1,className:"dropdown",isDisabled:!1,"aria-label":"Aria label is missing",menuPosition:"absolute",menuPlacement:"auto",maxMenuHeight:220,menuShouldScrollIntoView:!1,menuPortalTarget:null,isLoading:!1,components:{DropdownIndicator:c,IndicatorSeparator:()=>null,Option:Jm,SingleValue:d},styles:l,isSearchable:!0})},qr={VIRTUAL_BACKGROUNDS:10,FOLDER_ORGANIZATION:11,TELEPROMPTER:50},Gr=(e,o)=>o&&e&&e.user&&e.user.packageDetails?e.user.packageDetails.id===0?!0:!e.user.packageDetails.products||!e.user.packageDetails.products.length?!1:e.user.packageDetails.products.includes(o):!1,Gn={MY_FOLDERS:"MY FOLDERS",SHARED_WITH_ME:"SHARED WITH ME"},Yn={MY_FOLDERS:"my_folders",SHARED_WITH_ME:"shared_with_me"},tx=i.div`
|
|
3629
3629
|
width: ${({width:e})=>e};
|
|
3630
3630
|
margin-top: 12px;
|
|
3631
3631
|
margin-bottom: 12px;
|
|
3632
3632
|
justify-content: center;
|
|
3633
|
-
`,
|
|
3633
|
+
`,ox=i.div`
|
|
3634
3634
|
font-weight: 500;
|
|
3635
3635
|
font-size: 14px;
|
|
3636
3636
|
line-height: 20px;
|
|
3637
3637
|
color: ${E.midGrey};
|
|
3638
3638
|
margin-bottom: 8px;
|
|
3639
|
-
`,
|
|
3639
|
+
`,rx=({value:e,setValue:o,showSharedWithMeFolders:r=!0,showLabel:s=!0,width:n="100%",showAllFolderOption:a=!0})=>{const{t:c}=W.useTranslation(),{userData:d}=me(),{data:l=[],refetch:u}=Hm({getShared:!0}),g=Gr(d,qr.FOLDER_ORGANIZATION);p.useEffect(()=>{u()},[]);let h=[];if(g){let x=(l==null?void 0:l.filter(m=>!m.hasOwnProperty("access")&&m.folderId!==_e.value).map(m=>({value:m.folderId,label:m.name,isFolderShared:!!m.isFolderShared,access:!!m.hasOwnProperty("access")})))||[],y=(l==null?void 0:l.filter(m=>!!m.hasOwnProperty("access")&&m.access==="edit").map(m=>({value:m.folderId,label:m.name,isFolderShared:!!m.isFolderShared,access:!!m.hasOwnProperty("access"),sharedBy:m.sharedBy})))||[];a&&(h=[{value:_e.value,label:_e.label,isFolderShared:!1,access:!1}]),h=h.concat([{value:Yn.MY_FOLDERS,label:Gn.MY_FOLDERS,isFolderShared:!1,access:!1}]),x.length&&(h=h.concat(x)),r&&y.length&&(h=h.concat([{value:Yn.SHARED_WITH_ME,label:Gn.SHARED_WITH_ME,isFolderShared:!1,access:!1}],y))}return p.useEffect(()=>{l&&l.length&&o&&o({value:l[0].folderId.toString(),label:l[0].name})},[l]),t.jsxs(tx,{width:n,children:[s&&t.jsx(ox,{children:c("Select Folder")}),t.jsx(ex,{value:e,onChange:x=>{o&&o(x)},options:[...h]})]})},nx={value:-2,label:"Primary",isFolderShared:!1,access:"edit"},ix=i.div`
|
|
3640
3640
|
padding-bottom: 64px;
|
|
3641
3641
|
display: flex;
|
|
3642
3642
|
position: relative;
|
|
@@ -3647,20 +3647,20 @@
|
|
|
3647
3647
|
${({theme:e})=>e.containerWidth<z.md&&i.css`
|
|
3648
3648
|
width: 100%;
|
|
3649
3649
|
`}
|
|
3650
|
-
`,
|
|
3650
|
+
`,sx=i.div`
|
|
3651
3651
|
margin-bottom: 24px;
|
|
3652
3652
|
max-width: 488px;
|
|
3653
3653
|
.fullscreen {
|
|
3654
3654
|
height: auto;
|
|
3655
3655
|
display: block;
|
|
3656
3656
|
}
|
|
3657
|
-
`,
|
|
3657
|
+
`,ax=i($e.Form)`
|
|
3658
3658
|
width: 380px;
|
|
3659
3659
|
|
|
3660
3660
|
${({theme:e})=>e.containerWidth<z.md&&i.css`
|
|
3661
3661
|
width: 100%;
|
|
3662
3662
|
`}
|
|
3663
|
-
`,
|
|
3663
|
+
`,cx=i(je)`
|
|
3664
3664
|
flex-flow: initial;
|
|
3665
3665
|
align-items: flex-start;
|
|
3666
3666
|
justify-content: space-between;
|
|
@@ -3673,11 +3673,11 @@
|
|
|
3673
3673
|
height: 437px;
|
|
3674
3674
|
background: '#f6f7f9';
|
|
3675
3675
|
margin-top: 90px;
|
|
3676
|
-
`,
|
|
3676
|
+
`,lx=(e,o)=>{const r=(Math.random()+1).toString(36).substring(2);return`${o.userId}_${o.customerId}_${r}.${e}`},Yr=({videoBlob:e,handleGoToRecordHome:o,autoSave:r=!1})=>{var G;const{t:s}=W.useTranslation(),[n,a]=p.useState(null),{userData:c}=me(),d=it.useHistory(),{customer:l}=c,{userId:u}=c,[g,h]=p.useState(!1),x=Bm(),y=Ht(),{trackGTMDiscardVideoEvent:m}=Ge(),{trackVideoSpecificPagesManually:w}=bt({vin:""}),{setCdkAmplitudeFields:f,setRecordingFormData:b,isLoading:S,createProgress:T,encodeProgress:V,uploadToS3Progress:I,progressState:L}=jm({contineToInsert:g}),v=Xe(c),C=st(c),$=c.automotiveRole===oo.TECHNICIAN,R=p.useRef(),j=p.useRef(!1),{data:A,isLoading:P}=Y0({page:0,size:200,filterByDepartment:!0}),M=[{customerId:l.customerId,role:oo.SERVICE_ADVISOR},{customerId:l.customerId,role:oo.SERVICE_MANAGER}],{isLoading:N,results:D}=gm({params:M,enabled:C});p.useEffect(()=>{w==null||w({...vt.RECORD_VIDEOS_DETAILS})},[]),p.useEffect(()=>{const q=URL.createObjectURL(e);return a(q),()=>{URL.revokeObjectURL(q)}},[e]);const O=q=>{const ee=lx(fo,c),B=new File([e],ee,{type:e.type});b({...q,file:B})},U=()=>{o(),m==null||m()},Y=((G=A==null?void 0:A.attributes)==null?void 0:G.map(q=>{var B,de;return{value:q.type==="dropdown"&&((de=(B=q.dropdownValues)==null?void 0:B.find(te=>te.default))==null?void 0:de.value)||(q==null?void 0:q.default)||"",...q}}))||[],ne={title:x,folder:nx,videoTags:[],attributes:Y,...v?{videoRequest:{customerName:"",videoType:"",vehicle:{vin:"",stockNumber:""},advisorId:C&&!$?u:"",repairOrderNumber:"",note:""}}:{}};p.useEffect(()=>{!r||j.current||P||N||(j.current=!0,f({values:ne,initialValues:ne}),O(ne))},[r,P,N,x]);const K=Oe.object().shape({attributes:Oe.array().of(Oe.object().shape({value:Oe.string().when("isRequired",{is:1,then:Oe.string().required(s("This field is required")),otherwise:Oe.string()})})),title:Oe.string().trim().required(s("This field is required")).matches(/^[^.]*$/,s("Title should not contain a dot (.)")),...v?{videoRequest:Oe.object().shape({advisorId:Oe.string().when([],{is:()=>$,then:Oe.string().nullable().required(s("Advisor ID is required")),otherwise:Oe.string()}),repairOrderNumber:Oe.string().when([],{is:()=>$,then:Oe.string().required(s("Repair Order Number is required.")),otherwise:Oe.string()})})}:{}});return P||N||n===null?t.jsx(Ue,{isLoading:!0}):S?t.jsx(Qn,{style:{width:y?"100%":770},children:t.jsx(Hn,{progressState:L,encodeProgress:V,uploadToS3Progress:I,createProgress:T})}):r?t.jsx(Qn,{style:{width:y?"100%":770},children:t.jsx(Hn,{progressState:L,encodeProgress:V,uploadToS3Progress:I,createProgress:T})}):t.jsxs(ix,{children:[t.jsx($e.Formik,{initialValues:ne,validateOnMount:!0,onSubmit:q=>(f({values:q,initialValues:ne}),O(q)),validationSchema:K,children:({values:q,setFieldValue:ee})=>t.jsxs(t.Fragment,{children:[t.jsx(Q0,{onDiscardHandler:U,setContineToInsert:h}),t.jsxs(cx,{flexDirection:"column",width:"100%",gap:"36px",children:[t.jsxs(ax,{children:[t.jsx(dt,{name:"title",label:s("Video Title"),isRequired:!0}),t.jsx($e.Field,{name:"folder",component:rx,value:q.folder,setValue:B=>ee("folder",B),showAllFolderOption:!1}),t.jsx(sm,{}),t.jsx(um,{}),t.jsx(dm,{results:D,fetchSoldVehiclesForAutomotive:!1}),t.jsx(cm,{})]}),t.jsx(sx,{children:t.jsx(Nt,{videoRef:R,videoSource:n})})]})]})}),t.jsx(Eo,{when:!0,stay:!0,navigate:q=>d.push(q),shouldBlockNavigation:()=>!0,title:s("Leave without saving the recording?"),text:s("Your recording will not be saved. This action can’t be undone."),confirmButtonText:s("Continue"),discardButtonText:s("Leave")})]})},dx=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,showPreview:s=!0,onStartUpladingVoiceOverHandler:n})=>{const a=p.useRef(null),{trackVideoSpecificPagesManually:c}=bt({vin:""}),{stopRecording:d,pauseRecording:l,startCountDown:u,stopCountDown:g,status:h,recordedBlob:x,countdown:y,timeInSeconds:m}=Wr({screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:n,videoRef:a,shouldStartCountdown:!Es,handleGoToRecordHome:r});return p.useEffect(()=>{c==null||c({...vt.VIDEOS_RECORDER})},[]),h===le.DONE&&x&&s?t.jsx(Yr,{videoBlob:x,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Br,{status:h,handleGoToRecordHome:r}),t.jsx(Ur,{videoRef:a,countdown:y,status:h}),t.jsx(Hr,{startCountDown:u,stopCountDown:g,pauseRecording:l,stopRecording:d,status:h,timeInSeconds:m})]})},ux=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,showPreview:s=!0,onStartUpladingVoiceOverHandler:n})=>{const a=p.useRef(null),{trackVideoSpecificPagesManually:c}=bt({vin:""}),{stopRecording:d,pauseRecording:l,startCountDown:u,stopCountDown:g,status:h,recordedBlob:x,countdown:y,timeInSeconds:m}=Wr({screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:n,shouldStartCountdown:!0,videoRef:a,handleGoToRecordHome:r});return p.useEffect(()=>{c==null||c({...vt.VIDEOS_RECORDER})},[]),h===le.DONE&&x&&s?t.jsx(Yr,{videoBlob:x,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Br,{status:h,handleGoToRecordHome:r}),t.jsx(Ur,{videoRef:a,countdown:y,status:h}),t.jsx(Hr,{startCountDown:u,stopCountDown:g,pauseRecording:l,stopRecording:d,status:h,timeInSeconds:m})]})};var to=(e=>(e.SCREEN="Screen",e.CAM="Camera",e.SCREEN_AND_CAM="Screen+Camera",e))(to||{}),Ut=(e=>(e.OPENED="Opened",e.APPLIED="Applied",e.CLOSED="Closed",e.REMOVED="Removed",e))(Ut||{});const As=p.createContext({}),px=()=>{const e=localStorage.getItem("TeleprompterSettings");if(e===null)return null;try{return JSON.parse(e)}catch(o){return console.error("Error parsing localStorage data:",o),null}},hx=e=>{localStorage.setItem("TeleprompterSettings",JSON.stringify(e))},gx=({children:e})=>{const{trackGTMRecordingToolIntearctionEvent:o}=Ge(),[r,s]=p.useState(!1),[n,a]=p.useState(!1),[c,d]=p.useState(px()),[l,u]=p.useState(!1),[g,h]=p.useState(!1),x=I=>{d(I),hx({...I,activeScriptId:"",content:""}),a(!1)},y=()=>{g||(s(!0),a(!0),o==null||o({action:Ut.OPENED}))},m=I=>{u(!1),d({...c,speed:I,scriptSize:(c==null?void 0:c.scriptSize)||""}),u(!0)},w=()=>{u(!l)},f=()=>{a(!1),s(!1),o==null||o({action:Ut.CLOSED})},b=()=>{s(!1),o==null||o({action:Ut.REMOVED})},S=()=>{s(!0)},T=()=>{u(!0)},V=I=>{h(I)};return t.jsx(As.Provider,{value:{isUsingTeleprompter:r,showTeleprompterModal:n,teleprompterSettings:c,isTeleprompterPlaying:l,isTeleprompterDisabled:g,saveTeleprompterSettingsHandler:x,onEditOrTurnOnTeleprompterHandler:y,onDropdownTeleprompterSpeedChange:m,turnOnTeleprompterPlaying:T,toggleTeleprompterPlaying:w,onTeleprompterModalClose:f,turnOffTeleprompter:b,turnOnTeleprompter:S,disableOrEnableTeleprompter:V},children:e})},To=()=>{const e=p.useContext(As);if(e===void 0)throw new Error("useTeleprompter must be used within a TeleprompterProvider");return e},mx=({status:e})=>{const{colors:o,isCdkEnviroment:r}=i.useTheme(),{t:s}=W.useTranslation(),{turnOffTeleprompter:n,onEditOrTurnOnTeleprompterHandler:a,isUsingTeleprompter:c,isTeleprompterDisabled:d}=To();return t.jsxs(je,{children:[t.jsxs(je,{gap:"4px",children:[t.jsx(H.MdSubtitles,{color:o.neutral[60],size:20}),t.jsx(xo,{color:o.neutral[60],children:s("Teleprompter")})]}),t.jsx(F.Button,{variant:"secondary",disabled:d||e===le.COUNTDOWN,text:s(c?"Edit":"Turn on"),onClick:a}),c&&t.jsx(F.Button,{title:s("Turn Off Teleprompter"),icon:t.jsx(H.MdPowerSettingsNew,{size:20}),onClick:n,variant:r?"text":"destructive"})]})},xx=()=>{const{teleprompterSettings:e,isUsingTeleprompter:o,toggleTeleprompterPlaying:r,isTeleprompterPlaying:s,onDropdownTeleprompterSpeedChange:n}=To(),{t:a}=W.useTranslation();return o?t.jsx(t.Fragment,{children:t.jsxs(je,{m:"0 0 0 auto",children:[t.jsx(Ne,{placeholder:a("Set teleprompter speed"),value:e==null?void 0:e.speed,onChange:c=>n(c),options:Is(e==null?void 0:e.scriptSize,a),isSearchable:!1,height:40,zIndexProp:9999,menuZIndexProp:9,extendStyles:{container:{width:180}},creatable:!1}),t.jsx(F.Button,{text:`${s?"Pause":"Play"} Teleprompter`,icon:s?t.jsx(H.MdPause,{size:20}):t.jsx(H.MdPlayArrow,{size:20}),onClick:r})]})}):t.jsx(t.Fragment,{})},fx=({status:e})=>{const o=e===le.RECORDING||e===le.PAUSED;return t.jsx(t.Fragment,{children:o?t.jsx(xx,{}):t.jsx(mx,{status:e})})},vx=i.div`
|
|
3677
3677
|
overflow-wrap: break-word;
|
|
3678
3678
|
max-width: 600px;
|
|
3679
3679
|
font-size: ${e=>e.fontSize};
|
|
3680
|
-
`,
|
|
3680
|
+
`,bx=({content:e,fontSize:o})=>t.jsx(t.Fragment,{children:t.jsx(vx,{fontSize:o,children:e})}),wx=i.div`
|
|
3681
3681
|
position: absolute;
|
|
3682
3682
|
left: 0;
|
|
3683
3683
|
right: 0;
|
|
@@ -3703,7 +3703,7 @@
|
|
|
3703
3703
|
);
|
|
3704
3704
|
}
|
|
3705
3705
|
overflow: hidden;
|
|
3706
|
-
`,
|
|
3706
|
+
`,yx=i.div`
|
|
3707
3707
|
scroll-behavior: smooth;
|
|
3708
3708
|
box-sizing: border-box;
|
|
3709
3709
|
font-style: normal;
|
|
@@ -3747,7 +3747,7 @@
|
|
|
3747
3747
|
.marquee-container:not(.horizontal)::after {
|
|
3748
3748
|
background: transparent;
|
|
3749
3749
|
}
|
|
3750
|
-
`,
|
|
3750
|
+
`,Cx=({status:e})=>{const{teleprompterSettings:o,isUsingTeleprompter:r,isTeleprompterPlaying:s}=To(),n=()=>{ta.animateScroll.scrollMore(20,{containerId:"teleprompter",duration:50,smooth:!0,offset:50})};return p.useEffect(()=>{var c;let a;return s&&e===le.RECORDING?(a&&clearInterval(a),a=setInterval(n,((c=o==null?void 0:o.speed)==null?void 0:c.value)||100)):a&&clearInterval(a),()=>{a&&clearInterval(a)}},[s,o==null?void 0:o.speed,e]),r?t.jsxs(t.Fragment,{children:[t.jsx(wx,{className:o==null?void 0:o.scriptPosition}),t.jsx(yx,{id:"teleprompter",style:{top:(o==null?void 0:o.scriptPosition)==="top"?"0px":"30%"},children:t.jsx(bx,{content:eo((o==null?void 0:o.content)||""),fontSize:(o==null?void 0:o.scriptSize)||"16px"})})]}):t.jsx(t.Fragment,{})},Sx=i.div`
|
|
3751
3751
|
height: 440px;
|
|
3752
3752
|
width: 100%;
|
|
3753
3753
|
z-index: 4;
|
|
@@ -3759,14 +3759,14 @@
|
|
|
3759
3759
|
justify-content: center;
|
|
3760
3760
|
top: 0;
|
|
3761
3761
|
left: 0;
|
|
3762
|
-
`,Qr=({text:e})=>t.jsx(
|
|
3762
|
+
`,Qr=({text:e})=>t.jsx(Sx,{children:t.jsx("div",{children:t.jsx(Ue,{isLoading:!0,text:e})})}),Ko={url:"",type:"none",index:-1,privacy:"PUBLIC",id:""},jx=e=>{const o=localStorage.getItem("covideoVirtualBackground")||"";try{const r=JSON.parse(o);return r&&typeof r=="object"&&(r==null?void 0:r[e])||Ko}catch{return Ko}},Ex=()=>{const e=localStorage.getItem("covideoVirtualBackground")||"";try{const o=JSON.parse(e);return o&&typeof o=="object"?o:{}}catch{return{}}},Tx=(e,o)=>{const s={...Ex(),[o]:e};localStorage.setItem("covideoVirtualBackground",JSON.stringify(s))},kx={all:()=>["CUSTOM_VIRTUAL_BACKGROUND"]},Ix=async()=>(await ie.get("custom-virtual-background")).data,Ax=()=>{const{toast:e}=Te(),{t:o}=W.useTranslation(),{data:r,isLoading:s,refetch:n}=Ce.useQuery(kx.all(),()=>Ix(),{refetchOnMount:!0,onError:()=>{e({message:o("We're currently experiencing difficulties fetching custom virtual backgrounds.")})}});return{data:r||[],isLoading:s,refetch:n}},Rx=e=>k.createElement("svg",{width:20,height:20,viewBox:"0 0 20 20",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{d:"M2 3C2 2.45 2.45 2 3 2H8C8.55 2 9 1.55 9 1C9 0.45 8.55 0 8 0H2C0.9 0 0 0.9 0 2V8C0 8.55 0.45 9 1 9C1.55 9 2 8.55 2 8V3ZM7.61 11.49L4.65 15.19C4.39 15.52 4.62 16 5.04 16H15C15.41 16 15.65 15.53 15.4 15.2L13.4 12.53C13.2 12.26 12.8 12.26 12.6 12.53L10.97 14.71L8.39 11.49C8.19 11.24 7.81 11.24 7.61 11.49ZM15 6.5C15 5.67 14.33 5 13.5 5C12.67 5 12 5.67 12 6.5C12 7.33 12.67 8 13.5 8C14.33 8 15 7.33 15 6.5ZM18 0H12C11.45 0 11 0.45 11 1C11 1.55 11.45 2 12 2H17C17.55 2 18 2.45 18 3V8C18 8.55 18.45 9 19 9C19.55 9 20 8.55 20 8V2C20 0.9 19.1 0 18 0ZM18 17C18 17.55 17.55 18 17 18H12C11.45 18 11 18.45 11 19C11 19.55 11.45 20 12 20H18C19.1 20 20 19.1 20 18V12C20 11.45 19.55 11 19 11C18.45 11 18 11.45 18 12V17ZM1 11C0.45 11 0 11.45 0 12V18C0 19.1 0.9 20 2 20H8C8.55 20 9 19.55 9 19C9 18.45 8.55 18 8 18H3C2.45 18 2 17.55 2 17V12C2 11.45 1.55 11 1 11Z",fill:"#272A32"})),$x=i(Rx)`
|
|
3763
3763
|
width: ${e=>e.width||"16px"};
|
|
3764
3764
|
height: ${e=>e.height||"16px"};
|
|
3765
3765
|
path {
|
|
3766
3766
|
fill: ${e=>e.color||"currentColor"};
|
|
3767
3767
|
opacity: ${e=>e.opacity||"inherit"};
|
|
3768
3768
|
}
|
|
3769
|
-
`,br=720,wr=1280,Zn=(e,o,r)=>{const s=e.createShader(o);return e.shaderSource(s,r),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS)?s:(console.error("Error compiling shader:",e.getShaderInfoLog(s)),e.deleteShader(s),null)},
|
|
3769
|
+
`,br=720,wr=1280,Zn=(e,o,r)=>{const s=e.createShader(o);return e.shaderSource(s,r),e.compileShader(s),e.getShaderParameter(s,e.COMPILE_STATUS)?s:(console.error("Error compiling shader:",e.getShaderInfoLog(s)),e.deleteShader(s),null)},Vx=(e,o,r)=>{const s=Zn(e,e.VERTEX_SHADER,o),n=Zn(e,e.FRAGMENT_SHADER,r);if(!s||!n)return null;const a=e.createProgram();return e.attachShader(a,s),e.attachShader(a,n),e.linkProgram(a),e.getProgramParameter(a,e.LINK_STATUS)?(e.useProgram(a),a):(console.error("Error linking program:",e.getProgramInfoLog(a)),e.deleteProgram(a),null)},Xo=(e,o,r,s,n)=>{e.bindTexture(e.TEXTURE_2D,o),r instanceof Uint8Array?e.texImage2D(e.TEXTURE_2D,0,e.ALPHA,s,n,0,e.ALPHA,e.UNSIGNED_BYTE,r):e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,r)},Kn=e=>{const o=e.createTexture();return e.bindTexture(e.TEXTURE_2D,o),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),o},Lx=e=>{const o=e.getContext("webgl2");if(!o)return console.error("WebGL not supported"),{gl:null,program:null};o.viewport(0,0,wr,br);const n=Vx(o,`
|
|
3770
3770
|
precision highp float;
|
|
3771
3771
|
|
|
3772
3772
|
attribute vec4 a_position;
|
|
@@ -3837,7 +3837,7 @@
|
|
|
3837
3837
|
gl_FragColor = blended;
|
|
3838
3838
|
}
|
|
3839
3839
|
}
|
|
3840
|
-
`);return n?{gl:o,program:n}:(console.error("Failed to create WebGL program"),{gl:null,program:null})},
|
|
3840
|
+
`);return n?{gl:o,program:n}:(console.error("Failed to create WebGL program"),{gl:null,program:null})},Mx=(e,o)=>{const r=e.getAttribLocation(o,"a_position"),s=e.getAttribLocation(o,"a_texCoord"),n=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,n);const a=new Float32Array([-1,-1,1,-1,-1,1,1,1]);e.bufferData(e.ARRAY_BUFFER,a,e.STATIC_DRAW),e.enableVertexAttribArray(r),e.vertexAttribPointer(r,2,e.FLOAT,!1,0,0);const c=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,c);const d=new Float32Array([0,0,1,0,0,1,1,1]);e.bufferData(e.ARRAY_BUFFER,d,e.STATIC_DRAW),e.enableVertexAttribArray(s),e.vertexAttribPointer(s,2,e.FLOAT,!1,0,0)},Dx=(e,o,r,s,n,a,c,d,l,u,g=[1,1])=>{e.useProgram(o),e.activeTexture(e.TEXTURE0),e.bindTexture(e.TEXTURE_2D,r),e.activeTexture(e.TEXTURE1),e.bindTexture(e.TEXTURE_2D,s),e.activeTexture(e.TEXTURE2),e.bindTexture(e.TEXTURE_2D,n),e.activeTexture(e.TEXTURE3),e.bindTexture(e.TEXTURE_2D,a),e.activeTexture(e.TEXTURE4),e.bindTexture(e.TEXTURE_2D,c),e.activeTexture(e.TEXTURE5),e.bindTexture(e.TEXTURE_2D,d),e.activeTexture(e.TEXTURE6),e.bindTexture(e.TEXTURE_2D,l),e.activeTexture(e.TEXTURE7),e.bindTexture(e.TEXTURE_2D,u);const h=e.getUniformLocation(o,"u_foreground"),x=e.getUniformLocation(o,"u_background"),y=e.getUniformLocation(o,"u_confidenceMask"),m=e.getUniformLocation(o,"u_confidenceMaskHair"),w=e.getUniformLocation(o,"u_confidenceMaskBody"),f=e.getUniformLocation(o,"u_confidenceMaskFace"),b=e.getUniformLocation(o,"u_confidenceMaskClothes"),S=e.getUniformLocation(o,"u_confidenceMaskOther");e.uniform1i(h,0),e.uniform1i(x,1),e.uniform1i(y,2),e.uniform1i(m,3),e.uniform1i(w,4),e.uniform1i(f,5),e.uniform1i(b,6),e.uniform1i(S,7),e.clear(e.COLOR_BUFFER_BIT);const T=e.getUniformLocation(o,"u_backgroundScale");e.uniform2fv(T,g),e.drawArrays(e.TRIANGLE_STRIP,0,4)},Ox=e=>{e.useProgram(null),e.clearColor(0,0,0,0),e.clear(e.COLOR_BUFFER_BIT)},yr=document.createElement("canvas"),Xn=yr.getContext("2d");let po=0;const Nx=(e,o,r)=>{let s=o,n=r,a=0,c=0;return o/r<e.width/e.height?(s=r*(e.width/e.height),a=(s-o)/2):(n=o*e.height/e.width,c=(n-r)/2),yr.width=s,yr.height=n,Xn.drawImage(e,0,0,s,n),Xn.getImageData(a,c,o,r).data},Jn=(e,o,r,s)=>{const n=e/o,a=r/s;let c=1,d=1;return a<n?d=a/n:c=n/a,[c,d]},Px=(e,o,r)=>{const s=p.useRef(null),n=p.useRef(!0),a=p.useRef(null),c=p.useRef(null),d=p.useRef({gl:null,program:null}),l=p.useRef(),u=p.useRef([1,1]);let g;const h=T=>{g=Kn(T),l.current=Kn(T)},x=()=>{e.current&&(d.current=Lx(e.current),d.current.gl&&(h(d.current.gl),c.current&&(Xo(d.current.gl,l.current,c.current,e.current.width,e.current.height),u.current=Jn(wr,br,c.current.width,c.current.height))))},y=async()=>{if(s.current)return;const T=await Jr.FilesetResolver.forVisionTasks("https://cdn.jsdelivr.net/npm/@mediapipe/tasks-vision@0.10.2/wasm");x();const V=await Jr.ImageSegmenter.createFromOptions(T,{baseOptions:{modelAssetPath:"https://storage.googleapis.com/mediapipe-models/image_segmenter/selfie_multiclass_256x256/float32/latest/selfie_multiclass_256x256.tflite",delegate:"GPU"},runningMode:"VIDEO",outputCategoryMask:!1,outputConfidenceMasks:!0,canvas:e.current});s.current=V,r(!1),S()},m=()=>{if(s.current&&(s.current.close(),s.current=null),d.current.gl&&Ox(d.current.gl),e.current){const T=e.current.getContext("2d");T&&T.clearRect(0,0,e.current.width,e.current.height)}},w=T=>{if(!T.confidenceMasks||!e.current||!a.current||!c.current||!o.current){T.close();return}const{gl:V,program:I}=d.current;if(!V||!I)return;Mx(V,I);const L=T.confidenceMasks[0].getAsWebGLTexture(),v=T.confidenceMasks[1].getAsWebGLTexture(),C=T.confidenceMasks[2].getAsWebGLTexture(),$=T.confidenceMasks[3].getAsWebGLTexture(),R=T.confidenceMasks[4].getAsWebGLTexture(),j=T.confidenceMasks[5].getAsWebGLTexture();Dx(V,I,g,l.current,L,v,C,$,R,j,u.current),window.requestAnimationFrame(S),T.close()},f=()=>{e.current&&o.current&&c.current&&(a.current=Nx(c.current,e.current.width,e.current.height),d.current.gl&&(u.current=Jn(wr,br,c.current.width,c.current.height),Xo(d.current.gl,l.current,c.current,e.current.width,e.current.height)))};function b(){const T=Math.floor(performance.now());return T<=po?po+=1:po=T,po}const S=async()=>{if(e.current&&o.current&&s.current&&c.current){const T=o.current.videoWidth,V=o.current.videoHeight;n.current&&(n.current=!1,e.current.width=T,e.current.height=V,f());let I=b();d.current.gl&&Xo(d.current.gl,g,o.current,T,V),s.current.segmentForVideo(o.current,I,w)}};return{imageRef:c,onDestroyVirtualBackgroundHandler:m,getCavansBgImage:f,onCreateVirtualBackgroundHandler:y}};let jt;const ko=async()=>{if(!jt){const{data:e}=await ie.get("/droplr/auth");na.set("jwtToken",e.jwt,{domain:".covideo.com",sameSite:"strict",secure:!0}),jt=new en.Client({auth:new en.JwtAuth(e.jwt)}),jt.sharedDrop=new Fx(jt)}};class Fx{constructor(o){this.client=o,this.path="drops/groups/shared"}async get(o,r={}){return(await this.client.get(`${this.path}/${o}`,r)).data}async list(o={},r={}){const s={params:o},n=await this.client.get(this.path,Object.assign(s,r));return{count:n.headers["x-results-count"],hasMore:n.headers["x-has-more"],results:n.data}}}const zx=async(e,o,r,s)=>(await ko(),jt.drops.create({type:"FILE",variant:o,title:e,content:r},{onUploadProgress:n=>{const a=n.loaded/n.total;Number(a.toFixed(2))*100}})),_x=async e=>{await ko();const o=await jt.boards.list(),r=(o==null?void 0:o.results)||[],s=(await ie.get("/board/all",{params:e})).data,n=(s==null?void 0:s.boards)||[],a=[];return r.forEach(c=>{const d=n.find(l=>l.droplrBoardId===c.id);a.push({...c,thumbnailUrl:(d==null?void 0:d.thumbnailUrl)||""})}),{boards:a,count:a.length}},ei=async e=>{if(e)return await ko(),jt.drops.get(e)},Bx={FILE:"FILE"};var Cr=(e=>(e.SHARED="shared",e.OWNED="owned",e))(Cr||{});const ti=async e=>{await ko();const{order:o,sort:r,page:s=0,size:n=10,type:a="",variant:c="",search:d="",boardId:l}=e;let u={order:o,sort_by:r,offset:s*n,amount:n,board:""};a&&(u.type=a,a===Bx.FILE&&c&&(u.variant=c)),d&&(u.search=d),l&&(u.board=l);const g=await jt.drops.list(u);return{drops:g.results,count:Number(g.count)||0,hasMore:(g==null?void 0:g.hasMore)||!1}},Ux=i.div`
|
|
3841
3841
|
margin-top: 24px;
|
|
3842
3842
|
padding: 0 32px;
|
|
3843
3843
|
width: 100%;
|
|
@@ -3858,17 +3858,17 @@
|
|
|
3858
3858
|
text-align: center;
|
|
3859
3859
|
color: ${E.coal};
|
|
3860
3860
|
}
|
|
3861
|
-
`,
|
|
3861
|
+
`,Wx=i.div`
|
|
3862
3862
|
margin-top: 24px;
|
|
3863
3863
|
background: #f6f7f9;
|
|
3864
3864
|
border-radius: 4px;
|
|
3865
3865
|
display: flex;
|
|
3866
3866
|
padding: 16px 32px;
|
|
3867
|
-
`,
|
|
3867
|
+
`,Hx=i.div`
|
|
3868
3868
|
width: 90%;
|
|
3869
|
-
`,
|
|
3869
|
+
`,qx=i.div`
|
|
3870
3870
|
width: 10%;
|
|
3871
|
-
`,
|
|
3871
|
+
`,Gx=i.div`
|
|
3872
3872
|
background: #ffffff;
|
|
3873
3873
|
border: 1px solid #d0d3d9;
|
|
3874
3874
|
box-sizing: border-box;
|
|
@@ -3880,7 +3880,7 @@
|
|
|
3880
3880
|
line-height: 24px;
|
|
3881
3881
|
color: ${E.coal};
|
|
3882
3882
|
padding: 8px 12px;
|
|
3883
|
-
`,
|
|
3883
|
+
`,Yx=i.progress`
|
|
3884
3884
|
background-color: ${E.lightgray};
|
|
3885
3885
|
border: none;
|
|
3886
3886
|
border-radius: 2px;
|
|
@@ -3905,37 +3905,37 @@
|
|
|
3905
3905
|
background: #ff8b22;
|
|
3906
3906
|
border-radius: 2px;
|
|
3907
3907
|
}
|
|
3908
|
-
`,
|
|
3908
|
+
`,Qx=i.div`
|
|
3909
3909
|
display: flex;
|
|
3910
3910
|
justify-content: space-between;
|
|
3911
3911
|
margin-top: 8px;
|
|
3912
|
-
`,
|
|
3912
|
+
`,Zx=i.div`
|
|
3913
3913
|
font-style: normal;
|
|
3914
3914
|
font-weight: normal;
|
|
3915
3915
|
font-size: 16px;
|
|
3916
3916
|
line-height: 24px;
|
|
3917
3917
|
color: ${e=>e.color?e.color:"#9297A2"};
|
|
3918
|
-
`,
|
|
3918
|
+
`,Kx=i.div`
|
|
3919
3919
|
font-style: normal;
|
|
3920
3920
|
font-weight: normal;
|
|
3921
3921
|
font-size: 16px;
|
|
3922
3922
|
line-height: 24px;
|
|
3923
3923
|
text-align: right;
|
|
3924
3924
|
color: ${E.coal};
|
|
3925
|
-
`,
|
|
3925
|
+
`,Xx=i.div`
|
|
3926
3926
|
margin-top: 24px;
|
|
3927
3927
|
width: 100%;
|
|
3928
|
-
`,
|
|
3928
|
+
`,Jx=i.div`
|
|
3929
3929
|
display: flex;
|
|
3930
3930
|
justify-content: space-between;
|
|
3931
3931
|
margin-top: 8px;
|
|
3932
|
-
`,
|
|
3932
|
+
`,ef=i.div`
|
|
3933
3933
|
width: 200px;
|
|
3934
|
-
`,
|
|
3934
|
+
`,tf=i.div`
|
|
3935
3935
|
margin-top: 24px;
|
|
3936
3936
|
height: 300px;
|
|
3937
3937
|
overflow-y: auto;
|
|
3938
|
-
`,
|
|
3938
|
+
`,of=i.div`
|
|
3939
3939
|
display: flex;
|
|
3940
3940
|
justify-content: center;
|
|
3941
3941
|
align-items: center;
|
|
@@ -3946,14 +3946,14 @@
|
|
|
3946
3946
|
font-size: 15px;
|
|
3947
3947
|
line-height: 24px;
|
|
3948
3948
|
color: #272a32;
|
|
3949
|
-
`,
|
|
3949
|
+
`,rf=i.div`
|
|
3950
3950
|
display: grid;
|
|
3951
3951
|
grid-gap: 16.5px;
|
|
3952
3952
|
grid-template-columns: 166px 166px 166px;
|
|
3953
3953
|
.selected {
|
|
3954
3954
|
border: 3px solid ${({theme:e})=>e.colors.primary[100]} !important;
|
|
3955
3955
|
}
|
|
3956
|
-
`,
|
|
3956
|
+
`,nf=i.div`
|
|
3957
3957
|
background: url('${e=>e.backgroundUrl?e.backgroundUrl:""}');
|
|
3958
3958
|
background-color: white;
|
|
3959
3959
|
background-repeat: no-repeat;
|
|
@@ -3966,7 +3966,7 @@
|
|
|
3966
3966
|
justify-content: center;
|
|
3967
3967
|
align-items: center;
|
|
3968
3968
|
border: 1px solid rgba(39, 42, 50, 0.1);
|
|
3969
|
-
`,
|
|
3969
|
+
`,sf=[{value:"file",text:"Files"},{value:"board",text:"Boards"}],af=e=>{const{handleModalClose:o,onSelect:r,selectedFile:s,selectedVirtualBackgroundUrl:n}=e,[a,c]=p.useState({name:"",sizeText:"",size:0,currentUpload:0,status:"",progress:0}),{t:d}=W.useTranslation(),{toast:l}=Te(),[u,g]=p.useState(0),[h,x]=p.useState({count:"0",hasMore:"false"}),[y,m]=p.useState([]),[w,f]=p.useState(""),[b,S]=p.useState(!0),[T,V]=p.useState([{label:d("All"),value:""}]),[I,L]=p.useState(T[0]),[v,C]=p.useState([]),{userData:$}=me(),R=(s==null?void 0:s.itemType)||sf[0].value,j=p.useCallback(async K=>{let G={name:K[0].name,status:Qe.WAITING,sizeText:Nm(K[0].size,2),size:K[0].size,progress:0,currentUpload:0};c(G);const q=new FileReader;q.onabort=()=>console.log("file reading was aborted"),q.onerror=()=>console.log("file reading has failed"),q.onload=async()=>{G={...G,status:Qe.UPLOADING},c(G);try{const ee=await zx(K[0].name,K[0].type,q.result);let B=(ee==null?void 0:ee.previewMedium)||"";if(B)G={...G,status:Qe.FINISHED,progress:100},c(G),setTimeout(()=>{U()},100);else{if(!ee||!ee.code){l({message:d("Error while uploading file, please try again later.")});return}G={...G,status:Qe.GENERATING_PREVIEW,progress:90},c(G),B=await A(a,ee.code,1500)||"",G={...G,status:Qe.FINISHED,progress:100},c(G),setTimeout(()=>{U()},150)}}catch{l({message:d("Error while uploading file, please try again later.")})}},q.readAsArrayBuffer(K[0])},[]),A=async(K,G,q)=>new Promise(ee=>{ei(G).then(B=>B&&B.previewMedium?ee(B.previewMedium):P(G,q)).then(B=>ee(B)).catch(()=>{})}),P=(K,G)=>new Promise(q=>{setTimeout(()=>{ei(K).then(ee=>ee&&ee.previewMedium?q(ee.previewMedium):G>=96e3?q(""):q(P(K,G*2))).catch(()=>{})},G)}),{getRootProps:M,getInputProps:N,isDragActive:D}=oa.useDropzone({onDrop:j,multiple:!1,accept:["image/png","image/jpeg"]}),O=async()=>{const K=await ti({boardId:I.value||"",search:w,page:u+1,type:"IMAGE",dropType:Cr.OWNED});g(u+1),x(K),m([...y,...K.drops])},U=async()=>{if(R!=="file")return;S(!0);const K=await ti({boardId:I.value||"",search:w,type:"IMAGE",dropType:Cr.OWNED});if(!v||v.length<=1){const G=await _x({userId:Number($.id),customerId:Number($.customerId)}).catch(()=>{});if(G&&G.boards){C(G.boards||[]);const q=ne(G.boards);V([...T,...q])}}x(K),S(!1),m(K.drops)};p.useEffect(()=>{R==="file"&&U()},[I,w,R]);const Y=!!a.name,ne=K=>K.map(q=>({label:q.name,value:q.id}))||[];return t.jsxs(t.Fragment,{children:[!Y&&t.jsxs(Ux,{isDragActive:D,...M(),children:[t.jsx("input",{...N()}),!D&&t.jsxs(t.Fragment,{children:[t.jsx("p",{children:d("Drag and drop files here to upload new file")}),t.jsx(F.Button,{text:d("Browse files..."),variant:"ghost"})]}),D&&t.jsx("p",{children:d("Drop files here")})]}),Y&&t.jsxs(Wx,{children:[t.jsxs(Hx,{children:[t.jsx(Gx,{children:a.name}),t.jsx(Yx,{value:a.progress,max:100}),t.jsxs(Qx,{children:[t.jsx(Zx,{color:zm(a.status),children:Fm(a.status)}),t.jsx(Kx,{children:_m(a)})]})]}),t.jsx(qx,{})]}),b&&t.jsx(Ue,{isLoading:b,height:"200px"}),!b&&t.jsxs(Xx,{children:[t.jsxs(Jx,{children:[t.jsx("div",{style:{width:"280px"}}),t.jsx("div",{style:{display:"flex"},children:t.jsx(ef,{children:t.jsx(Ne,{value:I,onChange:K=>{L(K)},options:T,placeholder:d("All"),isSearchable:!1,creatable:!1})})})]}),t.jsx(tf,{children:t.jsxs(ra,{dataLength:u*parseInt(h.count),next:O,hasMore:h.hasMore==="true",loader:t.jsx("h4",{children:d("Loading...")}),height:300,endMessage:t.jsx("p",{style:{textAlign:"center"},children:t.jsx("b",{children:d("No more files")})}),children:[t.jsx(rf,{children:y.map(K=>t.jsx(nf,{backgroundUrl:K.previewMedium,onClick:()=>{r(K.previewMedium,"custom",-1,K.privacy,K.code),o()},className:n===K.previewMedium?"selected":""},K.code))}),!y.length&&t.jsx(of,{children:d("No files found.")})]})})]})]})},cf=i.div`
|
|
3970
3970
|
width: 592px;
|
|
3971
3971
|
height: 648px;
|
|
3972
3972
|
background: #ffffff;
|
|
@@ -3975,11 +3975,11 @@
|
|
|
3975
3975
|
borde-rradius: 4px;
|
|
3976
3976
|
padding: 25px;
|
|
3977
3977
|
box-sizing: border-box;
|
|
3978
|
-
`,
|
|
3978
|
+
`,lf=i.div`
|
|
3979
3979
|
display: flex;
|
|
3980
3980
|
align-items: center;
|
|
3981
3981
|
justify-content: space-between;
|
|
3982
|
-
`,
|
|
3982
|
+
`,df=i.div`
|
|
3983
3983
|
width: 275px;
|
|
3984
3984
|
height: 24px;
|
|
3985
3985
|
|
|
@@ -3988,7 +3988,7 @@
|
|
|
3988
3988
|
font-size: 18px;
|
|
3989
3989
|
line-height: 24px;
|
|
3990
3990
|
color: #272a32;
|
|
3991
|
-
`,
|
|
3991
|
+
`,uf=i.div`
|
|
3992
3992
|
margin-left: 20px;
|
|
3993
3993
|
color: ${E.white};
|
|
3994
3994
|
height: 24px;
|
|
@@ -3997,7 +3997,7 @@
|
|
|
3997
3997
|
opacity: 0.7;
|
|
3998
3998
|
cursor: pointer;
|
|
3999
3999
|
}
|
|
4000
|
-
`,
|
|
4000
|
+
`,pf=({handleModalClose:e,selectedVirtualBackgroundUrl:o,onSelect:r})=>{const{t:s}=W.useTranslation();return t.jsx(Ot,{style:{position:"fixed"},children:t.jsxs(cf,{style:{width:"592px",height:"648px",background:"#FFFFFF",border:"1px solid #F7F8FA",boxShadow:"0px 4px 12px rgba(29, 30, 36, 0.04)",borderRadius:"4px"},children:[t.jsxs(lf,{children:[t.jsx(df,{children:s("Select your virtual background")}),t.jsx(uf,{title:"Close",children:t.jsx(ve.IoMdClose,{size:24,onClick:e,color:E.label})})]}),t.jsx("br",{}),t.jsx(af,{onSelect:r,handleModalClose:e,selectedVirtualBackgroundUrl:o})]})})},hf=i.div`
|
|
4001
4001
|
display: flex;
|
|
4002
4002
|
width: 100%;
|
|
4003
4003
|
height: auto;
|
|
@@ -4009,13 +4009,13 @@
|
|
|
4009
4009
|
.selected {
|
|
4010
4010
|
border: 3px solid ${({theme:e})=>e.colors.primary[100]} !important;
|
|
4011
4011
|
}
|
|
4012
|
-
`,
|
|
4012
|
+
`,gf=i.div`
|
|
4013
4013
|
display: flex;
|
|
4014
4014
|
align-items: center;
|
|
4015
4015
|
justify-content: space-between;
|
|
4016
4016
|
width: 100%;
|
|
4017
4017
|
box-sizing: border-box;
|
|
4018
|
-
`,
|
|
4018
|
+
`,mf=i.div`
|
|
4019
4019
|
height: 24px;
|
|
4020
4020
|
|
|
4021
4021
|
font-style: normal;
|
|
@@ -4023,7 +4023,7 @@
|
|
|
4023
4023
|
font-size: 14px;
|
|
4024
4024
|
line-height: 24px;
|
|
4025
4025
|
color: #4e5461;
|
|
4026
|
-
`,
|
|
4026
|
+
`,xf=i.div`
|
|
4027
4027
|
display: flex;
|
|
4028
4028
|
width: 100%;
|
|
4029
4029
|
height: 278px;
|
|
@@ -4031,7 +4031,7 @@
|
|
|
4031
4031
|
overflow-y: scroll;
|
|
4032
4032
|
margin-top: 20px;
|
|
4033
4033
|
flex-wrap: wrap;
|
|
4034
|
-
`,
|
|
4034
|
+
`,ff=i.div`
|
|
4035
4035
|
display: grid;
|
|
4036
4036
|
width: 100%;
|
|
4037
4037
|
grid-gap: 16.5px;
|
|
@@ -4053,15 +4053,15 @@
|
|
|
4053
4053
|
align-items: center;
|
|
4054
4054
|
border: 1px solid rgba(39, 42, 50, 0.1);
|
|
4055
4055
|
box-sizing: border-box;
|
|
4056
|
-
`,
|
|
4056
|
+
`,vf=["https://virtualbackgrounds.s3.amazonaws.com/Embed/vb1.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb2.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb3.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb4.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb5.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb6.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb7.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb8.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb9.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb10.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb11.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb12.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb13.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb14.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb15.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb16.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb17.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb18.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb19.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb20.webp","https://virtualbackgrounds.s3.amazonaws.com/Embed/vb21.webp"],bf="https://cv-custom-virtual-backgrounds.s3.amazonaws.com/",wf=({onSelect:e,onMainButtonClick:o,selectedVirtualBackgroundUrl:r,customVirtualBackgrounds:s})=>{const{colors:n}=i.useTheme(),{t:a}=W.useTranslation(),[c,d]=p.useState(!1),l=(s==null?void 0:s.map(h=>h.url))||[],{userData:u}=me(),g=[...l,...vf];return t.jsxs(t.Fragment,{children:[c&&t.jsx(pf,{selectedVirtualBackgroundUrl:r,onSelect:e,handleModalClose:()=>{d(!1)}}),t.jsxs(hf,{children:[t.jsxs(gf,{children:[t.jsx(mf,{children:a("Select a virtual background")}),t.jsx(F.Button,{variant:"primary",text:a("Done"),icon:t.jsx(H.MdCheck,{size:24}),onClick:o})]}),t.jsx(xf,{children:t.jsxs(ff,{children:[t.jsx(Jo,{onClick:()=>{e("","none",-1)},children:t.jsx("div",{style:{display:"flex",color:n.primary[100],justifyContent:"center",alignItems:"center",height:"100px",fontSize:"34px",borderRadius:"3px",boxSizing:"border-box"},className:r===""?"selected":"",children:t.jsx(vo.FaBan,{})})}),u.droplrAccess&&t.jsx(Jo,{onClick:()=>{d(!0)},children:t.jsxs("div",{style:{display:"flex",flexDirection:"column",color:"#FF8B22",justifyContent:"center",alignItems:"center",height:"100px",fontSize:"28px",borderRadius:"3px",boxSizing:"border-box"},children:[t.jsx(H.MdAddCircle,{color:n.primary[100]}),t.jsx("div",{style:{marginTop:"5px",width:"auto",display:"flex",color:n.primary[100],justifyContent:"center",alignItems:"center",height:"auto",fontSize:"14px",boxSizing:"border-box"},children:a("Select your own")})]})}),g.map((h,x)=>t.jsx(Jo,{backgroundUrl:h,className:r===h?"selected":"",onClick:()=>{if(h.includes(bf)){e(h,"custom",-1);return}e(h,"default",x)}},h+x))]})})]})]})},yf=i.div`
|
|
4057
4057
|
max-width: 770px;
|
|
4058
4058
|
margin-top: 25px;
|
|
4059
|
-
`,
|
|
4059
|
+
`,Cf=i.div`
|
|
4060
4060
|
position: absolute;
|
|
4061
4061
|
bottom: 25px;
|
|
4062
4062
|
right: 20px;
|
|
4063
4063
|
z-index: 2;
|
|
4064
|
-
`,
|
|
4064
|
+
`,Sf=()=>{const{t:e}=W.useTranslation();return t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:e("Virtual Backgrounds")}),t.jsx(ht,{children:e("Select from a library of high-resolution images, or upload your own for extra personalization.")})]})},jf=({videoRef:e,canvasRef:o,isSegmenterActive:r,setIsSegmenterActive:s,status:n,initialImage:a,setIsLoadingVB:c,isLoadingVb:d})=>{const{t:l}=W.useTranslation(),{colors:u,isCdkEnviroment:g}=i.useTheme(),[h,x]=p.useState(!1),{userData:y}=me(),[m,w]=p.useState(!0),[f,b]=p.useState(a),{onCreateVirtualBackgroundHandler:S,onDestroyVirtualBackgroundHandler:T,imageRef:V,getCavansBgImage:I}=Px(o,e,c),{data:L}=Ax(),v=()=>{var A,P,M;(A=o.current)!=null&&A.width&&((P=o.current)!=null&&P.height)&&((M=e.current)!=null&&M.videoWidth)&&e.current.videoHeight&&(S(),s(!0))},C=()=>{T(),s(!1)},$=(A,P)=>{if(V.current){const M=V.current;M.src=`${A}?t=virtual`,M.crossOrigin="Anonymous";const N=()=>{P==null||P(),r||v()};return M.onload=N,()=>{M.onload=null}}},R=({url:A,type:P,index:M,privacy:N,id:D})=>{const O={url:A,type:P,index:M,privacy:N,id:D};b(O),Tx(O,y.id)},j=()=>{x(!h)};return p.useEffect(()=>{var A,P,M,N;if(((P=(A=y.user)==null?void 0:A.packageDetails)==null?void 0:P.id)==0)w(!0);else if((N=(M=y.user)==null?void 0:M.packageDetails)!=null&&N.products){const D=Gr(y,qr.VIRTUAL_BACKGROUNDS);w(D)}},[]),p.useEffect(()=>{if(n===le.CAMERA_READY){const{url:A}=f;if(A&&V.current){const P=V.current;return P.crossOrigin="Anonymous",P.src=`${A}?t=virtual`,P.onload=async()=>{r||(I==null||I(),v())},()=>{P.onload=null}}}},[n]),p.useEffect(()=>()=>{T()},[]),t.jsxs(t.Fragment,{children:[!h&&t.jsxs(t.Fragment,{children:[d&&t.jsx(Qr,{text:l("Applying Virtual Background")}),n===le.CAMERA_READY&&t.jsx(t.Fragment,{children:!d&&t.jsx(Cf,{children:t.jsx(F.Tooltip,{position:"bottom",children:t.jsx(F.Button,{icon:t.jsx($x,{}),variant:g?"text":"white",disabled:!m,text:l("Virtual Backgrounds"),onClick:j}),popup:m?null:t.jsx(Sf,{}),extendStyles:{popup:m?{display:"none"}:{width:210,gap:8,display:"flex",flexDirection:"column",padding:"10px 24px",...g?{color:u.white[100],background:u.black[100]}:{}}}})})})]}),t.jsx(t.Fragment,{children:t.jsx(yf,{hidden:!h||n===le.RECORDING,children:t.jsx(wf,{selectedVirtualBackgroundUrl:f.url,customVirtualBackgrounds:L,onMainButtonClick:()=>{x(!1)},onSelect:(A="",P,M,N="PUBLIC",D="")=>{const O={url:A,type:P,index:M,privacy:N,id:D};if(P==="none"){C(),R(O);return}R(O),$(A,I)}})})}),t.jsx("img",{ref:V,crossOrigin:"anonymous",alt:"Segmentation",style:{display:"none"}})]})},Ef=async e=>(await ie.get("/teleprompter",{params:{...e,field:"createdAt",order:"desc"}})).data,Tf=async({data:e})=>(await ie.post("/teleprompter",e)).data,kf=async({scriptId:e,data:o})=>(await ie.put(`/teleprompter/${e}`,o)).data,If=e=>k.createElement("svg",{width:15,height:14,viewBox:"0 0 15 14",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M3.31556 1.25854L0 4.66606V9.33212L3.31662 12.7638L6.49739 9.94768V3.954L3.31556 1.25854Z",fill:"#09534A"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M15.0001 6.74778V4.66606L10.4863 0H4.54083L3.50781 1.06115L10.2023 6.74778H15.0001Z",fill:"#09534A"}),k.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M10.2012 7.02661L3.50781 12.9614L4.51217 13.9999H10.4863L15.0001 9.33204V7.02661H10.2012Z",fill:"#09534A"})),oi=i(If)`
|
|
4065
4065
|
width: ${e=>e.width||"21px"};
|
|
4066
4066
|
height: ${e=>e.height||"21px"};
|
|
4067
4067
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -4069,7 +4069,7 @@
|
|
|
4069
4069
|
fill: ${e=>e.color||"currentColor"};
|
|
4070
4070
|
opacity: ${e=>e.opacity||"inherit"};
|
|
4071
4071
|
}
|
|
4072
|
-
`,
|
|
4072
|
+
`,Af=e=>k.createElement("svg",{width:144,height:145,viewBox:"0 0 144 145",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},k.createElement("g",{clipPath:"url(#clip0_16_1167)"},k.createElement("path",{d:"M70.94 64.3999H65.67V79.9099H70.94C73.83 79.9099 75.3 79.2599 76.56 78.0499C78.03 76.6199 78.85 74.8499 78.85 72.2199C78.85 69.7599 78.12 67.9399 76.78 66.5199C75.53 65.1799 74.06 64.3999 70.95 64.3999H70.94Z",fill:"#231F20"}),k.createElement("path",{d:"M72 0.23999C32.34 0.23999 0.0799866 32.5 0.0799866 72.16C0.0799866 111.82 32.34 144.08 72 144.08C111.66 144.08 143.92 111.82 143.92 72.16C143.92 32.5 111.66 0.23999 72 0.23999ZM38.5 87.12C29.04 87.12 22.77 80.38 22.77 72.13C22.77 63.88 29.08 57.18 38.28 57.18C43.46 57.18 48.73 59.17 52.36 62.02L47.82 66.94C45.18 64.78 41.77 63.53 39.22 63.53C33.99 63.53 30.62 67.46 30.62 72.17C30.62 76.88 34.08 80.81 39.43 80.81C42.71 80.81 46.13 78.87 48.63 76.53L53.21 81.37C49.8 84.39 44.7 87.12 38.48 87.12H38.5ZM82.7 82.24C80.24 84.66 76.7 86.26 71.12 86.26H58.12V58.05H71.12C76.39 58.05 80.28 59.52 82.91 62.28C85.33 64.83 86.67 68.28 86.67 72.13C86.67 75.98 85.29 79.69 82.7 82.24ZM113.45 86.26L103.82 74.12L100.41 77.36V86.26H92.81V58.05H100.41V68.63L111.51 58.05H121.1L109.13 69.24L122.82 86.26H113.45Z",fill:"#231F20"})),k.createElement("defs",null,k.createElement("clipPath",{id:"clip0_16_1167"},k.createElement("rect",{width:144,height:145,fill:"white"})))),ri=i(Af)`
|
|
4073
4073
|
width: ${e=>e.width||"21px"};
|
|
4074
4074
|
height: ${e=>e.height||"21px"};
|
|
4075
4075
|
fill: ${e=>e.color||"currentColor"};
|
|
@@ -4098,10 +4098,10 @@
|
|
|
4098
4098
|
margin-bottom: 20px;
|
|
4099
4099
|
}
|
|
4100
4100
|
`,si=i.div`
|
|
4101
|
-
${
|
|
4101
|
+
${Pa}
|
|
4102
4102
|
font-size: ${yo.lg};
|
|
4103
4103
|
color: ${E.themeDark};
|
|
4104
|
-
`,
|
|
4104
|
+
`,Rf=i.div`
|
|
4105
4105
|
display: flex;
|
|
4106
4106
|
width: 100%;
|
|
4107
4107
|
padding: 4px;
|
|
@@ -4132,10 +4132,10 @@
|
|
|
4132
4132
|
opacity: 1;
|
|
4133
4133
|
}
|
|
4134
4134
|
}
|
|
4135
|
-
`,er=i(
|
|
4135
|
+
`,er=i(ve.IoIosCheckmarkCircle)`
|
|
4136
4136
|
background: white;
|
|
4137
4137
|
border-radius: 50%;
|
|
4138
|
-
|
|
4138
|
+
`,$f=i.div`
|
|
4139
4139
|
display: flex;
|
|
4140
4140
|
width: 100%;
|
|
4141
4141
|
margin: 16px 0;
|
|
@@ -4155,7 +4155,7 @@
|
|
|
4155
4155
|
gap: 12px;
|
|
4156
4156
|
justify-content: flex-end;
|
|
4157
4157
|
align-items: right;
|
|
4158
|
-
`,
|
|
4158
|
+
`,Vf=i.div`
|
|
4159
4159
|
margin-left: 10px;
|
|
4160
4160
|
color: ${E.black_1_100};
|
|
4161
4161
|
height: 24px;
|
|
@@ -4197,7 +4197,7 @@
|
|
|
4197
4197
|
}
|
|
4198
4198
|
`,tr=i.label`
|
|
4199
4199
|
font-weight: 500;
|
|
4200
|
-
|
|
4200
|
+
`,Lf=i.textarea`
|
|
4201
4201
|
display: block;
|
|
4202
4202
|
width: 100%;
|
|
4203
4203
|
height: 200px;
|
|
@@ -4265,13 +4265,13 @@
|
|
|
4265
4265
|
}
|
|
4266
4266
|
}
|
|
4267
4267
|
}
|
|
4268
|
-
`,
|
|
4268
|
+
`,Mf=i.div`
|
|
4269
4269
|
width: ${e=>e.width?e.width:"auto"};
|
|
4270
4270
|
> div {
|
|
4271
4271
|
margin-left: 0;
|
|
4272
4272
|
width: 90%;
|
|
4273
4273
|
}
|
|
4274
|
-
`,
|
|
4274
|
+
`,Df=i.form`
|
|
4275
4275
|
float: left;
|
|
4276
4276
|
width: 100%;
|
|
4277
4277
|
color: #9297a2;
|
|
@@ -4310,7 +4310,7 @@
|
|
|
4310
4310
|
gap: 8px;
|
|
4311
4311
|
flex-direction: row;
|
|
4312
4312
|
align-items: center;
|
|
4313
|
-
`,wt=-1;function Mf(e,o){var c;const r=vr(e)[2],s=((c=o==null?void 0:o.speed)==null?void 0:c.label)??"",n=String(s).match(/(\d+(?:[.,]\d+)?)/),a=n?Number(n[1].replace(",",".")):void 0;return a!=null&&!Number.isNaN(a)?{value:a,label:`${a} ${e("words / min")}`}:r}const Df=({handleModalClose:e,handleSubmit:o,settings:r})=>{var Ee,Ae;const{trackGTMRecordingToolIntearctionEvent:s}=Ge(),{t:n,i18n:a}=W.useTranslation(),c=[{value:"top",text:n("Top")},{value:"bottom",text:n("Bottom")}],{isCdkEnviroment:d}=i.useTheme(),{env:l}=Se(),{userData:u}=me(),{toast:g}=Te(),h=st(u),x=pt(u),w=Xe(u),m=!!(u!=null&&u.customer.isIMSEnabled),y=[{title:n("Create a new script"),scriptId:wt}],[f,b]=p.useState(1),[S,T]=p.useState(0),[L,I]=p.useState(!1),[V,v]=p.useState({speed:Mf(n,r),scriptSize:(r==null?void 0:r.scriptSize)||"large",scriptPosition:(r==null?void 0:r.scriptPosition)||c[0].value,content:eo((r==null?void 0:r.content)||""),activeScriptId:(r==null?void 0:r.activeScriptId)||wt}),[C,$]=p.useState(eo(V.content||"")),R=`New Script ${We(new Date).format("YYYY-MM-DD")}`,[j,A]=p.useState(!1),[P,M]=p.useState(R),[N,D]=p.useState(!1),[O,B]=p.useState(y),Z=i.useTheme(),re=async()=>{try{D(!0);const Q=await Sf({});K(Q.scripts),Q.count||D(!1);let te=JSON.parse(JSON.stringify(O));Q.scripts.forEach(ve=>{te=[...te,ve]}),te=Wt.uniqBy(te,"scriptId"),B(te),D(!1)}catch(Q){console.log("exp at get scripts",Q)}},K=Q=>Q.sort((te,ve)=>te.title.localeCompare(ve.title)),G=Q=>{if(Q.scriptId!==""&&Q.scriptId>wt){const te=eo(Q.content||"");M(Q.title),$(te),v({...V,content:te,activeScriptId:Q.sharedWithAll?wt:Q.scriptId})}else $(""),v({...V,content:"",activeScriptId:Q.sharedWithAll?wt:Q.scriptId}),M(Q.title??R);I(!1),D(!1)},H=Q=>{$(Q.target.value),I(!0)},U=Q=>{v({...V,speed:Q})},J=Q=>{v({...V,scriptSize:Q})},ue=Q=>{v({...V,scriptPosition:Q})},ie=async()=>{V.activeScriptId<0?A(!0):await le()},le=async()=>{const Q=encodeURIComponent(C||""),te=await Ef({scriptId:V.activeScriptId,data:{content:Q}});if(te){let ve=JSON.parse(JSON.stringify(O)),Le=ve.findIndex(Pe=>Pe.scriptId==V.activeScriptId);Le!=-1&&(ve[Le].content=eo(te.content)),B(ve),A(!1),v({...V,content:Q}),I(!1),g({message:n("Script updated sucessfully.")})}},ce=async()=>{const Q=encodeURIComponent(C||""),te=await jf({data:{title:P,content:Q}});if(te){let ve=O.filter(Le=>!!Le.scriptId);ve=[...ve,te],K(ve),ve=[...y,...ve],B(ve),A(!1),v({...V,activeScriptId:te.scriptId,content:Q}),I(!1),g({message:n("Script saved as {{scriptTitleText}}.",{scriptTitleText:P})}),M(`New Script ${We(new Date).format("YYYY-MM-DD")}`)}},we=Vm(w);p.useEffect(()=>{re()},[]);const Ie=[...O.filter(Q=>!Q.sharedWithAll),...O.filter(Q=>Q.sharedWithAll)],X=Q=>{const{data:te}=Q;return t.jsx(Ze.components.SingleValue,{...Q,children:te.sharedWithAll?t.jsxs(di,{children:[d?t.jsx(ri,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(oi,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),te.title]}):t.jsx(t.Fragment,{children:te.title})})},se=Q=>{const{data:te,innerRef:ve,innerProps:Le}=Q;return t.jsx("div",{ref:ve,...Le,style:{padding:"10px 15px",fontSize:"14px",lineHeight:"20px",fontWeight:500,color:"##001B53",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:te.sharedWithAll?t.jsxs(di,{children:[d?t.jsx(ri,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(oi,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),te.title]}):te.title})},Y=t.jsxs(ni,{children:[t.jsxs(ii,{children:[t.jsx(si,{children:n("Telepromter")}),t.jsx(Rf,{title:n("Close"),children:t.jsx(fe.IoMdClose,{size:24,onClick:()=>b(3),color:E.label})})]}),t.jsxs(ai,{children:[t.jsxs(If,{children:[t.jsx("div",{className:` scriptTab ${S==0?"active":""}`,onClick:()=>T(0),children:n("Script")}),t.jsx("div",{className:` appearanceTab ${S==1?"active":""}`,onClick:()=>{T(1),A(!1)},children:n("Appearance")})]}),S==1?t.jsxs(Lf,{children:[t.jsxs(li,{children:[t.jsxs(or,{children:[t.jsx(tr,{htmlFor:"videoSource",children:n("Speed")}),t.jsx(Ne,{name:"videoSource",value:V.speed,placeholder:n("Select script..."),options:Ts(V.scriptSize,n),onChange:U,dropdownHeight:140,height:40,isSearchable:!1,creatable:!1})]})," ",t.jsxs(or,{children:[t.jsx(tr,{htmlFor:"audioSource",children:n("Position")}),t.jsx("div",{children:t.jsx(Vf,{width:"150px",children:t.jsx(yc,{defaultValue:V.scriptPosition,values:c,onChange:ue})})})]})]}),t.jsx(li,{children:t.jsxs(or,{children:[t.jsx(tr,{children:n("Text size")}),t.jsxs("div",{className:"scriptSizeContainer",children:[t.jsxs("div",{className:` smallSize ${V.scriptSize=="small"?"active":""}`,onClick:()=>{J("small")},children:[n("Small"),V.scriptSize=="small"?t.jsx(er,{fill:Z.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` mediumSize ${V.scriptSize=="large"?"active":""}`,onClick:()=>{J("large")},children:[n("Medium"),V.scriptSize=="large"?t.jsx(er,{fill:Z.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` largeSize ${V.scriptSize=="x-large"?"active":""}`,onClick:()=>{J("x-large")},children:[n("Large"),V.scriptSize=="x-large"?t.jsx(er,{fill:Z.colors.primary[100],size:22}):null]})]})]})})]}):t.jsxs(t.Fragment,{children:[t.jsxs(je,{flexWrap:"no-wrap",alignItems:"center",children:[t.jsx(Af,{children:t.jsx("div",{className:`scriptList ${u.droplrAccess?"":"fullWidth"}`,children:t.jsx(Ne,{options:Ie,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"bottom",placeholder:n("Select script..."),value:Ie.find(Q=>Q.scriptId==V.activeScriptId),onChange:G,getOptionLabel:Q=>Q.title,getOptionValue:Q=>Q.scriptId,isLoading:N,onMenuClose:()=>D(!1),isSearchable:!1,creatable:!1,disabled:N,customComponents:{SingleValue:X,Option:se}})})}),t.jsx(mi.CovideoMagicButton,{userInput:C,defaultPromptType:kr.TELEPROPTER_SCRIPT,defaultPromptUseCase:we,handleSubmitGeneratedContent:Q=>{$(Q),I(!0)},variant:"gradient",token:He,userData:{customer:{business:u.customer.business,hasCovideoMagic:((Ae=(Ee=u==null?void 0:u.customer)==null?void 0:Ee.hasCovideoMagic)==null?void 0:Ae.toString())==="1",markVideosAsSent:Lt(u)},firstName:u.firstName,isAutomotiveSalesRole:x,isAutomotiveServiceRole:h,isIMSEnabled:m,isCompanyAdmin:u.isCompanyAdmin,isAutomotive:w,preferredLanguage:a.language},aiAssistTheme:"branding",env:l,apiKey:mt,size:"small"})]}),t.jsx($f,{value:C,onChange:H,placeholder:n("Type or paste your script here...")})]})]}),t.jsx(ci,{children:j?t.jsxs("div",{className:"saveNewScript",children:[t.jsx(Cc,{style:{boxSizing:"border-box",width:"75%"},onChange:Q=>M(Q.target.value),value:P}),t.jsx(F.Button,{text:n("Save"),icon:t.jsx(q.MdSave,{}),onClick:async()=>{await ce()}}),t.jsx("div",{className:"closeCreateScriptView",children:t.jsx(q.MdOutlineClose,{size:"24px",color:"#272A32",onClick:()=>{A(!1)}})})]}):t.jsxs("div",{className:"newScriptDiv",children:[S!=1?t.jsx(F.Button,{disabled:!V.activeScriptId||!C||C&&!L||C.trim()==="",variant:"secondary",text:n("Save To My Scripts"),icon:t.jsx(q.MdSave,{size:18}),onClick:ie}):t.jsx("div",{children:" "}),t.jsx(F.Button,{text:n("Turn on"),disabled:V.activeScriptId!==wt&&!V.content||V.activeScriptId===wt&&(!C||C.trim()===""||C&&!L),onClick:()=>{const Q=V;Q.activeScriptId===wt&&(Q.content=C),o&&(s==null||s({action:Ut.APPLIED}),o(Q))}})]})})]}),_=t.jsxs(ni,{children:[t.jsx(ii,{children:t.jsx(si,{children:n("Cancel Teleprompter?")})}),t.jsx(ai,{children:n("You will lose all changes for the Teleprompter.")}),t.jsxs(ci,{style:{justifyContent:"end"},children:[t.jsx(F.Button,{text:n("Yes, cancel"),onClick:()=>{s==null||s({action:Ut.REMOVED}),e()},variant:d?"text":"destructive"}),t.jsx(F.Button,{text:n("Back to editing"),onClick:()=>b(1)})]})]});let de=null;switch(f){case 1:de=Y;break;case 3:de=_;break}return t.jsx(Ot,{disableFullScreen:!0,style:{position:"fixed",zIndex:9},children:de})},Of=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,onOpenRecordingSettings:s,showPreview:n=!0,autoSaveOnFinish:a=!1,onStartUpladingVoiceOverHandler:c,toggleCamera:d,isCameraToggled:l})=>{const{t:u}=W.useTranslation(),g=p.useRef(null),h=p.useRef(null),{userData:x}=me(),{showVirtualBgFeature:w,showTeleprompterFeature:m}=Se(),y=Cx(x.id),[f,b]=p.useState(!!y.url),[S,T]=p.useState(!1),L=Ht(),{trackVideoSpecificPagesManually:I}=bt({vin:""}),{disableOrEnableTeleprompter:V,turnOnTeleprompterPlaying:v,saveTeleprompterSettingsHandler:C,onTeleprompterModalClose:$,showTeleprompterModal:R,isUsingTeleprompter:j,teleprompterSettings:A}=To(),{stopRecording:P,pauseRecording:M,startCountDown:N,stopCountDown:D,status:O,recordedBlob:B,countdown:Z,timeInSeconds:re}=Wr({isSegmenterActive:S,canvasRef:g,videoRef:h,screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:c,shouldStartCountdown:!1,handleGoToRecordHome:r,isCameraToggled:l});return p.useEffect(()=>{I==null||I({...vt.VIDEOS_RECORDER})},[]),p.useEffect(()=>{Z===0&&O===ae.COUNTDOWN&&j&&v()},[Z,O]),p.useEffect(()=>{var K,G;if((G=(K=x==null?void 0:x.user)==null?void 0:K.packageDetails)!=null&&G.id){const H=!Gr(x,qr.TELEPROMPTER);V(H)}},[]),O===ae.DONE&&B&&(n||a)?t.jsx(Yr,{videoBlob:B,autoSave:a,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Br,{status:O,handleGoToRecordHome:()=>{r()},onOpenRecordingSettings:s,teleprompterActions:m?t.jsx(mx,{status:O}):t.jsx(t.Fragment,{})}),t.jsxs("div",{style:{position:"relative"},children:[O===ae.IDLE&&t.jsx(Qr,{text:u("Loading camera")}),t.jsx(Ur,{videoRef:h,canvasRef:g,countdown:Z,status:O,teleprompter:t.jsx(wx,{status:O}),toggleCamera:d}),!L&&w&&t.jsx(Cf,{setIsLoadingVB:b,isLoadingVb:f,initialImage:y,videoRef:h,canvasRef:g,isSegmenterActive:S,setIsSegmenterActive:T,status:O})]}),t.jsx(Hr,{startCountDown:N,stopCountDown:D,pauseRecording:M,stopRecording:P,status:O,timeInSeconds:re,isLoadingVB:f}),R&&t.jsx(Df,{handleModalClose:$,handleSubmit:C,settings:A})]})},Nf=24,Pf=e=>{var r;const o=(r=e==null?void 0:e.audioSource)==null?void 0:r.value;return o?{deviceId:o}:!1},ui={low:{width:{ideal:640},height:{ideal:360}},standard:{width:{ideal:1280},height:{ideal:720}},high:{width:{ideal:1920},height:{ideal:1080}}},Ff=e=>{var r,s;return{...e!=null&&e.videoQuality?ui[e.videoQuality]:ui.standard,frameRate:Nf,deviceId:(r=e==null?void 0:e.videoSource)!=null&&r.value?(s=e==null?void 0:e.videoSource)==null?void 0:s.value:void 0}},rr=i.div`
|
|
4313
|
+
`,wt=-1;function Of(e,o){var c;const r=vr(e)[2],s=((c=o==null?void 0:o.speed)==null?void 0:c.label)??"",n=String(s).match(/(\d+(?:[.,]\d+)?)/),a=n?Number(n[1].replace(",",".")):void 0;return a!=null&&!Number.isNaN(a)?{value:a,label:`${a} ${e("words / min")}`}:r}const Nf=({handleModalClose:e,handleSubmit:o,settings:r})=>{var Ee,Ae;const{trackGTMRecordingToolIntearctionEvent:s}=Ge(),{t:n,i18n:a}=W.useTranslation(),c=[{value:"top",text:n("Top")},{value:"bottom",text:n("Bottom")}],{isCdkEnviroment:d}=i.useTheme(),{env:l}=Se(),{userData:u}=me(),{toast:g}=Te(),h=st(u),x=pt(u),y=Xe(u),m=!!(u!=null&&u.customer.isIMSEnabled),w=[{title:n("Create a new script"),scriptId:wt}],[f,b]=p.useState(1),[S,T]=p.useState(0),[V,I]=p.useState(!1),[L,v]=p.useState({speed:Of(n,r),scriptSize:(r==null?void 0:r.scriptSize)||"large",scriptPosition:(r==null?void 0:r.scriptPosition)||c[0].value,content:eo((r==null?void 0:r.content)||""),activeScriptId:(r==null?void 0:r.activeScriptId)||wt}),[C,$]=p.useState(eo(L.content||"")),R=`New Script ${We(new Date).format("YYYY-MM-DD")}`,[j,A]=p.useState(!1),[P,M]=p.useState(R),[N,D]=p.useState(!1),[O,U]=p.useState(w),Y=i.useTheme(),ne=async()=>{try{D(!0);const Z=await Ef({});K(Z.scripts),Z.count||D(!1);let oe=JSON.parse(JSON.stringify(O));Z.scripts.forEach(be=>{oe=[...oe,be]}),oe=Wt.uniqBy(oe,"scriptId"),U(oe),D(!1)}catch(Z){console.log("exp at get scripts",Z)}},K=Z=>Z.sort((oe,be)=>oe.title.localeCompare(be.title)),G=Z=>{if(Z.scriptId!==""&&Z.scriptId>wt){const oe=eo(Z.content||"");M(Z.title),$(oe),v({...L,content:oe,activeScriptId:Z.sharedWithAll?wt:Z.scriptId})}else $(""),v({...L,content:"",activeScriptId:Z.sharedWithAll?wt:Z.scriptId}),M(Z.title??R);I(!1),D(!1)},q=Z=>{$(Z.target.value),I(!0)},ee=Z=>{v({...L,speed:Z})},B=Z=>{v({...L,scriptSize:Z})},de=Z=>{v({...L,scriptPosition:Z})},te=async()=>{L.activeScriptId<0?A(!0):await se()},se=async()=>{const Z=encodeURIComponent(C||""),oe=await kf({scriptId:L.activeScriptId,data:{content:Z}});if(oe){let be=JSON.parse(JSON.stringify(O)),Le=be.findIndex(Pe=>Pe.scriptId==L.activeScriptId);Le!=-1&&(be[Le].content=eo(oe.content)),U(be),A(!1),v({...L,content:Z}),I(!1),g({message:n("Script updated sucessfully.")})}},ae=async()=>{const Z=encodeURIComponent(C||""),oe=await Tf({data:{title:P,content:Z}});if(oe){let be=O.filter(Le=>!!Le.scriptId);be=[...be,oe],K(be),be=[...w,...be],U(be),A(!1),v({...L,activeScriptId:oe.scriptId,content:Z}),I(!1),g({message:n("Script saved as {{scriptTitleText}}.",{scriptTitleText:P})}),M(`New Script ${We(new Date).format("YYYY-MM-DD")}`)}},xe=Mm(y);p.useEffect(()=>{ne()},[]);const Ie=[...O.filter(Z=>!Z.sharedWithAll),...O.filter(Z=>Z.sharedWithAll)],X=Z=>{const{data:oe}=Z;return t.jsx(Ze.components.SingleValue,{...Z,children:oe.sharedWithAll?t.jsxs(di,{children:[d?t.jsx(ri,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(oi,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),oe.title]}):t.jsx(t.Fragment,{children:oe.title})})},ce=Z=>{const{data:oe,innerRef:be,innerProps:Le}=Z;return t.jsx("div",{ref:be,...Le,style:{padding:"10px 15px",fontSize:"14px",lineHeight:"20px",fontWeight:500,color:"##001B53",display:"flex",alignItems:"center",gap:"8px",cursor:"pointer",whiteSpace:"nowrap",textOverflow:"ellipsis"},children:oe.sharedWithAll?t.jsxs(di,{children:[d?t.jsx(ri,{width:"20px",height:"20px","aria-label":"CDK Logo"}):t.jsx(oi,{width:"20px",height:"20px","aria-label":"Covideo Logo"}),oe.title]}):oe.title})},Q=t.jsxs(ni,{children:[t.jsxs(ii,{children:[t.jsx(si,{children:n("Telepromter")}),t.jsx(Vf,{title:n("Close"),children:t.jsx(ve.IoMdClose,{size:24,onClick:()=>b(3),color:E.label})})]}),t.jsxs(ai,{children:[t.jsxs(Rf,{children:[t.jsx("div",{className:` scriptTab ${S==0?"active":""}`,onClick:()=>T(0),children:n("Script")}),t.jsx("div",{className:` appearanceTab ${S==1?"active":""}`,onClick:()=>{T(1),A(!1)},children:n("Appearance")})]}),S==1?t.jsxs(Df,{children:[t.jsxs(li,{children:[t.jsxs(or,{children:[t.jsx(tr,{htmlFor:"videoSource",children:n("Speed")}),t.jsx(Ne,{name:"videoSource",value:L.speed,placeholder:n("Select script..."),options:Is(L.scriptSize,n),onChange:ee,dropdownHeight:140,height:40,isSearchable:!1,creatable:!1})]})," ",t.jsxs(or,{children:[t.jsx(tr,{htmlFor:"audioSource",children:n("Position")}),t.jsx("div",{children:t.jsx(Mf,{width:"150px",children:t.jsx(Sc,{defaultValue:L.scriptPosition,values:c,onChange:de})})})]})]}),t.jsx(li,{children:t.jsxs(or,{children:[t.jsx(tr,{children:n("Text size")}),t.jsxs("div",{className:"scriptSizeContainer",children:[t.jsxs("div",{className:` smallSize ${L.scriptSize=="small"?"active":""}`,onClick:()=>{B("small")},children:[n("Small"),L.scriptSize=="small"?t.jsx(er,{fill:Y.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` mediumSize ${L.scriptSize=="large"?"active":""}`,onClick:()=>{B("large")},children:[n("Medium"),L.scriptSize=="large"?t.jsx(er,{fill:Y.colors.primary[100],size:22}):null]}),t.jsxs("div",{className:` largeSize ${L.scriptSize=="x-large"?"active":""}`,onClick:()=>{B("x-large")},children:[n("Large"),L.scriptSize=="x-large"?t.jsx(er,{fill:Y.colors.primary[100],size:22}):null]})]})]})})]}):t.jsxs(t.Fragment,{children:[t.jsxs(je,{flexWrap:"no-wrap",alignItems:"center",children:[t.jsx($f,{children:t.jsx("div",{className:`scriptList ${u.droplrAccess?"":"fullWidth"}`,children:t.jsx(Ne,{options:Ie,menuPortalTarget:document.body,menuPosition:"fixed",menuPlacement:"bottom",placeholder:n("Select script..."),value:Ie.find(Z=>Z.scriptId==L.activeScriptId),onChange:G,getOptionLabel:Z=>Z.title,getOptionValue:Z=>Z.scriptId,isLoading:N,onMenuClose:()=>D(!1),isSearchable:!1,creatable:!1,disabled:N,customComponents:{SingleValue:X,Option:ce}})})}),t.jsx(fi.CovideoMagicButton,{userInput:C,defaultPromptType:kr.TELEPROPTER_SCRIPT,defaultPromptUseCase:xe,handleSubmitGeneratedContent:Z=>{$(Z),I(!0)},variant:"gradient",token:He,userData:{customer:{business:u.customer.business,hasCovideoMagic:((Ae=(Ee=u==null?void 0:u.customer)==null?void 0:Ee.hasCovideoMagic)==null?void 0:Ae.toString())==="1",markVideosAsSent:Lt(u)},firstName:u.firstName,isAutomotiveSalesRole:x,isAutomotiveServiceRole:h,isIMSEnabled:m,isCompanyAdmin:u.isCompanyAdmin,isAutomotive:y,preferredLanguage:a.language},aiAssistTheme:"branding",env:l,apiKey:mt,size:"small"})]}),t.jsx(Lf,{value:C,onChange:q,placeholder:n("Type or paste your script here...")})]})]}),t.jsx(ci,{children:j?t.jsxs("div",{className:"saveNewScript",children:[t.jsx(jc,{style:{boxSizing:"border-box",width:"75%"},onChange:Z=>M(Z.target.value),value:P}),t.jsx(F.Button,{text:n("Save"),icon:t.jsx(H.MdSave,{}),onClick:async()=>{await ae()}}),t.jsx("div",{className:"closeCreateScriptView",children:t.jsx(H.MdOutlineClose,{size:"24px",color:"#272A32",onClick:()=>{A(!1)}})})]}):t.jsxs("div",{className:"newScriptDiv",children:[S!=1?t.jsx(F.Button,{disabled:!L.activeScriptId||!C||C&&!V||C.trim()==="",variant:"secondary",text:n("Save To My Scripts"),icon:t.jsx(H.MdSave,{size:18}),onClick:te}):t.jsx("div",{children:" "}),t.jsx(F.Button,{text:n("Turn on"),disabled:L.activeScriptId!==wt&&!L.content||L.activeScriptId===wt&&(!C||C.trim()===""||C&&!V),onClick:()=>{const Z=L;Z.activeScriptId===wt&&(Z.content=C),o&&(s==null||s({action:Ut.APPLIED}),o(Z))}})]})})]}),_=t.jsxs(ni,{children:[t.jsx(ii,{children:t.jsx(si,{children:n("Cancel Teleprompter?")})}),t.jsx(ai,{children:n("You will lose all changes for the Teleprompter.")}),t.jsxs(ci,{style:{justifyContent:"end"},children:[t.jsx(F.Button,{text:n("Yes, cancel"),onClick:()=>{s==null||s({action:Ut.REMOVED}),e()},variant:d?"text":"destructive"}),t.jsx(F.Button,{text:n("Back to editing"),onClick:()=>b(1)})]})]});let ue=null;switch(f){case 1:ue=Q;break;case 3:ue=_;break}return t.jsx(Ot,{disableFullScreen:!0,style:{position:"fixed",zIndex:9},children:ue})},Pf=({screenStream:e,stopAllStreams:o,handleGoToRecordHome:r,onOpenRecordingSettings:s,showPreview:n=!0,autoSaveOnFinish:a=!1,onStartUpladingVoiceOverHandler:c,toggleCamera:d,isCameraToggled:l})=>{const{t:u}=W.useTranslation(),g=p.useRef(null),h=p.useRef(null),{userData:x}=me(),{showVirtualBgFeature:y,showTeleprompterFeature:m}=Se(),w=jx(x.id),[f,b]=p.useState(!!w.url),[S,T]=p.useState(!1),V=Ht(),{trackVideoSpecificPagesManually:I}=bt({vin:""}),{disableOrEnableTeleprompter:L,turnOnTeleprompterPlaying:v,saveTeleprompterSettingsHandler:C,onTeleprompterModalClose:$,showTeleprompterModal:R,isUsingTeleprompter:j,teleprompterSettings:A}=To(),{stopRecording:P,pauseRecording:M,startCountDown:N,stopCountDown:D,status:O,recordedBlob:U,countdown:Y,timeInSeconds:ne}=Wr({isSegmenterActive:S,canvasRef:g,videoRef:h,screenStream:e,stopAllStreams:o,onStartUpladingVoiceOverHandler:c,shouldStartCountdown:!1,handleGoToRecordHome:r,isCameraToggled:l});return p.useEffect(()=>{I==null||I({...vt.VIDEOS_RECORDER})},[]),p.useEffect(()=>{Y===0&&O===le.COUNTDOWN&&j&&v()},[Y,O]),p.useEffect(()=>{var K,G;if((G=(K=x==null?void 0:x.user)==null?void 0:K.packageDetails)!=null&&G.id){const q=!Gr(x,qr.TELEPROMPTER);L(q)}},[]),O===le.DONE&&U&&(n||a)?t.jsx(Yr,{videoBlob:U,autoSave:a,handleGoToRecordHome:()=>{r()}}):t.jsxs(t.Fragment,{children:[t.jsx(Br,{status:O,handleGoToRecordHome:()=>{r()},onOpenRecordingSettings:s,teleprompterActions:m?t.jsx(fx,{status:O}):t.jsx(t.Fragment,{})}),t.jsxs("div",{style:{position:"relative"},children:[O===le.IDLE&&t.jsx(Qr,{text:u("Loading camera")}),t.jsx(Ur,{videoRef:h,canvasRef:g,countdown:Y,status:O,teleprompter:t.jsx(Cx,{status:O}),toggleCamera:d}),!V&&y&&t.jsx(jf,{setIsLoadingVB:b,isLoadingVb:f,initialImage:w,videoRef:h,canvasRef:g,isSegmenterActive:S,setIsSegmenterActive:T,status:O})]}),t.jsx(Hr,{startCountDown:N,stopCountDown:D,pauseRecording:M,stopRecording:P,status:O,timeInSeconds:ne,isLoadingVB:f}),R&&t.jsx(Nf,{handleModalClose:$,handleSubmit:C,settings:A})]})},Ff=24,ui=e=>{var r;const o=(r=e==null?void 0:e.audioSource)==null?void 0:r.value;return o?{deviceId:o}:!1},pi={low:{width:{ideal:640},height:{ideal:360}},standard:{width:{ideal:1280},height:{ideal:720}},high:{width:{ideal:1920},height:{ideal:1080}}},hi=e=>{var r,s;return{...e!=null&&e.videoQuality?pi[e.videoQuality]:pi.standard,frameRate:Ff,deviceId:(r=e==null?void 0:e.videoSource)!=null&&r.value?(s=e==null?void 0:e.videoSource)==null?void 0:s.value:void 0}},rr=i.div`
|
|
4314
4314
|
display: flex;
|
|
4315
4315
|
flex-direction: column;
|
|
4316
4316
|
width: 176px;
|
|
@@ -4370,9 +4370,9 @@
|
|
|
4370
4370
|
border: 2px solid white;
|
|
4371
4371
|
bottom: 65px;
|
|
4372
4372
|
left: 35px;
|
|
4373
|
-
`,Hf=({extendStyles:e,showPreview:o,onStartUpladingVoiceOverHandler:r,autoStartCam:s})=>{const{showRecordBothFeature:n,showRecordCamFeature:a,showRecordScreenFeature:c}=Se(),{trackVideoSpecificPagesManually:d}=bt({vin:""}),{trackGTMSelectRecordingTypeEvent:l}=Ge(),u=he.useHistory(),[g,h]=p.useState(!1),{t:x}=W.useTranslation(),{recordingError:
|
|
4373
|
+
`,Hf=({extendStyles:e,showPreview:o,onStartUpladingVoiceOverHandler:r,autoStartCam:s})=>{const{showRecordBothFeature:n,showRecordCamFeature:a,showRecordScreenFeature:c}=Se(),{trackVideoSpecificPagesManually:d}=bt({vin:""}),{trackGTMSelectRecordingTypeEvent:l}=Ge(),u=he.useHistory(),[g,h]=p.useState(!1),{t:x}=W.useTranslation(),{recordingError:y,updateErrorMessage:m,userSettings:w,recorderSettings:f}=_r(),{colors:b}=i.useTheme(),[S,T]=p.useState(),[V,I]=p.useState(null),[L,v]=p.useState(!1),[C,$]=p.useState(null),R=p.useRef(null),j=p.useRef(null),A=p.useRef(null),P=p.useRef(!1),M=p.useRef(!1),N=ui(w),D=hi(w),O=async()=>{R.current&&R.current.getTracks().forEach(B=>B.stop()),j.current&&(j.current.getTracks().forEach(B=>B.stop()),j.current=null),C&&C.getTracks().forEach(B=>B.stop()),document.pictureInPictureElement&&await document.exitPictureInPicture(),A.current&&A.current.srcObject&&(A.current.srcObject.getTracks().forEach(de=>de.stop()),A.current.srcObject=null)},U=async()=>{if(!(y||L))try{v(!0);const B=await b0(R,N,D);B&&($(B),l==null||l({type:to.SCREEN}),I("screen")),v(!1)}catch(B){O(),v(!1),console.log(B,"screenCaptureHandler")}},Y=async B=>{if(!(y||L))try{v(!0);const de=B||w,te=ui(de),se=hi(de),ae=await Bn(j,te,se);ae&&($(ae),l==null||l({type:to.CAM}),I("cam")),v(!1)}catch(de){O(),v(!1),console.log(de,"enableCameraHandler"),m()}},ne=async()=>{var B,de;try{P.current=!0;const te=!S,se=f.videoSource.filter(xe=>te?xe.label.toLowerCase().includes("front"):xe.label.toLowerCase().includes("back"));await O();const ae=await Bn(j,N,{...D,deviceId:(B=se[0])!=null&&B.value?(de=se[0])==null?void 0:de.value:void 0});ae&&($(ae),l==null||l({type:to.CAM}),I("cam")),T(te)}catch(te){console.error("Error toggling camera:",te)}},K=async()=>{if(!(y||A.current===null||L))try{v(!0);const B=Es?await y0(R,j,N,D,A):await w0(R,j,N,D,A);$(B),I("both"),l==null||l({type:to.SCREEN_AND_CAM}),v(!1)}catch(B){O(),console.log(B,"enableCameraHandler"),v(!1)}},G=()=>{s&&(M.current=!1),I(null),O()},q=async B=>{V==="cam"&&(await O(),await Y(B))},ee=Ht();return p.useEffect(()=>{G()},[u.location]),p.useEffect(()=>{var de,te,se;const B=!!((se=(te=(de=w==null?void 0:w.videoSource)==null?void 0:de.label)==null?void 0:te.toLowerCase())!=null&&se.includes("front"));T(B)},[w]),p.useEffect(()=>{V===null&&(d==null||d({...vt.VIDEOS_RECORD}))},[V]),p.useEffect(()=>{s&&a&&V===null&&!M.current&&(M.current=!0,Y())},[s,a,V]),t.jsxs(t.Fragment,{children:[t.jsxs(Rt,{gap:"32px",children:[V===null&&!s&&t.jsxs(zf,{flexDirection:"column",gap:"44px",style:e==null?void 0:e.mainRecordContentWrapper,children:[t.jsx(ns,{color:b.black[100],children:x("Choose recording option")}),t.jsxs(_f,{gap:"32px",children:[n&&!W0&&!H0&&!ee&&t.jsxs(rr,{onClick:K,style:{position:"relative"},error:!!y,children:[t.jsx(H.MdLaptop,{size:72}),t.jsx(Wf,{children:t.jsx(yi.IoPersonCircle,{size:28})}),t.jsx(ft,{color:b.black[100],textAlign:"center",children:x("Screen+Cam")})]}),c&&!ee&&t.jsxs(rr,{onClick:U,error:!!y,children:[t.jsx(H.MdLaptop,{size:72}),t.jsx(ft,{color:b.black[100],textAlign:"center",children:x("Screen Only")})]}),a&&t.jsxs(rr,{onClick:()=>{Y()},error:!!y,children:[t.jsx(H.MdPerson,{size:72}),t.jsx(ft,{color:b.black[100],textAlign:"center",children:x("Cam Only")})]})]})]}),V===null&&s&&!y&&t.jsx(ho,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(Bf,{children:t.jsx(Uf,{children:t.jsx(Qr,{text:x("Loading camera")})})})}),V===null&&s&&!!y&&t.jsxs(Rt,{gap:"16px",style:{width:"100%"},children:[t.jsx(xo,{children:y}),t.jsx(F.Button,{variant:"secondary",text:x("Try again"),onClick:()=>{Y()}})]}),!!y&&V===null&&!s&&t.jsx(xo,{children:y}),V==="screen"&&C instanceof MediaStream&&t.jsx(ho,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(nr,{children:t.jsx(ux,{screenStream:C,stopAllStreams:O,handleGoToRecordHome:G,showPreview:o,onStartUpladingVoiceOverHandler:r})})}),V==="cam"&&C instanceof MediaStream&&t.jsx(ho,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(nr,{children:t.jsx(gx,{children:t.jsx(Pf,{screenStream:C,stopAllStreams:O,handleGoToRecordHome:G,onOpenRecordingSettings:()=>h(!0),showPreview:o,autoSaveOnFinish:!!s,onStartUpladingVoiceOverHandler:r,toggleCamera:ne,isCameraToggled:P.current})})})}),V==="both"&&C instanceof MediaStream&&t.jsx(ho,{style:e==null?void 0:e.showRecorderWrapper,children:t.jsx(nr,{children:t.jsx(dx,{screenStream:C,stopAllStreams:O,handleGoToRecordHome:G,showPreview:o,onStartUpladingVoiceOverHandler:r})})}),t.jsx("video",{ref:A,style:{display:"none"}}),V===null&&!s&&t.jsx(F.Button,{icon:t.jsx(H.MdSettings,{size:18}),variant:"secondary",text:x("Recording settings"),onClick:()=>h(!0)})]}),g&&t.jsx($0,{handleModalClose:()=>h(!1),onSave:q})]})},qf=i.div`
|
|
4374
4374
|
background: ${E.gray10};
|
|
4375
|
-
`,Gf=()=>{const{t:e}=W.useTranslation(),o=he.useHistory(),{flow:r,startupPage:s}=Se(),a=(r||(s===Qt.RECORD_CAMERA?Be.RECORD_CAMERA_ONLY:Be.FULL))===Be.RECORD_CAMERA_ONLY;return t.jsxs(qf,{children:[!a&&t.jsx(Ke,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(q.MdArrowBack,{size:"18"}),onClick:()=>o.push("/"),style:{color:"white"}}),center:t.jsx(Yt,{children:e("Record Video")})}),t.jsx(C0,{children:t.jsx(Hf,{showHelpDesk:!0,showLegacyRecorderSwitch:!0,autoStartCam:a})})]})},Yf=()=>t.jsx(he.Switch,{children:t.jsx(he.Route,{path:"/record/home",component:Gf})}),Qf="Add",Zf="Upload",Kf="Record",Xf="Back",Jf="Stock",e2="Model",t2="Make",o2="Year",r2="Cancel",n2="Insert",i2="Download",s2="Voiceover",a2="Low",c2="Standard",l2="High",d2="Save",u2="Continue",p2="Leave",h2="Resume",g2="Pause",m2="Finish",x2="Teleprompter",f2="Edit",v2="Close",b2="Script",w2="Appearance",y2="Speed",C2="Position",S2="Small",j2="Medium",E2="Large",T2="Top",k2="Bottom",I2="Teleprompter",A2="Done",R2="All",$2="Discard",V2="required",L2="VIN",M2="Note",D2="Encoding",O2="Encoded",N2="Creating",P2="Created",F2="Uploading",z2="Uploaded",_2="Failed",B2="Title",U2="Tags",W2="Marketing",H2="Prospecting",q2="Copy",G2="Trim",Y2="Websites",Q2="CTAs",Z2="Change",K2="Remove",X2="Username",J2="Password",ev="Login",tv="of",ov="VINReels",rv="Lesa",nv="Preview",iv="Company",sv="Primary",av="Private",cv="Vault",lv="Introductions",dv={Add:Qf,Upload:Zf,Record:Kf,Back:Xf,"Search...":"Search...","Search Videos...":"Search Videos...",Stock:Jf,Model:e2,Make:t2,Year:o2,"Lesa TV Import":"Lesa TV Import","Merge Videos":"Merge Videos",Cancel:r2,"Select 2+ videos to merge":"Select 2+ videos to merge","Select maximum 9 videos":"Select maximum 9 videos",Insert:n2,"Copy Video":"Copy Video","Copy to Primary":"Copy to Primary",Download:i2,Voiceover:s2,"Loading...":"Loading...","No videos match your query":"No videos match your query","Upload new video":"Upload new video","Drag and drop your files here or":"Drag and drop your files here or","Browse files...":"Browse files...","Continue Upload":"Continue Upload","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?","Record Video":"Record Video","Choose recording option":"Choose recording option","Screen+Cam":"Screen+Cam","Screen Only":"Screen Only","Cam Only":"Cam Only","Recording settings":"Recording settings","Video source":"Video source","Audio source":"Audio source","Video quality":"Video quality",Low:a2,"Faster Upload":"Faster Upload",Standard:c2,"Fast Upload":"Fast Upload",High:l2,"Slow Upload":"Slow Upload",Save:d2,"Leave without saving changes?":"Leave without saving changes?","Your updates will not be saved. This action can’t be undone.":"Your updates will not be saved. This action can’t be undone.","Discard Changes":"Discard Changes","Save Changes":"Save Changes","Leave without saving the recording?":"Leave without saving the recording?","Your recording will not be saved. This action can’t be undone.":"Your recording will not be saved. This action can’t be undone.",Continue:u2,Leave:p2,"Delete Current Video?":"Delete Current Video?","Do you want to go back? The current video will be deleted.":"Do you want to go back? The current video will be deleted.","Yes, Delete Video":"Yes, Delete Video","No, Keep Video":"No, Keep Video","Yes, Keep Video":"Yes, Keep Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Some of the videos are still processing. Please wait until they are done, and then proceed with merging.","Change recording option":"Change recording option","Start recording":" Start recording",Resume:h2,Pause:g2,Finish:m2,"Loading camera":"Loading camera",Teleprompter:x2,"Turn on":"Turn on",Edit:f2,"Turn Off Teleprompter":"Turn Off Teleprompter","Set teleprompter speed":"Set teleprompter speed",Close:v2,Script:b2,Appearance:w2,Speed:y2,"Select script...":"Select script...",Position:C2,"Text size":"Text size",Small:S2,Medium:j2,Large:E2,"Type or paste your script here...":"Type or paste your script here...","Save To My Scripts":"Save To My Scripts",Top:T2,Bottom:k2,"Create a new script":"Create a new script","Select file":"Select file","Cancel Teleprompter?":"Cancel Teleprompter?","You will lose all changes for the Teleprompter.":"You will lose all changes for the Teleprompter.","Yes, cancel":"Yes, cancel","Back to editing":"Back to editing",Telepromter:I2,"Virtual Backgrounds":"Virtual Backgrounds","Applying Virtual Background":"Applying Virtual Background","Select from a library of high-resolution images, or upload your own for extra personalization.":" Select from a library of high-resolution images, or upload your own for extra personalization.","Select your own":"Select your own","Select a virtual background":"Select a virtual background",Done:A2,"Drag and drop files here to upload new file":"Drag and drop files here to upload new file","Drop files here":"Drop files here",All:R2,"No more files":"No more files","No files found.":"No files found.","Select your virtual background":"Select your virtual background","Search files...":"Search files...","Uploaded on (ASC)":"Uploaded on (ASC)","Uploaded on (DESC)":"Uploaded on (DESC)","Close video preview":"Close video preview","Tag can not be empty.":"Tag can not be empty.","Tag cannot contain more than {{count}} characters":"Tag cannot contain more than {{count}} characters","Tag already exists.":"Tag already exists.","Manage Tags":"Manage Tags","Add tag(s)...":"Add tag(s)...","Add Tags...":"Add Tags...","Remove this video":"Remove this video","Select Folder":"Select Folder","Video Title":"Video Title","This field is required":"This field is required","Title should not contain a dot (.)":"Title should not contain a dot (.)","Advisor ID is required":"Advisor ID is required","Repair Order Number is required.":"Repair Order Number is required.","Preview recorded video":"Preview recorded video",Discard:$2,"Save Recording":"Save Recording","Continue to Insert":"Continue to Insert","Video Attributes":"Video Attributes",required:V2,"Video Type":"Video Type","Search vehicle":"Search vehicle","Search vehicle by name, VIN or stock number...":"Search vehicle by name, VIN or stock number...",VIN:L2,"Stock number":"Stock number","Assign To":"Assign To","RO Number":"RO Number","Customer Name":"Customer Name",Note:M2,"Waiting...":"Waiting...",Encoding:D2,Encoded:O2,Creating:N2,Created:P2,Uploading:F2,Uploaded:z2,"Controls disabled before preview.":"Controls disabled before preview.","Start Over":"Start Over","Start Over?":"Start Over?","Your voiceover recording will be erased.":"Your voiceover recording will be erased.","Go Back":"Go Back","Save Video":"Save Video","Duplicated video ready for voiceover":"Duplicated video ready for voiceover","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.","Name new video":"Name new video","Give your new video a name":"Give your new video a name","Wheels TV Import":"Wheels TV Import","Oops! It looks like there are no videos matching your search terms.":"Oops! It looks like there are no videos matching your search terms.","Try using a different search terms":"Try using a different search terms","Go to:":"Go to:",Failed:_2,"Trimmed.":"Trimmed.","Revert to Original":"Revert to Original","Playback Speed":"Playback Speed",Title:B2,Tags:U2,"Search tags or create new...":"Search tags or create new...","Mark Video as ‘Sent’?":"Mark Video as ‘Sent’?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.","Leave as ‘Not Sent’":"Leave as ‘Not Sent’","Mark as Sent":"Mark as Sent","Something went wrong while trimming the video, try again later!":"Something went wrong while trimming the video, try again later!","Download failed, please try again later.":"Download failed, please try again later.","Video copied successfully.":"Video copied successfully.","Copy failed, please try again later.":"Copy failed, please try again later.","Video marked as Sent":"Video marked as Sent","Inserting video...":"Inserting video...","Link copied to clipboard!":"Link copied to clipboard!","Script updated sucessfully.":"Script updated sucessfully.","Script saved as {{scriptTitleText}}.":"Script saved as {{scriptTitleText}}.","Failed to start recording.":"Failed to start recording.","Something went wrong, try again later!":"Something went wrong, try again later!","Error while uploading file, please try again later.":"Error while uploading file, please try again later.","Successfully saved video!":"Successfully saved video!","There was an error while creating your video request. Please try again.":"There was an error while creating your video request. Please try again.","Server is currently unavailable, try again later!":"Server is currently unavailable, try again later!","Creating voiceover failed, try again later!":"Creating voiceover failed, try again later!","Voiceover successfully created!":"Voiceover successfully created!","Please enable audio in your recording settings and try again!":"Please enable audio in your recording settings and try again!","Video has been added!":"Video has been added!","An error occured while trying to add the video!":"An error occured while trying to add the video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"We're currently experiencing difficulties fetching custom virtual backgrounds.","We're currently experiencing difficulties fetching Lesa videos.":"We're currently experiencing difficulties fetching Lesa videos.","Video successfully created!":"Video successfully created!","Failed to create video. Please try again later.":"Failed to create video. Please try again later.","Video title can not be more than 100 characters!":"Video title can not be more than 100 characters!","{{name}} is of invalid type and won't be uploaded.":"{{name}} is of invalid type and won't be uploaded.","Oops! Something went wrong, try again in a few moments.":"Oops! Something went wrong, try again in a few moments.","Failed to copy to clipboard":"Failed to copy to clipboard","Transcription Started.":"Transcription Started.",Marketing:W2,Prospecting:H2,"Respond to Inquiry":"Respond to Inquiry","Thanks For Your Business":"Thanks For Your Business","Additional Repair":"Additional Repair","Repair inquiry":"Repair inquiry","Regular service":"Regular service","Service reminder":"Service reminder","Quote request":"Quote request",Copy:q2,"Trim Video":"Trim Video",Trim:G2,"CRM Code Copied!":"CRM Code Copied!","URL Copied!":"URL Copied!","Raw HTML Copied!":"Raw HTML Copied!","Landing Page":"Landing Page",Websites:Y2,CTAs:Q2,"Use Existing":"Use Existing","Add New":"Add New","No Websites":"No Websites","No CTAs":"No CTAs","Enter website":"Enter website","No vehicles found, try entering a different name or VIN.":"No vehicles found, try entering a different name or VIN.","Add Vehicle":"Add Vehicle",Change:Z2,Remove:K2,"To enable the integration with your Inventory Management System, please call us at":"To enable the integration with your Inventory Management System, please call us at","processing...":"processing...","Login failed":"Login failed","External token invalid.":"External token invalid.",Username:X2,Password:J2,Login:ev,"Forgot password?":"Forgot password?","Please upgrade you account to use eLead integration.":"Please upgrade you account to use eLead integration.","No Audio":"No Audio","No Video":"No Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"You do not have the necessary permissions to access this feature. Please check your browser permissions.","Add More Videos":"Add More Videos","videos uploading":"videos uploading","Video title is required!":"Video title is required!","Uploading...":"Uploading...","Encoding...":"Encoding...","VIN / search vehicle":"VIN / search vehicle","Select vehicle":"Select vehicle","Select video type":"Select video type","Log Out":"Log Out","Login to your account":"Login to your account",of:tv,"No settings":"No settings","Title cannot be empty.":"Title cannot be empty.","words / min":"words / min","Please enter at least three characters to search":"Please enter at least three characters to search","Select Landing Page":"Select Landing Page","We're currently experiencing difficulties fetching VINReels.":"We're currently experiencing difficulties fetching VINReels.","VINReel has been added to Video library.":"VINReel has been added to Video library.","We're currently experiencing difficulties copying the VINReel to the Video library.":"We're currently experiencing difficulties copying the VINReel to the Video library.","VINReels Import":"VINReels Import",VINReels:ov,Lesa:rv,"Wheels TV":"Wheels TV","Add to Covideo":"Add to Covideo",Preview:nv,"Enable video reactions & comments":"Enable video reactions & comments","Try using different search term":"Try using different search term","All folders":"All folders",Company:iv,Primary:sv,Private:av,Vault:cv,"Vehicle Walkarounds":"Vehicle Walkarounds","Appointment Reminders":"Appointment Reminders",Introductions:lv,"Post - Sale Thank You":"Post - Sale Thank You","Video Replies":"Video Replies","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.","Welcome back":"Welcome back","Enter username to continue":"Enter username to continue","Forgot username?":"Forgot username?","Log In":"Log In","Verifying SSO...":"Verifying SSO..."},uv="Añadir",pv="Subir",hv="Grabar",gv="Atrás",mv="Stock",xv="Modelo",fv="Marca",vv="Año",bv="Cancelar",wv="Insertar",yv="Descargar",Cv="Narración",Sv="Baja",jv="Estándar",Ev="Alta",Tv="Guardar",kv="Continuar",Iv="Salir",Av="Reanudar",Rv="Pausa",$v="Finalizar",Vv="Editar",Lv="Teleprompter",Mv="Cerrar",Dv="Guion",Ov="Apariencia",Nv="Velocidad",Pv="Posición",Fv="Pequeño",zv="Mediano",_v="Grande",Bv="Arriba",Uv="Abajo",Wv="Teleprompter",Hv="Hecho",qv="Todos",Gv="Descartar",Yv="obligatorio",Qv="VIN",Zv="Nota",Kv="Codificando",Xv="Codificado",Jv="Creando",eb="Creado",tb="Subiendo",ob="Subido",rb="Fallido",nb="Título",ib="Etiquetas",sb="Marketing",ab="Prospección",cb="Copy",lb="Recortar",db="Sitios Web",ub="CTAs",pb="Cambiar",hb="Eliminar",gb="Nombre de usuario",mb="Contraseña",xb="Iniciar sesión",fb="de",vb="VINReels",bb="Lesa",wb="Vista Previa",yb="Empresa",Cb="Principal",Sb="Privado",jb="Bóveda",Eb="Introducciones",Tb={Add:uv,Upload:pv,Record:hv,Back:gv,"Search...":"Buscar...","Search Videos...":"Buscar videos...",Stock:mv,Model:xv,Make:fv,Year:vv,"Lesa TV Import":"Importar Lesa TV","Merge Videos":"Combinar Videos",Cancel:bv,"Select 2+ videos to merge":"Selecciona 2 o más videos para combinar","Select maximum 9 videos":"Selecciona un máximo de 9 videos",Insert:wv,"Copy Video":"Copiar Video","Copy to Primary":"Copiar a Primary",Download:yv,Voiceover:Cv,"Loading...":"Cargando...","No videos match your query":"Ningún video coincide con tu búsqueda","Upload new video":"Subir nuevo video","Drag and drop your files here or":"Arrastra y suelta tus archivos aquí o","Browse files...":"Buscar archivos...","Continue Upload":"Continuar Subida","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Tendrás que reiniciar la subida de tu video desde el principio si cancelas ahora. Estás seguro de que quieres cancelar esta subida?","Record Video":"Grabar Video","Choose recording option":"Elige opción de grabación","Screen+Cam":"Pantalla+Cámara","Screen Only":"Solo Pantalla","Cam Only":"Solo Cámara","Recording settings":"Configuración de grabación","Video source":"Fuente de video","Audio source":"Fuente de audio","Video quality":"Calidad de video",Low:Sv,"Faster Upload":"Subida Más Rápida",Standard:jv,"Fast Upload":"Subida Rápida",High:Ev,"Slow Upload":"Subida Lenta",Save:Tv,"Leave without saving changes?":"¿Salir sin guardar los cambios?","Your updates will not be saved. This action can’t be undone.":"Tus actualizaciones no se guardarán. Esta acción no se puede deshacer.","Discard Changes":"Descartar Cambios","Save Changes":"Guardar Cambios","Leave without saving the recording?":"¿Salir sin guardar la grabación?","Your recording will not be saved. This action can’t be undone.":"Tu grabación no se guardará. Esta acción no se puede deshacer.",Continue:kv,Leave:Iv,"Delete Current Video?":"¿Eliminar el Video Actual?","Do you want to go back? The current video will be deleted.":"¿Quieres regresar? El video actual será eliminado.","Yes, Delete Video":"Sí, Eliminar Video","No, Keep Video":"No, Mantener Video","Yes, Keep Video":"Sí, Mantener Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Algunos de los videos aún están procesándose. Por favor espera hasta que terminen, y luego procede con la combinación.","Change recording option":"Cambiar opción de grabación","Start recording":" Iniciar grabación",Resume:Av,Pause:Rv,Finish:$v,"Loading camera":"Cargando cámara",Edit:Vv,Teleprompter:Lv,"Turn on":"Encender","Turn Off Teleprompter":"Apagar Teleprompter","Set teleprompter speed":"Ajustar velocidad del teleprompter",Close:Mv,Script:Dv,Appearance:Ov,Speed:Nv,"Select script...":"Seleccionar guion...",Position:Pv,"Text size":"Tamaño del texto",Small:Fv,Medium:zv,Large:_v,"Type or paste your script here...":"Escribe o pega tu guion aquí...","Save To My Scripts":"Guardar en Mis Guiones",Top:Bv,Bottom:Uv,"Create a new script":"Crear un nuevo guion","Select file":"Seleccionar archivo","Cancel Teleprompter?":"¿Cancelar Teleprompter?","You will lose all changes for the Teleprompter.":"Perderás todos los cambios del Teleprompter.","Yes, cancel":"Sí, cancelar","Back to editing":"Volver a editar",Telepromter:Wv,"Virtual Backgrounds":"Fondos Virtuales","Applying Virtual Background":"Aplicando Fondos Virtuale","Select from a library of high-resolution images, or upload your own for extra personalization.":"Selecciona de una biblioteca de imágenes de alta resolución, o sube las tuyas para una personalización extra.","Select your own":"Selecciona las tuyas propias","Select a virtual background":"Selecciona un fondo virtual",Done:Hv,"Drag and drop files here to upload new file":"Arrastra y suelta archivos aquí para subir un nuevo archivo","Drop files here":"Suelta los archivos aquí",All:qv,"No more files":"No hay más archivos","No files found.":"No se encontraron archivos.","Select your virtual background":"Selecciona tu fondo virtual","Search files...":"Buscar archivos...","Uploaded on (ASC)":"Subido el (ASC)","Uploaded on (DESC)":"Subido el (DESC)","Close video preview":"Cerrar vista previa de video","Tag can not be empty.":"La etiqueta no puede estar vacía.","Tag cannot contain more than {{count}} characters":"La etiqueta no puede contener más de {{count}} caracteres.","Tag already exists.":"La etiqueta ya existe.","Manage Tags":"Gestionar Etiquetas","Add tag(s)...":"Añadir etiqueta(s)...","Add Tags...":"Añadir Etiquetas...","Remove this video":"Eliminar este video","Select Folder":"Seleccionar Carpeta","Video Title":"Título del Video","This field is required":"Este campo es obligatorio","Title should not contain a dot (.)":"El título no debe contener un punto (.).","Advisor ID is required":"El identificador del asesor es obligatorio.","Repair Order Number is required.":"El número de orden de reparación es obligatorio.","Preview recorded video":"Vista previa del video grabado",Discard:Gv,"Save Recording":"Guardar Grabación","Continue to Insert":"Continuar para Insertar","Video Attributes":"Atributos del Video",required:Yv,"Video Type":"Tipo de Video","Search vehicle":"Buscar vehículo","Search vehicle by name, VIN or stock number...":"Buscar vehículo por nombre, VIN o número de stock...",VIN:Qv,"Stock number":"Número de stock","Assign To":"Asignar a","RO Number":"Número de RO","Customer Name":"Nombre del Cliente",Note:Zv,"Waiting...":"Esperando...",Encoding:Kv,Encoded:Xv,Creating:Jv,Created:eb,Uploading:tb,Uploaded:ob,"Controls disabled before preview.":"Controles deshabilitados antes de la vista previa.","Start Over":"Empezar de Nuevo","Start Over?":"¿Empezar de Nuevo?","Your voiceover recording will be erased.":"Tu grabación de voz será borrada.","Go Back":"Regresar","Save Video":"Guardar Video","Duplicated video ready for voiceover":"Video duplicado listo para voz en off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"El video no estará disponible en la Biblioteca hasta que lo guardes. Una nueva voz en off reemplazará el audio original del video duplicado.","Name new video":"Nombrar nuevo video","Give your new video a name":"Dale un nombre a tu nuevo video","Wheels TV Import":"Importar Wheels TV","Oops! It looks like there are no videos matching your search terms.":"¡Vaya! Parece que no hay videos que coincidan con tus términos de búsqueda.","Try using a different search terms":"Intenta usar términos de búsqueda diferentes","Go to:":"Ir a:",Failed:rb,"Trimmed.":"Recortado.","Revert to Original":"Revertir a Original","Playback Speed":"Velocidad de Reproducción",Title:nb,Tags:ib,"Search tags or create new...":"Buscar etiquetas o crear nuevas...","Mark Video as ‘Sent’?":"¿Marcar Video como 'Enviado'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, puedes cambiar las preferencias de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, tu administrador puede cambiar las preferencias de QuickShare.","Leave as ‘Not Sent’":"Dejar como 'No Enviado'","Mark as Sent":"Marcar como Enviado","Something went wrong while trimming the video, try again later!":"¡Algo salió mal al recortar el video, intenta de nuevo más tarde!","Download failed, please try again later.":"La descarga falló, por favor intenta de nuevo más tarde.","Video copied successfully.":"Video copiado con éxito.","Copy failed, please try again later.":"Error al copiar, por favor intenta de nuevo más tarde.","Video marked as Sent":"Video marcado como Enviado","Inserting video...":"Insertando video...","Link copied to clipboard!":"¡Enlace copiado al portapapeles!","Script updated sucessfully.":"Guion actualizado con éxito.","Script saved as {{scriptTitleText}}.":"Guion guardado como {{scriptTitleText}}","Failed to start recording.":"Error al iniciar la grabación.","Something went wrong, try again later!":"¡Algo salió mal, intenta de nuevo más tarde!","Error while uploading file, please try again later.":"Error al subir el archivo, por favor intenta de nuevo más tarde.","Successfully saved video!":"¡Video guardado con éxito!","There was an error while creating your video request. Please try again.":"Hubo un error al crear tu solicitud de video. Por favor, intenta de nuevo.","Server is currently unavailable, try again later!":"¡El servidor no está disponible actualmente, intenta de nuevo más tarde!","Creating voiceover failed, try again later!":"¡Error al crear la voz en off, intenta de nuevo más tarde!","Voiceover successfully created!":"¡Voz en off creada con éxito!","Please enable audio in your recording settings and try again!":"¡Por favor, habilita el audio en la configuración de tu grabación e intenta de nuevo!","Video has been added!":"¡El video ha sido añadido!","An error occured while trying to add the video!":"¡Ocurrió un error al intentar añadir el video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Actualmente estamos experimentando dificultades para obtener fondos virtuales personalizados.","We're currently experiencing difficulties fetching Lesa videos.":"Actualmente estamos experimentando dificultades para obtener videos de Lesa.","Video successfully created!":"¡Video creado con éxito!","Failed to create video. Please try again later.":"No se pudo crear el video. Por favor, intenta de nuevo más tarde.","Video title can not be more than 100 characters!":"¡El título del video no puede tener más de 100 caracteres!","{{name}} is of invalid type and won't be uploaded.":"{{name}} tiene un tipo no válido y no se subirá.","Oops! Something went wrong, try again in a few moments.":"¡Vaya! Algo salió mal, intenta de nuevo en unos momentos.","Failed to copy to clipboard":"Error al copiar al portapapeles","Transcription Started.":"Transcripción Iniciada.",Marketing:sb,Prospecting:ab,"Respond to Inquiry":"Responder a Consulta","Thanks For Your Business":"Gracias por tu Negocio","Additional Repair":"Reparaciones Adicionale","Repair inquiry":"Consulta de Reparación","Regular service":"Servicio Regular","Service reminder":"Recordatorio de Servicio","Quote request":"Solicitud de Cotización",Copy:cb,"Trim Video":"Recortar Video",Trim:lb,"CRM Code Copied!":"¡Código CRM Copiado!","URL Copied!":"¡URL Copiado!","Raw HTML Copied!":"¡HTML en Bruto Copiado!","Landing Page":"Página de Aterrizaje",Websites:db,CTAs:ub,"Use Existing":"Usar Existente","Add New":"Añadir Nuevo","No Websites":"No hay Sitios Web","No CTAs":"No hay CTAs","Enter website":"Introducir sitio web","No vehicles found, try entering a different name or VIN.":"No se encontraron vehículos, intenta ingresar un nombre o VIN diferente.","Add Vehicle":"Añadir Vehículo",Change:pb,Remove:hb,"To enable the integration with your Inventory Management System, please call us at":"Para habilitar la integración con tu Sistema de Gestión de Inventario, por favor llámanos al","processing...":"procesando...","Login failed":"Error de inicio de sesión","External token invalid.":"Token externo no válido.",Username:gb,Password:mb,Login:xb,"Forgot password?":"¿Olvidaste tu contraseña?","Please upgrade you account to use eLead integration.":"Por favor, actualiza tu cuenta para usar la integración eLead.","No Audio":"Sin Audio","No Video":"Sin Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"No tienes los permisos necesarios para acceder a esta función. Por favor, verifica los permisos de tu navegador.","Add More Videos":"Añadir Más Videos","videos uploading":"videos subiendo","Video title is required!":"¡El título del video es obligatorio!","Uploading...":"Subiendo...","Encoding...":"Codificando...","VIN / search vehicle":"VIN / buscar vehículo","Select vehicle":"Seleccionar vehículo","Select video type":"Seleccionar tipo de video","Log Out":"Cerrar sesión","Login to your account":"Iniciar sesión en tu cuenta",of:fb,"No settings":"Sin configuraciones","Title cannot be empty.":"El título no puede estar vacío.","words / min":"palabras / min","Please enter at least three characters to search":"Por favor, ingresa al menos tres caracteres para buscar","Select Landing Page":"Seleccionar Página de Aterrizaje","We're currently experiencing difficulties fetching VINReels.":"Actualmente estamos experimentando dificultades para obtener VINReels.","VINReel has been added to Video library.":"VINReel ha sido añadido a la Biblioteca de Videos.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Actualmente estamos experimentando dificultades para copiar el VINReel a la Biblioteca de Videos.","VINReels Import":"Importar VINReels",VINReels:vb,Lesa:bb,"Wheels TV":"Wheels TV","Add to Covideo":"Añadir a Covideo",Preview:wb,"Enable video reactions & comments":"Habilitar reacciones y comentarios en el video","Try using different search term":"Intenta usar un término de búsqueda diferente","All folders":"Todas las carpetas",Company:yb,Primary:Cb,Private:Sb,Vault:jb,"Vehicle Walkarounds":"Presentaciones de vehículos","Appointment Reminders":"Recordatorios de citas",Introductions:Eb,"Post - Sale Thank You":"Gracias postventa","Video Replies":"Respuestas en video","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Actualmente estás conectado con una cuenta de usuario que no tiene funcionalidades activas asignadas dentro de la integración de Covideo.","Welcome back":"Bienvenido de nuevo","Enter username to continue":"Ingresa tu nombre de usuario para continuar","Forgot username?":"¿Olvidaste tu nombre de usuario?","Log In":"Iniciar sesión","Verifying SSO...":"Verificando SSO..."},kb="Ajouter",Ib="Téléverser",Ab="Enregistrer",Rb="Retour",$b="Stock",Vb="Modèle",Lb="Marque",Mb="Année",Db="Annuler",Ob="Insérer",Nb="Télécharger",Pb="Voix off",Fb="Faible",zb="Standard",_b="Élevée",Bb="Enregistrer",Ub="Continuer",Wb="Quitter",Hb="Reprendre",qb="Pause",Gb="Terminer",Yb="Modifier",Qb="Téléprompteur",Zb="Fermer",Kb="Script",Xb="Apparence",Jb="Vitesse",ew="Position",tw="Petit",ow="Moyen",rw="Grand",nw="Haut",iw="Bas",sw="Téléprompteur",aw="Terminé",cw="Tout",lw="Ignorer",dw="obligatoire",uw="VIN",pw="Remarque",hw="Encodage",gw="Encodé",mw="Création",xw="Créé",fw="Téléversement",vw="Téléversé",bw="Échoué",ww="Titre",yw="Balises",Cw="Marketing",Sw="Prospection",jw="Copy",Ew="Rogner",Tw="Sites Web",kw="CTA",Iw="Changer",Aw="Supprimer",Rw="Nom d’utilisateur",$w="Mot de passe",Vw="Connexion",Lw="de",Mw="VINReels",Dw="Lesa",Ow="Aperçu",Nw="Entreprise",Pw="Principal",Fw="Privé",zw="Coffre",_w="Présentations",Bw={Add:kb,Upload:Ib,Record:Ab,Back:Rb,"Search...":"Rechercher...","Search Videos...":"Rechercher des vidéos...",Stock:$b,Model:Vb,Make:Lb,Year:Mb,"Lesa TV Import":"Importation Lesa TV","Merge Videos":"Fusionner les vidéos",Cancel:Db,"Select 2+ videos to merge":"Sélectionnez 2 vidéos ou plus à fusionner","Select maximum 9 videos":"Sélectionnez un maximum de 9 vidéos",Insert:Ob,"Copy Video":"Copier la vidéo","Copy to Primary":"Copier vers Primary",Download:Nb,Voiceover:Pb,"Loading...":"Chargement...","No videos match your query":"Aucune vidéo ne correspond à votre recherche","Upload new video":"Téléverser une nouvelle vidéo","Drag and drop your files here or":"Glissez et déposez vos fichiers ici ou","Browse files...":"Parcourir les fichiers...","Continue Upload":"Continuer le téléversement","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Vous devrez recommencer le téléversement de votre vidéo depuis le début si vous annulez maintenant. Êtes-vous sûr de vouloir annuler ce téléversement?","Record Video":"Enregistrer une vidéo","Choose recording option":"Choisir l'option d'enregistrement","Screen+Cam":"Écran+Caméra","Screen Only":"Écran uniquement","Cam Only":"Caméra uniquement","Recording settings":"Paramètres d'enregistrement","Video source":"Source vidéo","Audio source":"Source audio","Video quality":"Qualité vidéo",Low:Fb,"Faster Upload":"Téléversement plus rapide",Standard:zb,"Fast Upload":"Téléversement rapide",High:_b,"Slow Upload":"Téléversement lent",Save:Bb,"Leave without saving changes?":"Quitter sans enregistrer les modifications?","Your updates will not be saved. This action can’t be undone.":"Vos mises à jour ne seront pas enregistrées. Cette action est irréversible.","Discard Changes":"Ignorer les modifications","Save Changes":"Enregistrer les modifications","Leave without saving the recording?":"Quitter sans enregistrer l'enregistrement?","Your recording will not be saved. This action can’t be undone.":"Votre enregistrement ne sera pas sauvegardé. Cette action est irréversible.",Continue:Ub,Leave:Wb,"Delete Current Video?":"Supprimer la vidéo actuelle?","Do you want to go back? The current video will be deleted.":"Voulez-vous revenir en arrière? La vidéo actuelle sera supprimée.","Yes, Delete Video":"Oui, supprimer la vidéo","No, Keep Video":"Non, conserver la vidéo","Yes, Keep Video":"Oui, conserver la vidéo","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Certaines des vidéos sont encore en cours de traitement. Veuillez attendre qu'elles soient terminées, puis procédez à la fusion.","Change recording option":"Changer l'option d'enregistrement","Start recording":" Démarrer l'enregistrement",Resume:Hb,Pause:qb,Finish:Gb,"Loading camera":"Chargement de la caméra",Edit:Yb,Teleprompter:Qb,"Turn on":"Allumer","Turn Off Teleprompter":"Éteindre le téléprompteur","Set teleprompter speed":"Régler la vitesse du téléprompteur",Close:Zb,Script:Kb,Appearance:Xb,Speed:Jb,"Select script...":"Sélectionner un script...",Position:ew,"Text size":"Taille du texte",Small:tw,Medium:ow,Large:rw,"Type or paste your script here...":"Tapez ou collez votre script ici...","Save To My Scripts":"Enregistrer dans Mes Scripts",Top:nw,Bottom:iw,"Create a new script":"Créer un nouveau script","Select file":"Sélectionner un fichier","Cancel Teleprompter?":"Annuler le téléprompteur?","You will lose all changes for the Teleprompter.":"Vous perdrez toutes les modifications du téléprompteur.","Yes, cancel":"Oui, annuler","Back to editing":"Retour à la modification",Telepromter:sw,"Virtual Backgrounds":"Arrière-plans virtuels","Applying Virtual Background":"Application des arrière-plans virtuel","Select from a library of high-resolution images, or upload your own for extra personalization.":"Sélectionnez dans une bibliothèque d'images haute résolution, ou téléversez les vôtres pour une personnalisation supplémentaire.","Select your own":"Sélectionnez les vôtres","Select a virtual background":"Sélectionnez un arrière-plan virtuel",Done:aw,"Drag and drop files here to upload new file":"Glissez et déposez des fichiers ici pour téléverser un nouveau fichier","Drop files here":"Déposez les fichiers ici",All:cw,"No more files":"Plus de fichiers","No files found.":"Aucun fichier trouvé.","Select your virtual background":"Sélectionnez votre arrière-plan virtuel","Search files...":"Rechercher des fichiers...","Uploaded on (ASC)":"Téléversé le (ASC)","Uploaded on (DESC)":"Téléversé le (DESC)","Close video preview":"Fermer l'aperçu vidéo","Tag can not be empty.":"La balise ne peut pas être vide.","Tag cannot contain more than {{count}} characters":"L’étiquette ne peut pas contenir plus de {{count}} caractères.","Tag already exists.":"La balise existe déjà.","Manage Tags":"Gérer les balises","Add tag(s)...":"Ajouter une ou des balises...","Add Tags...":"Ajouter des balises...","Remove this video":"Supprimer cette vidéo","Select Folder":"Sélectionner un dossier","Video Title":"Titre de la vidéo","This field is required":"Ce champ est obligatoire","Title should not contain a dot (.)":"Le titre ne doit pas contenir de point (.).","Advisor ID is required":"L’identifiant du conseiller est obligatoire.","Repair Order Number is required.":"Le numéro de commande de réparation est obligatoire.","Preview recorded video":"Aperçu de la vidéo enregistrée",Discard:lw,"Save Recording":"Enregistrer l'enregistrement","Continue to Insert":"Continuer pour insérer","Video Attributes":"Attributs de la vidéo",required:dw,"Video Type":"Type de vidéo","Search vehicle":"Rechercher un véhicule","Search vehicle by name, VIN or stock number...":"Rechercher un véhicule par nom, VIN ou numéro de stock...",VIN:uw,"Stock number":"Numéro de stock","Assign To":"Assigner à","RO Number":"Numéro de RO","Customer Name":"Nom du client",Note:pw,"Waiting...":"En attente...",Encoding:hw,Encoded:gw,Creating:mw,Created:xw,Uploading:fw,Uploaded:vw,"Controls disabled before preview.":"Contrôles désactivés avant l'aperçu.","Start Over":"Recommencer","Start Over?":"Recommencer?","Your voiceover recording will be erased.":"Votre enregistrement de voix off sera effacé.","Go Back":"Retour","Save Video":"Enregistrer la vidéo","Duplicated video ready for voiceover":"Vidéo dupliquée prête pour la voix off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"La vidéo ne sera pas disponible dans la bibliothèque tant que vous ne l'aurez pas enregistrée. Une nouvelle voix off remplacera l'audio original de la vidéo dupliquée.","Name new video":"Nommer la nouvelle vidéo","Give your new video a name":"Donnez un nom à votre nouvelle vidéo","Wheels TV Import":"Importation Wheels TV","Oops! It looks like there are no videos matching your search terms.":"Oups! Il semble qu'il n'y ait pas de vidéos correspondant à vos termes de recherche.","Try using a different search terms":"Essayez d'utiliser des termes de recherche différents","Go to:":"Aller à:",Failed:bw,"Trimmed.":"Rogner.","Revert to Original":"Revenir à l'original","Playback Speed":"Vitesse de lecture",Title:ww,Tags:yw,"Search tags or create new...":"Rechercher des balises ou en créer de nouvelles...","Mark Video as ‘Sent’?":"Marquer la vidéo comme 'Envoyée'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, vous pouvez modifier les préférences de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, votre administrateur peut modifier les préférences de QuickShare.","Leave as ‘Not Sent’":"Laisser comme 'Non envoyé'","Mark as Sent":"Marquer comme envoyé","Something went wrong while trimming the video, try again later!":"Une erreur s'est produite lors du rognage de la vidéo, réessayez plus tard!","Download failed, please try again later.":"Le téléchargement a échoué, veuillez réessayer plus tard.","Video copied successfully.":"Vidéo copiée avec succès.","Copy failed, please try again later.":"La copie a échoué, veuillez réessayer plus tard.","Video marked as Sent":"Vidéo marquée comme envoyée","Inserting video...":" Insertion de la vidéo...","Link copied to clipboard!":"Lien copié dans le presse-papiers!","Script updated sucessfully.":"Script mis à jour avec succès.","Script saved as {{scriptTitleText}}.":"Script enregistré sous {{scriptTitleText}}.","Failed to start recording.":"Échec du démarrage de l'enregistrement.","Something went wrong, try again later!":"Une erreur s'est produite, réessayez plus tard!","Error while uploading file, please try again later.":"Erreur lors du téléversement du fichier, veuillez réessayer plus tard.","Successfully saved video!":"Vidéo enregistrée avec succès!","There was an error while creating your video request. Please try again.":"Une erreur s'est produite lors de la création de votre demande de vidéo. Veuillez réessayer.","Server is currently unavailable, try again later!":"Le serveur est actuellement indisponible, réessayez plus tard!","Creating voiceover failed, try again later!":"Échec de la création de la voix off, réessayez plus tard!","Voiceover successfully created!":"Voix off créée avec succès!","Please enable audio in your recording settings and try again!":"Veuillez activer l'audio dans vos paramètres d'enregistrement et réessayer!","Video has been added!":"La vidéo a été ajoutée!","An error occured while trying to add the video!":"Une erreur s'est produite lors de la tentative d'ajout de la vidéo!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Nous rencontrons actuellement des difficultés pour récupérer des arrière-plans virtuels personnalisés.","We're currently experiencing difficulties fetching Lesa videos.":"Nous rencontrons actuellement des difficultés pour récupérer les vidéos Lesa.","Video successfully created!":"Vidéo créée avec succès!","Failed to create video. Please try again later.":"Échec de la création de la vidéo. Veuillez réessayer plus tard.","Video title can not be more than 100 characters!":"Le titre de la vidéo ne peut pas contenir plus de 100 caractères!","{{name}} is of invalid type and won't be uploaded.":"{{name}} est d’un type non valide et ne sera pas téléversé.","Oops! Something went wrong, try again in a few moments.":"Oups! Une erreur s'est produite, réessayez dans quelques instants.","Failed to copy to clipboard":"Échec de la copie dans le presse-papiers","Transcription Started.":"Transcription commencée.",Marketing:Cw,Prospecting:Sw,"Respond to Inquiry":"Répondre à la demande","Thanks For Your Business":"Merci pour votre entreprise","Additional Repair":"Réparations supplémentaire","Repair inquiry":"Demande de réparation","Regular service":"Service régulier","Service reminder":"Rappel de service","Quote request":"Demande de devis",Copy:jw,"Trim Video":"Rogner la vidéo",Trim:Ew,"CRM Code Copied!":"Code CRM copié!","URL Copied!":"URL copiée!","Raw HTML Copied!":"HTML brut copié!","Landing Page":"Page de destination",Websites:Tw,CTAs:kw,"Use Existing":"Utiliser existant","Add New":"Ajouter nouveau","No Websites":"Aucun site Web","No CTAs":"Aucun CTA","Enter website":"Entrer le site Web","No vehicles found, try entering a different name or VIN.":"Aucun véhicule trouvé, essayez d'entrer un nom ou un VIN différent.","Add Vehicle":"Ajouter un véhicule",Change:Iw,Remove:Aw,"To enable the integration with your Inventory Management System, please call us at":"Pour activer l'intégration avec votre système de gestion des stocks, veuillez nous appeler au","processing...":"traitement...","Login failed":"Échec de la connexion","External token invalid.":"Jeton externe invalide.",Username:Rw,Password:$w,Login:Vw,"Forgot password?":"Mot de passe oublié ?","Please upgrade you account to use eLead integration.":"Veuillez mettre à niveau votre compte pour utiliser l'intégration eLead.","No Audio":"Pas d'audio","No Video":"Pas de vidéo","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"Vous n'avez pas les autorisations nécessaires pour accéder à cette fonctionnalité. Veuillez vérifier les autorisations de votre navigateur.","Add More Videos":"Ajouter plus de vidéos","videos uploading":"vidéos en cours de téléversement","Video title is required!":"Le titre de la vidéo est obligatoire!","Uploading...":"Téléversement...","Encoding...":"Encodage...","VIN / search vehicle":"VIN / rechercher un véhicule","Select vehicle":"Sélectionner un véhicule","Select video type":"Sélectionner le type de vidéo","Log Out":"Déconnexion","Login to your account":"Connectez-vous à votre compte",of:Lw,"No settings":"Aucun paramètre","Title cannot be empty.":"Le titre ne peut pas être vide.","words / min":"mots / min","Please enter at least three characters to search":"Veuillez entrer au moins trois caractères pour la recherche","Select Landing Page":"Sélectionner la page de destination","We're currently experiencing difficulties fetching VINReels.":"Nous rencontrons actuellement des difficultés pour récupérer les VINReels.","VINReel has been added to Video library.":"Le VINReel a été ajouté à la bibliothèque vidéo.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Nous rencontrons actuellement des difficultés pour copier le VINReel dans la bibliothèque vidéo.","VINReels Import":"Importation VINReels",VINReels:Mw,Lesa:Dw,"Wheels TV":"Wheels TV","Add to Covideo":"Ajouter à Covideo",Preview:Ow,"Enable video reactions & comments":"Activer les réactions et commentaires vidéo","Try using different search term":"Essayez d'utiliser un terme de recherche différent","All folders":"Tous les dossiers",Company:Nw,Primary:Pw,Private:Fw,Vault:zw,"Vehicle Walkarounds":"Présentations de véhicules","Appointment Reminders":"Rappels de rendez-vous",Introductions:_w,"Post - Sale Thank You":"Remerciements après-vente","Video Replies":"Réponses vidéo","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Vous êtes actuellement connecté avec un compte utilisateur qui n'a aucune fonctionnalité active assignée dans l'intégration de Covideo.","Welcome back":"Bon retour","Enter username to continue":"Entrez le nom d'utilisateur pour continuer","Forgot username?":"Nom d'utilisateur oublié?","Log In":"Se connecter","Verifying SSO...":"Vérification SSO..."};lt.use(W.initReactI18next).init({resources:{en:{translation:dv},es:{translation:Tb},fr:{translation:Bw}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},react:{useSuspense:!1},saveMissing:!0,missingKeyHandler:function(e,o,r,s){console.warn("Missing translation key:",{lng:e,ns:o,key:r,fallbackValue:s})}});const Is=i.div`
|
|
4375
|
+
`,Gf=()=>{const{t:e}=W.useTranslation(),o=he.useHistory(),{flow:r,startupPage:s}=Se(),a=(r||(s===Qt.RECORD_CAMERA?Be.RECORD_CAMERA_ONLY:Be.FULL))===Be.RECORD_CAMERA_ONLY;return t.jsxs(qf,{children:[!a&&t.jsx(Ke,{left:t.jsx(F.Button,{text:e("Back"),variant:"transparent",icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>o.push("/"),style:{color:"white"}}),center:t.jsx(Yt,{children:e("Record Video")})}),t.jsx(j0,{children:t.jsx(Hf,{showHelpDesk:!0,showLegacyRecorderSwitch:!0,autoStartCam:a})})]})},Yf=()=>t.jsx(he.Switch,{children:t.jsx(he.Route,{path:"/record/home",component:Gf})}),Qf="Add",Zf="Upload",Kf="Record",Xf="Back",Jf="Stock",e2="Model",t2="Make",o2="Year",r2="Cancel",n2="Insert",i2="Download",s2="Voiceover",a2="Low",c2="Standard",l2="High",d2="Save",u2="Continue",p2="Leave",h2="Resume",g2="Pause",m2="Finish",x2="Teleprompter",f2="Edit",v2="Close",b2="Script",w2="Appearance",y2="Speed",C2="Position",S2="Small",j2="Medium",E2="Large",T2="Top",k2="Bottom",I2="Teleprompter",A2="Done",R2="All",$2="Discard",V2="required",L2="VIN",M2="Note",D2="Encoding",O2="Encoded",N2="Creating",P2="Created",F2="Uploading",z2="Uploaded",_2="Failed",B2="Title",U2="Tags",W2="Marketing",H2="Prospecting",q2="Copy",G2="Trim",Y2="Websites",Q2="CTAs",Z2="Change",K2="Remove",X2="Username",J2="Password",ev="Login",tv="of",ov="VINReels",rv="Lesa",nv="Preview",iv="Company",sv="Primary",av="Private",cv="Vault",lv="Introductions",dv={Add:Qf,Upload:Zf,Record:Kf,Back:Xf,"Search...":"Search...","Search Videos...":"Search Videos...",Stock:Jf,Model:e2,Make:t2,Year:o2,"Lesa TV Import":"Lesa TV Import","Merge Videos":"Merge Videos",Cancel:r2,"Select 2+ videos to merge":"Select 2+ videos to merge","Select maximum 9 videos":"Select maximum 9 videos",Insert:n2,"Copy Video":"Copy Video","Copy to Primary":"Copy to Primary",Download:i2,Voiceover:s2,"Loading...":"Loading...","No videos match your query":"No videos match your query","Upload new video":"Upload new video","Drag and drop your files here or":"Drag and drop your files here or","Browse files...":"Browse files...","Continue Upload":"Continue Upload","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?","Record Video":"Record Video","Choose recording option":"Choose recording option","Screen+Cam":"Screen+Cam","Screen Only":"Screen Only","Cam Only":"Cam Only","Recording settings":"Recording settings","Video source":"Video source","Audio source":"Audio source","Video quality":"Video quality",Low:a2,"Faster Upload":"Faster Upload",Standard:c2,"Fast Upload":"Fast Upload",High:l2,"Slow Upload":"Slow Upload",Save:d2,"Leave without saving changes?":"Leave without saving changes?","Your updates will not be saved. This action can’t be undone.":"Your updates will not be saved. This action can’t be undone.","Discard Changes":"Discard Changes","Save Changes":"Save Changes","Leave without saving the recording?":"Leave without saving the recording?","Your recording will not be saved. This action can’t be undone.":"Your recording will not be saved. This action can’t be undone.",Continue:u2,Leave:p2,"Delete Current Video?":"Delete Current Video?","Do you want to go back? The current video will be deleted.":"Do you want to go back? The current video will be deleted.","Yes, Delete Video":"Yes, Delete Video","No, Keep Video":"No, Keep Video","Yes, Keep Video":"Yes, Keep Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Some of the videos are still processing. Please wait until they are done, and then proceed with merging.","Change recording option":"Change recording option","Start recording":" Start recording",Resume:h2,Pause:g2,Finish:m2,"Loading camera":"Loading camera",Teleprompter:x2,"Turn on":"Turn on",Edit:f2,"Turn Off Teleprompter":"Turn Off Teleprompter","Set teleprompter speed":"Set teleprompter speed",Close:v2,Script:b2,Appearance:w2,Speed:y2,"Select script...":"Select script...",Position:C2,"Text size":"Text size",Small:S2,Medium:j2,Large:E2,"Type or paste your script here...":"Type or paste your script here...","Save To My Scripts":"Save To My Scripts",Top:T2,Bottom:k2,"Create a new script":"Create a new script","Select file":"Select file","Cancel Teleprompter?":"Cancel Teleprompter?","You will lose all changes for the Teleprompter.":"You will lose all changes for the Teleprompter.","Yes, cancel":"Yes, cancel","Back to editing":"Back to editing",Telepromter:I2,"Virtual Backgrounds":"Virtual Backgrounds","Applying Virtual Background":"Applying Virtual Background","Select from a library of high-resolution images, or upload your own for extra personalization.":" Select from a library of high-resolution images, or upload your own for extra personalization.","Select your own":"Select your own","Select a virtual background":"Select a virtual background",Done:A2,"Drag and drop files here to upload new file":"Drag and drop files here to upload new file","Drop files here":"Drop files here",All:R2,"No more files":"No more files","No files found.":"No files found.","Select your virtual background":"Select your virtual background","Search files...":"Search files...","Uploaded on (ASC)":"Uploaded on (ASC)","Uploaded on (DESC)":"Uploaded on (DESC)","Close video preview":"Close video preview","Tag can not be empty.":"Tag can not be empty.","Tag cannot contain more than {{count}} characters":"Tag cannot contain more than {{count}} characters","Tag already exists.":"Tag already exists.","Manage Tags":"Manage Tags","Add tag(s)...":"Add tag(s)...","Add Tags...":"Add Tags...","Remove this video":"Remove this video","Select Folder":"Select Folder","Video Title":"Video Title","This field is required":"This field is required","Title should not contain a dot (.)":"Title should not contain a dot (.)","Advisor ID is required":"Advisor ID is required","Repair Order Number is required.":"Repair Order Number is required.","Preview recorded video":"Preview recorded video",Discard:$2,"Save Recording":"Save Recording","Continue to Insert":"Continue to Insert","Video Attributes":"Video Attributes",required:V2,"Video Type":"Video Type","Search vehicle":"Search vehicle","Search vehicle by name, VIN or stock number...":"Search vehicle by name, VIN or stock number...",VIN:L2,"Stock number":"Stock number","Assign To":"Assign To","RO Number":"RO Number","Customer Name":"Customer Name",Note:M2,"Waiting...":"Waiting...",Encoding:D2,Encoded:O2,Creating:N2,Created:P2,Uploading:F2,Uploaded:z2,"Controls disabled before preview.":"Controls disabled before preview.","Start Over":"Start Over","Start Over?":"Start Over?","Your voiceover recording will be erased.":"Your voiceover recording will be erased.","Go Back":"Go Back","Save Video":"Save Video","Duplicated video ready for voiceover":"Duplicated video ready for voiceover","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.","Name new video":"Name new video","Give your new video a name":"Give your new video a name","Wheels TV Import":"Wheels TV Import","Oops! It looks like there are no videos matching your search terms.":"Oops! It looks like there are no videos matching your search terms.","Try using a different search terms":"Try using a different search terms","Go to:":"Go to:",Failed:_2,"Trimmed.":"Trimmed.","Revert to Original":"Revert to Original","Playback Speed":"Playback Speed",Title:B2,Tags:U2,"Search tags or create new...":"Search tags or create new...","Mark Video as ‘Sent’?":"Mark Video as ‘Sent’?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.","Leave as ‘Not Sent’":"Leave as ‘Not Sent’","Mark as Sent":"Mark as Sent","Something went wrong while trimming the video, try again later!":"Something went wrong while trimming the video, try again later!","Download failed, please try again later.":"Download failed, please try again later.","Video copied successfully.":"Video copied successfully.","Copy failed, please try again later.":"Copy failed, please try again later.","Video marked as Sent":"Video marked as Sent","Inserting video...":"Inserting video...","Link copied to clipboard!":"Link copied to clipboard!","Script updated sucessfully.":"Script updated sucessfully.","Script saved as {{scriptTitleText}}.":"Script saved as {{scriptTitleText}}.","Failed to start recording.":"Failed to start recording.","Something went wrong, try again later!":"Something went wrong, try again later!","Error while uploading file, please try again later.":"Error while uploading file, please try again later.","Successfully saved video!":"Successfully saved video!","There was an error while creating your video request. Please try again.":"There was an error while creating your video request. Please try again.","Server is currently unavailable, try again later!":"Server is currently unavailable, try again later!","Creating voiceover failed, try again later!":"Creating voiceover failed, try again later!","Voiceover successfully created!":"Voiceover successfully created!","Please enable audio in your recording settings and try again!":"Please enable audio in your recording settings and try again!","Video has been added!":"Video has been added!","An error occured while trying to add the video!":"An error occured while trying to add the video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"We're currently experiencing difficulties fetching custom virtual backgrounds.","We're currently experiencing difficulties fetching Lesa videos.":"We're currently experiencing difficulties fetching Lesa videos.","Video successfully created!":"Video successfully created!","Failed to create video. Please try again later.":"Failed to create video. Please try again later.","Video title can not be more than 100 characters!":"Video title can not be more than 100 characters!","{{name}} is of invalid type and won't be uploaded.":"{{name}} is of invalid type and won't be uploaded.","Oops! Something went wrong, try again in a few moments.":"Oops! Something went wrong, try again in a few moments.","Failed to copy to clipboard":"Failed to copy to clipboard","Transcription Started.":"Transcription Started.",Marketing:W2,Prospecting:H2,"Respond to Inquiry":"Respond to Inquiry","Thanks For Your Business":"Thanks For Your Business","Additional Repair":"Additional Repair","Repair inquiry":"Repair inquiry","Regular service":"Regular service","Service reminder":"Service reminder","Quote request":"Quote request",Copy:q2,"Trim Video":"Trim Video",Trim:G2,"CRM Code Copied!":"CRM Code Copied!","URL Copied!":"URL Copied!","Raw HTML Copied!":"Raw HTML Copied!","Landing Page":"Landing Page",Websites:Y2,CTAs:Q2,"Use Existing":"Use Existing","Add New":"Add New","No Websites":"No Websites","No CTAs":"No CTAs","Enter website":"Enter website","No vehicles found, try entering a different name or VIN.":"No vehicles found, try entering a different name or VIN.","Add Vehicle":"Add Vehicle",Change:Z2,Remove:K2,"To enable the integration with your Inventory Management System, please call us at":"To enable the integration with your Inventory Management System, please call us at","processing...":"processing...","Login failed":"Login failed","External token invalid.":"External token invalid.",Username:X2,Password:J2,Login:ev,"Forgot password?":"Forgot password?","Please upgrade you account to use eLead integration.":"Please upgrade you account to use eLead integration.","No Audio":"No Audio","No Video":"No Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"You do not have the necessary permissions to access this feature. Please check your browser permissions.","Add More Videos":"Add More Videos","videos uploading":"videos uploading","Video title is required!":"Video title is required!","Uploading...":"Uploading...","Encoding...":"Encoding...","VIN / search vehicle":"VIN / search vehicle","Select vehicle":"Select vehicle","Select video type":"Select video type","Log Out":"Log Out","Login to your account":"Login to your account",of:tv,"No settings":"No settings","Title cannot be empty.":"Title cannot be empty.","words / min":"words / min","Please enter at least three characters to search":"Please enter at least three characters to search","Select Landing Page":"Select Landing Page","We're currently experiencing difficulties fetching VINReels.":"We're currently experiencing difficulties fetching VINReels.","VINReel has been added to Video library.":"VINReel has been added to Video library.","We're currently experiencing difficulties copying the VINReel to the Video library.":"We're currently experiencing difficulties copying the VINReel to the Video library.","VINReels Import":"VINReels Import",VINReels:ov,Lesa:rv,"Wheels TV":"Wheels TV","Add to Covideo":"Add to Covideo",Preview:nv,"Enable video reactions & comments":"Enable video reactions & comments","Try using different search term":"Try using different search term","All folders":"All folders",Company:iv,Primary:sv,Private:av,Vault:cv,"Vehicle Walkarounds":"Vehicle Walkarounds","Appointment Reminders":"Appointment Reminders",Introductions:lv,"Post - Sale Thank You":"Post - Sale Thank You","Video Replies":"Video Replies","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.","Welcome back":"Welcome back","Enter username to continue":"Enter username to continue","Forgot username?":"Forgot username?","Log In":"Log In","Verifying SSO...":"Verifying SSO..."},uv="Añadir",pv="Subir",hv="Grabar",gv="Atrás",mv="Stock",xv="Modelo",fv="Marca",vv="Año",bv="Cancelar",wv="Insertar",yv="Descargar",Cv="Narración",Sv="Baja",jv="Estándar",Ev="Alta",Tv="Guardar",kv="Continuar",Iv="Salir",Av="Reanudar",Rv="Pausa",$v="Finalizar",Vv="Editar",Lv="Teleprompter",Mv="Cerrar",Dv="Guion",Ov="Apariencia",Nv="Velocidad",Pv="Posición",Fv="Pequeño",zv="Mediano",_v="Grande",Bv="Arriba",Uv="Abajo",Wv="Teleprompter",Hv="Hecho",qv="Todos",Gv="Descartar",Yv="obligatorio",Qv="VIN",Zv="Nota",Kv="Codificando",Xv="Codificado",Jv="Creando",eb="Creado",tb="Subiendo",ob="Subido",rb="Fallido",nb="Título",ib="Etiquetas",sb="Marketing",ab="Prospección",cb="Copy",lb="Recortar",db="Sitios Web",ub="CTAs",pb="Cambiar",hb="Eliminar",gb="Nombre de usuario",mb="Contraseña",xb="Iniciar sesión",fb="de",vb="VINReels",bb="Lesa",wb="Vista Previa",yb="Empresa",Cb="Principal",Sb="Privado",jb="Bóveda",Eb="Introducciones",Tb={Add:uv,Upload:pv,Record:hv,Back:gv,"Search...":"Buscar...","Search Videos...":"Buscar videos...",Stock:mv,Model:xv,Make:fv,Year:vv,"Lesa TV Import":"Importar Lesa TV","Merge Videos":"Combinar Videos",Cancel:bv,"Select 2+ videos to merge":"Selecciona 2 o más videos para combinar","Select maximum 9 videos":"Selecciona un máximo de 9 videos",Insert:wv,"Copy Video":"Copiar Video","Copy to Primary":"Copiar a Primary",Download:yv,Voiceover:Cv,"Loading...":"Cargando...","No videos match your query":"Ningún video coincide con tu búsqueda","Upload new video":"Subir nuevo video","Drag and drop your files here or":"Arrastra y suelta tus archivos aquí o","Browse files...":"Buscar archivos...","Continue Upload":"Continuar Subida","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Tendrás que reiniciar la subida de tu video desde el principio si cancelas ahora. Estás seguro de que quieres cancelar esta subida?","Record Video":"Grabar Video","Choose recording option":"Elige opción de grabación","Screen+Cam":"Pantalla+Cámara","Screen Only":"Solo Pantalla","Cam Only":"Solo Cámara","Recording settings":"Configuración de grabación","Video source":"Fuente de video","Audio source":"Fuente de audio","Video quality":"Calidad de video",Low:Sv,"Faster Upload":"Subida Más Rápida",Standard:jv,"Fast Upload":"Subida Rápida",High:Ev,"Slow Upload":"Subida Lenta",Save:Tv,"Leave without saving changes?":"¿Salir sin guardar los cambios?","Your updates will not be saved. This action can’t be undone.":"Tus actualizaciones no se guardarán. Esta acción no se puede deshacer.","Discard Changes":"Descartar Cambios","Save Changes":"Guardar Cambios","Leave without saving the recording?":"¿Salir sin guardar la grabación?","Your recording will not be saved. This action can’t be undone.":"Tu grabación no se guardará. Esta acción no se puede deshacer.",Continue:kv,Leave:Iv,"Delete Current Video?":"¿Eliminar el Video Actual?","Do you want to go back? The current video will be deleted.":"¿Quieres regresar? El video actual será eliminado.","Yes, Delete Video":"Sí, Eliminar Video","No, Keep Video":"No, Mantener Video","Yes, Keep Video":"Sí, Mantener Video","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Algunos de los videos aún están procesándose. Por favor espera hasta que terminen, y luego procede con la combinación.","Change recording option":"Cambiar opción de grabación","Start recording":" Iniciar grabación",Resume:Av,Pause:Rv,Finish:$v,"Loading camera":"Cargando cámara",Edit:Vv,Teleprompter:Lv,"Turn on":"Encender","Turn Off Teleprompter":"Apagar Teleprompter","Set teleprompter speed":"Ajustar velocidad del teleprompter",Close:Mv,Script:Dv,Appearance:Ov,Speed:Nv,"Select script...":"Seleccionar guion...",Position:Pv,"Text size":"Tamaño del texto",Small:Fv,Medium:zv,Large:_v,"Type or paste your script here...":"Escribe o pega tu guion aquí...","Save To My Scripts":"Guardar en Mis Guiones",Top:Bv,Bottom:Uv,"Create a new script":"Crear un nuevo guion","Select file":"Seleccionar archivo","Cancel Teleprompter?":"¿Cancelar Teleprompter?","You will lose all changes for the Teleprompter.":"Perderás todos los cambios del Teleprompter.","Yes, cancel":"Sí, cancelar","Back to editing":"Volver a editar",Telepromter:Wv,"Virtual Backgrounds":"Fondos Virtuales","Applying Virtual Background":"Aplicando Fondos Virtuale","Select from a library of high-resolution images, or upload your own for extra personalization.":"Selecciona de una biblioteca de imágenes de alta resolución, o sube las tuyas para una personalización extra.","Select your own":"Selecciona las tuyas propias","Select a virtual background":"Selecciona un fondo virtual",Done:Hv,"Drag and drop files here to upload new file":"Arrastra y suelta archivos aquí para subir un nuevo archivo","Drop files here":"Suelta los archivos aquí",All:qv,"No more files":"No hay más archivos","No files found.":"No se encontraron archivos.","Select your virtual background":"Selecciona tu fondo virtual","Search files...":"Buscar archivos...","Uploaded on (ASC)":"Subido el (ASC)","Uploaded on (DESC)":"Subido el (DESC)","Close video preview":"Cerrar vista previa de video","Tag can not be empty.":"La etiqueta no puede estar vacía.","Tag cannot contain more than {{count}} characters":"La etiqueta no puede contener más de {{count}} caracteres.","Tag already exists.":"La etiqueta ya existe.","Manage Tags":"Gestionar Etiquetas","Add tag(s)...":"Añadir etiqueta(s)...","Add Tags...":"Añadir Etiquetas...","Remove this video":"Eliminar este video","Select Folder":"Seleccionar Carpeta","Video Title":"Título del Video","This field is required":"Este campo es obligatorio","Title should not contain a dot (.)":"El título no debe contener un punto (.).","Advisor ID is required":"El identificador del asesor es obligatorio.","Repair Order Number is required.":"El número de orden de reparación es obligatorio.","Preview recorded video":"Vista previa del video grabado",Discard:Gv,"Save Recording":"Guardar Grabación","Continue to Insert":"Continuar para Insertar","Video Attributes":"Atributos del Video",required:Yv,"Video Type":"Tipo de Video","Search vehicle":"Buscar vehículo","Search vehicle by name, VIN or stock number...":"Buscar vehículo por nombre, VIN o número de stock...",VIN:Qv,"Stock number":"Número de stock","Assign To":"Asignar a","RO Number":"Número de RO","Customer Name":"Nombre del Cliente",Note:Zv,"Waiting...":"Esperando...",Encoding:Kv,Encoded:Xv,Creating:Jv,Created:eb,Uploading:tb,Uploaded:ob,"Controls disabled before preview.":"Controles deshabilitados antes de la vista previa.","Start Over":"Empezar de Nuevo","Start Over?":"¿Empezar de Nuevo?","Your voiceover recording will be erased.":"Tu grabación de voz será borrada.","Go Back":"Regresar","Save Video":"Guardar Video","Duplicated video ready for voiceover":"Video duplicado listo para voz en off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"El video no estará disponible en la Biblioteca hasta que lo guardes. Una nueva voz en off reemplazará el audio original del video duplicado.","Name new video":"Nombrar nuevo video","Give your new video a name":"Dale un nombre a tu nuevo video","Wheels TV Import":"Importar Wheels TV","Oops! It looks like there are no videos matching your search terms.":"¡Vaya! Parece que no hay videos que coincidan con tus términos de búsqueda.","Try using a different search terms":"Intenta usar términos de búsqueda diferentes","Go to:":"Ir a:",Failed:rb,"Trimmed.":"Recortado.","Revert to Original":"Revertir a Original","Playback Speed":"Velocidad de Reproducción",Title:nb,Tags:ib,"Search tags or create new...":"Buscar etiquetas o crear nuevas...","Mark Video as ‘Sent’?":"¿Marcar Video como 'Enviado'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, puedes cambiar las preferencias de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si no quieres responder a esta pregunta en cada QuickShare, tu administrador puede cambiar las preferencias de QuickShare.","Leave as ‘Not Sent’":"Dejar como 'No Enviado'","Mark as Sent":"Marcar como Enviado","Something went wrong while trimming the video, try again later!":"¡Algo salió mal al recortar el video, intenta de nuevo más tarde!","Download failed, please try again later.":"La descarga falló, por favor intenta de nuevo más tarde.","Video copied successfully.":"Video copiado con éxito.","Copy failed, please try again later.":"Error al copiar, por favor intenta de nuevo más tarde.","Video marked as Sent":"Video marcado como Enviado","Inserting video...":"Insertando video...","Link copied to clipboard!":"¡Enlace copiado al portapapeles!","Script updated sucessfully.":"Guion actualizado con éxito.","Script saved as {{scriptTitleText}}.":"Guion guardado como {{scriptTitleText}}","Failed to start recording.":"Error al iniciar la grabación.","Something went wrong, try again later!":"¡Algo salió mal, intenta de nuevo más tarde!","Error while uploading file, please try again later.":"Error al subir el archivo, por favor intenta de nuevo más tarde.","Successfully saved video!":"¡Video guardado con éxito!","There was an error while creating your video request. Please try again.":"Hubo un error al crear tu solicitud de video. Por favor, intenta de nuevo.","Server is currently unavailable, try again later!":"¡El servidor no está disponible actualmente, intenta de nuevo más tarde!","Creating voiceover failed, try again later!":"¡Error al crear la voz en off, intenta de nuevo más tarde!","Voiceover successfully created!":"¡Voz en off creada con éxito!","Please enable audio in your recording settings and try again!":"¡Por favor, habilita el audio en la configuración de tu grabación e intenta de nuevo!","Video has been added!":"¡El video ha sido añadido!","An error occured while trying to add the video!":"¡Ocurrió un error al intentar añadir el video!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Actualmente estamos experimentando dificultades para obtener fondos virtuales personalizados.","We're currently experiencing difficulties fetching Lesa videos.":"Actualmente estamos experimentando dificultades para obtener videos de Lesa.","Video successfully created!":"¡Video creado con éxito!","Failed to create video. Please try again later.":"No se pudo crear el video. Por favor, intenta de nuevo más tarde.","Video title can not be more than 100 characters!":"¡El título del video no puede tener más de 100 caracteres!","{{name}} is of invalid type and won't be uploaded.":"{{name}} tiene un tipo no válido y no se subirá.","Oops! Something went wrong, try again in a few moments.":"¡Vaya! Algo salió mal, intenta de nuevo en unos momentos.","Failed to copy to clipboard":"Error al copiar al portapapeles","Transcription Started.":"Transcripción Iniciada.",Marketing:sb,Prospecting:ab,"Respond to Inquiry":"Responder a Consulta","Thanks For Your Business":"Gracias por tu Negocio","Additional Repair":"Reparaciones Adicionale","Repair inquiry":"Consulta de Reparación","Regular service":"Servicio Regular","Service reminder":"Recordatorio de Servicio","Quote request":"Solicitud de Cotización",Copy:cb,"Trim Video":"Recortar Video",Trim:lb,"CRM Code Copied!":"¡Código CRM Copiado!","URL Copied!":"¡URL Copiado!","Raw HTML Copied!":"¡HTML en Bruto Copiado!","Landing Page":"Página de Aterrizaje",Websites:db,CTAs:ub,"Use Existing":"Usar Existente","Add New":"Añadir Nuevo","No Websites":"No hay Sitios Web","No CTAs":"No hay CTAs","Enter website":"Introducir sitio web","No vehicles found, try entering a different name or VIN.":"No se encontraron vehículos, intenta ingresar un nombre o VIN diferente.","Add Vehicle":"Añadir Vehículo",Change:pb,Remove:hb,"To enable the integration with your Inventory Management System, please call us at":"Para habilitar la integración con tu Sistema de Gestión de Inventario, por favor llámanos al","processing...":"procesando...","Login failed":"Error de inicio de sesión","External token invalid.":"Token externo no válido.",Username:gb,Password:mb,Login:xb,"Forgot password?":"¿Olvidaste tu contraseña?","Please upgrade you account to use eLead integration.":"Por favor, actualiza tu cuenta para usar la integración eLead.","No Audio":"Sin Audio","No Video":"Sin Video","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"No tienes los permisos necesarios para acceder a esta función. Por favor, verifica los permisos de tu navegador.","Add More Videos":"Añadir Más Videos","videos uploading":"videos subiendo","Video title is required!":"¡El título del video es obligatorio!","Uploading...":"Subiendo...","Encoding...":"Codificando...","VIN / search vehicle":"VIN / buscar vehículo","Select vehicle":"Seleccionar vehículo","Select video type":"Seleccionar tipo de video","Log Out":"Cerrar sesión","Login to your account":"Iniciar sesión en tu cuenta",of:fb,"No settings":"Sin configuraciones","Title cannot be empty.":"El título no puede estar vacío.","words / min":"palabras / min","Please enter at least three characters to search":"Por favor, ingresa al menos tres caracteres para buscar","Select Landing Page":"Seleccionar Página de Aterrizaje","We're currently experiencing difficulties fetching VINReels.":"Actualmente estamos experimentando dificultades para obtener VINReels.","VINReel has been added to Video library.":"VINReel ha sido añadido a la Biblioteca de Videos.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Actualmente estamos experimentando dificultades para copiar el VINReel a la Biblioteca de Videos.","VINReels Import":"Importar VINReels",VINReels:vb,Lesa:bb,"Wheels TV":"Wheels TV","Add to Covideo":"Añadir a Covideo",Preview:wb,"Enable video reactions & comments":"Habilitar reacciones y comentarios en el video","Try using different search term":"Intenta usar un término de búsqueda diferente","All folders":"Todas las carpetas",Company:yb,Primary:Cb,Private:Sb,Vault:jb,"Vehicle Walkarounds":"Presentaciones de vehículos","Appointment Reminders":"Recordatorios de citas",Introductions:Eb,"Post - Sale Thank You":"Gracias postventa","Video Replies":"Respuestas en video","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Actualmente estás conectado con una cuenta de usuario que no tiene funcionalidades activas asignadas dentro de la integración de Covideo.","Welcome back":"Bienvenido de nuevo","Enter username to continue":"Ingresa tu nombre de usuario para continuar","Forgot username?":"¿Olvidaste tu nombre de usuario?","Log In":"Iniciar sesión","Verifying SSO...":"Verificando SSO..."},kb="Ajouter",Ib="Téléverser",Ab="Enregistrer",Rb="Retour",$b="Stock",Vb="Modèle",Lb="Marque",Mb="Année",Db="Annuler",Ob="Insérer",Nb="Télécharger",Pb="Voix off",Fb="Faible",zb="Standard",_b="Élevée",Bb="Enregistrer",Ub="Continuer",Wb="Quitter",Hb="Reprendre",qb="Pause",Gb="Terminer",Yb="Modifier",Qb="Téléprompteur",Zb="Fermer",Kb="Script",Xb="Apparence",Jb="Vitesse",ew="Position",tw="Petit",ow="Moyen",rw="Grand",nw="Haut",iw="Bas",sw="Téléprompteur",aw="Terminé",cw="Tout",lw="Ignorer",dw="obligatoire",uw="VIN",pw="Remarque",hw="Encodage",gw="Encodé",mw="Création",xw="Créé",fw="Téléversement",vw="Téléversé",bw="Échoué",ww="Titre",yw="Balises",Cw="Marketing",Sw="Prospection",jw="Copy",Ew="Rogner",Tw="Sites Web",kw="CTA",Iw="Changer",Aw="Supprimer",Rw="Nom d’utilisateur",$w="Mot de passe",Vw="Connexion",Lw="de",Mw="VINReels",Dw="Lesa",Ow="Aperçu",Nw="Entreprise",Pw="Principal",Fw="Privé",zw="Coffre",_w="Présentations",Bw={Add:kb,Upload:Ib,Record:Ab,Back:Rb,"Search...":"Rechercher...","Search Videos...":"Rechercher des vidéos...",Stock:$b,Model:Vb,Make:Lb,Year:Mb,"Lesa TV Import":"Importation Lesa TV","Merge Videos":"Fusionner les vidéos",Cancel:Db,"Select 2+ videos to merge":"Sélectionnez 2 vidéos ou plus à fusionner","Select maximum 9 videos":"Sélectionnez un maximum de 9 vidéos",Insert:Ob,"Copy Video":"Copier la vidéo","Copy to Primary":"Copier vers Primary",Download:Nb,Voiceover:Pb,"Loading...":"Chargement...","No videos match your query":"Aucune vidéo ne correspond à votre recherche","Upload new video":"Téléverser une nouvelle vidéo","Drag and drop your files here or":"Glissez et déposez vos fichiers ici ou","Browse files...":"Parcourir les fichiers...","Continue Upload":"Continuer le téléversement","You will have to restart your video upload from the beginning if you cancel now. Are you sure you want to cancel this upload?":"Vous devrez recommencer le téléversement de votre vidéo depuis le début si vous annulez maintenant. Êtes-vous sûr de vouloir annuler ce téléversement?","Record Video":"Enregistrer une vidéo","Choose recording option":"Choisir l'option d'enregistrement","Screen+Cam":"Écran+Caméra","Screen Only":"Écran uniquement","Cam Only":"Caméra uniquement","Recording settings":"Paramètres d'enregistrement","Video source":"Source vidéo","Audio source":"Source audio","Video quality":"Qualité vidéo",Low:Fb,"Faster Upload":"Téléversement plus rapide",Standard:zb,"Fast Upload":"Téléversement rapide",High:_b,"Slow Upload":"Téléversement lent",Save:Bb,"Leave without saving changes?":"Quitter sans enregistrer les modifications?","Your updates will not be saved. This action can’t be undone.":"Vos mises à jour ne seront pas enregistrées. Cette action est irréversible.","Discard Changes":"Ignorer les modifications","Save Changes":"Enregistrer les modifications","Leave without saving the recording?":"Quitter sans enregistrer l'enregistrement?","Your recording will not be saved. This action can’t be undone.":"Votre enregistrement ne sera pas sauvegardé. Cette action est irréversible.",Continue:Ub,Leave:Wb,"Delete Current Video?":"Supprimer la vidéo actuelle?","Do you want to go back? The current video will be deleted.":"Voulez-vous revenir en arrière? La vidéo actuelle sera supprimée.","Yes, Delete Video":"Oui, supprimer la vidéo","No, Keep Video":"Non, conserver la vidéo","Yes, Keep Video":"Oui, conserver la vidéo","Some of the videos are still processing. Please wait until they are done, and then proceed with merging.":"Certaines des vidéos sont encore en cours de traitement. Veuillez attendre qu'elles soient terminées, puis procédez à la fusion.","Change recording option":"Changer l'option d'enregistrement","Start recording":" Démarrer l'enregistrement",Resume:Hb,Pause:qb,Finish:Gb,"Loading camera":"Chargement de la caméra",Edit:Yb,Teleprompter:Qb,"Turn on":"Allumer","Turn Off Teleprompter":"Éteindre le téléprompteur","Set teleprompter speed":"Régler la vitesse du téléprompteur",Close:Zb,Script:Kb,Appearance:Xb,Speed:Jb,"Select script...":"Sélectionner un script...",Position:ew,"Text size":"Taille du texte",Small:tw,Medium:ow,Large:rw,"Type or paste your script here...":"Tapez ou collez votre script ici...","Save To My Scripts":"Enregistrer dans Mes Scripts",Top:nw,Bottom:iw,"Create a new script":"Créer un nouveau script","Select file":"Sélectionner un fichier","Cancel Teleprompter?":"Annuler le téléprompteur?","You will lose all changes for the Teleprompter.":"Vous perdrez toutes les modifications du téléprompteur.","Yes, cancel":"Oui, annuler","Back to editing":"Retour à la modification",Telepromter:sw,"Virtual Backgrounds":"Arrière-plans virtuels","Applying Virtual Background":"Application des arrière-plans virtuel","Select from a library of high-resolution images, or upload your own for extra personalization.":"Sélectionnez dans une bibliothèque d'images haute résolution, ou téléversez les vôtres pour une personnalisation supplémentaire.","Select your own":"Sélectionnez les vôtres","Select a virtual background":"Sélectionnez un arrière-plan virtuel",Done:aw,"Drag and drop files here to upload new file":"Glissez et déposez des fichiers ici pour téléverser un nouveau fichier","Drop files here":"Déposez les fichiers ici",All:cw,"No more files":"Plus de fichiers","No files found.":"Aucun fichier trouvé.","Select your virtual background":"Sélectionnez votre arrière-plan virtuel","Search files...":"Rechercher des fichiers...","Uploaded on (ASC)":"Téléversé le (ASC)","Uploaded on (DESC)":"Téléversé le (DESC)","Close video preview":"Fermer l'aperçu vidéo","Tag can not be empty.":"La balise ne peut pas être vide.","Tag cannot contain more than {{count}} characters":"L’étiquette ne peut pas contenir plus de {{count}} caractères.","Tag already exists.":"La balise existe déjà.","Manage Tags":"Gérer les balises","Add tag(s)...":"Ajouter une ou des balises...","Add Tags...":"Ajouter des balises...","Remove this video":"Supprimer cette vidéo","Select Folder":"Sélectionner un dossier","Video Title":"Titre de la vidéo","This field is required":"Ce champ est obligatoire","Title should not contain a dot (.)":"Le titre ne doit pas contenir de point (.).","Advisor ID is required":"L’identifiant du conseiller est obligatoire.","Repair Order Number is required.":"Le numéro de commande de réparation est obligatoire.","Preview recorded video":"Aperçu de la vidéo enregistrée",Discard:lw,"Save Recording":"Enregistrer l'enregistrement","Continue to Insert":"Continuer pour insérer","Video Attributes":"Attributs de la vidéo",required:dw,"Video Type":"Type de vidéo","Search vehicle":"Rechercher un véhicule","Search vehicle by name, VIN or stock number...":"Rechercher un véhicule par nom, VIN ou numéro de stock...",VIN:uw,"Stock number":"Numéro de stock","Assign To":"Assigner à","RO Number":"Numéro de RO","Customer Name":"Nom du client",Note:pw,"Waiting...":"En attente...",Encoding:hw,Encoded:gw,Creating:mw,Created:xw,Uploading:fw,Uploaded:vw,"Controls disabled before preview.":"Contrôles désactivés avant l'aperçu.","Start Over":"Recommencer","Start Over?":"Recommencer?","Your voiceover recording will be erased.":"Votre enregistrement de voix off sera effacé.","Go Back":"Retour","Save Video":"Enregistrer la vidéo","Duplicated video ready for voiceover":"Vidéo dupliquée prête pour la voix off","The video won’t be available in the Library until you save it. A new voiceover will replace the original audio of duplicated video.":"La vidéo ne sera pas disponible dans la bibliothèque tant que vous ne l'aurez pas enregistrée. Une nouvelle voix off remplacera l'audio original de la vidéo dupliquée.","Name new video":"Nommer la nouvelle vidéo","Give your new video a name":"Donnez un nom à votre nouvelle vidéo","Wheels TV Import":"Importation Wheels TV","Oops! It looks like there are no videos matching your search terms.":"Oups! Il semble qu'il n'y ait pas de vidéos correspondant à vos termes de recherche.","Try using a different search terms":"Essayez d'utiliser des termes de recherche différents","Go to:":"Aller à:",Failed:bw,"Trimmed.":"Rogner.","Revert to Original":"Revenir à l'original","Playback Speed":"Vitesse de lecture",Title:ww,Tags:yw,"Search tags or create new...":"Rechercher des balises ou en créer de nouvelles...","Mark Video as ‘Sent’?":"Marquer la vidéo comme 'Envoyée'?","If you don't want to answer this question with each QuickShare, you can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, vous pouvez modifier les préférences de QuickShare.","If you don't want to answer this question with each QuickShare, your admin can change QuickShare preferences.":"Si vous ne souhaitez pas répondre à cette question à chaque QuickShare, votre administrateur peut modifier les préférences de QuickShare.","Leave as ‘Not Sent’":"Laisser comme 'Non envoyé'","Mark as Sent":"Marquer comme envoyé","Something went wrong while trimming the video, try again later!":"Une erreur s'est produite lors du rognage de la vidéo, réessayez plus tard!","Download failed, please try again later.":"Le téléchargement a échoué, veuillez réessayer plus tard.","Video copied successfully.":"Vidéo copiée avec succès.","Copy failed, please try again later.":"La copie a échoué, veuillez réessayer plus tard.","Video marked as Sent":"Vidéo marquée comme envoyée","Inserting video...":" Insertion de la vidéo...","Link copied to clipboard!":"Lien copié dans le presse-papiers!","Script updated sucessfully.":"Script mis à jour avec succès.","Script saved as {{scriptTitleText}}.":"Script enregistré sous {{scriptTitleText}}.","Failed to start recording.":"Échec du démarrage de l'enregistrement.","Something went wrong, try again later!":"Une erreur s'est produite, réessayez plus tard!","Error while uploading file, please try again later.":"Erreur lors du téléversement du fichier, veuillez réessayer plus tard.","Successfully saved video!":"Vidéo enregistrée avec succès!","There was an error while creating your video request. Please try again.":"Une erreur s'est produite lors de la création de votre demande de vidéo. Veuillez réessayer.","Server is currently unavailable, try again later!":"Le serveur est actuellement indisponible, réessayez plus tard!","Creating voiceover failed, try again later!":"Échec de la création de la voix off, réessayez plus tard!","Voiceover successfully created!":"Voix off créée avec succès!","Please enable audio in your recording settings and try again!":"Veuillez activer l'audio dans vos paramètres d'enregistrement et réessayer!","Video has been added!":"La vidéo a été ajoutée!","An error occured while trying to add the video!":"Une erreur s'est produite lors de la tentative d'ajout de la vidéo!","We're currently experiencing difficulties fetching custom virtual backgrounds.":"Nous rencontrons actuellement des difficultés pour récupérer des arrière-plans virtuels personnalisés.","We're currently experiencing difficulties fetching Lesa videos.":"Nous rencontrons actuellement des difficultés pour récupérer les vidéos Lesa.","Video successfully created!":"Vidéo créée avec succès!","Failed to create video. Please try again later.":"Échec de la création de la vidéo. Veuillez réessayer plus tard.","Video title can not be more than 100 characters!":"Le titre de la vidéo ne peut pas contenir plus de 100 caractères!","{{name}} is of invalid type and won't be uploaded.":"{{name}} est d’un type non valide et ne sera pas téléversé.","Oops! Something went wrong, try again in a few moments.":"Oups! Une erreur s'est produite, réessayez dans quelques instants.","Failed to copy to clipboard":"Échec de la copie dans le presse-papiers","Transcription Started.":"Transcription commencée.",Marketing:Cw,Prospecting:Sw,"Respond to Inquiry":"Répondre à la demande","Thanks For Your Business":"Merci pour votre entreprise","Additional Repair":"Réparations supplémentaire","Repair inquiry":"Demande de réparation","Regular service":"Service régulier","Service reminder":"Rappel de service","Quote request":"Demande de devis",Copy:jw,"Trim Video":"Rogner la vidéo",Trim:Ew,"CRM Code Copied!":"Code CRM copié!","URL Copied!":"URL copiée!","Raw HTML Copied!":"HTML brut copié!","Landing Page":"Page de destination",Websites:Tw,CTAs:kw,"Use Existing":"Utiliser existant","Add New":"Ajouter nouveau","No Websites":"Aucun site Web","No CTAs":"Aucun CTA","Enter website":"Entrer le site Web","No vehicles found, try entering a different name or VIN.":"Aucun véhicule trouvé, essayez d'entrer un nom ou un VIN différent.","Add Vehicle":"Ajouter un véhicule",Change:Iw,Remove:Aw,"To enable the integration with your Inventory Management System, please call us at":"Pour activer l'intégration avec votre système de gestion des stocks, veuillez nous appeler au","processing...":"traitement...","Login failed":"Échec de la connexion","External token invalid.":"Jeton externe invalide.",Username:Rw,Password:$w,Login:Vw,"Forgot password?":"Mot de passe oublié ?","Please upgrade you account to use eLead integration.":"Veuillez mettre à niveau votre compte pour utiliser l'intégration eLead.","No Audio":"Pas d'audio","No Video":"Pas de vidéo","You do not have the necessary permissions to access this feature. Please check your browser permissions.":"Vous n'avez pas les autorisations nécessaires pour accéder à cette fonctionnalité. Veuillez vérifier les autorisations de votre navigateur.","Add More Videos":"Ajouter plus de vidéos","videos uploading":"vidéos en cours de téléversement","Video title is required!":"Le titre de la vidéo est obligatoire!","Uploading...":"Téléversement...","Encoding...":"Encodage...","VIN / search vehicle":"VIN / rechercher un véhicule","Select vehicle":"Sélectionner un véhicule","Select video type":"Sélectionner le type de vidéo","Log Out":"Déconnexion","Login to your account":"Connectez-vous à votre compte",of:Lw,"No settings":"Aucun paramètre","Title cannot be empty.":"Le titre ne peut pas être vide.","words / min":"mots / min","Please enter at least three characters to search":"Veuillez entrer au moins trois caractères pour la recherche","Select Landing Page":"Sélectionner la page de destination","We're currently experiencing difficulties fetching VINReels.":"Nous rencontrons actuellement des difficultés pour récupérer les VINReels.","VINReel has been added to Video library.":"Le VINReel a été ajouté à la bibliothèque vidéo.","We're currently experiencing difficulties copying the VINReel to the Video library.":"Nous rencontrons actuellement des difficultés pour copier le VINReel dans la bibliothèque vidéo.","VINReels Import":"Importation VINReels",VINReels:Mw,Lesa:Dw,"Wheels TV":"Wheels TV","Add to Covideo":"Ajouter à Covideo",Preview:Ow,"Enable video reactions & comments":"Activer les réactions et commentaires vidéo","Try using different search term":"Essayez d'utiliser un terme de recherche différent","All folders":"Tous les dossiers",Company:Nw,Primary:Pw,Private:Fw,Vault:zw,"Vehicle Walkarounds":"Présentations de véhicules","Appointment Reminders":"Rappels de rendez-vous",Introductions:_w,"Post - Sale Thank You":"Remerciements après-vente","Video Replies":"Réponses vidéo","You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.":"Vous êtes actuellement connecté avec un compte utilisateur qui n'a aucune fonctionnalité active assignée dans l'intégration de Covideo.","Welcome back":"Bon retour","Enter username to continue":"Entrez le nom d'utilisateur pour continuer","Forgot username?":"Nom d'utilisateur oublié?","Log In":"Se connecter","Verifying SSO...":"Vérification SSO..."};lt.use(W.initReactI18next).init({resources:{en:{translation:dv},es:{translation:Tb},fr:{translation:Bw}},fallbackLng:"en",supportedLngs:["en","es","fr"],interpolation:{escapeValue:!1},react:{useSuspense:!1},saveMissing:!0,missingKeyHandler:function(e,o,r,s){console.warn("Missing translation key:",{lng:e,ns:o,key:r,fallbackValue:s})}});const Rs=i.div`
|
|
4376
4376
|
display: flex;
|
|
4377
4377
|
box-sizing: border-box;
|
|
4378
4378
|
width: 1246px;
|
|
@@ -4381,13 +4381,13 @@
|
|
|
4381
4381
|
justify-content: space-between;
|
|
4382
4382
|
align-items: flex-start;
|
|
4383
4383
|
padding-bottom: 50px;
|
|
4384
|
-
`;i(
|
|
4384
|
+
`;i(Rs)`
|
|
4385
4385
|
margin-top: 0;
|
|
4386
4386
|
display: flex;
|
|
4387
4387
|
flex-direction: column;
|
|
4388
4388
|
width: 956px;
|
|
4389
4389
|
padding-bottom: 0;
|
|
4390
|
-
`;const
|
|
4390
|
+
`;const gi=i.div`
|
|
4391
4391
|
display: flex;
|
|
4392
4392
|
height: 100%;
|
|
4393
4393
|
flex-direction: column;
|
|
@@ -4396,7 +4396,7 @@
|
|
|
4396
4396
|
flex: 1;
|
|
4397
4397
|
width: 100%;
|
|
4398
4398
|
min-height: 530px;
|
|
4399
|
-
`;i(
|
|
4399
|
+
`;i(Rs)`
|
|
4400
4400
|
display: flex;
|
|
4401
4401
|
justify-content: flex-end;
|
|
4402
4402
|
margin-top: 32px;
|
|
@@ -4428,26 +4428,26 @@
|
|
|
4428
4428
|
font-size: 14px;
|
|
4429
4429
|
color: ${e=>e.theme.colors.neutral[60]};
|
|
4430
4430
|
display: flex;
|
|
4431
|
-
|
|
4431
|
+
`,$s=i.css`
|
|
4432
4432
|
max-width: 185px;
|
|
4433
4433
|
min-width: 80px;
|
|
4434
4434
|
`,Hw=i(Io)`
|
|
4435
|
-
${
|
|
4435
|
+
${$s}
|
|
4436
4436
|
`,qw=i(Ao)`
|
|
4437
|
-
${
|
|
4438
|
-
`,
|
|
4437
|
+
${$s}
|
|
4438
|
+
`,Vs=i.css`
|
|
4439
4439
|
max-width: 180px;
|
|
4440
4440
|
min-width: 130px;
|
|
4441
4441
|
`,Gw=i(Io)`
|
|
4442
|
-
${
|
|
4442
|
+
${Vs}
|
|
4443
4443
|
`,Yw=i(Ao)`
|
|
4444
|
-
${
|
|
4445
|
-
|
|
4444
|
+
${Vs}
|
|
4445
|
+
`,Ls=i.css`
|
|
4446
4446
|
width: inherit;
|
|
4447
4447
|
`,Qw=i(Io)`
|
|
4448
|
-
${
|
|
4448
|
+
${Ls}
|
|
4449
4449
|
`,Zw=i(Ao)`
|
|
4450
|
-
${
|
|
4450
|
+
${Ls}
|
|
4451
4451
|
`,Kw=i(Ao)`
|
|
4452
4452
|
width: 105px;
|
|
4453
4453
|
margin-left: 0;
|
|
@@ -4460,7 +4460,7 @@
|
|
|
4460
4460
|
line-height: 24px;
|
|
4461
4461
|
text-align: center;
|
|
4462
4462
|
color: white;
|
|
4463
|
-
`,
|
|
4463
|
+
`,e4=i.div`
|
|
4464
4464
|
display: flex;
|
|
4465
4465
|
flex-direction: row;
|
|
4466
4466
|
justify-content: flex-start;
|
|
@@ -4469,20 +4469,20 @@
|
|
|
4469
4469
|
flex-direction: column;
|
|
4470
4470
|
width: 100%;
|
|
4471
4471
|
`}
|
|
4472
|
-
`,
|
|
4472
|
+
`,t4=i.div`
|
|
4473
4473
|
background: ${E.white};
|
|
4474
4474
|
`;i.div`
|
|
4475
4475
|
width: 216px;
|
|
4476
4476
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
4477
4477
|
width: 100%;
|
|
4478
4478
|
`}
|
|
4479
|
-
`;const
|
|
4479
|
+
`;const o4=i.div`
|
|
4480
4480
|
display: flex;
|
|
4481
4481
|
flex-direction: row;
|
|
4482
4482
|
align-items: center;
|
|
4483
4483
|
justify-content: flex-end;
|
|
4484
4484
|
margin-top: 16px;
|
|
4485
|
-
`,
|
|
4485
|
+
`,r4=i.span`
|
|
4486
4486
|
color: ${E.gray80};
|
|
4487
4487
|
height: 20px;
|
|
4488
4488
|
font-size: 14px;
|
|
@@ -4492,7 +4492,7 @@
|
|
|
4492
4492
|
line-height: 20px;
|
|
4493
4493
|
letter-spacing: normal;
|
|
4494
4494
|
color: #4e5461;
|
|
4495
|
-
`,
|
|
4495
|
+
`,n4=i.input`
|
|
4496
4496
|
height: 40px;
|
|
4497
4497
|
width: 50px;
|
|
4498
4498
|
margin-right: 16px;
|
|
@@ -4501,7 +4501,7 @@
|
|
|
4501
4501
|
font-size: 15px;
|
|
4502
4502
|
border: 1px solid ${({theme:e})=>e.colors.primary[20]};
|
|
4503
4503
|
border-radius: 6px;
|
|
4504
|
-
`,
|
|
4504
|
+
`,i4=i.div`
|
|
4505
4505
|
display: flex;
|
|
4506
4506
|
gap: 8px;
|
|
4507
4507
|
justify-content: flex-end;
|
|
@@ -4509,26 +4509,26 @@
|
|
|
4509
4509
|
${({theme:e})=>e.containerWidth<z.mb&&i.css`
|
|
4510
4510
|
width: 100%;
|
|
4511
4511
|
`}
|
|
4512
|
-
`,
|
|
4512
|
+
`,s4=i.div`
|
|
4513
4513
|
padding-top: 2px;
|
|
4514
4514
|
padding-left: 10px;
|
|
4515
4515
|
cursor: ${e=>e.cursor?e.cursor:"default"};
|
|
4516
4516
|
.active {
|
|
4517
4517
|
fill: black;
|
|
4518
4518
|
}
|
|
4519
|
-
`,
|
|
4519
|
+
`,a4=i.div`
|
|
4520
4520
|
width: 100%;
|
|
4521
4521
|
display: flex;
|
|
4522
4522
|
align-items: top;
|
|
4523
4523
|
height: 32px;
|
|
4524
4524
|
border-bottom: 1px solid rgb(223, 227, 230);
|
|
4525
|
-
`,
|
|
4525
|
+
`,c4=i.div`
|
|
4526
4526
|
margin-top: 100px;
|
|
4527
|
-
`,
|
|
4527
|
+
`,l4=i.div`
|
|
4528
4528
|
display: flex;
|
|
4529
4529
|
flex-direction: column;
|
|
4530
4530
|
align-items: center;
|
|
4531
|
-
`,
|
|
4531
|
+
`,d4=i.div`
|
|
4532
4532
|
background-color: ${E.themeDark};
|
|
4533
4533
|
display: flex;
|
|
4534
4534
|
justify-content: center;
|
|
@@ -4546,7 +4546,7 @@
|
|
|
4546
4546
|
opacity: 0.7;
|
|
4547
4547
|
cursor: pointer;
|
|
4548
4548
|
}
|
|
4549
|
-
`,
|
|
4549
|
+
`,u4=i.div`
|
|
4550
4550
|
display: block;
|
|
4551
4551
|
position: relative;
|
|
4552
4552
|
background-color: black;
|
|
@@ -4559,9 +4559,9 @@
|
|
|
4559
4559
|
min-width: unset;
|
|
4560
4560
|
max-width: unset;
|
|
4561
4561
|
`}
|
|
4562
|
-
`,
|
|
4562
|
+
`,p4=({handleModalClose:e,source:o})=>{const{t:r}=W.useTranslation(),s=p.createRef();return t.jsx(Co,{maxHeight:"fit-content",onOutsideClick:e,children:t.jsxs(u4,{children:[t.jsx(d4,{title:r("Close video preview"),onClick:e,children:t.jsx(Et,{})}),t.jsx(l4,{children:t.jsx(Nt,{videoSource:o,videoRef:s,autoplay:!0,height:"405px",width:"100%"})})]})})};var It=(e=>(e.CREATED_AT="createdAt",e.YEAR="year",e.MAKE="make",e.MODEL="model",e))(It||{}),Bt=(e=>(e.DESCENDING="DESC",e.ASCENDING="ASC",e))(Bt||{});const h4=async e=>(await ie.get("/vinreels",{params:e})).data,g4=e=>{const{toast:o}=Te(),{t:r}=W.useTranslation();return Ce.useQuery(["VIN_REEL",e],()=>h4(e),{onError:s=>{o({message:r("We're currently experiencing difficulties fetching VINReels.")})}})},m4=async e=>(await ie.post("/vinreels/videos",e)).data,x4=({onSuccessCallback:e})=>{const{t:o}=W.useTranslation(),{toast:r}=Te();return Ce.useMutation(m4,{onSuccess:()=>{r({message:o("VINReel has been added to Video library.")}),e&&e()},onError:s=>{r({message:o("We're currently experiencing difficulties copying the VINReel to the Video library.")})}})},f4="data:image/webp;base64,UklGRmgHAABXRUJQVlA4IFwHAACQbwCdASqAAuABPp1Op020NzKiopHoALATiWlu4XJx+s/50+yuzN5LT07P+uvZVjy2gXYbLyiFcmJVtPJ99F7iDa3Mx9NfEQfTXxEH018RB9NfEXEW+GSWku6CKN0gKVzhot39pAUrnDRbt6EBSucNFu/tIClc4aLd/aQFJCIPpr4iD6a+Il2V86F8zMfTX02Vbtg8lWeZj6a+PEkbPFnmY+mviIPpsO8XYPMKlc4bOt2weYVPKf2l1BgbkGlK7hNpAOB3f2kBrKY98cqBJq6R6rF6f2rnDRKj3NmOWiu5CGO7+0gKVzhotgbSAwB6IkT3maV9pAUkxKrdsHmFSQiD6a/Vsx9NfEQfTXxEFiXleOFr2CRwqk5d2kBSucNFu/U8WeZj6a+BC/7IHIcFZ5lKWhbXls3wt2P1ipChg52BghCKhvxZ5q7+0gKVzhosoKBiFb6hayiOe2VDCepc9JLy2Znyq3jKcSKGOo9pASKGS7+0gKVzheq8aOFTyUYRDE4N8ZCOOx4SA1Z2dVAVzilc4aLd/aK6Vzhot39pAMiFF8JvTmFkag4TaoRQPuer+YcG8j3ETWEIHzmYC9COcNFu/XA5aK7kIpFZwCPHKzQmBoDZCv/2yCrYRH1uje1uLegBPQd3qatUn6uacwFmBVniOtSucNFsDaQFK5w0W6SFx3yTKKfhc2HofMjMi3v8ZTWYJmdCbPTrv7SApXOF5MhfVxJDu52eZtJOPbPM5SKan+R9TeWrnDRI+mviIPpgzcQAKV8QKQQ/Dcco4ItRxaxwtewKKlVA4t1KXf2kBSucNEj6a+Ig+mDETtzQTushu6rxWradFTRxaxwtewLUBR2rmY+mviIRzzCpXOGi3esJ4NNIVRKRH4dF49j5QUiIcKT9QQRlhZFJLv7SApJiU/GvyxLVzhotaNe0OmOVjheD9eYhV3KtDnizzMfTXxEH018RB9N/orLksPtDRbv7SApXOCEzHtIClc4aLd/aQFK5w0W7+0gKVzhlmT7CxSucMqfU18RB9NfEQfTXxEH018RB+UgqVzhot39pAUrnDRbv7CxSucNFu/tFdK5gWAvR9NfEQfTXxEH018RB9NfFi7br2pXOGi3f2kBI3JLv7SApXOGi2BtIClc4DfX9gIg+mviIPpr4iD6a+Ig+m/2z5Jd/aP1nmY+mviIPpr4iD6a+Ig+mvgQAAP79ZMH00mGs/Vy5cuXLly5TlDbQbaDbQbaDbQbkkg7i0JnaQCDhhvwXlXNzCTXNc2RLlzZERAhkyZMmTI9tVpIZdzLuZkidA0U9cuXLlym3GB8OdtCi3ijpckE2jH6CGQpdOGfIyAg5wQqgm2ow1Krg7JAtNBtoNs3Iaow2KSsQHeBG5VCQSA3KqltQHgnrLvnZqnC4ycua8HYi6CBPgXPJiYZr80n6zn2E1jT3Vjsbc1W25h6vhl+WX3xj5aaPagtEKviRRNvgcJlhZWS+kfDfT+vLqqroKOeI3CQbXlpntcQmuGdGObqLzkFR+SYQoT3DpY8xfw+7FNN5ujkAjo6OAvOIP/NXbVMN0PFvwHSkJ3Y8UrMwOShDOKqVhuIcYnJVdBTyMDkMGuG+hKTEa5cjkrC5AeALlTgMv6ZUjydfffodVvh1NNhNwmbiEmuVx6Goy/mqbhH2Aa7uNFU7dtBKmNkVscjSlDWBCxVdHEknWPmeLa9ZD5K/appsdDgBILJmyOnbdcNJHxJe7S41pGqcwy43+9nU42FHxA9RbMJ9jEoh/uSrypP24fRZNdgJuxxh8vLgw3hP8c6TfxK1SHQkcZgcBsdn+DKvxDDb18Yqbnz6/GRJL0BqFFKKcF94rzCjW6CSU4oob5Kz7CH5XM2uz2TvSWVWZVm95WjT/MQtrqt1YCDo7FJFVJqa2Li0zdyKnAl/nxEUhwAyqH9z5gtZg86+6A2c6JXc6hcWyuTA+PK3w+fPnzPTSDa69QEZAXGbwRtuYOauK07sgn3jwXpO8tG16S75KDF4qh4KVgYsBKRDac5y19hBTztscqp56cDxqpFCXehgWuH7AbxR05igWMmsfPUeQRPA3O7Wo/lT7PGICl85jwU7LEOuf1kNCWmrXqdnK4hcv2fA2vE3Lokvq70Ta1YmI7lbnQeGf51YGxDon3oUagmcYMbkEefKizZWzGKh1187Ao7GNLxcywGkTvx3qPUXvkGRi5Irau39fMQcHay/ILTpdFwVKKeOOQMkvpA3ouEL2FQSCeeWl2phPl3H+pm4JqazzdT5TPvnWGie+wruyd4ORbf4AYMmAcV/j9lTVeVllfYL7poL1U78rvDqlWPnOLrd2CJSePegCVlIHELGc9drkze+9jSc9vtxSwYBiiVJVPdD7JxjzQPsp8/63yfQT6ENMXv+zo43gEWXX14820PPZvcIRt8nR5KUNg0BhMgfav5jVTnkZVc80m3ehSwL1JDdYEW62qi7JqkDYzKccAAA01AAh6/2AAAAHvvrf42kAAAXWDhqAAAAAAAAAAA=",v4={imagePlaceholder:f4},b4=e=>e.filter(Boolean).join(" "),ir=e=>{const{isSorted:o,order:r,onChange:s}=e;return t.jsxs(s4,{cursor:"pointer",children:[t.jsx(ve.IoMdArrowRoundUp,{className:o&&r===Bt.ASCENDING?"active":"",onClick:()=>s(Bt.ASCENDING)}),t.jsx(ve.IoMdArrowRoundDown,{className:o&&r===Bt.DESCENDING?"active":"",onClick:()=>s(Bt.DESCENDING)})]})},sr=1,go=8,w4=1,y4=()=>{var P;const{containerWidth:e}=Se(),o=he.useHistory(),[r,s]=p.useState(""),[n,a]=p.useState(sr),{t:c}=W.useTranslation(),[d,l]=p.useState(""),[u,g]=p.useState(Bt.ASCENDING),[h,x]=p.useState(null),y=()=>{o.push("/")},{data:m,isFetching:w,refetch:f}=g4({start:((n||1)-1)*go,limit:go,search:r,...h&&u?{sortKey:h,order:u}:{}}),{mutateAsync:b,isLoading:S}=x4({onSuccessCallback:y}),T=w||S,V=((m==null?void 0:m.data)||[]).find(M=>M.vin===d),I=()=>{a(1)},L=r.length>0&&r.length<3;p.useEffect(()=>{L||f()},[r]);const v=(M,N)=>{g(N),x(M),a(sr)},C=async M=>{const N=M==null?void 0:M.inventoryItem;if(!N)return;const D=b4([N==null?void 0:N.year.toString(),N.make,N.model,N.stockNumber]);await b({itemId:M.itemId,videoTitle:D})},$=M=>{M==="left"&&a(N=>N-1),M==="right"&&a(N=>N+1)},R=Math.ceil(((m==null?void 0:m.count)||0)/go),j=()=>o.push("/"),A=async(M="")=>{s(M),I()};return t.jsxs(t.Fragment,{children:[t.jsxs(Xw,{children:[t.jsx(Ke,{left:t.jsx(F.Button,{text:c("Back"),icon:t.jsx(H.MdArrowBack,{size:"18"}),onClick:()=>j(),variant:"transparent",style:{color:"white"}}),center:t.jsx(Jw,{children:c("VINReels Import")})}),t.jsx(ut,{children:t.jsx(e4,{children:t.jsx(ms,{handleSearch:A,prevSearch:r})})})]}),t.jsx(t4,{children:t.jsx(ut,{extendStyle:{wrapper:{padding:e>=z.xs?"32px 16px":"16px 0px"}},children:T?t.jsx(c4,{children:t.jsx(Ue,{isLoading:T})}):L?t.jsx(gi,{children:t.jsx("p",{children:c("Please enter at least three characters to search")})}):m!=null&&m.data.length?t.jsxs(t.Fragment,{children:[t.jsxs(a4,{children:[e>=z.xs&&t.jsx(Kw,{children:c("Preview")}),e>=z.xs&&t.jsxs(qw,{children:[c("Year"),t.jsx(ir,{isSorted:h===It.YEAR,order:u,onChange:M=>v(It.YEAR,M)})]}),t.jsxs(Yw,{children:[c("Make"),t.jsx(ir,{isSorted:h===It.MAKE,order:u,onChange:M=>v(It.MAKE,M)})]}),t.jsxs(Zw,{children:[c("Model"),t.jsx(ir,{isSorted:h===It.MODEL,order:u,onChange:M=>v(It.MODEL,M)})]})]}),t.jsx(Uw,{children:(P=(m==null?void 0:m.data)||[])==null?void 0:P.map(M=>{var N,D,O;return t.jsxs(Ww,{children:[e>=z.xs&&t.jsx("div",{style:{width:"130px",height:"40px"},children:t.jsx(_i,{onClick:()=>l(M.vin),thumbnail:M.thumbnailUrl||v4.imagePlaceholder,videoId:M.vin,processing:0})}),e>=z.xs&&t.jsx(Hw,{children:((N=M==null?void 0:M.inventoryItem)==null?void 0:N.year)||""}),t.jsx(Gw,{children:((D=M==null?void 0:M.inventoryItem)==null?void 0:D.make)||""}),t.jsx(Qw,{children:((O=M==null?void 0:M.inventoryItem)==null?void 0:O.model)||""}),t.jsx(je,{flexWrap:"noWrap",gap:"10px",children:t.jsx(F.Button,{variant:"secondary",text:c("Add"),onClick:()=>C(M)})})]},M.vin)})}),t.jsx(o4,{children:t.jsxs(i4,{children:[t.jsx(r4,{children:c("Go to:")}),t.jsx(n4,{type:"number",min:w4,value:n,onChange:M=>{if(!M.currentTarget||!M.currentTarget.value)return;const N=parseInt(M.currentTarget.value);if(N<=0){I();return}if(N>R){a(R);return}a(N)}}),t.jsx(xs,{page:n-1,size:go,count:(m==null?void 0:m.count)||0}),t.jsx(F.Button,{onClick:()=>$("left"),icon:t.jsx(H.MdChevronLeft,{size:20}),disabled:n===sr,size:"small",variant:"secondary"}),t.jsx(F.Button,{onClick:()=>$("right"),icon:t.jsx(H.MdChevronRight,{size:20}),disabled:n===R,size:"small",variant:"secondary"})]})}),!!d&&!!V&&!!(V!=null&&V.videoUrl)&&t.jsx(p4,{source:(V==null?void 0:V.videoUrl)||"",handleModalClose:()=>{l("")}})]}):t.jsxs(gi,{children:[t.jsx("p",{children:c("Oops! It looks like there are no videos matching your search terms.")}),t.jsx("p",{children:c("Try using different search term")})]})})})]})};var Ms=(e=>(e.USER="1",e.ADMIN="3",e.SUPERVISOR="4",e))(Ms||{});const C4=i.div`
|
|
4563
4563
|
background: ${E.gray10};
|
|
4564
|
-
`,
|
|
4564
|
+
`,S4=i.div`
|
|
4565
4565
|
position: absolute;
|
|
4566
4566
|
height: 100%;
|
|
4567
4567
|
top: 0;
|
|
@@ -4572,9 +4572,9 @@
|
|
|
4572
4572
|
text-align: center;
|
|
4573
4573
|
font-size: 16px;
|
|
4574
4574
|
color: ${E.gray80};
|
|
4575
|
-
`,
|
|
4575
|
+
`,j4=i.div`
|
|
4576
4576
|
max-width: 65%;
|
|
4577
|
-
`,
|
|
4577
|
+
`,mi=({handleUpdateToken:e})=>{const{t:o}=W.useTranslation();return t.jsxs(C4,{children:[t.jsx(Ke,{left:t.jsx(Yi,{handleUpdateToken:e}),center:t.jsx(mo,{})}),t.jsx(S4,{children:t.jsx(j4,{children:o("You are currently logged in with a user account that has no active functionalities assigned within Covideo integration.")})})]})},ar={id:"",verified:0,access:0,customerId:0,customer:{automotiveAccess:0}};function E4(){const{flow:e,startupPage:o,hasExternalJwt:r}=Se(),[s,n]=p.useState(!0),[a,c]=p.useState(ar),[d,l]=p.useState(""),u=p.useMemo(()=>String(a.access)===Ms.SUPERVISOR,[a.access]),g=async()=>{var f,b;if(!He){c(ar),l(""),n(!1);return}n(!0);try{const S=await ga();c(S),l("")}catch(S){c(ar),l(((b=(f=S==null?void 0:S.response)==null?void 0:f.data)==null?void 0:b.message)||"Invalid token. Please provide a valid token to use recorder-only mode.")}n(!1)},h=async f=>{bo(f),await g()};p.useEffect(()=>{g()},[]);const x=!!(a!=null&&a.id),m=(e||(o===Qt.RECORD_CAMERA?Be.RECORD_CAMERA_ONLY:Be.FULL))===Be.RECORD_CAMERA_ONLY,w=m?"/record/home":"/";return m&&!r?t.jsx(io,{children:t.jsx("div",{children:"Please provide a token to use recorder-only mode."})}):m&&r&&!s&&!x?t.jsx(io,{children:t.jsx("div",{children:d||"Invalid token. Please provide a valid token to use recorder-only mode."})}):s?t.jsx(io,{children:t.jsx(Ue,{height:400,isLoading:!0,hideLoaderText:!0})}):t.jsx(tc,{initialUser:a,children:t.jsx(Cd,{children:t.jsx(wc,{children:t.jsx(io,{children:t.jsxs(he.MemoryRouter,{initialEntries:[w],children:[x&&!u&&t.jsxs(he.Switch,{children:[t.jsx(he.Route,{path:"/merge",component:Fg,exact:!0}),t.jsx(he.Route,{path:"/voiceover/:videoId",component:h1,exact:!0}),t.jsx(he.Route,{path:"/insert-video/:videoId",component:sh,exact:!0}),t.jsx(he.Route,{path:"/wheels-tv",component:O1}),t.jsx(he.Route,{path:"/lesa-tv",component:s1}),t.jsx(he.Route,{path:"/vinreels",component:y4}),t.jsx(he.Route,{exact:!0,path:"/preview-upload/:videoId",component:f0}),t.jsx(he.Route,{exact:!0,path:"/",render:()=>m?t.jsx(he.Redirect,{to:"/record/home"}):t.jsx(Iu,{handleUpdateToken:h})}),t.jsx(he.Route,{path:"/record",component:Yf})]}),u&&t.jsxs(he.Switch,{children:[t.jsx(he.Route,{exact:!0,path:"/",render:()=>t.jsx(mi,{handleUpdateToken:h})}),t.jsx(he.Route,{path:"*",render:()=>t.jsx(mi,{handleUpdateToken:h})})]}),!x&&!m&&t.jsxs(he.Switch,{children:[t.jsx(he.Route,{exact:!0,path:"/",render:()=>t.jsx(Sn,{handleUpdateToken:h})}),t.jsx(he.Route,{path:"*",render:()=>t.jsx(Sn,{handleUpdateToken:h})})]})]})})})})})}function T4({gtmId:e}){const[o,r]=p.useState(!0);return p.useEffect(()=>{if(typeof window>"u"||!e||document.getElementById("gtm-script"))return r(!1);const s=document.createElement("script");s.id="gtm-script",s.innerHTML=`
|
|
4578
4578
|
(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
|
|
4579
4579
|
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
|
|
4580
4580
|
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
|
|
@@ -4583,5 +4583,5 @@
|
|
|
4583
4583
|
`,document.head.appendChild(s);const n=document.createElement("noscript");n.id="gtm-noscript",n.innerHTML=`
|
|
4584
4584
|
<iframe src="https://www.googletagmanager.com/ns.html?id=${e}"
|
|
4585
4585
|
height="0" width="0" style="display:none;visibility:hidden"></iframe>
|
|
4586
|
-
`,document.body.appendChild(n),r(!1)},[e]),{isLoadingScript:o}}const
|
|
4586
|
+
`,document.body.appendChild(n),r(!1)},[e]),{isLoadingScript:o}}const k4=new Ce.QueryClient({defaultOptions:{queries:{retry:0},mutations:{retry:0}}});var Zr=(e=>(e.UPLOAD="upload",e.FOLDER="folder",e.RECORD_SCREEN="recordScreen",e.MERGE="merge",e.RECORD_CAM="recordCam",e.WHEELS_TV="wheelsTV",e.RECORD_BOTH="recordBoth",e.TRIM="trim",e.INSERT="insert",e.LANDING_PAGE="landingPage",e.QUICKSHARE="quickshare",e.CTA="CTA",e.VOICEOVER="voiceover",e.REACTIONS="reactions",e.AI_ASSIST="aiAssist",e.UPGRADE_MESSAGE="upgradeMessage",e.LESA_TV="lesaTV",e.MULTI_LOCATION="multiLocation",e.TELEPROMPTER="teleprompter",e.VIRTUAL_BG="virtualBg",e.WEBSITE_OVERLAY="websiteOverlay",e.LANGUAGE_DROPDOWN="languageDropdown",e.SSO="sso",e.VIN_REELS="vinReels",e))(Zr||{}),Ds=(e=>(e.DEVELOPMENT="development",e.SANDBOX="sandbox",e.STAGING="staging",e.PRODUCTION="production",e))(Ds||{}),Qt=(e=>(e.LIBRARY="library",e.RECORD_CAMERA="recordCamera",e))(Qt||{}),Be=(e=>(e.FULL="full",e.RECORD_CAMERA_ONLY="recordCameraOnly",e))(Be||{});function I4(){bo(""),ki()}const A4=e=>{const[o,r]=p.useState(0),s=()=>r(a=>a+1);if(!(e!=null&&e.apikey))return t.jsx(t.Fragment,{children:"Apikey is required."});const{isLoadingScript:n}=T4({gtmId:e.gtmId});return n?t.jsx("div",{style:{fontFamily:"Arial, sans-serif"},children:t.jsx(Ue,{isLoading:!0})}):t.jsx(Ce.QueryClientProvider,{client:k4,children:t.jsx(ha,{...e,reRender:s,children:t.jsx(E4,{},`${e==null?void 0:e.env}${e==null?void 0:e.token}${e==null?void 0:e.apikey}${o}`)})})};exports.CovideoEmbed=A4;exports.Environment=Ds;exports.Feature=Zr;exports.Flow=Be;exports.StartupPage=Qt;exports.logoutCovideo=I4;
|
|
4587
4587
|
//# sourceMappingURL=index.js.map
|