PageSourceSearch

https://cdn.xodo.com/21.39.0/_next/static/chunks/4686.e03a128e2a5cc216.js

js xodo.com collected 2026-09-24 09:04:55 UTC 16,858 bytes, 2 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[4686],{44686:function(e,t,n){n.d(t,{Z:function(){return ex}});var r=n(23842),o=n(85034),i=n(70169),l=n(31373),s=n(59312),a=n(24246),c=n(34896),u=n(13018),d=n(29549),f=n(87407),p=n(27378),h=n(11596),g=n(62749),x=n(1446),b=n(93586),_=n(87677),v=n(60027),m=n(27391),y=n(58833),j=n(13946),w=n(5003),k=n(86102),C=n(52298),S=n(11537),Z=n(96224),I=n(87334),D=n(29126),E=n(74270),F=n(22097),A=n(88872);function T(){return(T=(0,r.Z)(function(e){var t;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return[4,fetch(e.link).then(function(e){return e.blob()})];case 1:return(t=n.sent()).name=e.name,[2,t]}})})).apply(this,arguments)}function z(){return(z=(0,r.Z)(function(e){var t;return(0,s.__generator)(this,function(t){switch(t.label){case 0:return[4,Promise.all(e.map(function(e){return function(e){return T.apply(this,arguments)}(e)}))];case 1:return[2,t.sent()]}})})).apply(this,arguments)}var O=n(52050),P=n(16546),N=n(83125);function L(e){var t=e.icon,n=e.fill;return(0,y.H)().showUsageLoadingState?(0,a.jsx)(N.$,{position:"absolute",left:3.5,top:2.5,boxSize:5,fill:n}):(0,a.jsx)(u.JO,{fill:n,boxSize:6,as:t,position:"absolute",left:3,top:2})}var M=function(e){var t=e.onClick,n=e.disabled,r=e.tabIndex,o=(0,y.H)().showUsageLoadingState,i=(0,f.$G)().t;return(0,a.jsx)(d.zx,{id:"dropbox-button",title:i("select_file_from_dropbox"),loadingText:"Dropbox",bg:"white",color:"apryse.gray.4",w:"full",_hover:{bg:"apryse.gray.6"},_active:{bg:"apryse.gray.6"},onClick:t,isDisabled:n||o,position:"relative",leftIcon:(0,a.jsx)(L,{icon:P.ej,fill:"white"}),tabIndex:r,children:"Dropbox"})},U=n(81340),B=function(e){var t=(0,p.useState)(!1),n=t[0],r=t[1],o=(0,x.B)(),i=o.isOpen,l=o.onCloseSelectFilesModal,s=o.setThirdPartyFilePicker;return[(0,p.useCallback)(function(t){if(t.stopPropagation(),i&&(l(),s("dropbox")),document.getElementById("dropboxjs"))e();else{r(!0);var n=document.createElement("script");n.type="text/javascript",n.src="https://www.dropbox.com/static/api/2/dropins.js",n.id="dropboxjs",n.setAttribute("data-app-key",U.ZP.dropboxKeys.appKey),n.async=!0,n.onload=function(){r(!1),e()},document.body.appendChild(n)}},[e]),n]},R={linkType:"direct"},q=function(e){var t=e.success,n=e.cancel,r=e.multiselect,l=e.extensions,s=e.isDisabled,c=e.onDisabledClick,u=(0,p.useMemo)(function(){return(0,i.Z)((0,o.Z)({},R),{success:t,cancel:n,multiselect:r,extensions:l})},[n,l,r,t]),d=(0,I.q)().handleEssentialsModal,f=(0,p.useCallback)(function(){if(!d())try{Dropbox.choose(u)}catch(e){console.error("Popups blocked by browser\n",e)}},[u,d]),h=(0,O.Z)(B(f),1)[0];return(0,a.jsx)(M,{onClick:s?c:h,tabIndex:s?-1:0})},V=n(35739),G=n(12938),W=n(77147),$=n(15858),H=n(64128);function Q(e){var t=e.onFileRestored,n=e.source,o=(0,_.Z)().operation,i=(0,W.Z)(o),l=i.isAutosaveOn,u=i.getFileInfo,h=i.restoreFile,g=(0,$.Z)(null==o?void 0:o.route).deleteAutosavedFile,x=(0,f.$G)().t,b=(0,p.useState)(""),v=b[0],m=b[1],y=(0,p.useState)(!1),j=y[0],k=y[1],C=(0,p.useCallback)(function(){k(!1),g()},[k,g]),S=(0,p.useCallback)((0,r.Z)(function(){var e;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return[4,h()];case 1:if(!(e=n.sent()))return[3,3];return[4,t([e])];case 2:n.sent(),n.label=3;case 3:return[2]}})}),[h,t]);return(0,p.useEffect)(function(){var e=!1;if(n!==w.yh){var t,o=(t=(0,r.Z)(function(){var t,n;return(0,s.__generator)(this,function(r){switch(r.label){case 0:return[4,u()];case 1:if(t=r.sent(),e)return[2];return m(n=(null==t?void 0:t.filename)||""),k(!!n),[2]}})}),function(){return t.apply(this,arguments)});return l?o():k(!1),function(){e=!0}}},[l,v,m,k,u,n]),(0,a.jsxs)(H.Z,{disclosure:{isOpen:j,onClose:C},isCentered:!0,id:"file-recover-modal",children:[(0,a.jsx)(G.ZA,{}),(0,a.jsxs)(G.hz,{padding:"24px",className:"file_recover_modal",children:[(0,a.jsx)(G.xB,{fontWeight:700,fontSize:"24px",color:"gray.900",padding:0,children:x("autosave.recover.title")}),(0,a.jsx)(G.ol,{}),(0,a.jsx)(G.fe,{padding:0,my:5,children:(0,a.jsx)(c.xv,{children:x("autosave.recover.content")})}),(0,a.jsxs)(G.mz,{padding:0,marginTop:"20px",children:[(0,a.jsx)(d.zx,{id:"file-recover-cancel-button",variant:"secondaryAction",onClick:C,marginRight:"24px",className:"file_recover_modal_cancel",children:x("autosave.recover.cancel")}),(0,a.jsx)(d.zx,{id:"file-recover-accept-button",variant:"primaryAction",onClick:S,className:"file_recover_modal_accept",children:x("autosave.recover.accept")})]})]})]})}var J=n(17372),K=n(38271);function X(){return(X=(0,r.Z)(function(e,t){var n,r,o,i;return(0,s.__generator)(this,function(r){switch(r.label){case 0:return n={Authorization:"Bearer ".concat(t),Accept:"application/json"},[4,(0,K.Z)(J.N3+"/".concat(e.id,"?")+new URLSearchParams({alt:"media"}),{method:"get",headers:n})];case 1:return[4,r.sent().blob()];case 2:return o=r.sent(),e.name.split(".").length>1?o.name=e.name:o.name=e.name+(E.rs[e.mimeType]||""),[2,o]}})})).apply(this,arguments)}function Y(){return(Y=(0,r.Z)(function(e,t){var n;return(0,s.__generator)(this,function(n){switch(n.label){case 0:return[4,Promise.all(e.map(function(e){return function(e,t){return X.apply(this,arguments)}(e,t)}))];case 1:return[2,n.sent()]}})})).apply(this,arguments)}var ee=function(e){var t=e.onClick,n=e.disabled,r=e.tabIndex,o=(0,y.H)().showUsageLoadingState,i=(0,f.$G)().t;return(0,a.jsx)(d.zx,{id:"google-drive-button",title:i("select_file_from_google_drive"),bg:"white",color:"apryse.gray.4",w:"full",_hover:{bg:"apryse.gray.6"},_active:{bg:"apryse.gray.6"},onClick:t,isDisabled:n||o,position:"relative",leftIcon:(0,a.jsx)(L,{icon:P.mf,fill:"white"}),tabIndex:r,children:"Google Drive"})},et=n(94538),en=function(e){var t,n=(0,x.B)(),o=n.isOpen,i=n.onCloseSelectFilesModal,l=n.setThirdPartyFilePicker,a=(0,et.Z)().initialize,c=(0,b.Z)().showErrorToast,u=(0,f.$G)().t;return[(0,p.useCallback)((t=(0,r.Z)(function(t){var n,r;return(0,s.__generator)(this,function(r){switch(r.label){case 0:null==t||t.stopPropagation(),o&&(i(),l("google-drive")),r.label=1;case 1:return r.trys.push([1,3,,4]),[4,a()];case 2:return n=r.sent(),[3,4];case 3:return c(u(r.sent()),void 0),[2];case 4:try{e(null==n?void 0:n.token)}catch(s){c(u("toast.error_google_file_picker"),void 0)}return[2]}})}),function(e){return t.apply(this,arguments)}),[o,a,e])]},er=function(e){var t=e.success,n=e.extensions,r=e.multiselect,o=e.isDisabled,i=e.onDisabledClick,l=(0,p.useMemo)(function(){return(0,E.vA)(n)},[n]),s=(0,p.useCallback)(function(e){e.action===google.picker.Action.PICKED&&t(e.docs)},[t]),c=(0,I.q)().handleEssentialsModal,u=(0,p.useCallback)(function(e){if(!c()){var t=new google.picker.DocsView(google.picker.ViewId.DOCS);if(t.setIncludeFolders(!0),l){var n=l.split(",");n.sort(),t.setMimeTypes(n.join(","))}var o=new google.picker.PickerBuilder;
1r&&(o=o.enableFeature(google.picker.Feature.MULTISELECT_ENABLED)),o.hideTitleBar().enableFeature(google.picker.Feature.NAV_HIDDEN).setAppId("127976202811").setOAuthToken(e).addView(t).addView(new google.picker.DocsUploadView).setDeveloperKey("AIzaSyAE95uRs0ocPf2XuO4iUnW3c-CofEWNfpQ").setOrigin(window.location.protocol+"//"+window.location.host).setCallback(s).build().setVisible(!0)}},[r,l,s]),d=(0,O.Z)(en(u),1)[0];return(0,a.jsx)(ee,{onClick:o?i:d,tabIndex:o?-1:0})},eo=n(5662),ei=n(64376),el=n(73868),es=n(39737),ea=n(68567),ec=n(55477),eu=n(90174),ed=function(e){var t=e.onClick,n=e.disabled,r=e.tabIndex,o=(0,y.H)().showUsageLoadingState,i=(0,f.$G)().t;return(0,a.jsx)(d.zx,{id:"xodo-drive-button",title:i("xodo_drive.select_files"),loadingText:i("xodo_drive.xodo_drive"),bg:"white",color:"apryse.gray.4",w:"full",_hover:{bg:"apryse.gray.6"},_active:{bg:"apryse.gray.6"},onClick:t,isDisabled:n||o,position:"relative",leftIcon:(0,a.jsx)(L,{icon:P.pp,fill:"white"}),tabIndex:r,children:i("xodo_drive.xodo_drive")})},ef=n(64700);function ep(e){var t=e.isDisabled,n=e.onDisabledClick,r=(0,eu.Z)().xodoDriveSelectDisclosure,o=(0,el.useSession)().data,i=(0,ea.I0)(),l=(0,es.$G)().t,s=(0,I.q)().handleEssentialsModal,c=(0,_.Z)().operation,u=(0,p.useCallback)(function(){!s()&&(o?r.onOpen&&r.onOpen():i((0,ec.I2)({isOpened:!0,title:l("xodo_drive.get_free_storage"),description:l("xodo_drive.sign_up_free_storage")})))},[c.requiredAccount,c.tool,o,l]);return(0,a.jsx)(ed,{onClick:t?n:u,tabIndex:t?-1:0})}var eh=function(e){return(0,a.jsx)(ef.l,{children:(0,a.jsx)(ep,(0,o.Z)({},e))})},eg=F.BX.filter(function(e){return e.requiredAccount===A.Qm.RegularAccount||Array.isArray(e.requiredAccount)&&e.requiredAccount.includes(A.Qm.RegularAccount)}).map(function(e){return{tool:e.tool,route:e.route}});function ex(e){var t=e.source;return(0,a.jsx)(V.Z,{children:(0,a.jsx)(eb,{source:t})})}function eb(e){var t=e.accountRequired,n=e.source,l=(0,f.$G)().t,A=(0,et.Z)().getAccessTokenInfo,T=(0,C.Z)(),O=T.surface,P=T.secondaryText,N=T.background,L=(0,p.useContext)(V.q).open,M=(0,_.Z)(),U=M.goToCompleted,B=M.canGoToCompleted,R=M.nextStep,G=M.operation,W=M.resetProcessingFileStateIfNextStep,$=(0,x.B)(),H=$.onCloseSelectFilesModal,J=$.isOpen,K=$.setThirdPartyFilePicker,X=(0,v.n)(),ee=X.numberOfFilesAllowed,en=X.pushFilesFromDetails,el=X.allowedFileTypes,es=X.flushInputQueue,ea=(0,b.Z)().showUploadErrorToast,ec=(0,Z.Z)(),eu=(0,x.B)().goToOperationRoute,ed=null==G?void 0:G.maxFileSize,ef=(0,S.Z)(),ep=(0,p.useRef)(null),ex=(0,y.H)().showUsageLoadingState,eb=(0,m.Z)().populateCacheFilesToOutputQueue,ev=(0,I.q)().handleEssentialsModal,em=function(){!ev()&&(J&&K("default"),L())},ey=!(null==G?void 0:G.canAutosaveBeEnabled)||n===w.yh;(0,p.useEffect)(function(){eb((0,m.L)(G.tool))},[G.tool]),(0,p.useEffect)(function(){var e;(null==G?void 0:G.route)&&!ex&&(null===(e=ep.current)||void 0===e||e.focus())},[null==G?void 0:G.route,ex]);var ej,ew,ek,eC,eS=(0,p.useMemo)(function(){return(0,E.km)(el)},[el]),eZ=!ee||ee>1,eI=(0,p.useMemo)(function(){if(!el||0===el.length||el.length>2)return[l("select_files.select_notype"),l("select_files.drop_notype"),];if(2===el.length)return eZ?[l("select_files.select_multiple_two_types",{file0:E.ht[el[0]],file1:E.ht[el[1]]}),l("select_files.drop_multiple_two_types",{file0:E.ht[el[0]],file1:E.ht[el[1]]}),]:[l("select_files.select_single_two_types",{file0:E.ht[el[0]],file1:E.ht[el[1]]}),l("select_files.drop_single_two_types",{file0:E.ht[el[0]],file1:E.ht[el[1]]}),];var e=E.ht[el[0]];return eZ?[l("select_files.select_multiple",{file:e}),l("select_files.drop_multiple",{file:e}),]:[l("select_files.select_single",{file:e}),l("select_files.drop_single",{file:e}),]},[el,eZ,l]),eD=eI[0],eE=eI[1],eF=(0,p.useCallback)((ej=(0,r.Z)(function(e){var t,n,r=arguments;return(0,s.__generator)(this,function(o){switch(o.label){case 0:return t=r.length>1&&void 0!==r[1]?r[1]:[],n=e.map(function(e){return{name:e.name,fileObj:e}}),t.length&&ea(t),W([j.h8.VIEW_FILES,j.h8.EDIT_DOCX]),[4,en(n)];case 1:return o.sent(),es(),R([j.h8.SELECT_FILES]),[2]}})}),function(e){return ej.apply(this,arguments)}
1),[es,R,en,W,ea,]),eA=(0,p.useCallback)((ew=(0,r.Z)(function(e){return(0,s.__generator)(this,function(t){switch(t.label){case 0:return W([j.h8.VIEW_FILES,j.h8.EDIT_DOCX]),[4,en(e)];case 1:return t.sent(),es(),R(),[2]}})}),function(e){return ew.apply(this,arguments)}),[es,R,en,W,]),eT=(0,p.useCallback)((ek=(0,r.Z)(function(e){var t,r,o,i,l,a,c,u,d;return(0,s.__generator)(this,function(s){switch(s.label){case 0:if(ee&&e.length>ee)return ea([{code:"too_many_files",fileName:null,message:"too_many_files"}]),[2];t=[],r=[],o=!0,i=!1,l=void 0,s.label=1;case 1:return s.trys.push([1,6,7,8]),[4,function(e){return z.apply(this,arguments)}(e)];case 2:a=s.sent()[Symbol.iterator](),s.label=3;case 3:if(o=(c=a.next()).done)return[3,5];if(u=c.value,ed&&u.size>ed)return r.push({code:"file_too_large",fileName:u.name,message:"file too large"}),[3,4];t.push(u),s.label=4;case 4:return o=!0,[3,3];case 5:return[3,8];case 6:return d=s.sent(),i=!0,l=d,[3,8];case 7:try{o||null==a.return||a.return()}finally{if(i)throw l}return[7];case 8:return g.Z.event(g.Z.EVENTS.UPLOAD("dropbox")),k.lF.track("Select Files",{Count:t.length,"Page Name":G.tool,Source:"Dropbox"}),k.lF.track("Select Files",{Count:t.length,"Page Name":G.tool,Source:"Dropbox"}),[4,eF(t,r)];case 9:if(s.sent(),n!==w.yh)return[3,11];return[4,eu(G.route)];case 10:s.sent(),s.label=11;case 11:return[2]}})}),function(e){return ek.apply(this,arguments)}),[eF,ed,ee]),ez=(0,p.useCallback)((eC=(0,r.Z)(function(e){var t,r,o,i,l,a,c,u,d,f;return(0,s.__generator)(this,function(s){switch(s.label){case 0:if(ee&&e.length>ee)return ea([{code:"too_many_files",fileName:null,message:"too_many_files"}]),[2];t=[],r=[],o=A(),i=!0,l=!1,a=void 0,s.label=1;case 1:return s.trys.push([1,6,7,8]),[4,function(e,t){return Y.apply(this,arguments)}(e,null==o?void 0:o.token)];case 2:c=s.sent()[Symbol.iterator](),s.label=3;case 3:if(i=(u=c.next()).done)return[3,5];if(d=u.value,ed&&d.size>ed)return r.push({code:"file_too_large",fileName:d.name,message:"file too large"}),[3,4];t.push(d),s.label=4;case 4:return i=!0,[3,3];case 5:return[3,8];case 6:return f=s.sent(),l=!0,a=f,[3,8];case 7:try{i||null==c.return||c.return()}finally{if(l)throw a}return[7];case 8:return g.Z.event(g.Z.EVENTS.UPLOAD("g-drive")),k.lF.track("Select Files",{Count:t.length,"Page Name":G.tool,Source:"Dropbox"}),k.lF.track("Select Files",{Count:t.length,"Page Name":G.tool,Source:"Dropbox"}),[4,eF(t,r)];case 9:if(s.sent(),n!==w.yh)return[3,11];return[4,eu(G.route)];case 10:s.sent(),s.label=11;case 11:return[2]}})}),function(e){return eC.apply(this,arguments)}),[eF,eu,ed,null==G?void 0:G.route,n,G.tool,A,ee,]),eO=(0,p.useMemo)(function(){return n===w.yh?{borderRadius:"lg",borderWidth:0,borderStyle:"none"}:{bg:O}},[n,O]);return(0,a.jsxs)(c.kC,(0,i.Z)((0,o.Z)({direction:"column",h:"full"},eO),{children:[t?(0,a.jsx)(c.M5,{position:"relative",flex:"1 1 auto",p:2,children:(0,a.jsxs)(c.gC,{spacing:2,bg:N,py:9,px:12,borderWidth:1,borderRadius:"lg",maxW:"md",children:[(0,a.jsx)(ei.Z,{source:n,large:!0}),(0,a.jsxs)(c.xv,{fontSize:"md",textAlign:"center",children:[l("user.sign_up_prompt"),(0,a.jsx)(u.JO,{as:D.tB,ml:2,transform:"translateY(-2px)"})]}),(0,a.jsx)(c.xv,{fontSize:"xs",color:P,textAlign:"center",children:l("user.required")}),(0,a.jsxs)(c.gC,{pt:4,spacing:4,children:[(0,a.jsx)(c.xv,{fontSize:"sm",color:P,textAlign:"center",children:l("user.sign_up_includes")}),(0,a.jsxs)(c.gC,{align:"flex-start",spacing:1,children:[eg.filter(function(e){return e.route!==ec}).slice(0,eg.length>4?3:void 0).map(function(e){return(0,a.jsxs)(c.Ug,{children:[(0,a.jsx)(u.JO,{h:3,w:3,ml:-1,color:"blue.500",as:h.vyQ}),(0,a.jsx)(c.xv,{fontSize:"sm",color:P,children:l("operation.".concat(e.tool,".title"))})]},e.tool)}),eg.length>4?(0,a.jsxs)(c.Ug,{children:[(0,a.jsx)(u.JO,{h:3,w:3,ml:-1,color:"blue.500",as:h.vyQ}),(0,a.jsx)(c.xv,{fontSize:"sm",color:P,children:l("user.and_more")})]}):void 0]})]}),(0,a.jsx)(d.hE,{pt:4,spacing:4,w:"full",children:(0,a.jsx)(d.zx,{id:"select-file-sign-up-button",onClick:ef,colorScheme:"blue",w:"full",children:l("user.sign_up")})})]})}):(0,a.jsx)(c.M5,{flexDirection:"column",position:"relative",flex:"1 1 auto",p:2,children:(0,a.jsxs)(c.gC,{w:"full",spacing:n===w.yh?2:4,pb:n===w.yh?{base:0,md:4}:void 0,children:[(0,a.jsx)(ei.Z,{source:n,large:!0}),(0,a.jsx)(c.xv,{as:"h2",maxW:80,py:n===w.yh?4:void 0,color:"gray.900",fontSize:"16px",textAlign:"center",whiteSpace:"pre-wrap","data-testid":"marketing-operations-description",children:n===w.yh?eD:l((0,F.nK)(G,"description"))}),(0,a.jsxs)(c.gC,{w:"full",maxW:80,px:n===w.yh?4:void 0,children:[(0,a.jsx)(e_,{tabIndex:0,ref:ep,leftIcon:D.nm,onClick:em,primary:!0,children:l(null===G.maxFiles||G.maxFiles>1?"select_files.select_files":"select_files.select_file")}),(0,a.jsx)(eh,{isDisabled:!1,onDisabledClick:function(){}}),(0,a.jsx)(q,{success:eT,extensions:eS,multiselect:eZ}),(0,a.jsx)(er,{success:ez,extensions:eS,multiselect:eZ}),!1]}),(0,a.jsxs)(c.xv,{d:{base:"none",md:"block"},color:P,mb:5,pt:5,children:[eE,ey&&(0,a.jsx)(u.JO,{as:D.rs,boxSize:6,position:"absolute"})]}),(0,a.jsx)(Q,{onFileRestored:eA,source:n}),B?(0,a.jsx)(d.zx,{id:"completed-files-button",w:"full",variant:"link",color:"apryse.indigo",onClick:function(){U(),H()},children:l("completed_files")}):(0,a.jsx)(c.xu,{h:5,w:"full"})]})}),n!==w.yh&&(0,a.jsx)(c.xu,{display:{md:"none"},children:(0,a.jsx)(eo.Z,{})})]}))}var e_=(0,p.forwardRef)(function(e,t){var n=e.leftIcon,r=e.primary,s=(0,l.Z)(e,["leftIcon","primary"]),c=(0,C.Z)(),u=c.secondaryText,p=c.background,h=(0,f.$G)().t,g=(0,y.H)().showUsageLoadingState;return(0,a.jsx)(d.zx,(0,i.Z)((0,o.Z)((0,i.Z)((0,o.Z)({id:"select-file-button","data-testid":"select-file-button",title:h("select_files.select_file"),disabled:g},r?{colorScheme:"blue"}:{bg:p,color:u}),{ref:t,position:"relative",className:"select-files-button",leftIcon:(0,a.jsx)(L,{icon:n,fill:r?p:u})}),s),{w:"full"}))})}}]);
2//# sourceMappingURL=4686.e03a128e2a5cc216.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.