Mini Kabibi Habibi
/*************************************************************************
* ADOBE CONFIDENTIAL
* ___________________
*
* Copyright 2025 Adobe. All Rights Reserved.
*
* NOTICE: All information contained herein is, and remains
* the property of Adobe and its suppliers, if any. The intellectual
* and technical concepts contained herein are proprietary to Adobe
* and its suppliers and are protected by all applicable intellectual
* property laws, including trade secret and copyright laws.
* Dissemination of this information or reproduction of this material
* is strictly forbidden unless prior written permission is obtained
* from Adobe.
**************************************************************************/
(window.webpackJsonp=window.webpackJsonp||[]).push([[1],{hUbq:function(e,o,t){"use strict";t.r(o),t.d(o,"PickerModeClose",(function(){return _})),t.d(o,"innerPanelID",(function(){return W})),t.d(o,"panelID",(function(){return B})),t.d(o,"default",(function(){return J}));var n,i,r,a,l,d,c,s,u,m,p,v,h,b,w=t("q1tI"),g=t.n(w),P=t("i8i4"),f=t.n(P);const k={disableACPL:!1,disableCloudDocPrefetch:!0,importDisableCloudDocumentsTab:null===(n=window.cdoHost)||void 0===n?void 0:n.featureEnabled("importDisableCloudDocumentsTab"),disableRecentsTab:null===(i=window.cdoHost)||void 0===i?void 0:i.featureEnabled("disableRecentsTab"),disableSharedWithYouTab:null===(r=window.cdoHost)||void 0===r?void 0:r.featureEnabled("disableSharedWithYouTab"),hideCloudStatusIcon:null===(a=window.cdoHost)||void 0===a?void 0:a.featureEnabled("hideCloudStatusIcon"),enableCDPOnboarding:null===(l=window.cdoHost)||void 0===l?void 0:l.featureEnabled("CloudDocCDPOnboarding"),enableCloudDocExport:null===(d=window.cdoHost)||void 0===d?void 0:d.featureEnabled("CloudDocExport"),enablePlaceEmbedWarningToast:null===(c=window.cdoHost)||void 0===c?void 0:c.featureEnabled("enablePlaceEmbedWarningToast"),enablePlaceLinkWarningToast:null===(s=window.cdoHost)||void 0===s?void 0:s.featureEnabled("enablePlaceLinkWarningToast"),enableProjectsTab:null===(u=window.cdoHost)||void 0===u?void 0:u.featureEnabled("enableProjects"),useCDPDeletedTab:null===(m=window.cdoHost)||void 0===m?void 0:m.featureEnabled("CloudDocUseCDPDeletedTab"),useOrganizerMode:null===(p=window.cdoHost)||void 0===p?void 0:p.featureEnabled("CloudDocOrganizerDemo"),hideLinkCheckbox:null===(v=window.cdoHost)||void 0===v?void 0:v.featureEnabled("hideLinkCheckbox"),enableRenditionUrl:null===(h=window.cdoHost)||void 0===h?void 0:h.featureEnabled("enableRenditionUrl"),hideOnboardingInviteToEditRow:null===(b=window.cdoHost)||void 0===b?void 0:b.featureEnabled("hideOnboardingInviteToEditRow")};var D=t("K0Sv"),C=t("EcEN"),E=t.n(C),A=t("cCFZ"),O=t("3UBC"),I=t("tmGE"),y=t("wlGC"),S=t("/0Ih"),T=t("h0gY"),U=t("r1jx");class F extends g.a.Component{constructor(e){super(e),Object(U.f)("DocumentPickerRender")}componentDidMount(){Object(U.g)()}render(){return g.a.createElement(y.b,{tagName:y.a.CC_DOCUMENT_PICKER,args:this.props.args,attributes:this.props.attributes,cacheKey:T.a.UAP,renderLocation:S.f.UAP_DIALOG,performanceMarks:Object(U.d)()})}}var L=t("DFRl"),x=t("bUsb"),M=t.n(x),R=t("dXAr");class H extends g.a.Component{constructor(){super(...arguments),this.renderOfflineLayout=()=>{var e,o;return g.a.createElement(M.a,{theme:A.mainStore.colorTheme},g.a.createElement(L.a,{mode:null===(o=null===(e=this.props.uapArgs)||void 0===e?void 0:e.pickerInfo)||void 0===o?void 0:o.mode,renderLocation:S.f.UAP_DIALOG}))},this.renderDocumentPicker=()=>(this.props.addExternalCancelListener(()=>{this.props.uapArgs.closeDialog()}),Object(U.a)(`[UAB - webview] Trigger: ${A.mainStore.uabStore.trigger} | TagName: ${y.a.CC_DOCUMENT_PICKER} | load - start`,(new Date).toDateString(),!1),g.a.createElement(F,{args:this.props.uapArgs})),this.renderUAP=()=>{var e,o;const t=null===(o=null===(e=R.k.components)||void 0===e?void 0:e.find(e=>"uap"===e.id))||void 0===o?void 0:o.main;return g.a.createElement(t,Object.assign({},this.props.uapArgs))}}render(){return O.a.isWebViewEnabled?A.mainStore.online?this.renderDocumentPicker():this.renderOfflineLayout():this.renderUAP()}}var j=t("2vnA"),N=t("Iyrv");const _="closePicker",W="ccx-document-picker-inner-panel",B="ccx-document-picker-panel";class J{constructor(){this._logger=I.a.get("UAPController"),this.uapModeMap={onShowPicker:R.e.open,showPicker:R.e.open,openDocumentPicker:R.e.open,saveAsDocumentPicker:R.e.saveAs,linkAssetsPicker:R.e.linkAssets,relinkAssetsPicker:R.e.relink,placePicker:R.e.place,placeLinkOrEmbedPicker:R.e.placeLinkOrEmbed,saveAsCopyDocumentPicker:R.e.saveAsCopy,multiInstancelinkAssetsPicker:R.e.linkAssets,multiInstanceSaveAsDocumentPicker:R.e.saveAs,multiInstanceImportDocumentPicker:R.e.import,exportPicker:R.e.export},this.closePickerModeMap={hidePicker:_,onClosePicker:_,closeMultiInstanceDocPicker:_,closeSaveAsDocumentPicker:_,closeMultiInstanceImportDocumentPicker:_}}renderUAPInDialog(e,o,t){const n=g.a.createElement(H,{addExternalCancelListener:e,uapArgs:o});f.a.render(n,t)}showUapModal(e,o,t,n,i){let r,a,l=new N.a;if("onShowPicker"===e)r=document.getElementById(W),r||(r=document.createElement("div"),r.style.height="100%",r.style.width="100%",r.id=W,o.node.style.height="100%",o.node.style.width="100%",o.node.id=B),o.node.appendChild(r);else{r=document.createElement("dialog"),r.id="ccx-document-picker",r.className="ccx-document-picker-multi-instance",document.body.appendChild(r);const e=()=>{l.disposeAll(),document.body.contains(r)&&f.a.unmountComponentAtNode(r),r.remove()};r.addEventListener("close",e)}const d=this.getMode(e);this.closeUAPDialog=()=>O.a.shouldCloseUAPDialog(a)?new Promise(e=>{null==r||r.addEventListener("close",()=>{A.mainStore.uabStore.setIsDocumentPickerOpen(!1),e()},{once:!0}),null==r||r.close()}):Promise.resolve();const c=null==o?void 0:o.data,s=null==c?void 0:c.windowController;let u;c&&s&&("onShowPicker"===e?o.node.windowController=s:(r.windowController=s,r.wcId=s.id())),window.cdoHost.getPickerInfo&&(u=function(e){const o=e=>"string"==typeof e?"true"===e:e,t=e=>{if("string"!=typeof e)return e;if(e.startsWith("["))try{return JSON.parse(e)}catch(o){return void console.warn("Failed to parse JSON array, falling back to comma-delimited:",e,o)}return e.split(",")};return{...e,showInterstitial:o(e.showInterstitial),disableCancelButton:o(e.disableCancelButton),hideYourComputerButton:o(e.hideYourComputerButton),documentFilterOverride:t(e.documentFilterOverride),enabledTypes:t(e.enabledTypes),compatibleTypes:t(e.compatibleTypes),outputFileFormatChoices:t(e.outputFileFormatChoices),spacesOutputFileFormatChoices:t(e.spacesOutputFileFormatChoices),featureFlags:(e=>{if("string"!=typeof e)return e;try{return JSON.parse(e)}catch(o){return void console.warn("Failed to parse JSON object:",e,o)}})(e.featureFlags)}}(window.cdoHost.getPickerInfo(d)),u.mode=d),u={...u,...c},u.featureFlags||(u.featureFlags={}),u.featureFlags={...u.featureFlags,...k};const m=window.cdoHost,p={onFeatureEnabled:e=>null==m?void 0:m.featureEnabled(e),onGetLocalRecents:async()=>null==m?void 0:m.getLocalRecents(),onGetPreviewRendition:async e=>{const o=await(null==m?void 0:m.getUxpPreviewRendition(e));return Promise.resolve(o)},getTheme:async()=>(null==m?void 0:m.getTheme)?Object(D.b)(await(null==m?void 0:m.getTheme())):Object(D.b)(t.theme),onPlaceLinkOrEmbedDocuments:async(e,o,t)=>{var n;null===(n=null==m?void 0:m.placeLinkOrEmbedDocuments)||void 0===n||n.call(m,e,o,t),await this.closeUAPDialog()},onImportPlaceDocuments:async e=>{var o;const{windowController:t}=u;t&&(null===(o=null==m?void 0:m.importDocuments)||void 0===o||o.call(m,e,t),await this.closeUAPDialog())}},v=e=>{r.addEventListener("close",e)};d===R.e.placeLinkOrEmbed&&u.documentFilterOverride&&(t.documentFilter=u.documentFilterOverride,u.documentFilterOverride=void 0);const h={openedSessionGuid:E.a.v1(),pickerInfo:u,addExternalCancelListener:v,removeExternalCancelListener:e=>{r.removeEventListener("close",e)},executePickerAction:(e,o)=>{if(a=e,!O.a.isWebViewEnabled)return null==m?void 0:m.executePickerAction(e,o);if("projects"===e.selectedTabId)return null==m?void 0:m.executePickerAction(e,o);let t;try{t=e.folderAssetRef?JSON.parse(e.folderAssetRef):null}catch(o){this._logger.warn("Failed to parse folderAssetRef:",e.folderAssetRef,o),t=null}const n=t?JSON.stringify({...t,path:Object(R.l)(t.path)}):void 0;null==m||m.executePickerAction({...e,folder:Object(R.l)(e.repoPath),folderAssetRef:n},o)},placeDocuments:e=>{null==m||m.placeDocuments(e)},openDocuments:e=>{null==m||m.openDocuments(e)},closeDialog:this.closeUAPDialog,callbacks:p,cdoHostProductData:t,cdoIMSData:Object(D.a)(i,n),theme:A.mainStore.colorTheme};this.renderUAPInDialog(v,h,r);const b={resize:"both",minSize:{width:836,height:500},size:{width:836,height:576}};return r.uxpShowModal(b).then(e=>{this._logger.info("showUapModal : Dialog resolved.")}).catch(e=>{this._logger.info("showUapModal: Dialog caught error.",e)}),O.a.isWebViewEnabled&&l.register(Object(j.z)(()=>A.mainStore.online,()=>{r&&document.body.contains(r)?(f.a.unmountComponentAtNode(r),this.renderUAPInDialog(v,h,r)):this._logger.warn("Reaction fired for a dialog that was already removed or non-existent.")})),A.mainStore.uabStore.setIsDocumentPickerOpen(!0),!0}async closeUapModal(e,o){var t,n,i;if("onClosePicker"===e){const e=document.getElementById(B);if(e){const o=document.createEvent("Event");o.initEvent("cancel",!0,!0),o.eventName="cancel",e.dispatchEvent(o)}null===(t=o.node.firstChild)||void 0===t||t.remove()}else if("hidePicker"===e)await(null===(n=this.closeUAPDialog)||void 0===n?void 0:n.call(this));else{const e=null==o?void 0:o.data,t=null==e?void 0:e.windowController,n=document.querySelectorAll(".ccx-document-picker-multi-instance");for(let e=0;e<n.length;e+=1){const o=n[e];t&&o.wcId===t.id()&&(null===(i=null==o?void 0:o.close)||void 0===i||i.call(o))}}}getMode(e){return this.uapModeMap[e]||this.closePickerModeMap[e]}}}}]);