mirror of
https://github.com/mediacms-io/mediacms.git
synced 2026-04-24 00:08:07 -04:00
1 line
22 KiB
JavaScript
1 line
22 KiB
JavaScript
!function(){var e,t={463:function(e,t,a){"use strict";a.d(t,{c:function(){return i}});var s=a(4571),n=a.n(s);function i(e,t){let a=n()(e,{});return""!==a.origin&&"null"!==a.origin&&a.origin||(a=n()(t+"/"+e.replace(/^\//g,""),{})),a.toString()}},512:function(e,t,a){"use strict";var s=a(2985),n=a(9471),i=a(8713),r=a.n(i),o=a(8790),l=a(7460),d=a(285),h=a(2855),c=a(1177),u=a(239),g=a(7731),m=a(3160),p=a(9294),S=a(7670),f=a(4473),y=a(9200),_=a(9479),b=a(8974);function w(e){return n.createElement(o.LinksConsumer,null,(e=>n.createElement("div",{className:"empty-media empty-channel-media"},n.createElement("div",{className:"welcome-title"},"No shared media"),n.createElement("div",{className:"start-uploading"},"Media that others have shared with you will show up here."))))}class v extends _.Y{constructor(e,t){super(e,"string"==typeof t?t:"author-shared-with-me"),this.profilePageSlug="string"==typeof t?t:"author-shared-with-me",this.state={channelMediaCount:-1,author:l.ProfilePageStore.get("author-data"),uploadsPreviewItemsCount:0,title:this.props.title,query:l.ProfilePageStore.get("author-query"),requestUrl:null,hiddenFilters:!0,hiddenTags:!0,hiddenSorting:!0,hiddenSharing:!0,filterArgs:"",availableTags:[],selectedTag:"all",selectedSort:"date_added_desc",selectedMedia:new Set,sharedUsers:[],sharedGroups:[],selectedSharingType:null,selectedSharingValue:null},this.authorDataLoad=this.authorDataLoad.bind(this),this.onAuthorPreviewItemsCountCallback=this.onAuthorPreviewItemsCountCallback.bind(this),this.getCountFunc=this.getCountFunc.bind(this),this.changeRequestQuery=this.changeRequestQuery.bind(this),this.onToggleFiltersClick=this.onToggleFiltersClick.bind(this),this.onToggleTagsClick=this.onToggleTagsClick.bind(this),this.onToggleSortingClick=this.onToggleSortingClick.bind(this),this.onToggleSharingClick=this.onToggleSharingClick.bind(this),this.onFiltersUpdate=this.onFiltersUpdate.bind(this),this.onTagSelect=this.onTagSelect.bind(this),this.onSortSelect=this.onSortSelect.bind(this),this.onSharingSelect=this.onSharingSelect.bind(this),this.onResponseDataLoaded=this.onResponseDataLoaded.bind(this),this.handleMediaSelection=this.handleMediaSelection.bind(this),l.ProfilePageStore.on("load-author-data",this.authorDataLoad)}componentDidMount(){d.ProfilePageActions.load_author_data()}authorDataLoad(){const e=l.ProfilePageStore.get("author-data");let t=this.state.requestUrl;e&&(t=this.state.query?o.ApiUrlContext._currentValue.media+"?author="+e.id+"&show=shared_with_me&q="+encodeURIComponent(this.state.query)+this.state.filterArgs:o.ApiUrlContext._currentValue.media+"?author="+e.id+"&show=shared_with_me"+this.state.filterArgs),this.setState({author:e,requestUrl:t})}onAuthorPreviewItemsCountCallback(e){this.setState({uploadsPreviewItemsCount:e})}getCountFunc(e){this.setState({channelMediaCount:e},(()=>{if(this.state.query){let t="";t=e?1===e?'1 result for "'+this.state.query+'"':e+' results for "'+this.state.query+'"':'No results for "'+this.state.query+'"',this.setState({title:t})}}))}changeRequestQuery(e){if(!this.state.author)return;let t;t=e?o.ApiUrlContext._currentValue.media+"?author="+this.state.author.id+"&show=shared_with_me&q="+encodeURIComponent(e)+this.state.filterArgs:o.ApiUrlContext._currentValue.media+"?author="+this.state.author.id+"&show=shared_with_me"+this.state.filterArgs;let a=this.state.title;""===e&&(a=this.props.title),this.setState({requestUrl:t,query:e,title:a})}onToggleFiltersClick(){this.setState({hiddenFilters:!this.state.hiddenFilters,hiddenTags:!0,hiddenSorting:!0,hiddenSharing:!0})}onToggleTagsClick(){this.setState({hiddenFilters:!0,hiddenTags:!this.state.hiddenTags,hiddenSorting:!0,hiddenSharing:!0})}onToggleSortingClick(){this.setState({hiddenFilters:!0,hiddenTags:!0,hiddenSorting:!this.state.hiddenSorting,hiddenSharing:!0})}onToggleSharingClick(){this.setState({hiddenFilters:!0,hiddenTags:!0,hiddenSorting:!0,hiddenSharing:!this.state.hiddenSharing})}onTagSelect(e){this.setState({selectedTag:e},(()=>{this.onFiltersUpdate({media_type:this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],upload_date:this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],duration:this.state.filterArgs.match(/duration=([^&]+)/)?.[1],publish_state:this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],sort_by:this.state.selectedSort,tag:e,sharing_type:this.state.selectedSharingType,sharing_value:this.state.selectedSharingValue})}))}onSortSelect(e){this.setState({selectedSort:e},(()=>{this.onFiltersUpdate({media_type:this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],upload_date:this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],duration:this.state.filterArgs.match(/duration=([^&]+)/)?.[1],publish_state:this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],sort_by:e,tag:this.state.selectedTag,sharing_type:this.state.selectedSharingType,sharing_value:this.state.selectedSharingValue})}))}onSharingSelect(e,t){this.setState({selectedSharingType:e,selectedSharingValue:t},(()=>{this.onFiltersUpdate({media_type:this.state.filterArgs.match(/media_type=([^&]+)/)?.[1],upload_date:this.state.filterArgs.match(/upload_date=([^&]+)/)?.[1],duration:this.state.filterArgs.match(/duration=([^&]+)/)?.[1],publish_state:this.state.filterArgs.match(/publish_state=([^&]+)/)?.[1],sort_by:this.state.selectedSort,tag:this.state.selectedTag,sharing_type:e,sharing_value:t})}))}onFiltersUpdate(e){const t={media_type:null,upload_date:null,duration:null,publish_state:null,sort_by:null,ordering:null,t:null,shared_user:null,shared_group:null};switch(e.media_type){case"video":case"audio":case"image":case"pdf":t.media_type=e.media_type}switch(e.upload_date){case"today":case"this_week":case"this_month":case"this_year":t.upload_date=e.upload_date}switch(e.duration&&"all"!==e.duration&&(t.duration=e.duration),e.publish_state&&"all"!==e.publish_state&&(t.publish_state=e.publish_state),e.sort_by){case"date_added_desc":break;case"date_added_asc":t.ordering="asc";break;case"alphabetically_asc":t.sort_by="title_asc";break;case"alphabetically_desc":t.sort_by="title_desc";break;case"plays_least":t.sort_by="views_asc";break;case"plays_most":t.sort_by="views_desc";break;case"likes_least":t.sort_by="likes_asc";break;case"likes_most":t.sort_by="likes_desc"}e.tag&&"all"!==e.tag&&(t.t=e.tag),"user"===e.sharing_type&&e.sharing_value?t.shared_user=e.sharing_value:"group"===e.sharing_type&&e.sharing_value&&(t.shared_group=e.sharing_value);const a=[];for(let e in t)null!==t[e]&&a.push(e+"="+t[e]);this.setState({filterArgs:a.length?"&"+a.join("&"):""},(function(){if(!this.state.author)return;let e;e=this.state.query?o.ApiUrlContext._currentValue.media+"?author="+this.state.author.id+"&show=shared_with_me&q="+encodeURIComponent(this.state.query)+this.state.filterArgs:o.ApiUrlContext._currentValue.media+"?author="+this.state.author.id+"&show=shared_with_me"+this.state.filterArgs,this.setState({requestUrl:e})}))}onResponseDataLoaded(e){if(e&&e.tags){const t=e.tags.split(",").map((e=>e.trim())).filter((e=>e));this.setState({availableTags:t})}e&&void 0!==e.shared_users&&this.setState({sharedUsers:e.shared_users||[],sharedGroups:e.shared_groups||[]})}handleMediaSelection(e,t){const a=(0,y.inSelectMediaEmbedMode)();this.setState((s=>{const n=new Set;if(a){if(t&&(n.add(e),b.log("Selected media item:",e),window.parent!==window)){const t=`${window.location.origin}/embed?m=${e}`;window.parent.postMessage({type:"videoSelected",embedUrl:t,videoId:e},"*"),b.log("Sent postMessage to parent:",{embedUrl:t,videoId:e})}}else n.clear(),s.selectedMedia.forEach((e=>n.add(e))),t?n.add(e):n.delete(e);return{selectedMedia:n}}))}pageContent(){const e=l.ProfilePageStore.get("author-data"),t=e&&e.username===o.MemberContext._currentValue.username,a=(0,y.inSelectMediaEmbedMode)(),s=this.state.filterArgs&&(this.state.filterArgs.includes("media_type=")||this.state.filterArgs.includes("upload_date=")||this.state.filterArgs.includes("duration=")||this.state.filterArgs.includes("publish_state="));return[this.state.author?n.createElement(c.A,{key:"ProfilePagesHeader",author:this.state.author,type:"shared_with_me",onQueryChange:this.changeRequestQuery,onToggleFiltersClick:this.onToggleFiltersClick,onToggleTagsClick:this.onToggleTagsClick,onToggleSortingClick:this.onToggleSortingClick,onToggleSharingClick:this.onToggleSharingClick,hasActiveFilters:s,hasActiveTags:"all"!==this.state.selectedTag,hasActiveSort:"date_added_desc"!==this.state.selectedSort,hasActiveSharing:!!this.state.selectedSharingValue,hideChannelBanner:(0,y.inEmbeddedApp)()}):null,this.state.author?n.createElement(u.A,{key:"ProfilePagesContent"},n.createElement(h.MediaListWrapper,{title:(0,y.inEmbeddedApp)()?void 0:this.state.title,className:"items-list-ver",style:(0,y.inEmbeddedApp)()?{marginTop:"24px"}:void 0},n.createElement(m.F,{hidden:this.state.hiddenFilters,tags:this.state.availableTags,onFiltersUpdate:this.onFiltersUpdate}),n.createElement(p.L,{hidden:this.state.hiddenTags,tags:this.state.availableTags,onTagSelect:this.onTagSelect}),n.createElement(f.s,{hidden:this.state.hiddenSorting,onSortSelect:this.onSortSelect}),n.createElement(S.W,{hidden:this.state.hiddenSharing,mode:"shared_with_me",sharedUsers:this.state.sharedUsers,sharedGroups:this.state.sharedGroups,onSharingSelect:this.onSharingSelect,selectedSharingType:this.state.selectedSharingType,selectedSharingValue:this.state.selectedSharingValue}),n.createElement(g.LazyLoadItemListAsync,{key:this.state.requestUrl,requestUrl:this.state.requestUrl,hideAuthor:!0,itemsCountCallback:this.state.requestUrl?this.getCountFunc:null,hideViews:!l.PageStore.get("config-media-item").displayViews,hideDate:!l.PageStore.get("config-media-item").displayPublishDate,canEdit:!1,onResponseDataLoaded:this.onResponseDataLoaded,showSelection:a,hasAnySelection:this.state.selectedMedia.size>0,selectedMedia:this.state.selectedMedia,onMediaSelection:this.handleMediaSelection}),t&&0===this.state.channelMediaCount&&!this.state.query?n.createElement(w,{name:this.state.author.name}):null)):null]}}v.propTypes={title:r().string.isRequired},v.defaultProps={title:"Shared with me"},(0,s.C)("page-profile-shared-with-me",v)},977:function(e,t,a){"use strict";a.d(t,{A:function(){return n}});var s=a(7143);function n(e,t){return s.register(e[t].bind(e)),e}},1702:function(e,t,a){"use strict";a.d(t,{R:function(){return n},e:function(){return i}});var s=a(6403);const n=function(e,t,a){return void 0===e[t]||(n=e[t])===Math.trunc(n)&&n>=0?null:(0,s.m)(["Invalid prop `"+t+"` of type `"+typeof e[t]+"` supplied to `"+(a||"N/A")+"`, expected `positive integer or zero` ("+e[t]+")."]);var n},i=function(e,t,a){return void 0===e[t]||(n=e[t])===Math.trunc(n)&&n>0?null:(0,s.m)(["Invalid prop `"+t+"` of type `"+typeof e[t]+"` supplied to `"+(a||"N/A")+"`, expected `positive integer` ("+e[t]+")."]);var n}},1936:function(e,t,a){"use strict";a.d(t,{PageHeader:function(){return s.z},PageMain:function(){return n.P},PageSidebar:function(){return i.E}});var s=a(1254),n=a(3212),i=a(795);a(1470)},4853:function(e,t,a){"use strict";a.r(t),a.d(t,{useBulkActions:function(){return r}});var s=a(9471),n=a(9200),i=a(5742);function r(){const[e,t]=(0,s.useState)(new Set),[a,r]=(0,s.useState)([]),[o,l]=(0,s.useState)(!1),[d,h]=(0,s.useState)(null),[c,u]=(0,s.useState)(""),[g,m]=(0,s.useState)(0),[p,S]=(0,s.useState)(""),[f,y]=(0,s.useState)(!1),[_,b]=(0,s.useState)("success"),[w,v]=(0,s.useState)(!1),[C,T]=(0,s.useState)(null),[k,A]=(0,s.useState)(!1),[M,P]=(0,s.useState)(!1),[E,F]=(0,s.useState)(!1),[U,O]=(0,s.useState)(!1),[q,R]=(0,s.useState)(!1),[j,I]=(0,s.useState)(!1),[L,N]=(0,s.useState)(!1);(0,s.useEffect)((()=>{(0,i.inEmbeddedApp)()&&fetch("/api/v1/categories/contributor?lms_courses_only=true").then((e=>e.ok?e.json():null)).then((e=>{if(!e)return;const t=e.results||e;N(Array.isArray(t)&&t.length>0)})).catch((()=>{}))}),[]);const x=()=>{let e=null;if(document.cookie&&""!==document.cookie){const t=document.cookie.split(";");for(let a=0;a<t.length;a++){const s=t[a].trim();if("csrftoken="===s.substring(0,10)){e=decodeURIComponent(s.substring(10));break}}}return e},D=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"success";S(e),y(!0),b(t),setTimeout((()=>{y(!1)}),5e3)},V=()=>{t(new Set)},$=()=>{t(new Set),m((e=>e+1))};return{selectedMedia:e,availableMediaIds:a,listKey:g,showConfirmModal:o,confirmMessage:c,notificationMessage:p,showNotification:f,notificationType:_,showPermissionModal:w,permissionType:C,showPlaylistModal:k,showChangeOwnerModal:M,showPublishStateModal:E,showCategoryModal:U,showTagModal:q,showCourseCleanupModal:j,hasContributorCourses:L,handleMediaSelection:(e,a)=>{t((t=>{const s=new Set(t);return a?s.add(e):s.delete(e),s}))},handleItemsUpdate:e=>{const t=e.map((e=>e.friendly_token||e.uid||e.id));r(t)},handleSelectAll:()=>{t(new Set(a))},handleDeselectAll:()=>{t(new Set)},handleBulkAction:t=>{const a=e.size;"course-cleanup"!==t?0!==a&&("delete-media"===t?(l(!0),h(t),u((0,n.translateString)("You are going to delete")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"enable-comments"===t?(l(!0),h(t),u((0,n.translateString)("You are going to enable comments to")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"disable-comments"===t?(l(!0),h(t),u((0,n.translateString)("You are going to disable comments to")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"delete-comments"===t?(l(!0),h(t),u((0,n.translateString)("You are going to delete all comments from")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"enable-download"===t?(l(!0),h(t),u((0,n.translateString)("You are going to enable download for")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"disable-download"===t?(l(!0),h(t),u((0,n.translateString)("You are going to disable download for")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"copy-media"===t?(l(!0),h(t),u((0,n.translateString)("You are going to copy")+` ${a} `+(0,n.translateString)("media, are you sure?"))):"add-remove-coviewers"===t?(v(!0),T("viewer")):"add-remove-coeditors"===t?(v(!0),T("editor")):"add-remove-coowners"===t?(v(!0),T("owner")):"add-remove-playlist"===t?A(!0):"change-owner"===t?P(!0):"publish-state"===t?F(!0):"add-remove-category"===t?O(!0):"add-remove-tags"===t&&R(!0)):I(!0)},handleConfirmCancel:()=>{l(!1),h(null),u("")},handleConfirmProceed:()=>{const t=d;l(!1),h(null),u(""),"delete-media"===t?(()=>{const t=Array.from(e),a=t.length;fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"delete_media",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to delete media");return e.json()})).then((e=>{const t=1===a?(0,n.translateString)("The media was deleted successfully."):(0,n.translateString)("Successfully deleted")+` ${a} `+(0,n.translateString)("media.");D(t),$()})).catch((e=>{D((0,n.translateString)("Failed to delete media. Please try again."),"error"),$()}))})():"enable-comments"===t?(()=>{const t=Array.from(e);fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"enable_comments",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to enable comments");return e.json()})).then((e=>{D((0,n.translateString)("Successfully Enabled comments")),V()})).catch((e=>{D((0,n.translateString)("Failed to enable comments."),"error"),V()}))})():"disable-comments"===t?(()=>{const t=Array.from(e);fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"disable_comments",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to disable comments");return e.json()})).then((e=>{D((0,n.translateString)("Successfully Disabled comments")),V()})).catch((e=>{D((0,n.translateString)("Failed to disable comments."),"error"),V()}))})():"delete-comments"===t?(()=>{const t=Array.from(e);fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"delete_comments",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to delete comments");return e.json()})).then((e=>{D((0,n.translateString)("Successfully deleted comments")),V()})).catch((e=>{D((0,n.translateString)("Failed to delete comments."),"error"),V()}))})():"enable-download"===t?(()=>{const t=Array.from(e);fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"enable_download",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to enable download");return e.json()})).then((e=>{D((0,n.translateString)("Successfully Enabled Download")),V()})).catch((e=>{D((0,n.translateString)("Failed to enable download."),"error"),V()}))})():"disable-download"===t?(()=>{const t=Array.from(e);fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"disable_download",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to disable download");return e.json()})).then((e=>{D((0,n.translateString)("Successfully Disabled Download")),V()})).catch((e=>{D((0,n.translateString)("Failed to disable download."),"error"),V()}))})():"copy-media"===t&&(()=>{const t=Array.from(e);fetch("/api/v1/media/user/bulk_actions",{method:"POST",headers:{"Content-Type":"application/json","X-CSRFToken":x()},body:JSON.stringify({action:"copy_media",media_ids:t})}).then((e=>{if(!e.ok)throw new Error("Failed to copy media");return e.json()})).then((e=>{D((0,n.translateString)("Successfully Copied")),$()})).catch((e=>{D((0,n.translateString)("Failed to copy media."),"error"),V()}))})()},handlePermissionModalCancel:()=>{v(!1),T(null)},handlePermissionModalSuccess:e=>{D(e),V(),v(!1),T(null)},handlePermissionModalError:e=>{D(e,"error"),v(!1),T(null)},handlePlaylistModalCancel:()=>{A(!1)},handlePlaylistModalSuccess:e=>{D(e),V(),A(!1)},handlePlaylistModalError:e=>{D(e,"error"),A(!1)},handleChangeOwnerModalCancel:()=>{P(!1)},handleChangeOwnerModalSuccess:e=>{D(e),$(),P(!1)},handleChangeOwnerModalError:e=>{D(e,"error"),P(!1)},handlePublishStateModalCancel:()=>{F(!1)},handlePublishStateModalSuccess:e=>{D(e),$(),F(!1)},handlePublishStateModalError:e=>{D(e,"error"),F(!1)},handleCategoryModalCancel:()=>{O(!1)},handleCategoryModalSuccess:e=>{D(e),V(),O(!1)},handleCategoryModalError:e=>{D(e,"error"),O(!1)},handleTagModalCancel:()=>{R(!1)},handleTagModalSuccess:e=>{D(e),V(),R(!1)},handleTagModalError:e=>{D(e,"error"),R(!1)},handleCourseCleanupModalCancel:()=>{I(!1)},handleCourseCleanupModalSuccess:e=>{D(e),$(),I(!1)},handleCourseCleanupModalError:e=>{D(e,"error"),I(!1)},getCsrfToken:x,clearSelection:V,clearSelectionAndRefresh:$}}},6403:function(e,t,a){"use strict";a.d(t,{g:function(){return r},m:function(){return i}});var s=a(8004);function n(e,t,a){let s;switch(a){case TypeError:case RangeError:case SyntaxError:case ReferenceError:s=new a(t[0]);break;default:s=new Error(t[0])}return e(s.message,...t.slice(1)),s}function i(e,t){return n(s.z,e,t)}function r(e,t){return n(s.R,e,t)}},7143:function(e,t,a){const s=a(2063).Dispatcher;e.exports=new s},7731:function(e,t,a){"use strict";a.d(t,{LazyLoadItemListAsync:function(){return c}});var s=a(9471),n=a(7460),i=a(5338),r=a(4685),o=a(2495),l=a(4433),d=a(5633);function h(){return h=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var s in a)({}).hasOwnProperty.call(a,s)&&(e[s]=a[s])}return e},h.apply(null,arguments)}function c(e){const[t,a,r,c,u,g,m,p,S,f,y,_,b]=(0,i.useItemListLazyLoad)(e);return(0,s.useEffect)((()=>(c(new d.B(e.pageItems,e.maxItems,e.firstItemRequestUrl,e.requestUrl,g,m,e.onResponseDataLoaded)),n.PageStore.on("window_scroll",p),n.PageStore.on("document_visibility_change",S),p(),()=>{n.PageStore.removeListener("window_scroll",p),n.PageStore.removeListener("document_visibility_change",S),r&&(r.cancelAll(),c(null))})),[]),(0,s.useEffect)((()=>{e.onItemsUpdate&&t.length>0&&e.onItemsUpdate(t)}),[t]),a?t.length?s.createElement("div",{className:u.listOuter},_(),s.createElement("div",{ref:f,className:"items-list-wrap"},s.createElement("div",{ref:y,className:u.list},t.map(((t,a)=>s.createElement(l.c,h({key:a},(0,l.k)(e,t,a),{showSelection:e.showSelection,hasAnySelection:e.hasAnySelection,isSelected:e.selectedMedia&&e.selectedMedia.has(t.friendly_token||t.uid||t.id),onSelectionChange:e.onMediaSelection,mediaId:t.friendly_token||t.uid||t.id})))))),b()):null:s.createElement(o.e,{className:u.listOuter})}c.propTypes={...r.ItemListAsync.propTypes},c.defaultProps={...r.ItemListAsync.defaultProps,pageItems:2}},8004:function(e,t,a){"use strict";a.d(t,{R:function(){return i},z:function(){return r}});var s=a(8974);const n=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return s[t[0]](...t.slice(1))},i=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return n("warn",...t)},r=function(){for(var e=arguments.length,t=new Array(e),a=0;a<e;a++)t[a]=arguments[a];return n("error",...t)}}},a={};function s(e){var n=a[e];if(void 0!==n)return n.exports;var i=a[e]={exports:{}};return t[e].call(i.exports,i,i.exports,s),i.exports}s.m=t,e=[],s.O=function(t,a,n,i){if(!a){var r=1/0;for(h=0;h<e.length;h++){a=e[h][0],n=e[h][1],i=e[h][2];for(var o=!0,l=0;l<a.length;l++)(!1&i||r>=i)&&Object.keys(s.O).every((function(e){return s.O[e](a[l])}))?a.splice(l--,1):(o=!1,i<r&&(r=i));if(o){e.splice(h--,1);var d=n();void 0!==d&&(t=d)}}return t}i=i||0;for(var h=e.length;h>0&&e[h-1][2]>i;h--)e[h]=e[h-1];e[h]=[a,n,i]},s.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return s.d(t,{a:t}),t},s.d=function(e,t){for(var a in t)s.o(t,a)&&!s.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},s.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.j=92,function(){var e={92:0};s.O.j=function(t){return 0===e[t]};var t=function(t,a){var n,i,r=a[0],o=a[1],l=a[2],d=0;if(r.some((function(t){return 0!==e[t]}))){for(n in o)s.o(o,n)&&(s.m[n]=o[n]);if(l)var h=l(s)}for(t&&t(a);d<r.length;d++)i=r[d],s.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return s.O(h)},a=self.webpackChunkmediacms_frontend=self.webpackChunkmediacms_frontend||[];a.forEach(t.bind(null,0)),a.push=t.bind(null,a.push.bind(a))}();var n=s.O(void 0,[276],(function(){return s(512)}));n=s.O(n)}(); |