"use strict";(globalThis.webpackChunksuperset=globalThis.webpackChunksuperset||[]).push([[4169],{18575:(e,t,a)=>{t.w$=t.uv=void 0;var r=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var a=arguments[t];for(var r in a)Object.prototype.hasOwnProperty.call(a,r)&&(e[r]=a[r])}return e},n=l(a(96540)),i=l(a(5556)),s=a(11447);function l(e){return e&&e.__esModule?e:{default:e}}t.uv=function(e){var t=e.itemTypeToComponent,a=e.WrapperComponent,l=void 0===a?"div":a,o=function(e){var a=e.currentPage,i=e.totalPages,o=e.boundaryPagesRange,d=e.siblingPagesRange,u=e.hideEllipsis,c=e.hidePreviousAndNextPageLinks,h=e.hideFirstAndLastPageLinks,g=e.onChange,p=e.disabled,b=function(e,t){var a={};for(var r in e)t.indexOf(r)>=0||Object.prototype.hasOwnProperty.call(e,r)&&(a[r]=e[r]);return a}(e,["currentPage","totalPages","boundaryPagesRange","siblingPagesRange","hideEllipsis","hidePreviousAndNextPageLinks","hideFirstAndLastPageLinks","onChange","disabled"]),m=(0,s.getPaginationModel)({currentPage:a,totalPages:i,boundaryPagesRange:o,siblingPagesRange:d,hideEllipsis:u,hidePreviousAndNextPageLinks:c,hideFirstAndLastPageLinks:h}),P=function(e,t,a){return function(i){var s,l,o,d=e[i.type],u=(l=(s=i).value,o=s.isDisabled,function(){!o&&a&&t!==l&&a(l)});return n.default.createElement(d,r({onClick:u},i))}}(t,a,g);return n.default.createElement(l,b,m.map((function(e){return P(r({},e,{isDisabled:!!p}))})))};return o.propTypes={currentPage:i.default.number.isRequired,totalPages:i.default.number.isRequired,boundaryPagesRange:i.default.number,siblingPagesRange:i.default.number,hideEllipsis:i.default.bool,hidePreviousAndNextPageLinks:i.default.bool,hideFirstAndLastPageLinks:i.default.bool,onChange:i.default.func,disabled:i.default.bool},o},t.w$=s.ITEM_TYPES},12397:(e,t,a)=>{a.d(t,{U:()=>l});var r=a(19129),n=a(25106),i=a(95579),s=a(2445);const l=({user:e,date:t})=>{const a=(0,s.Y)("span",{className:"no-wrap",children:t});if(e){const t=(0,n.A)(e),l=(0,i.t)("Modified by: %s",t);return(0,s.Y)(r.m,{title:l,placement:"bottom",children:a})}return a}},74354:(e,t,a)=>{a.d(t,{A:()=>p});var r=a(96540),n=a(96453),i=a(95579),s=a(46920),l=a(85861),o=a(15595),d=a(50500),u=a(31383),c=a(2445);const h=n.I4.div`
  display: block;
  color: ${({theme:e})=>e.colors.grayscale.base};
  font-size: ${({theme:e})=>e.typography.sizes.s}px;
`,g=n.I4.div`
  padding-bottom: ${({theme:e})=>2*e.gridUnit}px;
  padding-top: ${({theme:e})=>2*e.gridUnit}px;

  & > div {
    margin: ${({theme:e})=>e.gridUnit}px 0;
  }

  &.extra-container {
    padding-top: 8px;
  }

  .confirm-overwrite {
    margin-bottom: ${({theme:e})=>2*e.gridUnit}px;
  }

  .input-container {
    display: flex;
    align-items: center;

    label {
      display: flex;
      margin-right: ${({theme:e})=>2*e.gridUnit}px;
    }

    i {
      margin: 0 ${({theme:e})=>e.gridUnit}px;
    }
  }

  input,
  textarea {
    flex: 1 1 auto;
  }

  textarea {
    height: 160px;
    resize: none;
  }

  input::placeholder,
  textarea::placeholder {
    color: ${({theme:e})=>e.colors.grayscale.light1};
  }

  textarea,
  input[type='text'],
  input[type='number'] {
    padding: ${({theme:e})=>1.5*e.gridUnit}px
      ${({theme:e})=>2*e.gridUnit}px;
    border-style: none;
    border: 1px solid ${({theme:e})=>e.colors.grayscale.light2};
    border-radius: ${({theme:e})=>e.gridUnit}px;

    &[name='name'] {
      flex: 0 1 auto;
      width: 40%;
    }

    &[name='sqlalchemy_uri'] {
      margin-right: ${({theme:e})=>3*e.gridUnit}px;
    }
  }
`,p=({resourceName:e,resourceLabel:t,passwordsNeededMessage:a,confirmOverwriteMessage:n,onModelImport:p,show:b,onHide:m,passwordFields:P=[],setPasswordFields:_=()=>{},sshTunnelPasswordFields:f=[],setSSHTunnelPasswordFields:v=()=>{},sshTunnelPrivateKeyFields:y=[],setSSHTunnelPrivateKeyFields:S=()=>{},sshTunnelPrivateKeyPasswordFields:E=[],setSSHTunnelPrivateKeyPasswordFields:w=()=>{}})=>{const[T,I]=(0,r.useState)(!0),[A,N]=(0,r.useState)({}),[L,F]=(0,r.useState)(!1),[Y,k]=(0,r.useState)(!1),[x,M]=(0,r.useState)([]),[R,D]=(0,r.useState)(!1),[K,C]=(0,r.useState)(),[O,H]=(0,r.useState)({}),[$,G]=(0,r.useState)({}),[U,B]=(0,r.useState)({}),z=()=>{M([]),_([]),N({}),F(!1),k(!1),D(!1),C(""),v([]),S([]),w([]),H({}),G({}),B({})},{state:{alreadyExists:j,passwordsNeeded:V,sshPasswordNeeded:q,sshPrivateKeyNeeded:W,sshPrivateKeyPasswordNeeded:X},importResource:J}=(0,d.bN)(e,t,(e=>{C(e)}));(0,r.useEffect)((()=>{_(V),V.length>0&&D(!1)}),[V,_]),(0,r.useEffect)((()=>{F(j.length>0),j.length>0&&D(!1)}),[j,F]),(0,r.useEffect)((()=>{v(q),q.length>0&&D(!1)}),[q,v]),(0,r.useEffect)((()=>{S(W),W.length>0&&D(!1)}),[W,S]),(0,r.useEffect)((()=>{w(X),X.length>0&&D(!1)}),[X,w]);return T&&b&&I(!1),(0,c.FD)(l.Ay,{name:"model",className:"import-model-modal",disablePrimaryButton:0===x.length||L&&!Y||R,onHandledPrimaryAction:()=>{var e;(null==(e=x[0])?void 0:e.originFileObj)instanceof File&&(D(!0),J(x[0].originFileObj,A,O,$,U,Y).then((e=>{e&&(z(),p())})))},onHide:()=>{I(!0),m(),z()},primaryButtonName:L?(0,i.t)("Overwrite"):(0,i.t)("Import"),primaryButtonType:L?"danger":"primary",width:"750px",show:b,title:(0,c.Y)("h4",{children:(0,i.t)("Import %s",t)}),children:[(0,c.Y)(g,{children:(0,c.Y)(o._O,{name:"modelFile",id:"modelFile",accept:".yaml,.json,.yml,.zip",fileList:x,onChange:e=>{M([{...e.file,status:"done"}])},onRemove:e=>(M(x.filter((t=>t.uid!==e.uid))),!1),customRequest:()=>{},disabled:R,children:(0,c.Y)(s.A,{loading:R,children:(0,i.t)("Select file")})})}),K&&(0,c.Y)(u.A,{errorMessage:K,showDbInstallInstructions:P.length>0||f.length>0||y.length>0||E.length>0}),(()=>{if(0===P.length&&0===f.length&&0===y.length&&0===E.length)return null;const e=[...new Set([...P,...f,...y,...E])];return(0,c.FD)(c.FK,{children:[(0,c.Y)("h5",{children:(0,i.t)("Database passwords")}),(0,c.Y)(h,{children:a}),e.map((e=>(0,c.FD)(c.FK,{children:[(null==P?void 0:P.indexOf(e))>=0&&(0,c.FD)(g,{children:[(0,c.FD)("div",{className:"control-label",children:[(0,i.t)("%s PASSWORD",e.slice(10)),(0,c.Y)("span",{className:"required",children:"*"})]}),(0,c.Y)("input",{name:`password-${e}`,autoComplete:`password-${e}`,type:"password",value:A[e],onChange:t=>N({...A,[e]:t.target.value})})]},`password-for-${e}`),(null==f?void 0:f.indexOf(e))>=0&&(0,c.FD)(g,{children:[(0,c.FD)("div",{className:"control-label",children:[(0,i.t)("%s SSH TUNNEL PASSWORD",e.slice(10)),(0,c.Y)("span",{className:"required",children:"*"})]}),(0,c.Y)("input",{name:`ssh_tunnel_password-${e}`,autoComplete:`ssh_tunnel_password-${e}`,type:"password",value:O[e],onChange:t=>H({...O,[e]:t.target.value})})]},`ssh_tunnel_password-for-${e}`),(null==y?void 0:y.indexOf(e))>=0&&(0,c.FD)(g,{children:[(0,c.FD)("div",{className:"control-label",children:[(0,i.t)("%s SSH TUNNEL PRIVATE KEY",e.slice(10)),(0,c.Y)("span",{className:"required",children:"*"})]}),(0,c.Y)("textarea",{name:`ssh_tunnel_private_key-${e}`,autoComplete:`ssh_tunnel_private_key-${e}`,value:$[e],onChange:t=>G({...$,[e]:t.target.value})})]},`ssh_tunnel_private_key-for-${e}`),(null==E?void 0:E.indexOf(e))>=0&&(0,c.FD)(g,{children:[(0,c.FD)("div",{className:"control-label",children:[(0,i.t)("%s SSH TUNNEL PRIVATE KEY PASSWORD",e.slice(10)),(0,c.Y)("span",{className:"required",children:"*"})]}),(0,c.Y)("input",{name:`ssh_tunnel_private_key_password-${e}`,autoComplete:`ssh_tunnel_private_key_password-${e}`,type:"password",value:U[e],onChange:t=>B({...U,[e]:t.target.value})})]},`ssh_tunnel_private_key_password-for-${e}`)]})))]})})(),L?(0,c.Y)(c.FK,{children:(0,c.FD)(g,{children:[(0,c.Y)("div",{className:"confirm-overwrite",children:n}),(0,c.Y)("div",{className:"control-label",children:(0,i.t)('Type "%s" to confirm',(0,i.t)("OVERWRITE"))}),(0,c.Y)("input",{id:"overwrite",type:"text",onChange:e=>{var t,a;const r=null!=(t=null==(a=e.currentTarget)?void 0:a.value)?t:"";k(r.toUpperCase()===(0,i.t)("OVERWRITE"))}})]})}):null]})}},25143:(e,t,a)=>{a.d(t,{S:()=>r.A});var r=a(46740);a(16707)},87320:(e,t,a)=>{a.r(t),a.d(t,{default:()=>G});var r,n=a(95579),i=a(96453),s=a(35742),l=a(27366),o=a(61225),d=a(96540),u=a(71519),c=a(58561),h=a.n(c),g=a(30703),p=a(50500),b=a(63358),m=a(35768),P=a(25143),_=a(4780),f=a(17444),v=a(51713),y=a(39854),S=a(62221),E=a(5261),w=a(75841),T=a(12249),I=a(37020),A=a(94704),N=a(73312),L=a(19129),F=a(74354),Y=a(23193),k=a(58132),x=a(3932),M=a(58998);!function(e){e.PUBLISHED="published",e.DRAFT="draft"}(r||(r={}));var R=a(84666),D=a(12397),K=a(2445);const C=(0,n.t)('The passwords for the databases below are needed in order to import them together with the dashboards. Please note that the "Secure Extra" and "Certificate" sections of the database configuration are not present in export files, and should be added manually after the import if they are needed.'),O=(0,n.t)("You are importing one or more dashboards that already exist. Overwriting might cause you to lose some of your work. Are you sure you want to overwrite?"),H=i.I4.div`
  color: ${({theme:e})=>e.colors.grayscale.base};
`,$=["id","dashboard_title","published","url","slug","changed_by","changed_on_delta_humanized","owners.id","owners.first_name","owners.last_name","owners","tags.id","tags.name","tags.type","status","certified_by","certification_details","changed_on"],G=(0,E.Ay)((function(e){var t;const{addDangerToast:a,addSuccessToast:i,user:c}=e,{roles:E}=(0,o.d4)((e=>e.user)),G=(0,R.L)("can_read","Tag",E),{state:{loading:U,resourceCount:B,resourceCollection:z,bulkSelectEnabled:j},setResourceCollection:V,hasPerm:q,fetchData:W,toggleBulkSelect:X,refreshData:J}=(0,p.RU)("dashboard",(0,n.t)("dashboard"),a,void 0,void 0,void 0,void 0,$),Q=(0,d.useMemo)((()=>z.map((e=>e.id))),[z]),[Z,ee]=(0,p.oG)("dashboard",Q,a),[te,ae]=(0,d.useState)(null),[re,ne]=(0,d.useState)(null),[ie,se]=(0,d.useState)(!1),[le,oe]=(0,d.useState)([]),[de,ue]=(0,d.useState)(!1),[ce,he]=(0,d.useState)([]),[ge,pe]=(0,d.useState)([]),[be,me]=(0,d.useState)([]),Pe=(0,S.SX)(null==c||null==(t=c.userId)?void 0:t.toString(),null),_e=q("can_write"),fe=q("can_write"),ve=q("can_write"),ye=q("can_export"),Se=[{id:"changed_on_delta_humanized",desc:!0}];function Ee(e){ae(e)}function we(e){return s.A.get({endpoint:`/api/v1/dashboard/${e.id}`}).then((({json:e={}})=>{V(z.map((t=>{var a;if(t.id===(null==e||null==(a=e.result)?void 0:a.id)){const{changed_by_name:a,changed_by:r,dashboard_title:n="",slug:i="",json_metadata:s="",changed_on_delta_humanized:l,url:o="",certified_by:d="",certification_details:u="",owners:c,tags:h}=e.result;return{...t,changed_by_name:a,changed_by:r,dashboard_title:n,slug:i,json_metadata:s,changed_on_delta_humanized:l,url:o,certified_by:d,certification_details:u,owners:c,tags:h}}return t})))}),(0,g.JF)((e=>a((0,n.t)("An error occurred while fetching dashboards: %s",e)))))}const Te=e=>{const t=e.map((({id:e})=>e));(0,_.A)("dashboard",t,(()=>{ue(!1)})),ue(!0)},Ie=(0,d.useMemo)((()=>[{Cell:({row:{original:{id:e}}})=>(null==c?void 0:c.userId)&&(0,K.Y)(A.A,{itemId:e,saveFaveStar:Z,isStarred:ee[e]}),Header:"",id:"id",disableSortBy:!0,size:"xs",hidden:!(null!=c&&c.userId)},{Cell:({row:{original:{url:e,dashboard_title:t,certified_by:a,certification_details:r}}})=>(0,K.FD)(u.N_,{to:e,children:[a&&(0,K.FD)(K.FK,{children:[(0,K.Y)(k.A,{certifiedBy:a,details:r})," "]}),t]}),Header:(0,n.t)("Name"),accessor:"dashboard_title"},{Cell:({row:{original:{status:e}}})=>(0,K.Y)(m.xI,{isPublished:e===r.PUBLISHED}),Header:(0,n.t)("Status"),accessor:"published",size:"xl"},{Cell:({row:{original:{tags:e=[]}}})=>(0,K.Y)(P.S,{tags:e.filter((e=>"TagTypes.custom"===e.type||1===e.type)),maxTags:3}),Header:(0,n.t)("Tags"),accessor:"tags",disableSortBy:!0,hidden:!(0,l.G7)(l.TO.TaggingSystem)},{Cell:({row:{original:{owners:e=[]}}})=>(0,K.Y)(w.A,{users:e}),Header:(0,n.t)("Owners"),accessor:"owners",disableSortBy:!0,size:"xl"},{Cell:({row:{original:{changed_on_delta_humanized:e,changed_by:t}}})=>(0,K.Y)(D.U,{date:e,user:t}),Header:(0,n.t)("Last modified"),accessor:"changed_on_delta_humanized",size:"xl"},{Cell:({row:{original:e}})=>(0,K.FD)(H,{className:"actions",children:[ve&&(0,K.Y)(b.A,{title:(0,n.t)("Please confirm"),description:(0,K.FD)(K.FK,{children:[(0,n.t)("Are you sure you want to delete")," ",(0,K.Y)("b",{children:e.dashboard_title}),"?"]}),onConfirm:()=>(0,g.yT)(e,J,i,a),children:e=>(0,K.Y)(L.m,{id:"delete-action-tooltip",title:(0,n.t)("Delete"),placement:"bottom",children:(0,K.Y)("span",{role:"button",tabIndex:0,className:"action-button",onClick:e,children:(0,K.Y)(T.A.Trash,{})})})}),ye&&(0,K.Y)(L.m,{id:"export-action-tooltip",title:(0,n.t)("Export"),placement:"bottom",children:(0,K.Y)("span",{role:"button",tabIndex:0,className:"action-button",onClick:()=>Te([e]),children:(0,K.Y)(T.A.Share,{})})}),fe&&(0,K.Y)(L.m,{id:"edit-action-tooltip",title:(0,n.t)("Edit"),placement:"bottom",children:(0,K.Y)("span",{role:"button",tabIndex:0,className:"action-button",onClick:()=>Ee(e),children:(0,K.Y)(T.A.EditAlt,{})})})]}),Header:(0,n.t)("Actions"),id:"actions",hidden:!fe&&!ve&&!ye,disableSortBy:!0},{accessor:Y.H.ChangedBy,hidden:!0}]),[null==c?void 0:c.userId,fe,ve,ye,Z,ee,J,i,a]),Ae=(0,d.useMemo)((()=>({Header:(0,n.t)("Favorite"),key:"favorite",id:"id",urlDisplay:"favorite",input:"select",operator:y.t.DashboardIsFav,unfilteredLabel:(0,n.t)("Any"),selects:[{label:(0,n.t)("Yes"),value:!0},{label:(0,n.t)("No"),value:!1}]})),[]),Ne=(0,d.useMemo)((()=>[{Header:(0,n.t)("Name"),key:"search",id:"dashboard_title",input:"search",operator:y.t.TitleOrSlug},{Header:(0,n.t)("Status"),key:"published",id:"published",input:"select",operator:y.t.Equals,unfilteredLabel:(0,n.t)("Any"),selects:[{label:(0,n.t)("Published"),value:!0},{label:(0,n.t)("Draft"),value:!1}]},...(0,l.G7)(l.TO.TaggingSystem)&&G?[{Header:(0,n.t)("Tag"),key:"tags",id:"tags",input:"select",operator:y.t.DashboardTagById,unfilteredLabel:(0,n.t)("All"),fetchSelects:x.m}]:[],{Header:(0,n.t)("Owner"),key:"owner",id:"owners",input:"select",operator:y.t.RelationManyMany,unfilteredLabel:(0,n.t)("All"),fetchSelects:(0,g.u1)("dashboard","owners",(0,g.JF)((e=>a((0,n.t)("An error occurred while fetching dashboard owner values: %s",e)))),e.user),paginate:!0},...null!=c&&c.userId?[Ae]:[],{Header:(0,n.t)("Certified"),key:"certified",id:"id",urlDisplay:"certified",input:"select",operator:y.t.DashboardIsCertified,unfilteredLabel:(0,n.t)("Any"),selects:[{label:(0,n.t)("Yes"),value:!0},{label:(0,n.t)("No"),value:!1}]},{Header:(0,n.t)("Modified by"),key:"changed_by",id:"changed_by",input:"select",operator:y.t.RelationOneMany,unfilteredLabel:(0,n.t)("All"),fetchSelects:(0,g.u1)("dashboard","changed_by",(0,g.JF)((e=>(0,n.t)("An error occurred while fetching dataset datasource values: %s",e))),c),paginate:!0}]),[a,Ae,e.user]),Le=[{desc:!1,id:"dashboard_title",label:(0,n.t)("Alphabetical"),value:"alphabetical"},{desc:!0,id:"changed_on_delta_humanized",label:(0,n.t)("Recently modified"),value:"recently_modified"},{desc:!1,id:"changed_on_delta_humanized",label:(0,n.t)("Least recently modified"),value:"least_recently_modified"}],Fe=(0,d.useCallback)((e=>(0,K.Y)(M.A,{dashboard:e,hasPerm:q,bulkSelectEnabled:j,showThumbnails:Pe?Pe.thumbnails:(0,l.G7)(l.TO.Thumbnails),userId:null==c?void 0:c.userId,loading:U,openDashboardEditModal:Ee,saveFavoriteStatus:Z,favoriteStatus:ee[e.id],handleBulkDashboardExport:Te,onDelete:e=>ne(e)})),[j,ee,q,U,null==c?void 0:c.userId,Z,Pe]),Ye=[];return(ve||ye)&&Ye.push({name:(0,n.t)("Bulk select"),buttonStyle:"secondary",onClick:X}),_e&&(Ye.push({name:(0,K.FD)(K.FK,{children:[(0,K.Y)("i",{className:"fa fa-plus"})," ",(0,n.t)("Dashboard")]}),buttonStyle:"primary",onClick:()=>{window.location.assign("/dashboard/new")}}),Ye.push({name:(0,K.Y)(L.m,{id:"import-tooltip",title:(0,n.t)("Import dashboards"),placement:"bottomRight",children:(0,K.Y)(T.A.Import,{})}),buttonStyle:"link",onClick:()=>{se(!0)}})),(0,K.FD)(K.FK,{children:[(0,K.Y)(v.A,{name:(0,n.t)("Dashboards"),buttons:Ye}),(0,K.Y)(b.A,{title:(0,n.t)("Please confirm"),description:(0,n.t)("Are you sure you want to delete the selected dashboards?"),onConfirm:function(e){return s.A.delete({endpoint:`/api/v1/dashboard/?q=${h().encode(e.map((({id:e})=>e)))}`}).then((({json:e={}})=>{J(),i(e.message)}),(0,g.JF)((e=>a((0,n.t)("There was an issue deleting the selected dashboards: ",e)))))},children:e=>{const t=[];return ve&&t.push({key:"delete",name:(0,n.t)("Delete"),type:"danger",onSelect:e}),ye&&t.push({key:"export",name:(0,n.t)("Export"),type:"primary",onSelect:Te}),(0,K.FD)(K.FK,{children:[te&&(0,K.Y)(N.A,{dashboardId:te.id,show:!0,onHide:()=>ae(null),onSubmit:we}),re&&(0,K.Y)(I.A,{description:(0,K.FD)(K.FK,{children:[(0,n.t)("Are you sure you want to delete")," ",(0,K.Y)("b",{children:re.dashboard_title}),"?"]}),onConfirm:()=>{(0,g.yT)(re,J,i,a,void 0,null==c?void 0:c.userId),ne(null)},onHide:()=>ne(null),open:!!re,title:(0,n.t)("Please confirm")}),(0,K.Y)(y.A,{bulkActions:t,bulkSelectEnabled:j,cardSortSelectOptions:Le,className:"dashboard-list-view",columns:Ie,count:B,data:z,disableBulkSelect:X,fetchData:W,refreshData:J,filters:Ne,initialSort:Se,loading:U,pageSize:25,addSuccessToast:i,addDangerToast:a,showThumbnails:Pe?Pe.thumbnails:(0,l.G7)(l.TO.Thumbnails),renderCard:Fe,defaultViewMode:(0,l.G7)(l.TO.ListviewsDefaultCardView)?"card":"table",enableBulkTag:!0,bulkTagResourceName:"dashboard"})]})}}),(0,K.Y)(F.A,{resourceName:"dashboard",resourceLabel:(0,n.t)("dashboard"),passwordsNeededMessage:C,confirmOverwriteMessage:O,addDangerToast:a,addSuccessToast:i,onModelImport:()=>{se(!1),J(),i((0,n.t)("Dashboard imported"))},show:ie,onHide:()=>{se(!1)},passwordFields:le,setPasswordFields:oe,sshTunnelPasswordFields:ce,setSSHTunnelPasswordFields:he,sshTunnelPrivateKeyFields:ge,setSSHTunnelPrivateKeyFields:pe,sshTunnelPrivateKeyPasswordFields:be,setSSHTunnelPrivateKeyPasswordFields:me}),de&&(0,K.Y)(f.A,{})]})}))},30327:(e,t)=>{t.ITEM_TYPES={PAGE:"PAGE",ELLIPSIS:"ELLIPSIS",FIRST_PAGE_LINK:"FIRST_PAGE_LINK",PREVIOUS_PAGE_LINK:"PREVIOUS_PAGE_LINK",NEXT_PAGE_LINK:"NEXT_PAGE_LINK",LAST_PAGE_LINK:"LAST_PAGE_LINK"},t.ITEM_KEYS={FIRST_ELLIPSIS:-1,SECOND_ELLIPSIS:-2,FIRST_PAGE_LINK:-3,PREVIOUS_PAGE_LINK:-4,NEXT_PAGE_LINK:-5,LAST_PAGE_LINK:-6}},8960:(e,t,a)=>{var r=a(30327);t.createFirstEllipsis=function(e){return{type:r.ITEM_TYPES.ELLIPSIS,key:r.ITEM_KEYS.FIRST_ELLIPSIS,value:e,isActive:!1}},t.createSecondEllipsis=function(e){return{type:r.ITEM_TYPES.ELLIPSIS,key:r.ITEM_KEYS.SECOND_ELLIPSIS,value:e,isActive:!1}},t.createFirstPageLink=function(e){var t=e.currentPage;return{type:r.ITEM_TYPES.FIRST_PAGE_LINK,key:r.ITEM_KEYS.FIRST_PAGE_LINK,value:1,isActive:1===t}},t.createPreviousPageLink=function(e){var t=e.currentPage;return{type:r.ITEM_TYPES.PREVIOUS_PAGE_LINK,key:r.ITEM_KEYS.PREVIOUS_PAGE_LINK,value:Math.max(1,t-1),isActive:1===t}},t.createNextPageLink=function(e){var t=e.currentPage,a=e.totalPages;return{type:r.ITEM_TYPES.NEXT_PAGE_LINK,key:r.ITEM_KEYS.NEXT_PAGE_LINK,value:Math.min(a,t+1),isActive:t===a}},t.createLastPageLink=function(e){var t=e.currentPage,a=e.totalPages;return{type:r.ITEM_TYPES.LAST_PAGE_LINK,key:r.ITEM_KEYS.LAST_PAGE_LINK,value:a,isActive:t===a}},t.createPageFunctionFactory=function(e){var t=e.currentPage;return function(e){return{type:r.ITEM_TYPES.PAGE,key:e,value:e,isActive:e===t}}}},17991:(e,t)=>{t.createRange=function(e,t){for(var a=[],r=e;r<=t;r++)a.push(r);return a}},11447:(e,t,a)=>{var r=a(17991),n=a(8960);t.getPaginationModel=function(e){if(null==e)throw new Error("getPaginationModel(): options object should be a passed");var t=Number(e.totalPages);if(isNaN(t))throw new Error("getPaginationModel(): totalPages should be a number");if(t<0)throw new Error("getPaginationModel(): totalPages shouldn't be a negative number");var a=Number(e.currentPage);if(isNaN(a))throw new Error("getPaginationModel(): currentPage should be a number");if(a<0)throw new Error("getPaginationModel(): currentPage shouldn't be a negative number");if(a>t)throw new Error("getPaginationModel(): currentPage shouldn't be greater than totalPages");var i=null==e.boundaryPagesRange?1:Number(e.boundaryPagesRange);if(isNaN(i))throw new Error("getPaginationModel(): boundaryPagesRange should be a number");if(i<0)throw new Error("getPaginationModel(): boundaryPagesRange shouldn't be a negative number");var s=null==e.siblingPagesRange?1:Number(e.siblingPagesRange);if(isNaN(s))throw new Error("getPaginationModel(): siblingPagesRange should be a number");if(s<0)throw new Error("getPaginationModel(): siblingPagesRange shouldn't be a negative number");var l=Boolean(e.hidePreviousAndNextPageLinks),o=Boolean(e.hideFirstAndLastPageLinks),d=Boolean(e.hideEllipsis),u=d?0:1,c=[],h=n.createPageFunctionFactory(e);if(o||c.push(n.createFirstPageLink(e)),l||c.push(n.createPreviousPageLink(e)),1+2*u+2*s+2*i>=t){var g=r.createRange(1,t).map(h);c.push.apply(c,g)}else{var p=i,b=r.createRange(1,p).map(h),m=t+1-i,P=t,_=r.createRange(m,P).map(h),f=Math.min(Math.max(a-s,p+u+1),m-u-2*s-1),v=f+2*s,y=r.createRange(f,v).map(h);if(c.push.apply(c,b),!d){var S=f-1,E=(S===p+1?h:n.createFirstEllipsis)(S);c.push(E)}if(c.push.apply(c,y),!d){var w=v+1,T=(w===m-1?h:n.createSecondEllipsis)(w);c.push(T)}c.push.apply(c,_)}return l||c.push(n.createNextPageLink(e)),o||c.push(n.createLastPageLink(e)),c};var i=a(30327);t.ITEM_TYPES=i.ITEM_TYPES,t.ITEM_KEYS=i.ITEM_KEYS}}]);