1import{a as jt}from"./chunk-EH3A2LAL.js";import{a as zt}from"./chunk-GVUFM4BL.js";import{a as Ut}from"./chunk-FVVF3KEN.js";import{A as O,O as $,X as Gt,j as Mt,l as Nt,n as Wt,p as Z,q as wt,r as A,v as Ft}from"./chunk-TCTAIJWM.js";import"./chunk-VC4XFMWE.js";import"./chunk-VOABLDRR.js";import"./chunk-7FCIPKCV.js";import"./chunk-FGZ3ZQQE.js";import"./chunk-UM7YLHYV.js";import"./chunk-FPG36ZW5.js";import{a as X,n as E,o as vt}from"./chunk-HFPNQYK3.js";import"./chunk-3FOGLSCS.js";import{a as St}from"./chunk-AFBZFFZY.js";import{$a as _t,Xa as ht,ab as bt,cb as xt,db as Ct,va as B,wa as ft}from"./chunk-ZRFJLEPH.js";import"./chunk-M7VFR4HZ.js";import"./chunk-KHURF4IG.js";import"./chunk-MTAH6EXV.js";import"./chunk-UOZHWH4U.js";import"./chunk-NUVGQ2M3.js";import"./chunk-ITR5BKW4.js";import{m as gt,r as ut,t as Q}from"./chunk-CCEZGLCM.js";import"./chunk-72CKKQUS.js";import"./chunk-BKCTV3WB.js";import{b as yt,c as k}from"./chunk-HSMTXZQB.js";import"./chunk-J4LU7ZEG.js";import"./chunk-Q2SVDQXD.js";import"./chunk-BZUSEBQS.js";import{H as dt,K as T,ia as J,j as mt,n as ct,qa as K,ta as P,u as pt}from"./chunk-U65M3XVB.js";import"./chunk-TOOYFEHP.js";import{O as L,R as D}from"./chunk-GC5OIQBG.js";import"./chunk-XWR5MKRV.js";import"./chunk-CUSX5PDQ.js";import"./chunk-GF3RRNYH.js";import"./chunk-J42KB47J.js";import"./chunk-MAJXIYGC.js";import"./chunk-A4UIXCQ4.js";import"./chunk-TUWPCWTE.js";import"./chunk-TESW6WJ4.js";import"./chunk-NXKKHNXI.js";import"./chunk-SKRSWWWN.js";import{a as d}from"./chunk-I4KDDPDM.js";import"./chunk-TK5SWOSM.js";import{$d as G,Aa as s,Ec as q,Fb as f,Fc as S,G as W,Ga as u,Ha as y,Hb as h,Jb as tt,Kb as et,Lb as it,Ma as w,Mb as c,Nb as n,Ob as r,Pb as C,Q as j,Qa as at,Rc as v,S as U,Wb as b,Wc as lt,Yb as _,_b as l,ae as st,be as H,gb as a,ic as Y,n as N,nc as m,oa as M,oc as ot,pb as F,ra as z,uc as V,vc as R,wc as I}from"./chunk-BV6YIIIM.js";import{g as x}from"./chunk-OAOUCCYY.js";var Ot=x(Nt()),Vt=x(wt()),Rt=x(Wt());var Tt=x(Ut()),Pt=x(zt());var qt=()=>({sidebar:"galleries-m"}),nt=e=>({outlets:e}),rt=e=>["",e],Ht=()=>({sidebar:"galleries-search-d"}),Jt=()=>({sidebar:"galleries-filter-d"});function Kt(e,p){if(e&1&&(n(0,"mat-option",4),m(1),r()),e&2){let t=p.$implicit;c("value",t.value),a(),ot(t.label)}}function Qt(e,p){if(e&1){let t=b();n(0,"mat-form-field",1)(1,"mat-label"),m(2,"Sort By"),r(),n(3,"mat-select",3),I("valueChange",function(o){u(t);let g=l(2);return R(g.sortByService.sortBy,o)||(g.sortByService.sortBy=o),y(o)}),et(4,Kt,2,2,"mat-option",4,tt),r()()}if(e&2){let t=l(2);a(3),V("value",t.sortByService.sortBy),a(),it(t.sortByService.sortOptions)}}function Xt(e,p){if(e&1&&(n(0,"button",2)(1,"mpix-material-icon-button-label",5),m(2,"Filter & Sort"),r()()),e&2){let t=l(2);c("routerLink",S(5,rt,S(3,nt,q(2,qt)))),a(),c("icon",t.faSliders)}}function Zt(e,p){if(e&1&&f(0,Qt,6,1,"mat-form-field",1)(1,Xt,3,7,"button",2),e&2){let t=l();h(t.isLimitedView()?0:1)}}function $t(e,p){if(e&1&&(n(0,"button",9)(1,"mpix-material-icon-button-label",5),m(2," Search "),r()()),e&2){let t=l(2);c("routerLink",S(5,rt,S(3,nt,q(2,Ht)))),a(),c("icon",t.faSearch)}}function te(e,p){if(e&1&&(n(0,"mat-option",4),m(1),r()),e&2){let t=p.$implicit;c("value",t.value),a(),ot(t.label)}}function ee(e,p){if(e&1&&(n(0,"button",10)(1,"mpix-material-icon-button-label",11),m(2,"Filters"),r()()),e&2){let t=l(2);c("routerLink",S(5,rt,S(3,nt,q(2,Jt)))),a(),c("icon",t.faSliders)}}function ie(e,p){if(e&1){let t=b();n(0,"div",6)(1,"button",7),_("click",function(){u(t);let o=l();return y(o.openDefaultDialog())}),m(2,"Add Photo Gallery"),r(),n(3,"button",8),_("click",function(){u(t);let o=l();return y(o.openSharedGalleryDialog())}),m(4,"Share Gallery"),r()(),f(5,$t,3,7,"button",9),n(6,"mat-form-field",1)(7,"mat-label"),m(8,"Sort By"),r(),n(9,"mat-select",3),I("valueChange",function(o){u(t);let g=l();return R(g.sortByService.sortBy,o)||(g.sortByService.sortBy=o),y(o)}),et(10,te,2,2,"mat-option",4,tt),r()(),f(12,ee,3,7,"button",10)}if(e&2){let t=l();a(5),h(t.isLimitedView()?-1:5),a(4),V("value",t.sortByService.sortBy),a(),it(t.sortByService.sortOptions),a(2),h(t.showDesktopFilter()?12:-1)}}var kt=(()=>{class e{constructor(){this.galleriesStore=s(E),this.dialogService=s(A),this.destroyRef=s(w),this.router=s(G),this.breakpointService=s(Z),this.sortByService=s(Gt),this.faSearch=Tt.faSearch,this.faSliders=Pt.faSliders,this.isLimitedView=v(()=>
1this.galleriesStore.isPaging()),this.showDesktopFilter=v(()=>this.galleriesStore.availableYears().length>1&&!this.isLimitedView())}openDefaultDialog(){this.dialogService.openDefaultDialog(O).afterClosed().pipe(d(this.destroyRef)).subscribe(i=>{i&&typeof i=="string"&&this.galleriesStore.addGallery({name:i}).pipe(d(this.destroyRef)).subscribe({next:o=>{this.dialogService.openPhotoUploader(o.data.id).afterClosed().pipe(d(this.destroyRef)).subscribe({next:()=>{this.router.navigate(["/my-photos/gallery",o.data.id]).catch(g=>{console.error(g)})}})}})})}openSharedGalleryDialog(){this.dialogService.openDefaultDialog($).afterClosed().pipe(d(this.destroyRef)).subscribe({next:t=>{t&&this.galleriesStore.loadSharedByMe()}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=F({type:e,selectors:[["mpix-gallery-listing-action-bar"]],decls:3,vars:1,consts:[[1,"home-actions-row","har-main"],[1,"hide-bottom","inline","basic-button-border"],["mat-flat-button","","color","basic","extended","","mpixFullstory","listing-filter-sort-btn","mpixFullstoryArea","gallery",1,"gallery-flat-button",3,"routerLink"],["color","basic","mpixFullstory","listing-sort-by-select","mpixFullstoryArea","gallery",3,"valueChange","value"],[3,"value"],[3,"icon"],[1,"home-actions-row","har-grow"],["type","button","mat-flat-button","","color","primary","mpixFullstory","listing-create-gallery-btn","mpixFullstoryArea","gallery",3,"click"],["type","button","mat-flat-button","","color","basic","mpixFullstory","shared-create-by-me-btn","mpixFullstoryArea","gallery",1,"gallery-flat-button",3,"click"],["type","button","mat-flat-button","","color","basic","extended","","mpixFullstory","listing-search-btn","mpixFullstoryArea","gallery",1,"mpix-normal-case","gallery-flat-button",3,"routerLink"],["type","button","mat-flat-button","","color","basic","extended","","mpixTooltip","Filters","mpixTooltipScreenSize","xl","mpixFullstory","listing-filter-btn","mpixFullstoryArea","gallery",1,"gallery-flat-button",3,"routerLink"],["collapsible","icon","breakpoint","xl",1,"btn-filters-label",3,"icon"]],template:function(i,o){i&1&&(n(0,"div",0),f(1,Zt,2,1)(2,ie,13,3),r()),i&2&&(a(),h(o.breakpointService.isMobile()?1:2))},dependencies:[D,L,T,k,K,J,P,Q,ut,gt,H,st,B,X],styles:[".home-actions-row[_ngcontent-%COMP%]{display:flex;flex-direction:row;gap:1rem}.home-actions-row.har-grow[_ngcontent-%COMP%]{flex-grow:1}.home-actions-row.har-main[_ngcontent-%COMP%]{margin-bottom:1rem}.home-actions-row[_ngcontent-%COMP%] button[_ngcontent-%COMP%], .home-actions-row[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{margin:0}.home-actions-row[_ngcontent-%COMP%] .mdc-button__label{font-size:.875rem;line-height:1.25rem;font-weight:400}.btn-filters-label[_ngcontent-%COMP%]{text-transform:none}"],changeDetection:0})}}return e})();var Bt=x(jt()),Et=x(wt());function oe(e,p){if(e&1){let t=b();n(0,"mpix-pagination",5),_("changePage",function(o){u(t);let g=l();return y(g.handlePageChange(o))}),r()}if(e&2){let t=l();c("pagination",t.pagination())}}function ne(e,p){if(e&1){let t=b();n(0,"div",4)(1,"button",6),_("click",function(){u(t);let o=l();return y(o.openNewGalleryDialog())}),m(2,"Add Photo Gallery"),r(),n(3,"button",7,0),C(5,"mpix-material-icon-button-label",8),r(),n(6,"mat-menu",9,1)(8,"button",10),_("click",function(){u(t);let o=l();return y(o.openSharedGalleryDialog())}),n(9,"mpix-material-icon-button-label",8),m(10," Share Gallery "),r()()()()}if(e&2){let t=Y(7),i=l();a(3),c("matMenuTriggerFor",t),a(2),c("icon",i.faEllipsis),a(4),c("icon",i.faLink)}}var At=(()=>{class e{constructor(){this.scrollToTarget=lt(),this.galleriesStore=s(E),this.breakpointService=s(Z),this.dialogService=s(A),this.router=s(G),this.destroyRef=s(w),this.faEllipsis=Bt.faEllipsis,this.faLink=Et.faLink,this.pagination=v(()=>{let t=this.galleriesStore.pageResult();return{page:this.galleriesStore.currentPage(),pageSize:t?.pageSize,totalPages:t?.totalPages,pageMax:10}})}openNewGalleryDialog(){this.dialogService.openDefaultDialog(O).afterClosed().pipe(j(t=>!!t),M(t=>this.galleriesStore.addGallery({name:t}).pipe(W(i=>i.data.id),M(i=>this.dialogService.openPhotoUploader(i).afterClosed().pipe(z(()=>{this.router.navigate(["/my-photos/gallery",i]).catch(o=>console.error("Navigation error:",o))}))),U(i=>(console.error("Error creating gallery or uploading photos:",i),N)))),d(this.destroyRef)).subscribe()}handlePageChange(t){this.galleriesStore.loadPage(t,!0).pipe(d(this.destroyRef)).subscribe({next:()=>{this.scrollTo(this.scrollToTarget())}})}scrollTo(t){t??=document.documentElement,t.scrollIntoView({behavior:"smooth"})}openSharedGalleryDialog(){this.dialogService.openDefaultDialog($).afterClosed().pipe(d(this.destroyRef)).subscribe({next:t=>{t&&this.galleriesStore.loadSharedByMe()}})}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=F({type:e,selectors:[["mpix-gallery-listing-footer"]],inputs:{scrollToTarget:[1,"scrollToTarget"]},decls:3,vars:2,consts:[["menuTrigger",""],["optionsMenu","matMenu"],["mpixSticky","",1,"gallery-listing-footer"],[3,"pagination"],[1,"gallery-listing-footer-wrapper"],[3,"changePage","pagination"],["type","button","mat-flat-button","","color","primary","mpixFullstory","listing-mobile-create-gallery-btn","mpixFullstoryArea","gallery",1,"btn-create-gallery",3,"click"],["type","button","mat-flat-button","","color","basic","mpixFullstory","mobile-more-options-button","mpixFullstoryArea","gallery","mpixTooltip","More Options",1,"btn-options","gallery-flat-button",3,"matMenuTriggerFor"],[3,"icon"],["yPosition","above","backdropClass","standard-dialog-backdrop",1,"mobile-footer-menu"],["color","basic","mat-menu-item","","mpixFullstory","mobile-share-gallery-btn","mpixFullstoryArea","gallery",3,"click"]],template:function(i,o){i&1&&(n(0,"div",2),f(1,oe,1,1,"mpix-pagination",3),f(2,ne,11,3,"div",4),r()),i&2&&(a(),h(o.galleriesStore.isPaging(
1)?1:-1),a(),h(o.breakpointService.isMobile()?2:-1))},dependencies:[D,L,T,k,P,Q,H,B,ft,ht,Ct,bt,_t,xt,X],styles:[".gallery-listing-footer[_ngcontent-%COMP%]{position:sticky;bottom:-1px;left:0;margin-top:.5rem;display:flex;min-height:fit-content;width:100%;flex-direction:column;gap:.5rem;border-top-width:2px;--tw-border-opacity: 1;border-color:rgb(249 250 251 / var(--tw-border-opacity));--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity));padding:1.25rem .5rem;transition-property:none}.gallery-listing-footer[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{width:100%}.gallery-listing-footer.stuck[_ngcontent-%COMP%]{left:0;right:0;z-index:50}.gallery-listing-footer[_ngcontent-%COMP%]:empty{display:none} .mobile-footer-menu{margin-bottom:1.25rem!important;width:100vw!important;max-width:none!important;border-radius:0%!important;--tw-bg-opacity: 1 !important;background-color:rgb(242 235 235 / var(--tw-bg-opacity))!important;--tw-shadow: 0 0 #0000 !important;--tw-shadow-colored: 0 0 #0000 !important;box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-sha
1dow)!important}.gallery-listing-footer-wrapper[_ngcontent-%COMP%]{display:flex;flex-direction:row;column-gap:.625rem}.gallery-listing-footer-wrapper[_ngcontent-%COMP%] .btn-create-gallery[_ngcontent-%COMP%]{width:100%;flex-grow:1}.gallery-listing-footer-wrapper[_ngcontent-%COMP%] .btn-options[_ngcontent-%COMP%]{width:auto;min-width:unset;flex:0 1 auto}"],changeDetection:0})}}return e})();function re(e,p){e&1&&C(0,"mpix-loader")}function ae(e,p){e&1&&(n(0,"div",2),C(1,"mpix-loader"),r())}function le(e,p){if(e&1&&(n(0,"div",null,0)(2,"div",1),f(3,ae,2,0,"div",2),C(4,"mpix-gallery-listing-action-bar")(5,"mpix-gallery-listing-customer-grid",3),r(),C(6,"mpix-gallery-listing-footer",4),r()),e&2){let t=Y(1),i=l();a(3),h(i.galleriesStore.isPartialLoading()?3:-1),a(2),c("galleries",i.galleriesStore.galleries()),a(),c("scrollToTarget",t)}}function se(e,p){if(e&1){let t=b();n(0,"mpix-gallery-empty")(1,"h1",5),m(2,"No galleries found."),r(),n(3,"p",6),m(4,"Create your first gallery to get started."),r(),n(5,"div",7)(6,"mat-form-field",8)(7,"mat-label"),m(8,"Gallery Name"),r(),n(9,"input",9),I("ngModelChange",function(o){u(t);let g=l();return R(g.name,o)||(g.name=o),y(o)}),r()(),n(10,"button",10),_("click",function(){u(t);let o=l();return y(o.createGallery())}),m(11,"Add Photo Gallery"),r()()()}if(e&2){let t=l();a(9),V("ngModel",t.name)}}var It=(()=>{class e{constructor(){this.dialogService=s(A),this.router=s(G),this.destroyRef=s(w),this.galleriesStore=s(E),this.galleryStore=s(vt),this.name=at(""),this.loading=v(()=>this.galleriesStore.isInitialLoading()||this.galleriesStore.isPartialLoading()),this.faTrash=Rt.faTrash,this.faArrowDownToLine=Ot.faArrowDownToLine,this.faLink=Vt.faLink}ngOnInit(){this.galleriesStore.initLoad().pipe(d(this.destroyRef)).subscribe()}createGallery(){this.name()&&(this.addGallery(this.name()),this.name.set(""))}addGallery(t){this.galleriesStore.addGallery({name:t}).subscribe({next:i=>{this.dialogService.openPhotoUploader(i.data.id).afterClosed().pipe(d(this.destroyRef)).subscribe({next:()=>{this.router.navigate(["/my-photos/gallery",i.data.id]).catch(o=>{console.error(o)})}})}})}openNewGalleryDialog(){this.dialogService.openDefaultDialog(O).afterClosed().pipe(j(t=>!!t),M(t=>this.galleriesStore.addGallery({name:t}).pipe(W(i=>i.data.id),M(i=>this.dialogService.openPhotoUploader(i).afterClosed().pipe(z(()=>{this.router.navigate(["/my-photos/gallery",i]).catch(o=>console.error("Navigation error:",o))}))),U(i=>(console.error("Error creating gallery or uploading photos:",i),N)))),d(this.destroyRef)).subscribe()}static{this.\u0275fac=function(i){return new(i||e)}}static{this.\u0275cmp=F({type:e,selectors:[["mpix-gallery-listing"]],decls:3,vars:1,consts:[["target",""],[1,"gallery-listing-content"],[1,"loading-overlay"],[3,"galleries"],[3,"scrollToTarget"],["ngProjectAs","empty-title",5,["empty-title"]],["ngProjectAs","empty-body",5,["empty-body"]],["ngProjectAs","empty-actions",5,["empty-actions"],1,"empty-actions"],["floatLabel","always","appearance","outline",1,"hide-bottom","inline","basic-button-border"],["title","Gallery Name","matInput","","cdkFocusInitial","","required","",3,"ngModelChange","ngModel"],["type","button","mat-flat-button","","color","primary","mat-button","","mpixFullstory","new-user-create-gallery-btn","mpixFullstoryArea","gallery",3,"click"]],template:function(i,o){i&1&&f(0,re,1,0,"mpix-loader")(1,le,7,3,"div")(2,se,12,1,"mpix-gallery-empty"),i&2&&h(o.galleriesStore.isInitialLoading()?0:o.galleriesStore.hasGalleries()?1:2)},dependencies:[St,Mt,D,L,T,mt,ct,dt,pt,k,yt,K,J,P,B,Ft,kt,At],styles:["mpix-chat-launcher{bottom:9rem!important}@media(min-width:768px){ mpix-chat-launcher{bottom:1rem!important}}.empty-actions[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:.75rem}@media(min-width:768px){.empty-actions[_ngcontent-%COMP%]{flex-direction:row}}.btn-filters-label[_ngcontent-%COMP%]{text-transform:none}.loading-overlay[_ngcontent-%COMP%]{position:absolute;inset:0;display:flex;align-items:center;justify-content:center;background-color:#ffffff80;z-index:1}.gallery-listing-content[_ngcontent-%COMP%]{position:relative}"],changeDetection:0})}}return e})();var ui=[{path:"",component:It}];export{It as GalleryListingComponent,ui as galleryListingRoutes};
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.