1var A=Object.freeze,R=Object.defineProperty,tt=Object.defineProperties;var et=Object.getOwnPropertyDescriptors;var B=Object.getOwnPropertySymbols;var ot=Object.prototype.hasOwnProperty,rt=Object.prototype.propertyIsEnumerable;var O=(e,r,i)=>r in e?R(e,r,{enumerable:!0,configurable:!0,writable:!0,value:i}):e[r]=i,U=(e,r)=>{for(var i in r||(r={}))ot.call(r,i)&&O(e,i,r[i]);if(B)for(var i of B(r))rt.call(r,i)&&O(e,i,r[i]);return e},$=(e,r)=>tt(e,et(r));var F=(e,r)=>A(R(e,"raw",{value:A(r||e.slice())}));import{_ as t,a as p,b as it}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_1_jsx_mf_2_runtime__loadShare__.js-B177jzqY.js";import{c6 as D,bW as z,bR as nt,bS as g,h7 as P,r as H,s as st,bP as w,e4 as G,cm as lt,cQ as at,iA as N,j as ct,F as mt,gY as dt,Y as V,v as pt}from"./index-C8DIms-h.js";import{e as ut}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_router_mf_2_dom__loadShare__.js-CK4j7iSY.js";import{L as ft}from"./PageLoading-sfftqEyl.js";import{G as ht}from"./Layout-bCGixQba.js";import{a as X,e as J}from"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js-ClGO9exV.js";import{A as It,F as gt}from"./index.esm-BNoxB-cU.js";import{I as kt}from"./index.esm-C-9-vkKh.js";import{h as xt,T as b}from"./moment-BQKGOo7b.js";import{O as bt,I as Y,a as W,F as wt,u as vt}from"./useBucketShares-DsM-fjR0.js";import{i as j}from"./placeholders-BhfK6KrI.js";import{M as St}from"./Appbar-CdqiVhJM.js";import{p as Ct}from"./Select-C0o-DiOk.js";import{M as q}from"./Stack-QTrU5DBN.js";import{C as Mt}from"./Card-CsgkyxjA.js";import{C as yt}from"./CardContent-CMD-aL4M.js";import{L as Et}from"./LockOutlined-C1DkaLno.js";import{a as Tt}from"./PaymentModal-BKpq6xP1.js";import{C as Lt}from"./MediaShareCreate-BiFB7eqO.js";import{g as _t}from"./index-CKJ3iTdM.js";import{u as T}from"./index-B6UHHHHX.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react__loadShare__.js_commonjs-proxy-D_fXcg40.js";import"./virtualExposes-_ivNhQLP.js";import"./remoteEntry-uboCqDRT.js";import"./preload-helper-s0Msbe4-.js";import"./index-DM2295YJ.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom_mf_1_client__loadShare__.js-_fD68H2V.js";import"./__virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js_commonjs-proxy-BYnSnx8j.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare___mf_0_unleash_mf_1_proxy_mf_2_client_mf_2_react__loadShare__.js-BdtqsXmB.js";import"./_virtual_mf___mfe_internal__host__mf_owner__1__loadShare__react_mf_2_dom__loadShare__.js-ckyQG2Wp.js";import"./groupsyChrome-CLCFmWEd.js";import"./index-C-9SF67q.js";import"./Popper-Dy4hrUxg.js";import"./useBucket-BIB0F6cO.js";import"./useSelectedMedia-moNafvFD.js";import"./AlbumDelete-C9KLfwcA.js";import"./Close-CS8X6lPR.js";import"./TextField-XHezjr4a.js";import"./en-US-CcscABQy.js";import"./albumCacheLinks-COyuqQrC.js";import"./useBucketMediaUpload-CDHeH3K-.js";import"./index--eSQkUPx.js";import"./useAnalytics-Bqtss9LT.js";import"./List-g65CIM25.js";import"./ListItemButton-CSZvALOV.js";import"./ListItemText--jWI7Cah.js";import"./useBucketMediaFavoriteCacheUpdate-JcQ4Mztc.js";import"./Dialog-DJadggB1.js";import"./DialogContent-BYgwep7Q.js";import"./DialogActions-FWBMDTDu.js";import"./Chip-ATUcrM8H.js";import"./formatDistanceToNow-uO2sKiQN.js";import"./Avatar-DO4rlweQ.js";import"./DialogTitle-CXgQtTsT.js";import"./DialogContentText-BuA64lWT.js";import"./ShoppingCartOutlined-B9P3wYA5.js";import"./Skeleton-CHHkEUB-.js";import"./Divider-D0Q2hE10.js";import"./dividerClasses-DKoWjx9h.js";import"./useCoverImage-LxxClbdl.js";import"./coverImageProcessor-BxMTeS1Q.js";import"./MediaDetails-DGfbi8nE.js";import"./formatBytes-jRUNT9z8.js";import"./CloudDownloadOutlined-QqXI5ZLk.js";import"./Grid-C0JuSV3X.js";import"./useThemeProps-BR0W8aGA.js";import"./getThemeProps-CWzAk5Hy.js";import"./isMuiElement-ByswdNQJ.js";import"./CheckCircleOutline-CinuUtlN.js";import"./useBucketMediaMove-BQjlNRvH.js";import"./logger-YHhloPCO.js";import"./ListItem-Bac8ygTt.js";import"./Link-CF_mY1kC.js";import"./SettingsMenu-DW5epDzy.js";import"./getInitials-DL7R944W.js";import"./useProfilePlan-CFYSgKgo.js";import"./UpsellModal-C_O-36_D.js";import"./useStartPlusCheckout-Cfk75TzO.js";import"./useDownloadGate-BU14gIxS.js";import"./useBucketList-Dp_j2Qaf.js";import"./CheckCircle-CEvPgtb7.js";import"./Videocam-DFmQbUqM.js";
1import"./BucketCreate-W2j7i5fC.js";import"./groupCapUpsell-C7pFxje8.js";import"./FormControlLabel-DDOXog2C.js";import"./FilterAndSort-DXPKXNHS.js";import"./mediaSortOptions-w2yTjTeV.js";import"./inviteUrl-BPL9TqJF.js";import"./index-CwMG8eoe.js";import"./PasswordVisibilityAdornment-Bsoiby26.js";import"./__vite-browser-external-D7Ct-6yo.js";import"./ArrowBack-Db3TjviE.js";import"./Menu-S9skcw_y.js";import"./useSubscriptionCreate-C7gk3Ixu.js";import"./StyledFormAlert-CPss5llY.js";import"./StyledFormDivider-CsAJDStv.js";import"./Autocomplete-DrFlT9WD.js";import"./groupsy-logo-white-C4_zM7ld.js";import"./X-9gRLxPhC.js";const zt=D(t("path",{d:"M19 5v14H5V5zm0-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2m-4.86 8.86-3 3.87L9 13.14 6 17h12z"})),Dt=D(t("path",{d:"M3 21h3.75L17.81 9.94l-3.75-3.75L3 17.25zm2-2.92 9.06-9.06.92.92L5.92 19H5zM18.37 3.29a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83c.39-.39.39-1.02 0-1.41z"})),At=D(t("path",{d:"m21.22 18.02 2 2H24v-2zm.77-2 .01-10c0-1.11-.9-2-2-2H7.22l5.23 5.23c.18-.04.36-.07.55-.1V7.02l4 3.73-1.58 1.47 5.54 5.54c.61-.33 1.03-.99 1.03-1.74M2.39 1.73 1.11 3l1.54 1.54c-.4.36-.65.89-.65 1.48v10c0 1.1.89 2 2 2H0v2h18.13l2.71 2.71 1.27-1.27zM7 15.02c.31-1.48.92-2.95 2.07-4.06l1.59 1.59c-1.54.38-2.7 1.18-3.66 2.47"}));var L=(function(e){return e.EDIT="EDIT",e.DELETE="Delete",e})({});const Q=nt(g)(()=>({fontWeight:400,marginLeft:"5px"}));function Bt({share:e}){const[r,i]=X(null),m=s=>{i(s.currentTarget)},n=()=>{i(null)};function a(){P(e.id),H("bucketMediaShareDelete")}function c(){P(e.id),H("bucketMediaShareUpdate")}function d(s){s===L.DELETE&&a(),s===L.EDIT&&c(),n()}return p(it,{children:[t(z,{"aria-label":"Share Link Actions",color:"secondary",onClick:m,"data-test":"sharelink-actions-".concat(e.id),size:"small",children:t(St,{})}),p(Ct,{anchorEl:r,keepMounted:!0,open:!!r,onClose:n,"data-test":"bucket-actions-menu",children:[p(q,{"data-test":"actions-resend-invite",id:"actions-resend-invite",onClick:()=>d(L.EDIT),children:[t(Dt,{}),t(Q,{variant:"subtitle2",children:"Edit Sharing Link"})]}),p(q,{"data-test":"actions-delete",id:"actions-delete",onClick:()=>d(L.DELETE),children:[t(At,{}),t(Q,{variant:"subtitle2",children:"Remove Sharing Link"})]})]})]})}function Ot(e,r){const i={0:{cols:1,rows:1},1:{cols:1,rows:1},2:{cols:1,rows:1},3:{cols:1,rows:1}};switch(e){case 1:i[0]={cols:2,rows:2};break;case 2:i[0]={cols:1,rows:2},i[1]={cols:1,rows:2};break;case 3:i[0]={cols:1,rows:1},i[1]={cols:1,rows:2},i[2]={cols:1,rows:1};break}return i[r]}function Rt({thumbnails:e,boundary:r,handleClick:i}){const m=n=>{n.stopPropagation(),n.currentTarget.src=j,n.currentTarget.srcset=j};return e!=null&&e.length?t(w,{sx:{cursor:"pointer"},onClick:i,children:t(Y,{sx:{width:r,height:r,margin:0,overflow:"hidden"},variant:"quilted",cols:2,rowHeight:Math.floor(Number(r||0)/2),children:e.map((n,a)=>{var o;const c=n.imageUrl,d=e.length,s=a,{cols:I,rows:k}=Ot(d,s);return c?t(W,{cols:I,rows:k,children:t("img",{src:c,alt:(o=n.title)!=null?o:"",onError:m,loading:"lazy",style:{userSelect:"none",WebkitUserSelect:"none"}})},n.id):null})})}):t(Y,{sx:{width:r,height:r,margin:0},cols:1,rowHeight:Number(r||0),onClick:i,children:t(W,{cols:1,rows:1,sx:{justifyContent:"center",alignItems:"center"},children:t(wt,{})})})}var K;const Ut=_t(K||(K=F(["\n query BucketUserDesktopCell($bucketId: ID!, $userId: ID!) {\n bucketUser(bucketId: $bucketId, userId: $userId) {\n userProfile {\n name\n }\n }\n }\n"])));function $t({data:e,rowIndex:r,columnIndex:i,style:m}){var S,C,u,M,y,E;const[n,a]=X(!1),{items:c,isAdmin:d,userId:s,zoom:I}=e,k=r*I+i,o=c[k],v=(o==null?void 0:o.userId)===s,x=st(Ut,{fetchPolicy:"cache-first",variables:{userId:o==null?void 0:o.userId,bucketId:o==null?void 0:o.bucketId},skip:!(o!=null&&o.userId)||!(o!=null&&o.bucketId)});if(!o)return null;const l=o.scheduledDeletionAt?xt(o.scheduledDeletionAt).format("MM/DD/YY"):null,f=()=>{window.open("https://".concat(G,"/share/").concat(o==null?void 0:o.id).concat(o.albumId?"/album/".concat(o.albumId):""),"_blank")},h=async()=>{const _="https://".concat(G,"/share/").concat(o==null?void 0:o.id),Z=new ClipboardItem({"text/plain":new Blob([_],{type:"text/plain"})});await navigator.clipboard.write([Z]),a(!0),setTimeout(()=>a(!1),3e3)};return t("div",{style:m,children:p(Mt,{sx:{margin:"10px"},children:[t(Rt,{thumbnails:(S=o==null?void 0:o.thumbnails)!=null?S:[],boundary:Number(m.width),handleClick:f}),p(yt,{children:[(o==null?void 0:o.title)&&t(g,{variant:"h6",gutterBottom:!0,sx:{maxWidth:"100%",overflow:"hidden",
1whiteSpace:"nowrap",textOverflow:"ellipsis"},children:o.title}),p(w,{sx:{display:"flex",alignItems:"center",gap:"4px"},children:[p(g,{variant:"body2",children:[(C=o.totalMedia)!=null?C:0," ",o.totalMedia!==1?"Items":"Item"]}),o.passwordProtected&&t(b,{title:"Password protected",arrow:!0,children:t(Et,{sx:{fontSize:"14px"}})})]}),l?p(g,{variant:"body2",children:["Expires ",l]}):t(g,{variant:"body2",children:"No expiration date"}),p(g,{variant:"body2",children:["Created By: ",v?"You":(E=(y=(M=(u=x==null?void 0:x.data)==null?void 0:u.bucketUser)==null?void 0:M.userProfile)==null?void 0:y.name)!=null?E:"Unknown User"]}),p(w,{sx:{display:"flex",position:"relative",justifyContent:"space-between"},children:[t(w,{sx:{display:"flex",alignItems:"center"},children:o.albumId?t(b,{title:"Album",arrow:!0,children:t(Tt,{fontSize:"small",sx:{fill:"rgba(0, 0, 0, 0.54)"}})}):t(b,{title:"Media",arrow:!0,children:t(zt,{fontSize:"small",sx:{fill:"rgba(0, 0, 0, 0.54)"}})})}),p(w,{sx:{display:"flex",flex:1,justifyContent:"flex-end",alignItems:"center"},children:[t(z,{size:"small",onClick:f,children:t(b,{title:"Public Link Page",arrow:!0,children:t(bt,{fontSize:"inherit"})})}),t(z,{size:"small",onClick:h,children:t(b,{title:n?"Copied!":"Copy Link",children:t(Lt,{fontSize:"inherit",color:n?"success":"inherit"})})}),(d||v)&&t(Bt,{share:o})]})]})]})]})})}function Ft({children:e,style:r,onScroll:i,ref:m}){const n=J(0),a=c=>{const d=c.currentTarget.scrollTop;d>100&&d>n.current?N("down"):N("up"),n.current=c.currentTarget.scrollTop,i(c)};return t("div",{id:"gallery",style:$(U({},r),{overflowX:"hidden",paddingBottom:"160px"}),onScroll:a,ref:m,children:e})}const Pt=({style:e,children:r,ref:i})=>t("div",{ref:i,style:e,children:r});function Ht({items:e,fetchMore:r,hasMore:i,isAdmin:m,userId:n}){const a=at.isMobile?0:14,c=f=>!!e[f],d=J(null),s=lt(),I=T(s.breakpoints.up("sm")),k=T(s.breakpoints.up("md")),o=T(s.breakpoints.up("lg")),v=T(s.breakpoints.up("xl")),x=async(f,h)=>{e[h]||r()};let l=1;return v?l=5:o?l=4:k?l=3:I&&(l=2),t("div",{style:{flex:1,position:"relative"},children:t(It,{children:({height:f,width:h})=>!h||!f?t("div",{}):t(kt,{isItemLoaded:c,itemCount:e.length+Number(i),loadMoreItems:x,children:({onItemsRendered:S,ref:C})=>t(gt,{columnCount:l,columnWidth:Math.floor(h/l)-Math.floor(a/l),height:f,innerElementType:Pt,itemData:{items:e,isAdmin:m,userId:n,zoom:l},ref:u=>{d.current=u,C(u)},outerElementType:Ft,rowCount:Math.ceil(e.length/l),rowHeight:Math.floor(h/l)-Math.floor(a/l)+200,width:h,onItemsRendered:u=>{const M=u.overscanRowStartIndex*l,y=u.overscanRowStopIndex*l,E=u.visibleRowStartIndex*l,_=u.visibleRowStopIndex*l;S({overscanStartIndex:M,overscanStopIndex:y,visibleStartIndex:E,visibleStopIndex:_})},children:$t})})})})}function Gt(){const{items:e,loading:r,fetchMore:i,nextToken:m}=vt(),{currentUser:n}=ct(),a=n==null?void 0:n.uid,{bucketId:c}=ut(),s=mt().readFragment({id:"BucketUser:".concat(c,":").concat(a),fragment:dt,fragmentName:"BucketUserFragment"}),I=(s==null?void 0:s.userRole)===V.Admin||(s==null?void 0:s.userRole)===V.Owner;return r||!a?t(ft,{}):pt.isEmpty(e)?t(g,{align:"center",variant:"h5",sx:{marginTop:12},children:"This bucket has no shares"}):t(Ht,{items:e,fetchMore:i,hasMore:!!m,isAdmin:I,userId:a})}function Ro(){return t(ht,{children:t(Gt,{})})}export{Ro as default};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.