@rero/sonar-ui
Version:
User interface for SONAR.
1 lines • 95.1 kB
JavaScript
import{a as Vt}from"./chunk-CPEDLTDA.js";import{a as vt,b as Vi}from"./chunk-OCFEN5PB.js";import{a as bt,b as yt}from"./chunk-NJM2TU2O.js";import{a as Ni}from"./chunk-ECUWCT3K.js";import{a as Li}from"./chunk-5VFGEJYA.js";import{a as De}from"./chunk-LUYCTK2V.js";import{a as xt}from"./chunk-UFXOWVKU.js";import{$a as Ge,$b as rt,$c as di,$e as Ae,A as Yt,Aa as I,Ab as ve,Ad as gi,B as je,Ba as p,Bb as ei,Bd as Ci,Be as ht,Ca as Xe,Cb as ti,Cd as vi,D as oe,Da as ke,Db as ii,Ea as We,Eb as xe,Ed as xi,F as Qt,Fa as Ke,Fb as et,Fc as ri,G as w,Ga as z,Gc as li,H as F,Ha as $,Hc as ye,Hd as bi,He as ki,I as k,Ic as st,J as Be,Jb as tt,Kb as it,Kc as ct,Kd as me,La as J,Lb as nt,Le as gt,M as Xt,Mc as pt,Me as Se,N as fe,Na as ge,Nb as pe,Nc as dt,O as U,Oa as M,P as he,Pa as x,Pc as ie,Q as Fe,Qa as B,Qc as mt,Qe as Ct,R as Wt,Ra as T,T as Kt,Tb as ni,Te as Mi,U as G,Ua as Me,V as O,Va as Ee,Ve as Ei,W as Ue,Wa as Pe,Wb as ot,We as Pi,X as l,Xa as se,Xd as Te,Ya as Ce,Yc as si,Ye as Lt,Z as Ft,Za as ce,Zb as at,Zc as ci,_ as R,_b as X,_c as pi,_e as Ne,a as Oe,aa as le,ab as Z,ac as W,af as Ai,b as Re,ba as He,bb as H,be as ft,c as u,ca as qe,ce as Ve,d as ze,da as y,de as yi,e as Ot,ee as Pt,f as Rt,fa as Q,h as ee,hd as ut,ia as f,id as we,j as K,ja as h,jb as g,jd as mi,k as zt,ka as A,kb as v,la as Gt,lb as ae,m as $t,ma as E,mb as Le,na as P,nc as re,oa as c,ob as te,oc as de,pa as d,pc as be,pd as _t,qa as m,qb as Jt,qc as Mt,qe as wi,ra as b,rb as V,sb as Zt,sc as oi,tb as D,tc as ai,td as ui,te as Ti,u as jt,ue as Si,v as Ut,va as Ye,vd as _i,ve as Di,wa as Qe,wb as kt,wc as Et,wd as fi,we as Ii,x as Ht,xa as q,xc as lt,xe as Bi,y as qt,ya as L,yb as Je,ye as Fi,z as $e,zb as Ze,zd as hi}from"./chunk-OW4VQFLY.js";function cn(e,n){if(e&1&&(d(0,"a",8),q(1,10),m()),e&2){let t=p(3),a=J(4);c("routerLink",t.link()),l(),c("ngTemplateOutlet",a)}}function pn(e,n){if(e&1&&(d(0,"a",9),q(1,10),m()),e&2){let t=p(3),a=J(4);c("href",t.link(),O),l(),c("ngTemplateOutlet",a)}}function dn(e,n){if(e&1&&f(0,cn,2,2,"a",8)(1,pn,2,2,"a",9),e&2){let t=p(2);h(t.inRouter()?0:1)}}function mn(e,n){if(e&1&&(d(0,"a",11),q(1,10),m()),e&2){let t=p(3),a=J(4);c("href",t.file().links.external,O),l(),c("ngTemplateOutlet",a)}}function un(e,n){if(e&1){let t=L();d(0,"div",13),I("click",function(i){F(t);let o=p(4);return o.preview(o.file()),k(i.preventDefault())})("keyup.enter",function(i){F(t);let o=p(4);return o.preview(o.file()),k(i.preventDefault())}),q(1,10),m()}if(e&2){p(4);let t=J(4);l(),c("ngTemplateOutlet",t)}}function _n(e,n){if(e&1&&(d(0,"a",14),q(1,10),m()),e&2){let t=p(5),a=J(4);c("href",t.file().links.download,O),l(),c("ngTemplateOutlet",a)}}function fn(e,n){if(e&1&&q(0,10),e&2){p(5);let t=J(4);c("ngTemplateOutlet",t)}}function hn(e,n){if(e&1&&f(0,_n,2,2,"a",14)(1,fn,1,1,"ng-container",10),e&2){let t=p(4);h(t.showDownload()&&t.file().links.download?0:1)}}function gn(e,n){if(e&1&&f(0,un,2,1,"div",12)(1,hn,2,1),e&2){let t=p(3);h(t.showPreview()&&t.file().links.preview?0:1)}}function Cn(e,n){if(e&1&&f(0,mn,2,2,"a",11)(1,gn,2,1),e&2){let t=p(2);h(t.showExternalLink()&&t.file().links.external?0:1)}}function vn(e,n){if(e&1&&(d(0,"div",3)(1,"p-tag",15),x(2),g(3,"translate"),b(4,"br"),x(5),m()()),e&2){let t=p(2);l(2),T(" ",v(3,2,"Public access from")),l(3),T("",t.file().restriction.date," ")}}function xn(e,n){if(e&1&&(d(0,"a",5),b(1,"i",16),m()),e&2){let t=p(2);c("href",t.file().links.external,O)}}function bn(e,n){if(e&1){let t=L();d(0,"p-button",17),I("onClick",function(){F(t);let i=p(2);return k(i.preview(i.file()))}),m()}}function yn(e,n){if(e&1&&b(0,"a",7),e&2){let t=p(2);c("href",t.file().links.download,O)}}function wn(e,n){if(e&1&&(f(0,dn,2,1)(1,Cn,2,1),f(2,vn,6,4,"div",3),d(3,"div",4),f(4,xn,2,1,"a",5),f(5,bn,1,0,"p-button",6),f(6,yn,1,1,"a",7),m()),e&2){let t,a=p();h(a.link()?0:1),l(2),h(!((t=a.file())==null||t.restriction==null)&&t.restriction.restricted&&(!((t=a.file())==null||t.restriction==null)&&t.restriction.date)?2:-1),l(2),h(a.showExternalLink()&&a.file().links.external?4:-1),l(),h(a.showPreview()&&a.file().links.preview?5:-1),l(),h(a.showDownload()&&a.file().links.download?6:-1)}}function Tn(e,n){e&1&&(b(0,"img",2),g(1,"translate")),e&2&&c("alt",v(1,1,"No image"))}function Sn(e,n){if(e&1&&b(0,"img",18),e&2){let t=p();c("src",t.file().thumbnail,O)("alt",t.file().label)}}var wt=(()=>{let n=class n{constructor(){this.file=D.required(),this.showPreview=D(!0),this.showDownload=D(!0),this.showExternalLink=D(!0),this.showStatistics=D(!0),this.statistics=D(),this.link=D(),this.inRouter=D(!1),this.previewClicked=Zt()}preview(a){this.previewClicked.emit(a)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=R({type:n,selectors:[["sonar-document-file"]],inputs:{file:[1,"file"],showPreview:[1,"showPreview"],showDownload:[1,"showDownload"],showExternalLink:[1,"showExternalLink"],showStatistics:[1,"showStatistics"],statistics:[1,"statistics"],link:[1,"link"],inRouter:[1,"inRouter"]},outputs:{previewClicked:"previewClicked"},decls:5,vars:1,consts:[["thumbnail",""],[1,"ui:text-center"],["src","/static/images/no-image.png",1,"ui:max-w-full","ui:h-auto","ui:inline",3,"alt"],[1,"ui:mt-2"],[1,"ui:flex","ui:gap-1","ui:justify-center"],["pButton","","text","","target","_blank",3,"href"],["variant","text","icon","fa fa-eye"],["pButton","","text","","icon","fa fa-download","download","",3,"href"],[3,"routerLink"],[3,"href"],[3,"ngTemplateOutlet"],["target","_blank",3,"href"],["tabindex","0",1,"ui:hover:cursor-pointer"],["tabindex","0",1,"ui:hover:cursor-pointer",3,"click","keyup.enter"],["download","",3,"href"],["severity","secondary"],[1,"fa","fa-external-link"],["variant","text","icon","fa fa-eye",3,"onClick"],[1,"ui:max-w-full","ui:h-auto","ui:inline",3,"src","alt"]],template:function(i,o){i&1&&(d(0,"div",1),f(1,wn,7,5)(2,Tn,2,3,"img",2),m(),y(3,Sn,1,2,"ng-template",null,0,te)),i&2&&(l(),h(o.file()?1:2))},dependencies:[me,xe,De,ut,we,W],encapsulation:2,changeDetection:0});let e=n;return e})();var Tt=(()=>{let n=class n{faClassForMimeType(a){if(a==null)return"fa-file-o";switch(!0){case a.startsWith("image/"):return"fa-file-image-o";case a.startsWith("audio/"):return"fa-file-audio-o";case a.startsWith("text/"):return"fa-file-text-o";case a.startsWith("video/"):return"fa-file-video-o";case a.startsWith("application/vnd.openxmlformats-officedocument.presentationml"):return"fa-file-powerpoint-o";case a.startsWith("application/vnd.openxmlformats-officedocument.wordprocessingml"):return"fa-file-word-o";case a.startsWith("application/vnd.openxmlformats-officedocument.spreadsheetml"):return"fa-file-excel-o";case a.startsWith("application/pdf"):return"fa-file-pdf-o"}return"fa-file-o"}faClassForContribution(a){switch(a){case"bf:Meeting":return"fa-users";case"bf:Organization":return"fa-building";case"bf:Person":return"fa-user";default:return"fa-circle"}}transform(a,i){switch(i){case"file":return this.faClassForMimeType(a);case"contribution":return this.faClassForContribution(a)}return null}};n.\u0275fac=function(i){return new(i||n)},n.\u0275pipe=le({name:"faIconClass",type:n,pure:!0});let e=n;return e})();var Dn=e=>({q:e,page:1,size:10});function In(e,n){if(e&1&&(b(0,"i",0),g(1,"faIconClass")),e&2){let t=p();c("ngClass",ae(1,1,t.contributor().agent.type,"contribution"))}}function Bn(e,n){if(e&1&&(d(0,"span",2),x(1),g(2,"translate"),m()),e&2){let t=p();l(),T("(",v(2,1,"contribution_role_"+t.contributor().role[0]),")")}}function Fn(e,n){if(e&1&&x(0),e&2){let t=p();T(" (",t.meetingInfo(),")\n")}}function kn(e,n){if(e&1&&b(0,"sonar-record-identifier",3),e&2){let t=p();c("data",t.contributor().agent.identifiedBy)}}function Mn(e,n){if(e&1&&(d(0,"span",4),g(1,"join"),x(2),m()),e&2){let t=p(2);c("pTooltip",ae(1,2,t.contributor().controlledAffiliation," ; ")),l(2),B(t.contributor().affiliation)}}function En(e,n){if(e&1&&(d(0,"span",5),x(1),m()),e&2){let t=p(2);l(),B(t.contributor().affiliation)}}function Pn(e,n){if(e&1&&f(0,Mn,3,5,"span",4)(1,En,2,1,"span",5),e&2){let t=p();h(t.contributor().controlledAffiliation?0:1)}}var Ln=["number","date","place"],St=(()=>{let n=class n{constructor(){this.contributor=D.required(),this.view=D(),this.viewType=D("brief"),this.route=V(()=>this.view()?["/",this.view(),"search","documents"]:["/records","documents"]),this.meetingInfo=V(()=>{let{agent:a}=this.contributor(),i=Ln.filter(o=>a[o]!=null).map(o=>a[o]);return i.length>0?i.join(" : "):null})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=R({type:n,selectors:[["sonar-contribution"]],inputs:{contributor:[1,"contributor"],view:[1,"view"],viewType:[1,"viewType"]},decls:7,vars:10,consts:[[1,"fa","ui:mr-2",3,"ngClass"],[1,"ui:mr-1",3,"routerLink","queryParams"],[1,"ui:mr-1"],["type","agent",1,"ui:mr-1",3,"data"],["tooltipPosition","top",1,"ui:text-muted-color","ui:text-sm","ui:italic",3,"pTooltip"],[1,"ui:text-muted-color","ui:text-sm","ui:italic"]],template:function(i,o){i&1&&(f(0,In,2,4,"i",0),d(1,"a",1),x(2),m(),f(3,Bn,3,3,"span",2),f(4,Fn,1,1),f(5,kn,1,1,"sonar-record-identifier",3),f(6,Pn,2,1)),i&2&&(h(o.viewType()==="detail"?0:-1),l(),c("routerLink",o.route())("queryParams",H(8,Dn,"contribution.agent.preferred_name:"+o.contributor().agent.preferred_name)),l(),B(o.contributor().agent.preferred_name),l(),h(o.contributor().agent.type==="bf:Person"&&o.contributor().role&&o.contributor().role[0]!=="cre"?3:-1),l(),h(o.contributor().agent.type==="bf:Meeting"&&o.meetingInfo()?4:-1),l(),h(o.contributor().agent.identifiedBy?5:-1),l(),h(o.viewType()==="detail"&&o.contributor().affiliation?6:-1))},dependencies:[ve,me,bt,Te,W,yt,Tt],encapsulation:2,changeDetection:0});let e=n;return e})();var Dt=(()=>{let n=class n{constructor(){this.SORT_CONTRIBUTOR_PRIORITY=["cre","ctb","dgs","edt","prt"]}transform(a,i=!1){return a?(a=a.filter(o=>i?o.agent.type==="bf:Meeting":o.agent.type!=="bf:Meeting"),a.sort((o,r)=>{let s=this.SORT_CONTRIBUTOR_PRIORITY.findIndex(C=>o.role[0]===C),_=this.SORT_CONTRIBUTOR_PRIORITY.findIndex(C=>r.role[0]===C);return s===_?0:s<_?-1:1})):[]}};n.\u0275fac=function(i){return new(i||n)},n.\u0275pipe=le({name:"contributors",type:n,pure:!0});let e=n;return e})();function Vn(e,n){if(e&1&&(d(0,"li"),b(1,"sonar-contribution",3),m()),e&2){let t=n.$implicit;l(),c("contributor",t)}}function Nn(e,n){if(e&1){let t=L();d(0,"a",4),I("click",function(i){F(t);let o=p(3);return k(o.showMoreContributors(i))}),x(1),g(2,"translate"),m()}e&2&&(l(),T(" ",v(2,1,"Show more"),"\u2026 "))}function An(e,n){if(e&1&&(d(0,"ul",1),E(1,Vn,2,1,"li",null,A),g(3,"slice"),m(),f(4,Nn,3,3,"a",2)),e&2){let t=p(2),a=ce(0);l(),P(Le(3,1,a,0,t.contributorsLength())),l(3),h(t.showMore()&&a.length>t.contributorsLength()?4:-1)}}function On(e,n){if(e&1&&(d(0,"li"),b(1,"sonar-contribution",3),m()),e&2){let t=n.$implicit;l(),c("contributor",t)}}function Rn(e,n){if(e&1&&(d(0,"dl",0)(1,"dt",5),x(2,"Conference"),m(),d(3,"dd")(4,"ul",1),E(5,On,2,1,"li",null,A),g(7,"slice"),m()()()),e&2){let t=p(2),a=ce(0);l(5),P(Le(7,0,a,0,t.contributorsLength()))}}function zn(e,n){if(e&1&&f(0,An,5,5)(1,Rn,8,4,"dl",0),e&2){let t=p();h(t.additionalInfosFields()?1:0)}}var Oi=(()=>{let n=class n{constructor(){this.contributions=D.required(),this.meeting=D(!1),this.additionalInfosFields=D(!1),this.showMore=U(!0),this.contributorsLength=V(()=>!this.showMore()||this.meeting()?this.contributions().length:5)}showMoreContributors(a){a.preventDefault(),this.showMore.set(!1)}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=R({type:n,selectors:[["sonar-contributions"]],inputs:{contributions:[1,"contributions"],meeting:[1,"meeting"],additionalInfosFields:[1,"additionalInfosFields"]},decls:3,vars:5,consts:[[1,"metadata"],[1,"ui:list-none"],["href","#"],["viewType","detail",3,"contributor"],["href","#",3,"click"],["translate",""]],template:function(i,o){if(i&1&&(se(0),g(1,"contributors"),f(2,zn,2,1)),i&2){let r=Ce(ae(1,1,o.contributions(),o.meeting()));l(2),h(r.length>0?2:-1)}},dependencies:[St,rt,it,W,Dt],encapsulation:2,changeDetection:0});let e=n;return e})();var Ri="\n .p-scrollpanel-content-container {\n overflow: hidden;\n width: 100%;\n height: 100%;\n position: relative;\n z-index: 1;\n float: left;\n }\n\n .p-scrollpanel-content {\n height: calc(100% + calc(2 * dt('scrollpanel.bar.size')));\n width: calc(100% + calc(2 * dt('scrollpanel.bar.size')));\n padding-inline: 0 calc(2 * dt('scrollpanel.bar.size'));\n padding-block: 0 calc(2 * dt('scrollpanel.bar.size'));\n position: relative;\n overflow: auto;\n box-sizing: border-box;\n scrollbar-width: none;\n }\n\n .p-scrollpanel-content::-webkit-scrollbar {\n display: none;\n }\n\n .p-scrollpanel-bar {\n position: relative;\n border-radius: dt('scrollpanel.bar.border.radius');\n z-index: 2;\n cursor: pointer;\n opacity: 0;\n outline-color: transparent;\n background: dt('scrollpanel.bar.background');\n border: 0 none;\n transition:\n outline-color dt('scrollpanel.transition.duration'),\n opacity dt('scrollpanel.transition.duration');\n }\n\n .p-scrollpanel-bar:focus-visible {\n box-shadow: dt('scrollpanel.bar.focus.ring.shadow');\n outline: dt('scrollpanel.barfocus.ring.width') dt('scrollpanel.bar.focus.ring.style') dt('scrollpanel.bar.focus.ring.color');\n outline-offset: dt('scrollpanel.barfocus.ring.offset');\n }\n\n .p-scrollpanel-bar-y {\n width: dt('scrollpanel.bar.size');\n inset-block-start: 0;\n }\n\n .p-scrollpanel-bar-x {\n height: dt('scrollpanel.bar.size');\n inset-block-end: 0;\n }\n\n .p-scrollpanel-hidden {\n visibility: hidden;\n }\n\n .p-scrollpanel:hover .p-scrollpanel-bar,\n .p-scrollpanel:active .p-scrollpanel-bar {\n opacity: 1;\n }\n\n .p-scrollpanel-grabbed {\n user-select: none;\n }\n";var zi=["content"],qn=["xBar"],Yn=["yBar"],Qn=["*"];function Xn(e,n){e&1&&ke(0)}function Wn(e,n){e&1&&q(0)}var Kn="\n ".concat(Ri,"\n\n .p-scrollpanel {\n display: block;\n }\n"),Gn={root:"p-scrollpanel p-component",contentContainer:"p-scrollpanel-content-container",content:"p-scrollpanel-content",barX:"p-scrollpanel-bar p-scrollpanel-bar-x",barY:"p-scrollpanel-bar p-scrollpanel-bar-y"},$i=(()=>{let n=class n extends ct{constructor(){super(...arguments);u(this,"name","scrollpanel");u(this,"style",Kn);u(this,"classes",Gn)}};u(n,"\u0275fac",(()=>{let i;return function(r){return(i||(i=Fe(n)))(r||n)}})()),u(n,"\u0275prov",oe({token:n,factory:n.\u0275fac}));let e=n;return e})();var ji=new Qt("SCROLLPANEL_INSTANCE"),Ui=(()=>{var n;let t=class t extends dt{constructor(){super(...arguments);u(this,"componentName","ScrollPanel");u(this,"$pcScrollPanel",(n=w(ji,{optional:!0,skipSelf:!0}))!=null?n:void 0);u(this,"bindDirectiveInstance",w(ie,{self:!0}));u(this,"styleClass");u(this,"step",5);u(this,"contentViewChild");u(this,"xBarViewChild");u(this,"yBarViewChild");u(this,"contentTemplate");u(this,"templates");u(this,"_contentTemplate");u(this,"scrollYRatio");u(this,"scrollXRatio");u(this,"timeoutFrame",o=>setTimeout(o,0));u(this,"initialized",!1);u(this,"lastPageY");u(this,"lastPageX");u(this,"isXBarClicked",!1);u(this,"isYBarClicked",!1);u(this,"lastScrollLeft",0);u(this,"lastScrollTop",0);u(this,"orientation","vertical");u(this,"timer");u(this,"contentId");u(this,"windowResizeListener");u(this,"contentScrollListener");u(this,"mouseEnterListener");u(this,"xBarMouseDownListener");u(this,"yBarMouseDownListener");u(this,"documentMouseMoveListener");u(this,"documentMouseUpListener");u(this,"_componentStyle",w($i));u(this,"zone",w(fe))}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptms(["host","root"]))}onInit(){this.contentId=lt("pn_id_")+"_content"}onAfterViewInit(){pe(this.platformId)&&this.zone.runOutsideAngular(()=>{this.moveBar(),this.moveBar=this.moveBar.bind(this),this.onXBarMouseDown=this.onXBarMouseDown.bind(this),this.onYBarMouseDown=this.onYBarMouseDown.bind(this),this.onDocumentMouseMove=this.onDocumentMouseMove.bind(this),this.onDocumentMouseUp=this.onDocumentMouseUp.bind(this),this.windowResizeListener=this.renderer.listen(window,"resize",this.moveBar),this.contentScrollListener=this.renderer.listen(this.contentViewChild.nativeElement,"scroll",this.moveBar),this.mouseEnterListener=this.renderer.listen(this.contentViewChild.nativeElement,"mouseenter",this.moveBar),this.xBarMouseDownListener=this.renderer.listen(this.xBarViewChild.nativeElement,"mousedown",this.onXBarMouseDown),this.yBarMouseDownListener=this.renderer.listen(this.yBarViewChild.nativeElement,"mousedown",this.onYBarMouseDown),this.calculateContainerHeight(),this.initialized=!0})}onAfterContentInit(){this.templates.forEach(o=>{o.getType()==="content"?this._contentTemplate=o.template:this._contentTemplate=o.template})}calculateContainerHeight(){let o=this.el.nativeElement,r=this.contentViewChild.nativeElement,s=this.xBarViewChild.nativeElement,_=this.document.defaultView,C=_.getComputedStyle(o),S=_.getComputedStyle(s),N=ai(o)-parseInt(S.height,10);C["max-height"]!="none"&&N==0&&(r.offsetHeight+parseInt(S.height,10)>parseInt(C["max-height"],10)?o.style.height=C["max-height"]:o.style.height=r.offsetHeight+parseFloat(C.paddingTop)+parseFloat(C.paddingBottom)+parseFloat(C.borderTopWidth)+parseFloat(C.borderBottomWidth)+"px")}moveBar(){let o=this.el.nativeElement,r=this.contentViewChild.nativeElement,s=this.xBarViewChild.nativeElement,_=r.scrollWidth,C=r.clientWidth,S=(o.clientHeight-s.clientHeight)*-1;this.scrollXRatio=C/_;let N=this.yBarViewChild.nativeElement,j=r.scrollHeight,ne=r.clientHeight,sn=(o.clientWidth-N.clientWidth)*-1;this.scrollYRatio=ne/j,this.requestAnimationFrame(()=>{if(this.scrollXRatio>=1)s.setAttribute("data-p-scrollpanel-hidden","true"),!this.$unstyled()&&re(s,"p-scrollpanel-hidden");else{s.setAttribute("data-p-scrollpanel-hidden","false"),!this.$unstyled()&&de(s,"p-scrollpanel-hidden");let Ie=Math.max(this.scrollXRatio*100,10),Bt=Math.abs(r.scrollLeft*(100-Ie)/(_-C));s.style.cssText="width:"+Ie+"%; inset-inline-start:"+Bt+"%;bottom:"+S+"px;"}if(this.scrollYRatio>=1)N.setAttribute("data-p-scrollpanel-hidden","true"),!this.$unstyled()&&re(N,"p-scrollpanel-hidden");else{N.setAttribute("data-p-scrollpanel-hidden","false"),!this.$unstyled()&&de(N,"p-scrollpanel-hidden");let Ie=Math.max(this.scrollYRatio*100,10),Bt=r.scrollTop*(100-Ie)/(j-ne);N.style.cssText="height:"+Ie+"%; top: calc("+Bt+"% - "+s.clientHeight+"px); inset-inline-end:"+sn+"px;"}}),this.cd.markForCheck()}onScroll(o){this.lastScrollLeft!==o.target.scrollLeft?(this.lastScrollLeft=o.target.scrollLeft,this.orientation="horizontal"):this.lastScrollTop!==o.target.scrollTop&&(this.lastScrollTop=o.target.scrollTop,this.orientation="vertical"),this.moveBar()}onKeyDown(o){if(this.orientation==="vertical")switch(o.code){case"ArrowDown":{this.setTimer("scrollTop",this.step),o.preventDefault();break}case"ArrowUp":{this.setTimer("scrollTop",this.step*-1),o.preventDefault();break}case"ArrowLeft":case"ArrowRight":{o.preventDefault();break}default:break}else if(this.orientation==="horizontal")switch(o.code){case"ArrowRight":{this.setTimer("scrollLeft",this.step),o.preventDefault();break}case"ArrowLeft":{this.setTimer("scrollLeft",this.step*-1),o.preventDefault();break}case"ArrowDown":case"ArrowUp":{o.preventDefault();break}default:break}}onKeyUp(){this.clearTimer()}repeat(o,r){var s;(s=this.contentViewChild)!=null&&s.nativeElement&&(this.contentViewChild.nativeElement[o]+=r),this.moveBar()}setTimer(o,r){this.clearTimer(),this.timer=setTimeout(()=>{this.repeat(o,r)},40)}clearTimer(){this.timer&&clearTimeout(this.timer)}bindDocumentMouseListeners(){this.documentMouseMoveListener||(this.documentMouseMoveListener=o=>{this.onDocumentMouseMove(o)},this.document.addEventListener("mousemove",this.documentMouseMoveListener)),this.documentMouseUpListener||(this.documentMouseUpListener=o=>{this.onDocumentMouseUp(o)},this.document.addEventListener("mouseup",this.documentMouseUpListener))}unbindDocumentMouseListeners(){this.documentMouseMoveListener&&(this.document.removeEventListener("mousemove",this.documentMouseMoveListener),this.documentMouseMoveListener=null),this.documentMouseUpListener&&(document.removeEventListener("mouseup",this.documentMouseUpListener),this.documentMouseUpListener=null)}onYBarMouseDown(o){var r,s,_,C;this.isYBarClicked=!0,(s=(r=this.yBarViewChild)==null?void 0:r.nativeElement)==null||s.focus(),this.lastPageY=o.pageY,(C=(_=this.yBarViewChild)==null?void 0:_.nativeElement)==null||C.setAttribute("data-p-scrollpanel-grabbed","true"),!this.$unstyled()&&re(this.yBarViewChild.nativeElement,"p-scrollpanel-grabbed"),this.document.body.setAttribute("data-p-scrollpanel-grabbed","true"),!this.$unstyled()&&re(this.document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),o.preventDefault()}onXBarMouseDown(o){var r,s,_,C;this.isXBarClicked=!0,(s=(r=this.xBarViewChild)==null?void 0:r.nativeElement)==null||s.focus(),this.lastPageX=o.pageX,(C=(_=this.xBarViewChild)==null?void 0:_.nativeElement)==null||C.setAttribute("data-p-scrollpanel-grabbed","false"),!this.$unstyled()&&re(this.xBarViewChild.nativeElement,"p-scrollpanel-grabbed"),this.document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.$unstyled()&&re(this.document.body,"p-scrollpanel-grabbed"),this.bindDocumentMouseListeners(),o.preventDefault()}onDocumentMouseMove(o){this.isXBarClicked?this.onMouseMoveForXBar(o):this.isYBarClicked?this.onMouseMoveForYBar(o):(this.onMouseMoveForXBar(o),this.onMouseMoveForYBar(o))}onMouseMoveForXBar(o){let r=o.pageX-this.lastPageX;this.lastPageX=o.pageX,this.requestAnimationFrame(()=>{this.contentViewChild.nativeElement.scrollLeft+=r/this.scrollXRatio})}onMouseMoveForYBar(o){let r=o.pageY-this.lastPageY;this.lastPageY=o.pageY,this.requestAnimationFrame(()=>{this.contentViewChild.nativeElement.scrollTop+=r/this.scrollYRatio})}scrollTop(o){let r=this.contentViewChild.nativeElement.scrollHeight-this.contentViewChild.nativeElement.clientHeight;o=o>r?r:o>0?o:0,this.contentViewChild.nativeElement.scrollTop=o}onFocus(o){var r,s,_,C;(s=(r=this.xBarViewChild)==null?void 0:r.nativeElement)!=null&&s.isSameNode(o.target)?this.orientation="horizontal":(C=(_=this.yBarViewChild)==null?void 0:_.nativeElement)!=null&&C.isSameNode(o.target)&&(this.orientation="vertical")}onBlur(){this.orientation==="horizontal"&&(this.orientation="vertical")}onDocumentMouseUp(o){var r,s,_,C;(s=(r=this.yBarViewChild)==null?void 0:r.nativeElement)==null||s.setAttribute("data-p-scrollpanel-grabbed","false"),!this.$unstyled()&&de(this.yBarViewChild.nativeElement,"p-scrollpanel-grabbed"),(C=(_=this.xBarViewChild)==null?void 0:_.nativeElement)==null||C.setAttribute("data-p-scrollpanel-grabbed","false"),!this.$unstyled()&&de(this.xBarViewChild.nativeElement,"p-scrollpanel-grabbed"),this.document.body.setAttribute("data-p-scrollpanel-grabbed","false"),!this.$unstyled()&&de(this.document.body,"p-scrollpanel-grabbed"),this.unbindDocumentMouseListeners(),this.isXBarClicked=!1,this.isYBarClicked=!1}requestAnimationFrame(o){(window.requestAnimationFrame||this.timeoutFrame)(o)}unbindListeners(){this.windowResizeListener&&(this.windowResizeListener(),this.windowResizeListener=null),this.contentScrollListener&&(this.contentScrollListener(),this.contentScrollListener=null),this.mouseEnterListener&&(this.mouseEnterListener(),this.mouseEnterListener=null),this.xBarMouseDownListener&&(this.xBarMouseDownListener(),this.xBarMouseDownListener=null),this.yBarMouseDownListener&&(this.yBarMouseDownListener(),this.yBarMouseDownListener=null)}onDestroy(){this.initialized&&this.unbindListeners()}refresh(){this.moveBar()}};u(t,"\u0275fac",(()=>{let o;return function(s){return(o||(o=Fe(t)))(s||t)}})()),u(t,"\u0275cmp",R({type:t,selectors:[["p-scroll-panel"],["p-scrollPanel"],["p-scrollpanel"]],contentQueries:function(r,s,_){if(r&1&&We(_,zi,4)(_,ye,4),r&2){let C;z(C=$())&&(s.contentTemplate=C.first),z(C=$())&&(s.templates=C)}},viewQuery:function(r,s){if(r&1&&Ke(zi,5)(qn,5)(Yn,5),r&2){let _;z(_=$())&&(s.contentViewChild=_.first),z(_=$())&&(s.xBarViewChild=_.first),z(_=$())&&(s.yBarViewChild=_.first)}},hostVars:2,hostBindings:function(r,s){r&2&&M(s.cn(s.cx("root"),s.styleClass))},inputs:{styleClass:"styleClass",step:[2,"step","step",Ze]},features:[Ge([$i,{provide:ji,useExisting:t},{provide:pt,useExisting:t}]),He([ie]),qe],ngContentSelectors:Qn,decls:9,vars:22,consts:[["content",""],["xBar",""],["yBar",""],[3,"pBind"],[3,"mouseenter","scroll","pBind"],[4,"ngTemplateOutlet"],["tabindex","0","role","scrollbar",3,"mousedown","keydown","keyup","focus","blur","pBind"],["tabindex","0","role","scrollbar",3,"mousedown","keydown","keyup","focus","pBind"]],template:function(r,s){r&1&&(Xe(),d(0,"div",3)(1,"div",4,0),I("mouseenter",function(){return s.moveBar()})("scroll",function(C){return s.onScroll(C)}),f(3,Xn,1,0),y(4,Wn,1,0,"ng-container",5),m()(),d(5,"div",6,1),I("mousedown",function(C){return s.onXBarMouseDown(C)})("keydown",function(C){return s.onKeyDown(C)})("keyup",function(){return s.onKeyUp()})("focus",function(C){return s.onFocus(C)})("blur",function(){return s.onBlur()}),m(),d(7,"div",7,2),I("mousedown",function(C){return s.onYBarMouseDown(C)})("keydown",function(C){return s.onKeyDown(C)})("keyup",function(){return s.onKeyUp()})("focus",function(C){return s.onFocus(C)}),m()),r&2&&(M(s.cx("contentContainer")),c("pBind",s.ptm("contentContainer")),l(),M(s.cx("content")),c("pBind",s.ptm("content")),l(2),h(!s.contentTemplate&&!s._contentTemplate?3:-1),l(),c("ngTemplateOutlet",s.contentTemplate||s._contentTemplate),l(),M(s.cx("barX")),c("pBind",s.ptm("barX")),Q("aria-orientation","horizontal")("aria-valuenow",s.lastScrollLeft)("aria-controls",s.contentId)("data-pc-group-section","bar"),l(2),M(s.cx("barY")),c("pBind",s.ptm("barY")),Q("aria-orientation","vertical")("aria-valuenow",s.lastScrollTop)("aria-controls",s.contentId)("data-pc-group-section","bar"))},dependencies:[nt,xe,st,mt,ie],encapsulation:2,changeDetection:0}));let e=t;return e})();function Jn(e,n){if(e&1&&(d(0,"span",2),x(1),m()),e&2){let t=p().$implicit,a=ce(0);c("pTooltip",a),l(),B(t.label)}}function Zn(e,n){if(e&1&&x(0),e&2){p();let t=ce(0);T(" ",t," ")}}function eo(e,n){var t;if(e&1&&(se(0),d(1,"dt"),f(2,Jn,2,2,"span",2)(3,Zn,1,1),m(),d(4,"dd"),x(5),m()),e&2){let a=n.$implicit,i=p(),o=Ce(a.key);l(2),h(a.label?2:3),l(3),B((t=i["file-download"][o]==null?null:i["file-download"][o].count)!=null?t:0)}}function to(e,n){if(e&1&&(d(0,"dl",0)(1,"dt",1),x(2,"Document views"),m(),d(3,"dd"),x(4),m()(),b(5,"p-divider"),d(6,"h6",1),x(7,"File downloads"),m(),d(8,"dl",0),E(9,eo,6,3,null,null,A),m()),e&2){let t=p();l(4),B(n["record-view"].count),l(5),P(t.filteredFiles())}}var Hi=(()=>{let n=class n{constructor(){this.httpClient=w(ot),this.apiService=w(gt),this.record=D.required(),this.filteredFiles=D.required(),this.statistics=U(null),he(()=>this.loadStats())}loadStats(){let a=this.record(),i={"record-view":{stat:"record-view",params:{pid_value:a.pid,pid_type:"doc"}},"file-download":{stat:"file-download",params:{bucket_id:a._bucket}}};this.httpClient.post(this.apiService.getEndpointByType("stats",!0),i).subscribe(o=>{var _,C;let r={"record-view":{count:(_=o["record-view"].unique_count)!=null?_:0},"file-download":{}},s=(C=o["file-download"])==null?void 0:C.buckets;s==null||s.forEach(S=>{r["file-download"][S.key]={count:S.unique_count}}),this.statistics.set(r)})}};n.\u0275fac=function(i){return new(i||n)},n.\u0275cmp=R({type:n,selectors:[["sonar-stats-files"]],inputs:{record:[1,"record"],filteredFiles:[1,"filteredFiles"]},decls:1,vars:1,consts:[[1,"metadata"],["translate",""],["tooltipPosition","top",3,"pTooltip"]],template:function(i,o){if(i&1&&f(0,to,11,1),i&2){let r;h((r=o.statistics())?0:-1,r)}},dependencies:[rt,Ti,Te],encapsulation:2,changeDetection:0});let e=n;return e})();var qi=new Set,_e,Qi=(()=>{let n=class n{constructor(){u(this,"_platform",w(yi));u(this,"_nonce",w(Kt,{optional:!0}));u(this,"_matchMedia");this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):no}matchMedia(a){return(this._platform.WEBKIT||this._platform.BLINK)&&io(a,this._nonce),this._matchMedia(a)}};u(n,"\u0275fac",function(i){return new(i||n)}),u(n,"\u0275prov",oe({token:n,factory:n.\u0275fac,providedIn:"root"}));let e=n;return e})();function io(e,n){if(!qi.has(e))try{_e||(_e=document.createElement("style"),n&&_e.setAttribute("nonce",n),_e.setAttribute("type","text/css"),document.head.appendChild(_e)),_e.sheet&&(_e.sheet.insertRule("@media ".concat(e," {body{ }}"),0),qi.add(e))}catch(t){console.error(t)}}function no(e){return{matches:e==="all"||e==="",media:e,addListener:()=>{},removeListener:()=>{}}}var Nt=(()=>{let n=class n{constructor(){u(this,"_mediaMatcher",w(Qi));u(this,"_zone",w(fe));u(this,"_queries",new Map);u(this,"_destroySubject",new Rt)}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(a){return Yi(Pt(a)).some(o=>this._registerQuery(o).mql.matches)}observe(a){let o=Yi(Pt(a)).map(s=>this._registerQuery(s).observable),r=zt(o);return r=$t(r.pipe(Ut(1)),r.pipe(Ht(1),jt(0))),r.pipe(K(s=>{let _={matches:!1,breakpoints:{}};return s.forEach(({matches:C,query:S})=>{_.matches=_.matches||C,_.breakpoints[S]=C}),_}))}_registerQuery(a){if(this._queries.has(a))return this._queries.get(a);let i=this._mediaMatcher.matchMedia(a),r={observable:new Ot(s=>{let _=C=>this._zone.run(()=>s.next(C));return i.addListener(_),()=>{i.removeListener(_)}}).pipe(qt(i),K(({matches:s})=>({query:a,matches:s})),Yt(this._destroySubject)),mql:i};return this._queries.set(a,r),r}};u(n,"\u0275fac",function(i){return new(i||n)}),u(n,"\u0275prov",oe({token:n,factory:n.\u0275fac,providedIn:"root"}));let e=n;return e})();function Yi(e){return e.map(n=>n.split(",")).reduce((n,t)=>n.concat(t)).map(n=>n.trim())}var ue={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var Xi="\n .p-carousel {\n display: flex;\n flex-direction: column;\n }\n\n .p-carousel-content-container {\n display: flex;\n flex-direction: column;\n overflow: auto;\n }\n\n .p-carousel-content {\n display: flex;\n flex-direction: row;\n gap: dt('carousel.content.gap');\n }\n\n .p-carousel-content:dir(rtl) {\n flex-direction: row-reverse;\n }\n\n .p-carousel-viewport {\n overflow: hidden;\n width: 100%;\n }\n\n .p-carousel-item-list {\n display: flex;\n flex-direction: row;\n }\n\n .p-carousel-item-list:dir(rtl) {\n flex-direction: row-reverse;\n }\n\n .p-carousel-prev-button,\n .p-carousel-next-button {\n align-self: center;\n flex-shrink: 0;\n }\n\n .p-carousel-indicator-list {\n display: flex;\n flex-direction: row;\n justify-content: center;\n flex-wrap: wrap;\n padding: dt('carousel.indicator.list.padding');\n gap: dt('carousel.indicator.list.gap');\n margin: 0;\n list-style: none;\n }\n\n .p-carousel-indicator-button {\n display: flex;\n align-items: center;\n justify-content: center;\n background: dt('carousel.indicator.background');\n width: dt('carousel.indicator.width');\n height: dt('carousel.indicator.height');\n border: 0 none;\n transition:\n background dt('carousel.transition.duration'),\n color dt('carousel.transition.duration'),\n outline-color dt('carousel.transition.duration'),\n box-shadow dt('carousel.transition.duration');\n outline-color: transparent;\n border-radius: dt('carousel.indicator.border.radius');\n padding: 0;\n margin: 0;\n user-select: none;\n cursor: pointer;\n }\n\n .p-carousel-indicator-button:focus-visible {\n box-shadow: dt('carousel.indicator.focus.ring.shadow');\n outline: dt('carousel.indicator.focus.ring.width') dt('carousel.indicator.focus.ring.style') dt('carousel.indicator.focus.ring.color');\n outline-offset: dt('carousel.indicator.focus.ring.offset');\n }\n\n .p-carousel-indicator-button:hover {\n background: dt('carousel.indicator.hover.background');\n }\n\n .p-carousel-indicator-active .p-carousel-indicator-button {\n background: dt('carousel.indicator.active.background');\n }\n\n .p-carousel-vertical .p-carousel-content {\n flex-direction: column;\n }\n\n .p-carousel-vertical .p-carousel-item-list {\n flex-direction: column;\n height: 100%;\n }\n\n .p-items-hidden .p-carousel-item {\n visibility: hidden;\n }\n\n .p-items-hidden .p-carousel-item.p-carousel-item-active {\n visibility: visible;\n }\n";var oo=["item"],ao=["header"],ro=["footer"],lo=["previousicon"],so=["nexticon"],co=["itemsContainer"],po=["indicatorContent"],mo=[[["p-header"]],[["p-footer"]]],uo=["p-header","p-footer"],_o=e=>({height:e}),It=e=>({index:e}),At=e=>({$implicit:e});function fo(e,n){e&1&&q(0)}function ho(e,n){if(e&1&&(d(0,"div",5),ke(1),y(2,fo,1,0,"ng-container",13),m()),e&2){let t=p();M(t.cx("header")),c("pBind",t.ptm("header")),l(2),c("ngTemplateOutlet",t.headerTemplate)}}function go(e,n){e&1&&(Be(),b(0,"svg",18))}function Co(e,n){e&1&&(Be(),b(0,"svg",19))}function vo(e,n){if(e&1&&(Ye(0),y(1,go,1,0,"svg",16)(2,Co,1,0,"svg",17),Qe()),e&2){let t=p(3);l(),c("ngIf",!t.isVertical()),l(),c("ngIf",t.isVertical())}}function xo(e,n){}function bo(e,n){e&1&&y(0,xo,0,0,"ng-template")}function yo(e,n){if(e&1&&(Ye(0),y(1,bo,1,0,null,13),Qe()),e&2){let t=p(3);l(),c("ngTemplateOutlet",t.previousIconTemplate||t._previousIconTemplate)}}function wo(e,n){if(e&1&&y(0,vo,3,2,"ng-container",15)(1,yo,2,1,"ng-container",15),e&2){let t=p(2);c("ngIf",!t.previousIconTemplate&&!t._previousIconTemplate&&!(t.prevButtonProps!=null&&t.prevButtonProps.icon)),l(),c("ngIf",(t.previousIconTemplate||t._previousIconTemplate)&&!(t.prevButtonProps!=null&&t.prevButtonProps.icon))}}function To(e,n){if(e&1){let t=L();d(0,"p-button",14),I("click",function(i){F(t);let o=p();return k(o.navBackward(i))}),y(1,wo,2,2,"ng-template",null,1,te),m()}if(e&2){let t=p();M(t.cx("pcPrevButton")),c("text",!0)("buttonProps",t.prevButtonProps)("pt",t.ptm("pcPrevButton"))("unstyled",t.unstyled()),Q("aria-label",t.ariaPrevButtonLabel())}}function So(e,n){e&1&&q(0)}function Do(e,n){if(e&1&&(d(0,"div",5),y(1,So,1,0,"ng-container",20),m()),e&2){let t=n.$implicit,a=n.index,i=p();M(i.cx("itemClone",H(11,It,a))),c("pBind",i.ptm("itemClone")),Q("aria-hidden",i.totalShiftedItems*-1!==i.value.length)("aria-label",i.ariaSlideNumber(a))("aria-roledescription",i.ariaSlideLabel())("data-p-carousel-item-active",i.totalShiftedItems*-1===i.value.length+i._numVisible)("data-p-carousel-item-start",a===0)("data-p-carousel-item-end",i.clonedItemsForStarting&&i.clonedItemsForStarting.length-1===a),l(),c("ngTemplateOutlet",i.itemTemplate||i._itemTemplate)("ngTemplateOutletContext",H(13,At,t))}}function Io(e,n){e&1&&q(0)}function Bo(e,n){if(e&1&&(d(0,"div",21),y(1,Io,1,0,"ng-container",20),m()),e&2){let t=n.$implicit,a=n.index,i=p();M(i.cx("item",H(11,It,a))),c("pBind",i.getItemPTOptions("item",a)),Q("aria-hidden",!(i.firstIndex()<=a&&i.lastIndex()>=a))("aria-label",i.ariaSlideNumber(a))("aria-roledescription",i.ariaSlideLabel())("data-p-carousel-item-active",i.firstIndex()<=a&&i.lastIndex()>=a)("data-p-carousel-item-start",i.firstIndex()===a)("data-p-carousel-item-end",i.lastIndex()===a),l(),c("ngTemplateOutlet",i.itemTemplate||i._itemTemplate)("ngTemplateOutletContext",H(13,At,t))}}function Fo(e,n){e&1&&q(0)}function ko(e,n){if(e&1&&(d(0,"div",5),y(1,Fo,1,0,"ng-container",20),m()),e&2){let t=n.$implicit,a=n.index,i=p();M(i.cx("itemClone",H(8,It,a))),c("pBind",i.ptm("itemClone")),Q("data-p-carousel-item-active",!1)("data-p-carousel-item-start",!1)("data-p-carousel-item-end",!1),l(),c("ngTemplateOutlet",i.itemTemplate||i._itemTemplate)("ngTemplateOutletContext",H(10,At,t))}}function Mo(e,n){e&1&&(Be(),b(0,"svg",25))}function Eo(e,n){e&1&&(Be(),b(0,"svg",26))}function Po(e,n){if(e&1&&(Ye(0),y(1,Mo,1,0,"svg",23)(2,Eo,1,0,"svg",24),Qe()),e&2){let t=p(3);l(),c("ngIf",!t.isVertical()),l(),c("ngIf",t.isVertical())}}function Lo(e,n){}function Vo(e,n){e&1&&y(0,Lo,0,0,"ng-template")}function No(e,n){if(e&1&&(d(0,"span"),y(1,Vo,1,0,null,13),m()),e&2){let t=p(3);l(),c("ngTemplateOutlet",t.nextIconTemplate||t._nextIconTemplate)}}function Ao(e,n){if(e&1&&y(0,Po,3,2,"ng-container",15)(1,No,2,1,"span",15),e&2){let t=p(2);c("ngIf",!t.nextIconTemplate&&!t._nextIconTemplate&&!(t.nextButtonProps!=null&&t.nextButtonProps.icon)),l(),c("ngIf",t.nextIconTemplate||t._nextIconTemplate&&!(t.nextButtonProps!=null&&t.nextButtonProps.icon))}}function Oo(e,n){if(e&1){let t=L();d(0,"p-button",22),I("click",function(i){F(t);let o=p();return k(o.navForward(i))}),y(1,Ao,2,2,"ng-template",null,1,te),m()}if(e&2){let t=p();M(t.cx("pcNextButton")),c("buttonProps",t.nextButtonProps)("text",!0)("pt",t.ptm("pcNextButton"))("unstyled",t.unstyled()),Q("aria-label",t.ariaNextButtonLabel())}}function Ro(e,n){if(e&1){let t=L();d(0,"li",5)(1,"button",28),I("click",function(i){let o=F(t).index,r=p(2);return k(r.onDotClick(i,o))}),m()()}if(e&2){let t=n.index,a=p(2);M(a.cx("indicator",H(11,It,t))),c("pBind",a.getIndicatorPTOptions("indicator",t)),Q("data-p-active",a._page===t),l(),M(a.cx("indicatorButton")),c("ngStyle",a.indicatorStyle)("tabindex",a._page===t?0:-1)("pBind",a.getIndicatorPTOptions("indicatorButton",t)),Q("aria-label",a.ariaPageLabel(t+1))("aria-current",a._page===t?"page":void 0)}}function zo(e,n){if(e&1){let t=L();d(0,"ul",27,2),I("keydown",function(i){F(t);let o=p();return k(o.onIndicatorKeydown(i))}),y(2,Ro,2,13,"li",9),m()}if(e&2){let t=p();M(t.cx("indicatorList")),c("ngStyle",t.indicatorsContentStyle)("pBind",t.ptm("indicatorList")),l(2),c("ngForOf",t.totalDotsArray())}}function $o(e,n){e&1&&q(0)}function jo(e,n){if(e&1&&(d(0,"div",5),ke(1,1),y(2,$o,1,0,"ng-container",13),m()),e&2){let t=p();M(t.cx("footer")),c("pBind",t.ptm("footer")),l(2),c("ngTemplateOutlet",t.footerTemplate||t._footerTemplate)}}var Uo={root:({instance:e})=>["p-carousel p-component",{"p-carousel-vertical":e.isVertical(),"p-carousel-horizontal":!e.isVertical()}],header:"p-carousel-header",contentContainer:"p-carousel-content-container",content:"p-carousel-content",pcPrevButton:({instance:e})=>["p-carousel-prev-button",{"p-disabled":e.isBackwardNavDisabled()}],viewport:"p-carousel-viewport",itemList:"p-carousel-item-list",itemClone:({instance:e,index:n})=>["p-carousel-item p-carousel-item-clone",{"p-carousel-item-active":e.totalShiftedItems*-1===e.value.length,"p-carousel-item-start":n===0,"p-carousel-item-end":e.clonedItemsForStarting.length-1===n}],item:({instance:e,index:n})=>["p-carousel-item",{"p-carousel-item-active":e.firstIndex()<=n&&e.lastIndex()>=n,"p-carousel-item-start":e.firstIndex()===n,"p-carousel-item-end":e.lastIndex()===n}],pcNextButton:({instance:e})=>["p-carousel-next-button",{"p-disabled":e.isForwardNavDisabled()}],indicatorList:({instance:e})=>["p-carousel-indicator-list",e.indicatorsContentClass],indicator:({instance:e,index:n})=>["p-carousel-indicator",{"p-carousel-indicator-active":e._page===n}],indicatorButton:({instance:e})=>["p-carousel-indicator-button",e.indicatorStyleClass],footer:"p-carousel-footer"},Wi=(()=>{let n=class n extends ct{constructor(){super(...arguments);u(this,"name","carousel");u(this,"style",Xi);u(this,"classes",Uo)}};u(n,"\u0275fac",(()=>{let i;return function(r){return(i||(i=Fe(n)))(r||n)}})()),u(n,"\u0275prov",oe({token:n,factory:n.\u0275fac}));let e=n;return e})();var Ki=(()=>{let n=class n extends dt{constructor(i,o){super();u(this,"el");u(this,"zone");u(this,"componentName","Carousel");u(this,"bindDirectiveInstance",w(ie,{self:!0}));u(this,"responsiveOptions");u(this,"orientation","horizontal");u(this,"verticalViewPortHeight","300px");u(this,"contentClass","");u(this,"indicatorsContentClass","");u(this,"indicatorsContentStyle");u(this,"indicatorStyleClass","");u(this,"indicatorStyle");u(this,"circular",!1);u(this,"showIndicators",!0);u(this,"showNavigators",!0);u(this,"autoplayInterval",0);u(this,"styleClass");u(this,"prevButtonProps",{severity:"secondary",text:!0,rounded:!0});u(this,"nextButtonProps",{severity:"secondary",text:!0,rounded:!0});u(this,"onPage",new Xt);u(this,"itemsContainer");u(this,"indicatorContent");u(this,"headerFacet");u(this,"footerFacet");u(this,"_numVisible",1);u(this,"_numScroll",1);u(this,"_oldNumScroll",0);u(this,"prevState",{numScroll:0,numVisible:0,value:[]});u(this,"defaultNumScroll",1);u(this,"defaultNumVisible",1);u(this,"_page",0);u(this,"_value");u(this,"carouselStyle");u(this,"id");u(this,"totalShiftedItems");u(this,"isRemainingItemsAdded",!1);u(this,"animationTimeout");u(this,"translateTimeout");u(this,"remainingItems",0);u(this,"_items");u(this,"startPos");u(this,"documentResizeListener");u(this,"clonedItemsForStarting");u(this,"clonedItemsForFinishing");u(this,"allowAutoplay");u(this,"interval");u(this,"isCreated");u(this,"swipeThreshold",20);u(this,"itemTemplate");u(this,"headerTemplate");u(this,"footerTemplate");u(this,"previousIconTemplate");u(this,"nextIconTemplate");u(this,"_itemTemplate");u(this,"_headerTemplate");u(this,"_footerTemplate");u(this,"_previousIconTemplate");u(this,"_nextIconTemplate");u(this,"window");u(this,"_componentStyle",w(Wi));u(this,"templates");this.el=i,this.zone=o,this.totalShiftedItems=this.page*this.numScroll*-1,this.window=this.document.defaultView}onAfterViewChecked(){this.bindDirectiveInstance.setAttrs(this.ptm("root"))}get page(){return this._page}set page(i){this.isCreated&&i!==this._page&&(this.autoplayInterval&&this.stopAutoplay(),i>this._page&&i<=this.totalDots()-1?this.step(-1,i):i<this._page&&this.step(1,i)),this._page=i}get numVisible(){return this._numVisible}set numVisible(i){this._numVisible=i}get numScroll(){return this._numVisible}set numScroll(i){this._numScroll=i}get value(){return this._value}set value(i){this._value=i}onChanges(i){pe(this.platformId)&&(i.value&&this.circular&&this._value&&this.setCloneItems(),this.isCreated&&(i.numVisible&&(this.responsiveOptions&&(this.defaultNumVisible=this.numVisible),this.isCircular()&&this.setCloneItems(),this.createStyle(),this.calculatePosition()),i.numScroll&&this.responsiveOptions&&(this.defaultNumScroll=this.numScroll))),this.cd.markForCheck()}onAfterContentInit(){var i;this.id=lt("pn_id_"),pe(this.platformId)&&(this.allowAutoplay=!!this.autoplayInterval,this.circular&&this.setCloneItems(),this.responsiveOptions&&(this.defaultNumScroll=this._numScroll,this.defaultNumVisible=this._numVisible),this.createStyle(),this.calculatePosition(),this.responsiveOptions&&this.bindDocumentListeners()),(i=this.templates)==null||i.forEach(o=>{switch(o.getType()){case"item":this._itemTemplate=o.template;break;case"header":this._headerTemplate=o.template;break;case"footer":this._footerTemplate=o.template;break;case"previousicon":this._previousIconTemplate=o.template;break;case"nexticon":this._nextIconTemplate=o.template;break;default:this._itemTemplate=o.template;break}}),this.cd.detectChanges()}onAfterContentChecked(){if(pe(this.platformId)){let i=this.isCircular(),o=this.totalShiftedItems;if(this.value&&this.itemsContainer&&(this.prevState.numScroll!==this._numScroll||this.prevState.numVisible!==this._numVisible||this.prevState.value.length!==this.value.length)){this.autoplayInterval&&this.stopAutoplay(!1),this.remainingItems=(this.value.length-this._numVisible)%this._numScroll;let r=this._page;this.totalDots()!==0&&r>=this.totalDots()&&(r=this.totalDots()-1,this._page=r,this.onPage.emit({page:this.page})),o=r*this._numScroll*-1,i&&(o-=this._numVisible),r===this.totalDots()-1&&this.remainingItems>0?(o+=-1*this.remainingItems+this._numScroll,this.isRemainingItemsAdded=!0):this.isRemainingItemsAdded=!1,o!==this.totalShiftedItems&&(this.totalShiftedItems=o),this._oldNumScroll=this._numScroll,this.prevState.numScroll=this._numScroll,this.prevState.numVisible=this._numVisible,this.prevState.value=[...this._value],this.totalDots()>0&&this.itemsContainer.nativeElement&&(this.itemsContainer.nativeElement.style.transform=this.isVertical()?"translate3d(0, ".concat(o*(100/this._numVisible),"%, 0)"):"translate3d(".concat(o*(100/this._numVisible),"%, 0, 0)")),this.isCreated=!0,this.autoplayInterval&&this.isAutoplay()&&this.startAutoplay()}i&&(this.page===0?o=-1*this._numVisible:o===0&&(o=-1*this.value.length,this.remainingItems>0&&(this.isRemainingItemsAdded=!0)),o!==this.totalShiftedItems&&(this.totalShiftedItems=o))}}createStyle(){var o,r,s,_;this.carouselStyle||(this.carouselStyle=this.renderer.createElement("style"),this.carouselStyle.type="text/css",Et(this.carouselStyle,"nonce",(r=(o=this.config)==null?void 0:o.csp())==null?void 0:r.nonce),this.renderer.appendChild(this.document.head,this.carouselStyle),Et(this.carouselStyle,"nonce",(_=(s=this.config)==null?void 0:s.csp())==null?void 0:_.nonce));let i="\n #".concat(this.id," .p-carousel-item {\n flex: 1 0 ").concat(100/this.numVisible,"%\n }\n ");if(this.responsiveOptions&&!this.$unstyled()){this.responsiveOptions.sort((C,S)=>{let N=C.breakpoint,j=S.breakpoint,ne=null;return N==null&&j!=null?ne=-1:N!=null&&j==null?ne=1:N==null&&j==null?ne=0:typeof N=="string"&&typeof j=="string"?ne=N.localeCompare(j,void 0,{numeric:!0}):ne=N<j?-1:N>j?1:0,-1*ne});for(let C=0;C<this.responsiveOptions.length;C++){let S=this.responsiveOptions[C];i+="\n @media screen and (max-width: ".concat(S.breakpoint,") {\n #").concat(this.id," .p-carousel-item {\n flex: 1 0 ").concat(100/S.numVisible,"%\n }\n }\n ")}}this.carouselStyle.innerHTML=i}calculatePosition(){if(this.responsiveOptions){let i={numVisible:this.defaultNumVisible,numScroll:this.defaultNumScroll};if(typeof window<"u"){let o=window.innerWidth;for(let r=0;r<this.responsiveOptions.length;r++){let s=this.responsiveOptions[r];parseInt(s.breakpoint,10)>=o&&(i=s)}}if(this._numScroll!==i.numScroll){let o=this._page;o=Math.floor(o*this._numScroll/i.numScroll);let r=i.numScroll*this.page*-1;this.isCircular()&&(r-=i.numVisible),this.totalShiftedItems=r,this._numScroll=i.numScroll,this._page=o,this.onPage.emit({page:this.page})}this._numVisible!==i.numVisible&&(this._numVisible=i.numVisible,this.setCloneItems()),this.cd.markForCheck()}}setCloneItems(){this.clonedItemsForStarting=[],this.clonedItemsForFinishing=[],this.isCircular()&&(this.clonedItemsForStarting.push(...this.value.slice(-1*this._numVisible)),this.clonedItemsForFinishing.push(...this.value.slice(0,this._numVisible)))}firstIndex(){return this.isCircular()?-1*(this.totalShiftedItems+this.numVisible):this.totalShiftedItems*-1}lastIndex(){return this.firstIndex()+this.numVisible-1}totalDots(){var i;return(i=this.value)!=null&&i.length?Math.ceil((this.value.length-this._numVisible)/this._numScroll)+1:0}totalDotsArray(){let i=this.totalDots();return i<=0?[]:Array(i).fill(0)}isVertical(){return this.orientation==="vertical"}isCircular(){return this.circular&&this.value&&this.value.length>=this.numVisible}isAutoplay(){return this.autoplayInterval&&this.allowAutoplay}isForwardNavDisabled(){return this.isEmpty()||this._page>=this.totalDots()-1&&!this.isCircular()}isBackwardNavDisabled(){return this.isEmpty()||this._page<=0&&!this.isCircular()}isEmpty(){return!this.value||this.value.length===0}navForward(i,o){(this.isCircular()||this._page<this.totalDots()-1)&&this.step(-1,o),this.autoplayInterval&&this.stopAutoplay(),i&&i.cancelable&&i.preventDefault()}navBackward(i,o){(this.isCircular()||this._page!==0)&&this.step(1,o),this.autoplayInterval&&this.stopAutoplay(),i&&i.cancelable&&i.preventDefault()}onDotClick(i,o){let r=this._page;this.autoplayInterval&&this.stopAutoplay(),o>r?this.navForward(i,o):o<r&&this.navBackward(i,o)}onIndicatorKeydown(i){switch(i.code){case"ArrowRight":this.onRightKey();break;case"ArrowLeft":this.onLeftKey();break}}onRightKey(){var r;let i=[...be((r=this.indicatorContent)==null?void 0:r.nativeElement,'[data-pc-section="indicator"]')],o=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(o,o+1===i.length?i.length-1:o+1)}onLeftKey(){let i=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(i,i-1<=0?0:i-1)}onHomeKey(){let i=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(i,0)}onEndKey(){var r;let i=[...be((r=this.indicatorContent)==null?void 0:r.nativeElement,'[data-pc-section="indicator"]')],o=this.findFocusedIndicatorIndex();this.changedFocusedIndicator(o,i.length-1)}onTabKey(){var _,C;let i=[...be((_=this.indicatorContent)==null?void 0:_.nativeElement,'[data-pc-section="indicator"]')],o=i.findIndex(S=>oi(S,"data-p-highlight")===!0),r=Mt((C=this.indicatorContent)==null?void 0:C.nativeElement,'[data-pc-section="indicator"] > button