dealposbooks 5.49.2 → 5.49.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (68) hide show
  1. package/assets/scss/style.scss +2 -4
  2. package/{chunk-HA7LLTOG.js → chunk-23PWXRYN.js} +1 -1
  3. package/{chunk-P5ICG7YE.js → chunk-2RRP7JK7.js} +1 -1
  4. package/{chunk-GWKQHO7M.js → chunk-5JNGJ6UW.js} +1 -1
  5. package/{chunk-2RI2WRFG.js → chunk-672TXWSC.js} +1 -1
  6. package/{chunk-JJ2G2ITS.js → chunk-6EIUS53G.js} +1 -1
  7. package/{chunk-LXHUCAAY.js → chunk-7B7LNBD5.js} +1 -1
  8. package/{chunk-ES2YST7G.js → chunk-AVSCJ22B.js} +1 -1
  9. package/{chunk-4YH7A4M6.js → chunk-BEZIBXGN.js} +1 -1
  10. package/{chunk-HY3WGTQF.js → chunk-BF6PW4QM.js} +1 -1
  11. package/{chunk-2BTS7BEP.js → chunk-BMM5YFHU.js} +1 -1
  12. package/chunk-BP4OMNR2.js +8 -0
  13. package/{chunk-66YEZ4LP.js → chunk-CFUVIXAX.js} +1 -1
  14. package/{chunk-YUS2B7BT.js → chunk-CNMK2GSA.js} +1 -1
  15. package/{chunk-7NY7TIU4.js → chunk-DIG4FYVW.js} +1 -1
  16. package/chunk-ETNPJTRI.js +1 -0
  17. package/{chunk-LO2GGXGQ.js → chunk-FOPCQ346.js} +1 -1
  18. package/{chunk-ULBVUV32.js → chunk-FSJNWH2Y.js} +1 -1
  19. package/{chunk-RTMNVCIM.js → chunk-FZS2ZX6Y.js} +1 -1
  20. package/chunk-GEFAWOOV.js +129 -0
  21. package/{chunk-B4CNCOTT.js → chunk-GTMCB3SL.js} +1 -1
  22. package/{chunk-F6G7POPA.js → chunk-H6FEO7T3.js} +1 -1
  23. package/{chunk-JD4TR3G6.js → chunk-HOAF22JI.js} +1 -1
  24. package/chunk-HU4J3ABZ.js +1 -0
  25. package/{chunk-S72FLLKS.js → chunk-I33QA736.js} +1 -1
  26. package/{chunk-MQPKGA4I.js → chunk-IPOA3SOW.js} +1 -1
  27. package/{chunk-ADC7G7M6.js → chunk-IWAIAUMO.js} +1 -1
  28. package/chunk-JDRK7YG6.js +1 -0
  29. package/{chunk-RIBVS2ZL.js → chunk-JIFUQXVH.js} +1 -1
  30. package/{chunk-6KSTIWOD.js → chunk-KBR5PEJ3.js} +1 -1
  31. package/{chunk-YSZN7YTG.js → chunk-KNBVJM2U.js} +2 -2
  32. package/{chunk-OARM3UHP.js → chunk-L3GNPRRN.js} +1 -1
  33. package/chunk-LNFCBMAA.js +1 -0
  34. package/{chunk-BVXHSTT4.js → chunk-OMLO5E65.js} +1 -1
  35. package/{chunk-TG6Y7ANZ.js → chunk-PK7RYZ5A.js} +1 -1
  36. package/{chunk-3LOZ6OKX.js → chunk-PSSATQO3.js} +1 -1
  37. package/{chunk-CIPN4BTQ.js → chunk-QC7NAJZG.js} +1 -1
  38. package/{chunk-7P5XATXL.js → chunk-RAF7SWW4.js} +4 -4
  39. package/{chunk-F4WXASVJ.js → chunk-RDQ7RWJC.js} +1 -1
  40. package/{chunk-TJQSE35W.js → chunk-RRL6OTRO.js} +1 -1
  41. package/{chunk-Q52A3GQ5.js → chunk-SLD2HX2B.js} +1 -1
  42. package/{chunk-L7WPJUZ6.js → chunk-U5YVZKME.js} +1 -1
  43. package/{chunk-ZVEQIMYP.js → chunk-URSKOWIQ.js} +1 -1
  44. package/chunk-V7EXGBKT.js +1 -0
  45. package/{chunk-C4W7XYJD.js → chunk-VFKJMUGN.js} +1 -1
  46. package/chunk-VQKIYDID.js +1 -0
  47. package/{chunk-WBGCOYQJ.js → chunk-W6US3XIE.js} +1 -1
  48. package/{chunk-33JUCBXH.js → chunk-WPJG57AR.js} +1 -1
  49. package/{chunk-TSPM6IPU.js → chunk-WSQPSWDS.js} +1 -1
  50. package/{chunk-BZUZKZY4.js → chunk-X3FAXRYR.js} +1 -1
  51. package/{chunk-KGZUIHAZ.js → chunk-YIG2I6WR.js} +1 -1
  52. package/{chunk-UM2HOJJR.js → chunk-YRW7AH7I.js} +1 -1
  53. package/chunk-ZIQBCB5X.js +7 -0
  54. package/chunk-ZY4AYAWJ.js +202 -0
  55. package/index.html +2 -2
  56. package/{main-OZKRZLSC.js → main-VIRQJVUE.js} +1 -1
  57. package/package.json +1 -1
  58. package/{styles-FYY2LVCE.css → styles-T5RGO2FA.css} +1 -1
  59. package/chunk-BRKRIPYY.js +0 -1
  60. package/chunk-EEQIJSRK.js +0 -8
  61. package/chunk-EOU5D6FS.js +0 -1
  62. package/chunk-FQRRGJBE.js +0 -1
  63. package/chunk-KDCDSUGW.js +0 -1
  64. package/chunk-M5M3M3GU.js +0 -202
  65. package/chunk-MGGC32PD.js +0 -129
  66. package/chunk-Q4KG7LH6.js +0 -1
  67. package/chunk-W6V2QFA7.js +0 -7
  68. package/chunk-X57GOVJJ.js +0 -1
@@ -1 +1 @@
1
- import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-RM5HLXNW.js";import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as de,b as fe}from"./chunk-3VQUNDVT.js";import{d as le,e as Je,i as Ke,j as qe,k as ne}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as Le}from"./chunk-BT7Y4ADP.js";import{a as re,b as pe}from"./chunk-DJXQKSLT.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import{a as W,b as j}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import{a as Ae,b as J}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as M}from"./chunk-7P5XATXL.js";import"./chunk-S27Z7D3D.js";import{a as Y,b as $}from"./chunk-AD247LWQ.js";import{b as Q,c as Fe,d as Te,e as we,f as Me,g as De,h as Ye}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{o as He,w as N,x as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as V,f as ye,j as te,k as Pe,l as be,m as Oe,n as ze,o as Ie,u as Ee,w as H,x as ae}from"./chunk-VMI3QWC6.js";import{b as ie,d as Ue,e as D,l as A}from"./chunk-F7PVAVLQ.js";import"./chunk-C4W7XYJD.js";import{a as ve}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{k as B,o as je,s as w}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as Se,Eb as x,Ec as z,Fc as oe,Ha as I,Mb as c,Oc as Ve,Pb as q,Pc as $e,Rb as Ce,Sb as P,Sc as u,Ub as b,Vb as O,Wb as r,Xb as a,Y as U,Yb as Z,_ as F,ac as v,bd as ee,c as ue,ca as he,cd as We,fc as y,gc as s,ia as h,ib as p,qa as C,ra as S,s as X,sc as m,tc as _,uc as E,wc as Be,yb as T}from"./chunk-6QJHEOXN.js";import{a as f,b as g}from"./chunk-YQFG5XE2.js";var k=(()=>{class t{constructor(){this.httpService=h(ve)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var R=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(R||{});var it={[R.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[R.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[R.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[R.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[R.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[R.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[R.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[R.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[R.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function _t(t,i){if(t&1){let e=v();r(0,"div",5)(1,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.onSubmit())}),a()()}}function gt(t,i){if(t&1&&(r(0,"p-tab",10),m(1),a()),t&2){let e=i.$implicit;c("value",e.value),p(),_(e.label)}}function xt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function ht(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ct(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",17),m(6),a()(),r(7,"p-select",18),x(8,xt,7,2,"ng-template",null,2,u)(10,ht,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function St(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function vt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function yt(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",20),m(6),a()(),r(7,"p-select",18),x(8,St,7,2,"ng-template",null,2,u)(10,vt,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function Pt(t,i){if(t&1&&(r(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),b(4,Ct,12,4,"div",14,P),a()(),r(6,"div",12)(7,"div",13),b(8,yt,12,4,"div",14,P),a()()()()),t&2){let e=i.$implicit,n=s(3);c("value",e.value),p(),c("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function bt(t,i){if(t&1){let e=v();r(0,"form",8),y("ngSubmit",function(){C(e);let o=s(2);return S(o.onSubmit())}),r(1,"p-tabs",9)(2,"p-tablist"),b(3,gt,2,2,"p-tab",10,P),a(),r(5,"p-tabpanels"),b(6,Pt,10,2,"p-tabpanel",10,P),a()()()}if(t&2){let e=s(2);c("formGroup",e.accountForm),p(),c("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function Ot(t,i){if(t&1&&x(0,bt,8,3,"form",7),t&2){let e=s();c("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(k),this.fb=h(Ee),this.tab=I(R.POSGLOBAL_SELL),this.tabs=I(Object.values(R).map(e=>({label:e,value:e}))),this.posIntegration=I(null),this.form=I([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=R}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(F(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return it[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:d,accountID:L}of l){let ce=`${d}_${L}`;o.has(ce)||(o.add(ce),n.push({typeID:d,accountID:L||Qe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(d=>{d!==o&&d.get("typeID")?.value===e&&d.get("accountID")?.value!==n&&d.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,_t,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),a())},dependencies:[M,ot,nt,tt,et,Xe,Ze,He,j,W,H,Pe,V,ye,w,B,A,G,N,ae,be,Ie,Oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,i){if(t&1&&(r(0,"th",7),m(1),a()),t&2){let e=i.$implicit;p(),_(e.name.slice(0,10))}}function Ft(t,i){if(t&1&&(r(0,"tr")(1,"th",6),m(2,"Method"),a()(),r(3,"tr"),b(4,Et,2,1,"th",7,P),a()),t&2){let e=s(3);p(4),O(e.paymentConfiguration().outlets)}}function Tt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.accountName)}}function wt(t,i){if(t&1&&(r(0,"tr")(1,"td",8)(2,"a",9),m(3),a()(),b(4,Tt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,It,e.id)),p(),_(e.name),p(),O(e.accounts)}}function Mt(t,i){if(t&1&&(r(0,"p-table",5),x(1,Ft,6,0,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),a()),t&2){let e=s(2);c("value",e.paymentConfiguration().payment)}}function Dt(t,i){if(t&1){let e=v();r(0,"app-main-panel",4),y("search",function(o){C(e);let l=s();return S(l.onSearch(o))}),x(1,Mt,5,1,"ng-template",null,0,u),a()}t&2&&c("isSearchableInput",!0)("scrollable",!0)}var pt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.paymentConfiguration=I(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(F(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(F(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&x(0,Dt,3,2,"app-main-panel",3),n&2&&c("ngIf",o.paymentConfiguration())},dependencies:[M,ne,le,Je,w,B,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var At={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ne=Fe(De(At),Te(t=>({first:ee(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:ee(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),Me(t=>{let i=h(k);return{updateFilter:n=>{Q(t,o=>g(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:de(ue(U(n=>i.fetchPOSOutletConfiguration(n).pipe(fe({next:o=>{Q(t,l=>g(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),we(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var kt=t=>[t];function Rt(t,i){if(t&1&&(r(0,"th"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.value)}}function Lt(t,i){if(t&1&&(r(0,"tr")(1,"th"),m(2,"Name"),a(),b(3,Rt,2,1,"th",null,P),a()),t&2){let e=s(2);p(3),O(e.store.data().listCOAType)}}function Nt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e)}}function Gt(t,i){if(t&1&&(r(0,"tr")(1,"td")(2,"a",7),m(3),a()(),b(4,Nt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,kt,e.OutletID)),p(),E(" ",e.OutletName,""),p(),O(e.Accounts)}}function Bt(t,i){if(t&1&&m(0),t&2){let e=s(2);Be(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Vt(t,i){t&1&&(r(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),a()()())}function $t(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",6),y("onPage",function(o){C(e);let l=s();return S(l.onPage(o))}),x(2,Lt,5,0,"ng-template",null,1,u)(4,Gt,6,4,"ng-template",null,2,u)(6,Bt,1,3,"ng-template",null,3,u)(8,Vt,4,0,"ng-template",null,4,u),a()()}if(t&2){let e=s();p(),c("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var lt=(()=>{class t{constructor(){this.store=h(Ne)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(g(f({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[Se([Ne])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();r(0,"app-main-panel",5),y("search",function(L){return C(l),S(o.onSearch(L))}),x(1,$t,10,5,"ng-template",null,0,u),a()}n&2&&c("isSearchableInput",!0)("scrollable",!0)},dependencies:[M,w,J,ne,le,A,D,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Wt=()=>({height:"calc(100vh - 100px)"}),jt=()=>({height:"calc(100vh - 150px)"});function Ut(t,i){if(t&1){let e=v();r(0,"a",5),m(1,"Cancel"),a(),r(2,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.updatePOsOutletConfiguration())}),a()}}function zt(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ht(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Yt(t,i){if(t&1&&(r(0,"div",12)(1,"span",14),m(2),a(),r(3,"p-select",15),x(4,zt,7,2,"ng-template",null,2,u)(6,Ht,7,2,"ng-template",null,3,u),a()()),t&2){let e,n=i.$implicit,o=i.$index,l=s(3);c("formGroupName",o),p(2),_((e=n.get("TypeName"))==null?null:e.value),p(),c("options",l.options.accounts)}}function Jt(t,i){t&1&&Z(0,"hr")}function Kt(t,i){if(t&1&&(r(0,"div",9)(1,"h3",10),m(2),Ve(3,"titlecase"),a(),r(4,"div",11),b(5,Yt,8,3,"div",12,P),a()(),x(7,Jt,1,0,"hr",13)),t&2){let e,n=i.$implicit,o=i.$index,l=i.$index,d=i.$count,L=s(2);c("formGroupName",o),p(2),E(" ",$e(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(L.getAccountsFormArray(l).controls),p(2),c("ngIf",l!==d-1)}}function qt(t,i){if(t&1&&(r(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Kt,8,5,null,null,P),a()()()()),t&2){let e=s();q(z(5,Wt)),p(),q(z(6,jt)),p(),c("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var mt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.outletForm=I(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=h(Ee)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),F(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,Ut,3,0,"ng-template",null,0,u)(3,qt,6,7,"ng-template",null,1,u),a()),n&2&&c("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,B,je,J,ae,Pe,V,ye,be,Ie,Oe,ze,j,W,$,Y,re,G,N,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=()=>({height:"calc(100vh - 100px)"}),en=()=>({width:"100%",height:"calc(100vh - 150px)"}),tn=()=>({width:"100%"});function nn(t,i){if(t&1){let e=v();r(0,"a",6),m(1,"Cancel"),a(),r(2,"p-button",7),y("onClick",function(){C(e);let o=s(3);return S(o.updatePOSOutletConfiguration())}),a()}}function on(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function an(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function rn(t,i){if(t&1){let e=v();r(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),a()(),Z(5,"div",13),r(6,"div",14)(7,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(4);return S(d.updateAccountById(o,l))}),x(8,on,7,2,"ng-template",null,2,u)(10,an,7,2,"ng-template",null,3,u),a()()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(4);p(4),_(e.outletName.slice(0,15)),p(3),q(z(7,tn)),c("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function pn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,rn,12,8,"div",9,P),a()()()),t&2){let e=s(3);q(z(4,Zt)),p(),q(z(5,en)),p(2),O(e.paymentForm().form.accounts)}}function ln(t,i){if(t&1&&(r(0,"app-main-panel",4),x(1,nn,3,0,"ng-template",null,0,u)(3,pn,5,6,"ng-template",null,1,u),a()),t&2){let e=s(2);c("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function mn(t,i){if(t&1&&x(0,ln,5,2,"app-main-panel",5),t&2){let e=s();c("ngIf",e.paymentForm())}}var st=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.paymentForm=I(null),this.router=h(Ue)}ngOnInit(){this.route.paramMap.pipe(X(e=>+e.get("id")),U(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),F(e=>{this.paymentForm.set(e)}),Le("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=g(f({},this.paymentForm()),{form:g(f({},this.paymentForm().form),{accounts:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Le("response"),F(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&x(0,mn,1,1,"app-main-panel",4),n&2&&Ce(o.paymentForm()?0:-1)},dependencies:[J,Ae,M,w,B,pe,re,j,W,H,V,te,A,D,G,N,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function sn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSTaxConfiguration())}),a()()}}function cn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",15)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function un(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",16)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function dn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"div",12)(2,"label",13),m(3),a(),r(4,"p-select",14),y("ngModelChange",function(o){let l=C(e).$index,d=s(2);return S(d.updateAccountID(o,l))}),x(5,cn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(2);p(3),_(e.name),p(),c("options",o.taxForm().options.chartOfAccount)("ngModel",o.taxForm().form[n].accountID)}}function fn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10),b(4,dn,9,3,"div",11,P),a()()()()),t&2){let e=s();p(4),O(e.taxForm().form)}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(k),this.taxForm=I(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(F(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=g(f({},this.taxForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(F(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,sn,4,0,"ng-template",null,0,u)(3,fn,6,0,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,J,w,j,W,pe,H,V,te,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var _n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,i){t&1&&Z(0,"p-button",6)}function hn(t,i){if(t&1&&x(0,xn,1,0,"p-button",5),t&2){let e=s();c("ngIf",e.hasCheckedItems())}}function Cn(t,i){t&1&&(r(0,"tr")(1,"th",8),Z(2,"p-tableHeaderCheckbox"),a(),r(3,"th"),m(4,"Name"),a(),r(5,"th"),m(6,"Description"),a()())}function Sn(t,i){if(t&1&&(r(0,"tr")(1,"td"),Z(2,"p-tableCheckbox",9),a(),r(3,"td")(4,"a",10),m(5),a()(),r(6,"td"),m(7),a()()),t&2){let e=i.$implicit;p(2),c("value",e),p(2),c("routerLink",oe(4,gn,e.id)),p(),_(e.name),p(2),_(e.description)}}function vn(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=s();return S(l.onSelectAll(o))}),x(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),a()()}if(t&2){let e=s();p(),c("value",e.writeoffList().data)("tableStyle",z(2,_n))}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(k),this.writeoffList=I(null),this.hasCheckedItems=ee(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(X(e=>g(f({},e),{data:e.data.map(n=>g(f({},n),{checked:!1}))})),F(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=g(f({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(g(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>g(f({},l),{checked:e.checked}));this.writeoffList.set(g(f({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,3,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,w,B,ne,le,Ke,qe,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Pn(t,i){if(t&1){let e=v();r(0,"div",6)(1,"a",7),m(2,"Cancel"),a(),r(3,"p-button",8),y("onClick",function(){C(e);let o=s(2);return S(o.updateWriteOffConfiguration())}),a()()}}function bn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function On(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function In(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateAccountById(o,l))}),x(5,bn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=s(3);p(3),_(e.name),p(),c("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,i){if(t&1&&(r(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,In,9,5,"div",12,P),a()()()()()),t&2){let e=s(2);p(),q(z(2,yn)),p(4),O(e.writeOffForm().form)}}function Fn(t,i){if(t&1&&(r(0,"app-main-panel",5),x(1,Pn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),a()),t&2){let e=s();c("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var dt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.route=h(ie),this.writeOffForm=I(null)}ngOnInit(){this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),F(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=g(f({},this.writeOffForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&x(0,Fn,5,2,"app-main-panel",4),n&2&&c("ngIf",o.writeOffForm())},dependencies:[M,w,B,J,Ae,pe,re,j,W,H,V,te,A,D,G,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Re=(()=>{class t{constructor(){this.httpService=h(ve)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}getExpenseOptionsLoader(){return this.httpService.get(void 0,"/api/SetupExpenseOptionLoader/GetExpenseOptions")}updatePOSExpenseOptionConfiguration(e){return this.httpService.put(void 0,"/api/SetupExpenseOption/UpdateExpenseAccount",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Tn={data:{expenseOptions:[],options:{chartOfAccountOptions:[]}}},Ge=Fe(De(Tn),Ye("POSExpenseOptionStore"),Te(t=>({hasCheckedRows:ee(()=>t.data().expenseOptions.some(i=>i.checked)),checkedInvoice:ee(()=>t.data().expenseOptions.filter(i=>i.checked).map(i=>i.id))})),Me(t=>{let i=h(Re);return{onRowSelect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!0}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onRowUnselect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!1}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>g(f({},d),{checked:n}));return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},getExpenseOptions:de(ue(U(()=>i.getExpenseOptions().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{expenseOptions:n.expenseOptions.map(l=>g(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}}))))),getExpenseOptionsLoader:de(ue(U(()=>i.getExpenseOptionsLoader().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{options:{chartOfAccountOptions:n.options.chartOfAccountOptions}})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),we({onInit:t=>{t.getExpenseOptions(),t.getExpenseOptionsLoader()}}));function wn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSExpenseOptionConfiguration())}),a()()}}function Mn(t,i){if(t&1&&(r(0,"div",5)(1,"div",14)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function Dn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function An(t,i){if(t&1){let e=v();r(0,"div",10)(1,"div",11)(2,"label",12),m(3),a(),r(4,"p-select",13),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateData(o,l))}),x(5,Mn,4,1,"ng-template",null,2,u)(7,Dn,4,1,"ng-template",null,3,u),a()()()}if(t&2){let e,n=i.$implicit,o=i.$index,l=s(3);p(3),_(n.name),p(),c("options",l.store.data().options.chartOfAccountOptions)("ngModel",((e=l.expenseOptForm().ListData[o])==null?null:e.AccountID)||"")}}function kn(t,i){if(t&1&&b(0,An,9,3,"div",10,P),t&2){let e=s(2);O(e.store.data().expenseOptions)}}function Rn(t,i){t&1&&(r(0,"div",9)(1,"p"),m(2,"No expense options available."),a()())}function Ln(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",8),x(4,kn,2,0)(5,Rn,3,0,"div",9),a()()()()),t&2){let e=s();p(4),Ce(e.store.data().expenseOptions&&e.store.data().expenseOptions.length?4:5)}}var ft=(()=>{class t{constructor(){this.store=h(Ge),this.expenseOptService=h(Re),this.expenseOptForm=I({ListData:[]}),this.originalData=I([]),We(()=>{let e=this.store.data().expenseOptions;if(e&&e.length>0){let n=e.map(o=>({ID:o.id,AccountID:o.accountID||""}));this.expenseOptForm.set({ListData:n}),this.originalData.set([...n])}})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}updatePOSExpenseOptionConfiguration(){let e=this.expenseOptForm().ListData,n=this.originalData(),o=e.filter((d,L)=>{let ce=n[L];return ce&&d.AccountID!==ce.AccountID});if(o.length===0)return;let l={ListData:o};this.expenseOptService.updatePOSExpenseOptionConfiguration(l).pipe(F(d=>{console.log("Update response:",d),this.originalData.set([...e])})).subscribe()}updateData(e,n){let l=[...this.expenseOptForm().ListData];l[n]&&(l[n]=g(f({},l[n]),{AccountID:e}),this.expenseOptForm.set({ListData:l}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[Se([Ge])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Expense Option",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-12"],[1,"col-4"],[1,"d-flex","flex-column","card","rounded-3","p-3","border"],["for",""],["filter","","filterBy","key,value","optionLabel","value","optionValue","key","placeholder","Select COA",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,wn,4,0,"ng-template",null,0,u)(3,Ln,6,1,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,ne,$,Y,G,N,w,D,j,W,ae,V,H,te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var za=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:at},{path:"outlets",component:lt},{path:"outlets/:id",component:mt},{path:"payments",component:pt},{path:"payments/:id",component:st},{path:"taxs",component:ct},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:ft}]}];export{za as POS_SETUP_ROUTES};
1
+ import{a as Xe,b as Ze,c as et,d as tt,e as nt,f as ot}from"./chunk-RM5HLXNW.js";import{a as Qe}from"./chunk-G4XX7EU2.js";import{a as de,b as fe}from"./chunk-3VQUNDVT.js";import{d as le,e as Je,i as Ke,j as qe,k as ne}from"./chunk-DGACZ747.js";import"./chunk-EBEY2MBR.js";import"./chunk-AMGBUOC4.js";import"./chunk-UPSNJEHO.js";import{a as Le}from"./chunk-BT7Y4ADP.js";import{a as re,b as pe}from"./chunk-DJXQKSLT.js";import"./chunk-VKNINE5Q.js";import"./chunk-E7QWESN4.js";import{a as W,b as j}from"./chunk-AN4SAUSA.js";import"./chunk-URH77XNK.js";import"./chunk-PPXXWO4E.js";import"./chunk-3DBSHDAQ.js";import"./chunk-M4SSELXT.js";import{a as Ae,b as J}from"./chunk-WXIG4CXY.js";import"./chunk-QPPFPDWZ.js";import"./chunk-WMZF4DQK.js";import{i as M}from"./chunk-RAF7SWW4.js";import"./chunk-S27Z7D3D.js";import{a as Y,b as $}from"./chunk-AD247LWQ.js";import{b as Q,c as Fe,d as Te,e as we,f as Me,g as De,h as Ye}from"./chunk-BKTBVFNX.js";import"./chunk-ZFNIPERQ.js";import{o as He,w as N,x as G}from"./chunk-ME4ALIS7.js";import"./chunk-DTYVTTET.js";import{e as V,f as ye,j as te,k as Pe,l as be,m as Oe,n as ze,o as Ie,u as Ee,w as H,x as ae}from"./chunk-VMI3QWC6.js";import{b as ie,d as Ue,e as D,l as A}from"./chunk-F7PVAVLQ.js";import"./chunk-VFKJMUGN.js";import{a as ve}from"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{k as B,o as je,s as w}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{Dc as Se,Eb as x,Ec as z,Fc as oe,Ha as I,Mb as c,Oc as Ve,Pb as q,Pc as $e,Rb as Ce,Sb as P,Sc as u,Ub as b,Vb as O,Wb as r,Xb as a,Y as U,Yb as Z,_ as F,ac as v,bd as ee,c as ue,ca as he,cd as We,fc as y,gc as s,ia as h,ib as p,qa as C,ra as S,s as X,sc as m,tc as _,uc as E,wc as Be,yb as T}from"./chunk-6QJHEOXN.js";import{a as f,b as g}from"./chunk-YQFG5XE2.js";var k=(()=>{class t{constructor(){this.httpService=h(ve)}getGlobalConfiguration(){return this.httpService.get(void 0,"/api/setup/GlobalConfiguration")}saveGlobalConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitGlobalConfiguration",e)}fetchPOSOutletConfiguration(e){return this.httpService.get(void 0,"/api/Setup/OutletConfiguration",{params:e})}fetchPOSOutletFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/Setup/OutletConfigurationForm",n)}updatePOSOutletConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitOutletConfiguration",e)}fetchPOSPaymentConfiguration(e){return this.httpService.get(void 0,"/api/Setup/PaymentConfiguration",{params:e})}fetchPOSPaymentFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"api/Setup/PaymentConfigurationForm",n)}updatePOSPaymentConfiguration(e){return this.httpService.post(void 0,"/api/Setup/SubmitPaymentConfiguration",e)}fetchPOSTaxConfiguration(){return this.httpService.get(void 0,"/api/setup/TaxConfigurationForm")}updatePOSTaxConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitTaxConfiguration",e)}fetchPOSWriteOffConfiguration(){return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationList")}fetchPOSWriteOffFormConfiguration(e){let n={params:e};return this.httpService.get(void 0,"/api/setup/WriteOffConfigurationForm",n)}updatePOSWriteOffConfiguration(e){return this.httpService.post(void 0,"/api/setup/SubmitWriteOffConfiguration",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var R=function(t){return t.POSGLOBAL_SELL="Sell",t.POSGLOBAL_BUY="Buy",t.POSGLOBAL_ADJUSTMENT="Adjustment",t.POSGLOBAL_PREPAID="Prepaid",t.POSGLOBAL_RETURN="Return",t.POSGLOBAL_DEBT="Debt",t.POSGLOBAL_PAYMENTFEE="Payment Fee",t.POSGLOBAL_MANUFACTURING="Manufacturing",t.POSGLOBAL_ADVANCE="Advance",t}(R||{});var it={[R.POSGLOBAL_SELL]:[{typeID:2,side:"debit",label:"Account Receivable"},{typeID:1,side:"credit",label:"Sales"},{typeID:4,side:"debit",label:"COGS"},{typeID:3,side:"credit",label:"Sold Inventory"},{typeID:10,side:"debit",label:"Sales Discount"}],[R.POSGLOBAL_BUY]:[{typeID:27,side:"debit",label:"Pending Paid Inventory"},{typeID:5,side:"credit",label:"Account Payable"},{typeID:28,side:"debit",label:"Inventory Bought"},{typeID:27,side:"credit",label:"Pending Paid Inventory"},{typeID:11,side:"credit",label:"Purchase Discount"}],[R.POSGLOBAL_ADJUSTMENT]:[{typeID:26,side:"debit",label:"Adjustment Asset"},{typeID:21,side:"credit",label:"Adjustment Expense"}],[R.POSGLOBAL_PREPAID]:[{typeID:29,side:"debit",label:"Accounting for Prepaid"},{typeID:30,side:"debit",label:"Sales For Prepaid"}],[R.POSGLOBAL_RETURN]:[{typeID:8,side:"debit",label:"Sales Return"},{typeID:3,side:"debit",label:"Inventory"},{typeID:4,side:"credit",label:"COGS"},{typeID:9,side:"credit",label:"Purchase Return"}],[R.POSGLOBAL_DEBT]:[{typeID:17,side:"debit",label:"Consignment Payable"}],[R.POSGLOBAL_PAYMENTFEE]:[{typeID:19,side:"debit",label:"Payment Fee"},{typeID:20,side:"credit",label:"Surcharge"}],[R.POSGLOBAL_MANUFACTURING]:[{typeID:24,side:"debit",label:"Finished Goods"},{typeID:23,side:"credit",label:"Raw Material"},{typeID:25,side:"credit",label:"Production Expenses"}],[R.POSGLOBAL_ADVANCE]:[{typeID:15,side:"debit",label:"Crossing Account"},{typeID:16,side:"debit",label:"Retained Earnings"},{typeID:18,side:"debit",label:"Current Earnings"}]};function _t(t,i){if(t&1){let e=v();r(0,"div",5)(1,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.onSubmit())}),a()()}}function gt(t,i){if(t&1&&(r(0,"p-tab",10),m(1),a()),t&2){let e=i.$implicit;c("value",e.value),p(),_(e.label)}}function xt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function ht(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ct(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",17),m(6),a()(),r(7,"p-select",18),x(8,xt,7,2,"ng-template",null,2,u)(10,ht,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function St(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function vt(t,i){if(t&1&&(r(0,"div",19)(1,"div")(2,"span"),m(3),a()(),r(4,"div")(5,"span"),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function yt(t,i){if(t&1&&(r(0,"div",14)(1,"div",15)(2,"div",5)(3,"label",16),m(4),a(),r(5,"span",20),m(6),a()(),r(7,"p-select",18),x(8,St,7,2,"ng-template",null,2,u)(10,vt,7,2,"ng-template",null,3,u),a()()()),t&2){let e=i.$implicit,n=s(4);c("formGroupName",e.index),p(4),_(e.entry.value.label),p(2),_(e.entry.value.side),p(),c("options",n.posIntegration().options.accounts)}}function Pt(t,i){if(t&1&&(r(0,"p-tabpanel",10)(1,"div",11)(2,"div",12)(3,"div",13),b(4,Ct,12,4,"div",14,P),a()(),r(6,"div",12)(7,"div",13),b(8,yt,12,4,"div",14,P),a()()()()),t&2){let e=i.$implicit,n=s(3);c("value",e.value),p(),c("formGroupName",e.value),p(3),O(n.getDebitEntries(e.value)),p(4),O(n.getCreditEntries(e.value))}}function bt(t,i){if(t&1){let e=v();r(0,"form",8),y("ngSubmit",function(){C(e);let o=s(2);return S(o.onSubmit())}),r(1,"p-tabs",9)(2,"p-tablist"),b(3,gt,2,2,"p-tab",10,P),a(),r(5,"p-tabpanels"),b(6,Pt,10,2,"p-tabpanel",10,P),a()()()}if(t&2){let e=s(2);c("formGroup",e.accountForm),p(),c("value",e.tab())("lazy",!0),p(2),O(e.tabs()),p(3),O(e.tabs())}}function Ot(t,i){if(t&1&&x(0,bt,8,3,"form",7),t&2){let e=s();c("ngIf",e.posIntegration()&&e.accountForm)}}var at=(()=>{class t{constructor(){this.posConfigService=h(k),this.fb=h(Ee),this.tab=I(R.POSGLOBAL_SELL),this.tabs=I(Object.values(R).map(e=>({label:e,value:e}))),this.posIntegration=I(null),this.form=I([]),this.descriptionsMap=new Map,this.objectKeys=Object.keys,this.posGlobalTabEnum=R}ngOnInit(){this.posConfigService.getGlobalConfiguration().pipe(F(e=>{this.posIntegration.set(e),this.form.set(e.form),this.descriptionsMap=new Map(e.descriptions.map(n=>[+n.id,n.name])),this.initializeForm()})).subscribe()}initializeForm(){let e={};this.tabs().forEach(n=>{let o=this.getEntriesForTab(n.value);console.log(`Entries for ${n.value}:`,o),e[n.value]=this.fb.array(o.map(l=>this.createEntryFormGroup(l)))}),this.accountForm=this.fb.group(e)}createEntryFormGroup(e){let n=this.fb.group({typeID:[e.typeID],label:[e.label],side:[e.side],accountID:[this.getAccountIDByTypeID(e.typeID)]});return n.get("accountID").valueChanges.subscribe(o=>{this.syncAccountIDs(e.typeID,o,n)}),n}getAccountIDByTypeID(e){return this.form().find(o=>o.typeID===e)?.accountID||""}getEntriesForTab(e){return it[e]||[]}getTabEntries(e){return this.accountForm.get(e)}onSubmit(){let e=this.accountForm.getRawValue(),n=[],o=new Set;for(let l of Object.values(e))for(let{typeID:d,accountID:L}of l){let ce=`${d}_${L}`;o.has(ce)||(o.add(ce),n.push({typeID:d,accountID:L||Qe}))}console.log("Form submitted with value:",n),this.posConfigService.saveGlobalConfiguration({form:n}).subscribe({next:()=>console.log("Save successful"),error:l=>console.error("Save failed",l)})}getDebitEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="debit")}getCreditEntries(e){return this.getTabEntries(e).controls.map((n,o)=>({entry:n,index:o})).filter(n=>n.entry.value.side==="credit")}syncAccountIDs(e,n,o){Object.values(this.accountForm.controls).forEach(l=>{l.controls.forEach(d=>{d!==o&&d.get("typeID")?.value===e&&d.get("accountID")?.value!==n&&d.get("accountID")?.setValue(n,{emitEvent:!1})})})}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-global"]],decls:5,vars:0,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","POS Integration"],[1,"d-flex","gap-2"],["label","Submit",3,"onClick"],[3,"formGroup","ngSubmit",4,"ngIf"],[3,"ngSubmit","formGroup"],[1,"border-top",3,"value","lazy"],[3,"value"],[1,"row",3,"formGroupName"],[1,"col"],[1,"row","gap-3"],[1,"col-12",3,"formGroupName"],[1,"form-group","d-flex","flex-column"],["for","",1,"fs-3"],[1,"text-success","fs-3"],["filter","","filterBy","code,name","formControlName","accountID","optionLabel","name","optionValue","id",3,"options"],[1,"d-flex","align-items-center","gap-2"],[1,"text-danger","fs-3"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,_t,2,0,"ng-template",null,0,u)(3,Ot,1,1,"ng-template",null,1,u),a())},dependencies:[M,ot,nt,tt,et,Xe,Ze,He,j,W,H,Pe,V,ye,w,B,A,G,N,ae,be,Ie,Oe],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var It=t=>[t];function Et(t,i){if(t&1&&(r(0,"th",7),m(1),a()),t&2){let e=i.$implicit;p(),_(e.name.slice(0,10))}}function Ft(t,i){if(t&1&&(r(0,"tr")(1,"th",6),m(2,"Method"),a()(),r(3,"tr"),b(4,Et,2,1,"th",7,P),a()),t&2){let e=s(3);p(4),O(e.paymentConfiguration().outlets)}}function Tt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.accountName)}}function wt(t,i){if(t&1&&(r(0,"tr")(1,"td",8)(2,"a",9),m(3),a()(),b(4,Tt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,It,e.id)),p(),_(e.name),p(),O(e.accounts)}}function Mt(t,i){if(t&1&&(r(0,"p-table",5),x(1,Ft,6,0,"ng-template",null,1,u)(3,wt,6,4,"ng-template",null,2,u),a()),t&2){let e=s(2);c("value",e.paymentConfiguration().payment)}}function Dt(t,i){if(t&1){let e=v();r(0,"app-main-panel",4),y("search",function(o){C(e);let l=s();return S(l.onSearch(o))}),x(1,Mt,5,1,"ng-template",null,0,u),a()}t&2&&c("isSearchableInput",!0)("scrollable",!0)}var pt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.paymentConfiguration=I(null)}ngOnInit(){this.POSSetupService.fetchPOSPaymentConfiguration({}).pipe(F(e=>{this.paymentConfiguration.set(e)})).subscribe()}onSearch(e){this.POSSetupService.fetchPOSPaymentConfiguration({Search:e}).pipe(F(n=>{this.paymentConfiguration.set(n)})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment"]],decls:1,vars:1,consts:[["content",""],["header",""],["body",""],["pageTitle","Payment Method Accounting",3,"isSearchableInput","scrollable","search",4,"ngIf"],["pageTitle","Payment Method Accounting",3,"search","isSearchableInput","scrollable"],[3,"value"],["rowspan","3",2,"min-width","300px"],[2,"min-width","200px"],["pFrozenColumn",""],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&x(0,Dt,3,2,"app-main-panel",3),n&2&&c("ngIf",o.paymentConfiguration())},dependencies:[M,ne,le,Je,w,B,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var At={data:{listOutletAccount:[],listCOAType:[],pageNumber:1,pageSize:20,totalCount:0,totalPages:0},filter:{PageNumber:1,PageSize:20,Search:""}},Ne=Fe(De(At),Te(t=>({first:ee(()=>(t.filter().PageNumber-1)*t.filter().PageSize+1),end:ee(()=>Math.min(t.filter().PageNumber*t.filter().PageSize,t.data().totalCount))})),Me(t=>{let i=h(k);return{updateFilter:n=>{Q(t,o=>g(f({},o),{filter:f(f({},o.filter),n)}))},getPOSOutlets:de(ue(U(n=>i.fetchPOSOutletConfiguration(n).pipe(fe({next:o=>{Q(t,l=>g(f({},l),{data:o}))},error:o=>{console.error("Error fetching POS outlets:",o)}})))))}}),we(t=>({onInit:()=>{t.getPOSOutlets(t.filter)}})));var kt=t=>[t];function Rt(t,i){if(t&1&&(r(0,"th"),m(1),a()),t&2){let e=i.$implicit;p(),_(e.value)}}function Lt(t,i){if(t&1&&(r(0,"tr")(1,"th"),m(2,"Name"),a(),b(3,Rt,2,1,"th",null,P),a()),t&2){let e=s(2);p(3),O(e.store.data().listCOAType)}}function Nt(t,i){if(t&1&&(r(0,"td"),m(1),a()),t&2){let e=i.$implicit;p(),_(e)}}function Gt(t,i){if(t&1&&(r(0,"tr")(1,"td")(2,"a",7),m(3),a()(),b(4,Nt,2,1,"td",null,P),a()),t&2){let e=i.$implicit;p(2),c("routerLink",oe(2,kt,e.OutletID)),p(),E(" ",e.OutletName,""),p(),O(e.Accounts)}}function Bt(t,i){if(t&1&&m(0),t&2){let e=s(2);Be(" Showing ",e.store.first()," to ",e.store.end()," of ",e.store.data().totalCount," entries ")}}function Vt(t,i){t&1&&(r(0,"tr")(1,"td",8)(2,"span"),m(3," No journal entries found. "),a()()())}function $t(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",6),y("onPage",function(o){C(e);let l=s();return S(l.onPage(o))}),x(2,Lt,5,0,"ng-template",null,1,u)(4,Gt,6,4,"ng-template",null,2,u)(6,Bt,1,3,"ng-template",null,3,u)(8,Vt,4,0,"ng-template",null,4,u),a()()}if(t&2){let e=s();p(),c("value",e.store.data().listOutletAccount)("paginator",!0)("rows",e.store.filter().PageSize)("lazy",!0)("totalRecords",e.store.data().totalCount)}}var lt=(()=>{class t{constructor(){this.store=h(Ne)}onSearch(e){this.store.updateFilter({PageNumber:1,PageSize:20,Search:e})}onPage(e){let n=e.first/e.rows+1;this.store.updateFilter(g(f({},this.store.filter()),{PageSize:e.rows,PageNumber:n}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet"]],features:[Se([Ne])],decls:3,vars:2,consts:[["content",""],["header",""],["body",""],["paginatorleft",""],["emptymessage",""],["pageTitle","Outlet Account",3,"search","isSearchableInput","scrollable"],["styleClass","d-flex flex-column justify-content-between h-100",3,"onPage","value","paginator","rows","lazy","totalRecords"],[1,"link","link-primary",3,"routerLink"],["colspan","8"]],template:function(n,o){if(n&1){let l=v();r(0,"app-main-panel",5),y("search",function(L){return C(l),S(o.onSearch(L))}),x(1,$t,10,5,"ng-template",null,0,u),a()}n&2&&c("isSearchableInput",!0)("scrollable",!0)},dependencies:[M,w,J,ne,le,A,D,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Wt=()=>({height:"calc(100vh - 100px)"}),jt=()=>({height:"calc(100vh - 150px)"});function Ut(t,i){if(t&1){let e=v();r(0,"a",5),m(1,"Cancel"),a(),r(2,"p-button",6),y("onClick",function(){C(e);let o=s();return S(o.updatePOsOutletConfiguration())}),a()}}function zt(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Ht(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function Yt(t,i){if(t&1&&(r(0,"div",12)(1,"span",14),m(2),a(),r(3,"p-select",15),x(4,zt,7,2,"ng-template",null,2,u)(6,Ht,7,2,"ng-template",null,3,u),a()()),t&2){let e,n=i.$implicit,o=i.$index,l=s(3);c("formGroupName",o),p(2),_((e=n.get("TypeName"))==null?null:e.value),p(),c("options",l.options.accounts)}}function Jt(t,i){t&1&&Z(0,"hr")}function Kt(t,i){if(t&1&&(r(0,"div",9)(1,"h3",10),m(2),Ve(3,"titlecase"),a(),r(4,"div",11),b(5,Yt,8,3,"div",12,P),a()(),x(7,Jt,1,0,"hr",13)),t&2){let e,n=i.$implicit,o=i.$index,l=i.$index,d=i.$count,L=s(2);c("formGroupName",o),p(2),E(" ",$e(3,3,(e=n.get("groupName"))==null?null:e.value)," "),p(3),O(L.getAccountsFormArray(l).controls),p(2),c("ngIf",l!==d-1)}}function qt(t,i){if(t&1&&(r(0,"p-panel")(1,"p-scroll-panel")(2,"form",7)(3,"div",8),b(4,Kt,8,5,null,null,P),a()()()()),t&2){let e=s();q(z(5,Wt)),p(),q(z(6,jt)),p(),c("formGroup",e.accountsForm),p(2),O(e.accountGroupsArray.controls)}}var mt=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.outletForm=I(null),this.allAccounts=[],this.options=null,this.outletName="",this.accountGroups=[{name:"sell",typeIds:[1,2,10],accounts:[]},{name:"delivery",typeIds:[3,4],accounts:[]},{name:"buy",typeIds:[27,11,28],accounts:[]},{name:"purchase return",typeIds:[9],accounts:[]},{name:"sales return",typeIds:[8],accounts:[]},{name:"adjustment",typeIds:[21,26],accounts:[]}],this.fb=h(Ee)}ngOnInit(){this.accountsForm=this.fb.group({accountGroups:this.fb.array([])}),this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSOutletFormConfiguration({outletID:e})),F(e=>{this.allAccounts=e.form,this.options=e.options,this.outletName=e.form[0].OutletName,this.accountGroups.forEach(o=>{o.accounts=this.allAccounts.filter(l=>o.typeIds.includes(l.TypeID))});let n=this.accountsForm.get("accountGroups");this.accountGroups.forEach(o=>{n.push(this.createAccountGroupControl(o))})})).subscribe()}get accountGroupsArray(){return this.accountsForm.get("accountGroups")}getAccountsFormArray(e){return this.accountGroupsArray.at(e).get("accounts")}createAccountGroupControl(e){return this.fb.group({groupName:[e.name],accounts:this.fb.array(e.accounts.map(n=>this.createAccountControl(n)))})}createAccountControl(e){return this.fb.group({AccountID:[e.AccountID],TypeID:[e.TypeID],TypeName:[e.TypeName],OutletID:[e.OutletID],OutletName:[e.OutletName]})}updatePOsOutletConfiguration(){let{accountGroups:e}=this.accountsForm.value,n={form:e.flatMap(o=>o.accounts.map(l=>({AccountID:l.AccountID,TypeID:l.TypeID,TypeName:l.TypeName,OutletID:l.OutletID,OutletName:l.OutletName})))};this.POSSetupService.updatePOSOutletConfiguration(n).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-outlet-form"]],decls:5,vars:2,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],["routerLink","/pages/pos-setup/outlets",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"",3,"formGroup"],["formArrayName","accountGroups",1,"d-flex","flex-column","gap-2"],[1,"row",3,"formGroupName"],[1,"fs-4","fw-semibold"],["formArrayName","accounts",1,"row","row-gap-3"],[1,"col-6",3,"formGroupName"],[4,"ngIf"],[1,"fs-3"],["formControlName","AccountID","filter","","filterBy","code,name","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-100",3,"options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,Ut,3,0,"ng-template",null,0,u)(3,qt,6,7,"ng-template",null,1,u),a()),n&2&&c("pageTitle","Edit "+o.outletName)("hasMainWrapperPadding",!0)},dependencies:[M,w,B,je,J,ae,Pe,V,ye,be,Ie,Oe,ze,j,W,$,Y,re,G,N,A,D],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Zt=()=>({height:"calc(100vh - 100px)"}),en=()=>({width:"100%",height:"calc(100vh - 150px)"}),tn=()=>({width:"100%"});function nn(t,i){if(t&1){let e=v();r(0,"a",6),m(1,"Cancel"),a(),r(2,"p-button",7),y("onClick",function(){C(e);let o=s(3);return S(o.updatePOSOutletConfiguration())}),a()}}function on(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",17)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function an(t,i){if(t&1&&(r(0,"div",16)(1,"div",17)(2,"span"),m(3),a()(),r(4,"div",18)(5,"span",17),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function rn(t,i){if(t&1){let e=v();r(0,"div",9)(1,"div",10)(2,"div",11)(3,"label",12),m(4),a()(),Z(5,"div",13),r(6,"div",14)(7,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(4);return S(d.updateAccountById(o,l))}),x(8,on,7,2,"ng-template",null,2,u)(10,an,7,2,"ng-template",null,3,u),a()()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(4);p(4),_(e.outletName.slice(0,15)),p(3),q(z(7,tn)),c("ngModel",o.paymentForm().form.accounts[n].accountID)("virtualScroll",!0)("virtualScrollItemSize",50)("options",o.paymentForm().options.chartOfAccount)}}function pn(t,i){if(t&1&&(r(0,"p-card")(1,"p-scrollpanel")(2,"div",8),b(3,rn,12,8,"div",9,P),a()()()),t&2){let e=s(3);q(z(4,Zt)),p(),q(z(5,en)),p(2),O(e.paymentForm().form.accounts)}}function ln(t,i){if(t&1&&(r(0,"app-main-panel",4),x(1,nn,3,0,"ng-template",null,0,u)(3,pn,5,6,"ng-template",null,1,u),a()),t&2){let e=s(2);c("pageTitle",e.paymentForm().form.paymentMethod.name+" Form Accounting")("hasMainWrapperPadding",!0)}}function mn(t,i){if(t&1&&x(0,ln,5,2,"app-main-panel",5),t&2){let e=s();c("ngIf",e.paymentForm())}}var st=(()=>{class t{constructor(){this.route=h(ie),this.POSSetupService=h(k),this.paymentForm=I(null),this.router=h(Ue)}ngOnInit(){this.route.paramMap.pipe(X(e=>+e.get("id")),U(e=>this.POSSetupService.fetchPOSPaymentFormConfiguration({ID:e})),F(e=>{this.paymentForm.set(e)}),Le("response")).subscribe()}updateAccountById(e,n){let o=this.paymentForm().form.accounts,l=g(f({},this.paymentForm()),{form:g(f({},this.paymentForm().form),{accounts:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)})});this.paymentForm.set(l)}updatePOSOutletConfiguration(){let e={form:[...this.paymentForm().form.accounts]};this.POSSetupService.updatePOSPaymentConfiguration(e).pipe(Le("response"),F(()=>{this.router.navigate(["/pages/pos-setup/payments"])})).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-payment-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding"],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],["routerLink","/pages/pos-setup/payments",1,"p-button","p-button-outlined","p-button-secondary"],["label","Submit",3,"onClick"],[1,"row","row-gap-3"],[1,"col-6","d-flex","flex-column","gap-2"],[1,"row","row-gap-4"],[1,"col-2"],["for",""],[1,"col-3"],[1,"col-7"],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an account",1,"w-full",3,"ngModelChange","ngModel","virtualScroll","virtualScrollItemSize","options"],[1,"d-flex","gap-2"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&x(0,mn,1,1,"app-main-panel",4),n&2&&Ce(o.paymentForm()?0:-1)},dependencies:[J,Ae,M,w,B,pe,re,j,W,H,V,te,A,D,G,N,$],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();function sn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSTaxConfiguration())}),a()()}}function cn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",15)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function un(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span"),m(3),a()(),r(4,"div",16)(5,"span",15),m(6),a()()()),t&2){let e=i.$implicit;p(3),E("(",e.code,")"),p(3),_(e.name)}}function dn(t,i){if(t&1){let e=v();r(0,"div",11)(1,"div",12)(2,"label",13),m(3),a(),r(4,"p-select",14),y("ngModelChange",function(o){let l=C(e).$index,d=s(2);return S(d.updateAccountID(o,l))}),x(5,cn,7,2,"ng-template",null,2,u)(7,un,7,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=i.$index,o=s(2);p(3),_(e.name),p(),c("options",o.taxForm().options.chartOfAccount)("ngModel",o.taxForm().form[n].accountID)}}function fn(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",10),b(4,dn,9,3,"div",11,P),a()()()()),t&2){let e=s();p(4),O(e.taxForm().form)}}var ct=(()=>{class t{constructor(){this.POSSetupService=h(k),this.taxForm=I(null)}ngOnInit(){this.POSSetupService.fetchPOSTaxConfiguration().pipe(F(e=>{this.taxForm.set(e)})).subscribe()}updateAccountID(e,n){let o=this.taxForm().form,l=g(f({},this.taxForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.taxForm.set(l)}updatePOSTaxConfiguration(){let e={form:[...this.taxForm().form]};this.POSSetupService.updatePOSTaxConfiguration(e).pipe(F(n=>console.log(n))).subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-tax"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Tax Setup",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-4"],[1,"row","row-gap-3"],[1,"col-12"],[1,"d-flex","flex-column"],["for",""],["filter","","filterBy","name,code","optionLabel","name","optionValue","id","placeholder","Select an Account",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,sn,4,0,"ng-template",null,0,u)(3,fn,6,0,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,J,w,j,W,pe,H,V,te,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var _n=()=>({"min-width":"50rem"}),gn=t=>[t];function xn(t,i){t&1&&Z(0,"p-button",6)}function hn(t,i){if(t&1&&x(0,xn,1,0,"p-button",5),t&2){let e=s();c("ngIf",e.hasCheckedItems())}}function Cn(t,i){t&1&&(r(0,"tr")(1,"th",8),Z(2,"p-tableHeaderCheckbox"),a(),r(3,"th"),m(4,"Name"),a(),r(5,"th"),m(6,"Description"),a()())}function Sn(t,i){if(t&1&&(r(0,"tr")(1,"td"),Z(2,"p-tableCheckbox",9),a(),r(3,"td")(4,"a",10),m(5),a()(),r(6,"td"),m(7),a()()),t&2){let e=i.$implicit;p(2),c("value",e),p(2),c("routerLink",oe(4,gn,e.id)),p(),_(e.name),p(2),_(e.description)}}function vn(t,i){if(t&1){let e=v();r(0,"p-panel")(1,"p-table",7),y("onRowSelect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onRowUnselect",function(o){C(e);let l=s();return S(l.onRowSelect(o))})("onHeaderCheckboxToggle",function(o){C(e);let l=s();return S(l.onSelectAll(o))}),x(2,Cn,7,0,"ng-template",null,2,u)(4,Sn,8,6,"ng-template",null,3,u),a()()}if(t&2){let e=s();p(),c("value",e.writeoffList().data)("tableStyle",z(2,_n))}}var ut=(()=>{class t{constructor(){this.POSSetupService=h(k),this.writeoffList=I(null),this.hasCheckedItems=ee(()=>{let e=this.writeoffList();return!e||!e.data||!Array.isArray(e.data)?!1:e.data.some(n=>n&&n.checked===!0)})}ngOnInit(){this.POSSetupService.fetchPOSWriteOffConfiguration().pipe(X(e=>g(f({},e),{data:e.data.map(n=>g(f({},n),{checked:!1}))})),F(e=>{this.writeoffList.set(e)})).subscribe()}onRowSelect(e){console.log("Selected Row:",e.data);let n=this.writeoffList();if(!n||!n.data)return;let o=n.data.findIndex(l=>l.id===e.data.id);if(o!==-1){let l=[...n.data];l[o]=g(f({},l[o]),{checked:!l[o].checked}),this.writeoffList.set(g(f({},n),{data:l}))}}onSelectAll(e){let n=this.writeoffList();if(!n?.data)return;let o=n.data.map(l=>g(f({},l),{checked:e.checked}));this.writeoffList.set(g(f({},n),{data:o}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff"]],decls:5,vars:1,consts:[["actionButton",""],["content",""],["header",""],["body",""],["pageTitle","Write Off",3,"scrollable"],["severity","danger","label","Delete","icon","fa-solid fa-trash",4,"ngIf"],["severity","danger","label","Delete","icon","fa-solid fa-trash"],["dataKey","id",3,"onRowSelect","onRowUnselect","onHeaderCheckboxToggle","value","tableStyle"],[2,"width","1rem"],[3,"value"],[1,"link-primary",3,"routerLink"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,hn,1,1,"ng-template",null,0,u)(3,vn,6,3,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,w,B,ne,le,Ke,qe,A,D,G,N,$,Y],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var yn=()=>({witdh:"100%",height:"calc(100vh - 150px)"});function Pn(t,i){if(t&1){let e=v();r(0,"div",6)(1,"a",7),m(2,"Cancel"),a(),r(3,"p-button",8),y("onClick",function(){C(e);let o=s(2);return S(o.updateWriteOffConfiguration())}),a()()}}function bn(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function On(t,i){if(t&1&&(r(0,"div",6)(1,"span",16),m(2),a(),r(3,"span",16),m(4),a()()),t&2){let e=i.$implicit;p(2),E("(",e.code,")"),p(2),_(e.name)}}function In(t,i){if(t&1){let e=v();r(0,"div",12)(1,"div",13)(2,"label",14),m(3),a(),r(4,"p-select",15),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateAccountById(o,l))}),x(5,bn,5,2,"ng-template",null,2,u)(7,On,5,2,"ng-template",null,3,u),a()()()}if(t&2){let e=i.$implicit,n=s(3);p(3),_(e.name),p(),c("ngModel",e.accountID)("options",n.writeOffForm().options.account)("virtualScroll",!0)("virtualScrollItemSize",50)}}function En(t,i){if(t&1&&(r(0,"p-card")(1,"p-scroll-panel")(2,"div",9)(3,"div",10)(4,"div",11),b(5,In,9,5,"div",12,P),a()()()()()),t&2){let e=s(2);p(),q(z(2,yn)),p(4),O(e.writeOffForm().form)}}function Fn(t,i){if(t&1&&(r(0,"app-main-panel",5),x(1,Pn,4,0,"ng-template",null,0,u)(3,En,7,3,"ng-template",null,1,u),a()),t&2){let e=s();c("pageTitle","Write Off Form "+e.writeOffForm().info.name)("hasMainWrapperPadding",!0)}}var dt=(()=>{class t{constructor(){this.POSSetupService=h(k),this.route=h(ie),this.writeOffForm=I(null)}ngOnInit(){this.route.paramMap.pipe(X(e=>e.get("id")),U(e=>this.POSSetupService.fetchPOSWriteOffFormConfiguration({ID:e})),F(e=>this.writeOffForm.set(e))).subscribe()}updateAccountById(e,n){let o=this.writeOffForm().form,l=g(f({},this.writeOffForm()),{form:o.map((d,L)=>L===n?g(f({},d),{accountID:e}):d)});this.writeOffForm.set(l)}updateWriteOffConfiguration(){let e={form:this.writeOffForm().form};this.POSSetupService.updatePOSWriteOffConfiguration(e).pipe().subscribe()}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-writeoff-form"]],decls:1,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],[3,"pageTitle","hasMainWrapperPadding",4,"ngIf"],[3,"pageTitle","hasMainWrapperPadding"],[1,"d-flex","gap-2"],["routerLink","/pages/pos-setup/writeoff",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col"],[1,"row","row-gap-3"],[1,"col-3"],[1,"d-flex","flex-column"],["for","",1,"d-inline-block","text-truncate",2,"max-width","300px"],["filter","","filterBy","name,code","optionLabel","name","filter","","filterBy","name,code","optionValue","id","placeholder","Select an account",3,"ngModelChange","ngModel","options","virtualScroll","virtualScrollItemSize"],[1,""]],template:function(n,o){n&1&&x(0,Fn,5,2,"app-main-panel",4),n&2&&c("ngIf",o.writeOffForm())},dependencies:[M,w,B,J,Ae,pe,re,j,W,H,V,te,A,D,G,N],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var Re=(()=>{class t{constructor(){this.httpService=h(ve)}getExpenseOptions(){return this.httpService.get(void 0,"/api/SetupExpenseOption/GetExpenseOptions")}getExpenseOptionsLoader(){return this.httpService.get(void 0,"/api/SetupExpenseOptionLoader/GetExpenseOptions")}updatePOSExpenseOptionConfiguration(e){return this.httpService.put(void 0,"/api/SetupExpenseOption/UpdateExpenseAccount",e)}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275prov=he({token:t,factory:t.\u0275fac,providedIn:"root"})}}return t})();var Tn={data:{expenseOptions:[],options:{chartOfAccountOptions:[]}}},Ge=Fe(De(Tn),Ye("POSExpenseOptionStore"),Te(t=>({hasCheckedRows:ee(()=>t.data().expenseOptions.some(i=>i.checked)),checkedInvoice:ee(()=>t.data().expenseOptions.filter(i=>i.checked).map(i=>i.id))})),Me(t=>{let i=h(Re);return{onRowSelect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!0}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onRowUnselect(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>d.id===n.id?g(f({},d),{checked:!1}):d);return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},onHeaderCheckboxToggle(n){Q(t,o=>{let l=o.data.expenseOptions.map(d=>g(f({},d),{checked:n}));return g(f({},o),{data:g(f({},o.data),{expenseOptions:l})})})},getExpenseOptions:de(ue(U(()=>i.getExpenseOptions().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{expenseOptions:n.expenseOptions.map(l=>g(f({},l),{checked:!1}))})}))},error:n=>{console.error("Error fetching expense options:",n)}}))))),getExpenseOptionsLoader:de(ue(U(()=>i.getExpenseOptionsLoader().pipe(fe({next:n=>{Q(t,o=>g(f({},o),{data:g(f({},o.data),{options:{chartOfAccountOptions:n.options.chartOfAccountOptions}})}))},error:n=>{console.error("Error fetching expense options:",n)}})))))}}),we({onInit:t=>{t.getExpenseOptions(),t.getExpenseOptionsLoader()}}));function wn(t,i){if(t&1){let e=v();r(0,"div",5)(1,"a",6),m(2,"Cancel"),a(),r(3,"p-button",7),y("onClick",function(){C(e);let o=s();return S(o.updatePOSExpenseOptionConfiguration())}),a()()}}function Mn(t,i){if(t&1&&(r(0,"div",5)(1,"div",14)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function Dn(t,i){if(t&1&&(r(0,"div",5)(1,"div",15)(2,"span",14),m(3),a()()()),t&2){let e=i.$implicit;p(3),_(e.value)}}function An(t,i){if(t&1){let e=v();r(0,"div",10)(1,"div",11)(2,"label",12),m(3),a(),r(4,"p-select",13),y("ngModelChange",function(o){let l=C(e).$index,d=s(3);return S(d.updateData(o,l))}),x(5,Mn,4,1,"ng-template",null,2,u)(7,Dn,4,1,"ng-template",null,3,u),a()()()}if(t&2){let e,n=i.$implicit,o=i.$index,l=s(3);p(3),_(n.name),p(),c("options",l.store.data().options.chartOfAccountOptions)("ngModel",((e=l.expenseOptForm().ListData[o])==null?null:e.AccountID)||"")}}function kn(t,i){if(t&1&&b(0,An,9,3,"div",10,P),t&2){let e=s(2);O(e.store.data().expenseOptions)}}function Rn(t,i){t&1&&(r(0,"div",9)(1,"p"),m(2,"No expense options available."),a()())}function Ln(t,i){if(t&1&&(r(0,"p-panel")(1,"div",8)(2,"div",9)(3,"div",8),x(4,kn,2,0)(5,Rn,3,0,"div",9),a()()()()),t&2){let e=s();p(4),Ce(e.store.data().expenseOptions&&e.store.data().expenseOptions.length?4:5)}}var ft=(()=>{class t{constructor(){this.store=h(Ge),this.expenseOptService=h(Re),this.expenseOptForm=I({ListData:[]}),this.originalData=I([]),We(()=>{let e=this.store.data().expenseOptions;if(e&&e.length>0){let n=e.map(o=>({ID:o.id,AccountID:o.accountID||""}));this.expenseOptForm.set({ListData:n}),this.originalData.set([...n])}})}onRowSelect(e){this.store.onRowSelect(e.data)}onRowUnselect(e){Array.isArray(e.data)?e.data.forEach(n=>{this.store.onRowUnselect(n)}):this.store.onRowUnselect(e.data)}onHeaderCheckboxToggle(e){this.store.onHeaderCheckboxToggle(e.checked)}updatePOSExpenseOptionConfiguration(){let e=this.expenseOptForm().ListData,n=this.originalData(),o=e.filter((d,L)=>{let ce=n[L];return ce&&d.AccountID!==ce.AccountID});if(o.length===0)return;let l={ListData:o};this.expenseOptService.updatePOSExpenseOptionConfiguration(l).pipe(F(d=>{console.log("Update response:",d),this.originalData.set([...e])})).subscribe()}updateData(e,n){let l=[...this.expenseOptForm().ListData];l[n]&&(l[n]=g(f({},l[n]),{AccountID:e}),this.expenseOptForm.set({ListData:l}))}static{this.\u0275fac=function(n){return new(n||t)}}static{this.\u0275cmp=T({type:t,selectors:[["app-pos-expense-option"]],features:[Se([Ge])],decls:5,vars:1,consts:[["actionButton",""],["content",""],["selectedItem",""],["item",""],["pageTitle","Expense Option",3,"scrollable"],[1,"d-flex","gap-2"],["routerLink","..",1,"p-button","p-button-secondary","p-button-outlined"],["label","Submit",3,"onClick"],[1,"row"],[1,"col-12"],[1,"col-4"],[1,"d-flex","flex-column","card","rounded-3","p-3","border"],["for",""],["filter","","filterBy","key,value","optionLabel","value","optionValue","key","placeholder","Select COA",3,"ngModelChange","options","ngModel"],[1,""],[1,"d-inline-block","text-truncate",2,"max-width","250px"]],template:function(n,o){n&1&&(r(0,"app-main-panel",4),x(1,wn,4,0,"ng-template",null,0,u)(3,Ln,6,1,"ng-template",null,1,u),a()),n&2&&c("scrollable",!0)},dependencies:[M,ne,$,Y,G,N,w,D,j,W,ae,V,H,te],styles:["[_nghost-%COMP%]{display:block}"],changeDetection:0})}}return t})();var za=[{path:"",redirectTo:"global",pathMatch:"full"},{path:"",children:[{path:"global",component:at},{path:"outlets",component:lt},{path:"outlets/:id",component:mt},{path:"payments",component:pt},{path:"payments/:id",component:st},{path:"taxs",component:ct},{path:"writeoff",component:ut},{path:"writeoff/:id",component:dt},{path:"expense-option",component:ft}]}];export{za as POS_SETUP_ROUTES};
@@ -1,4 +1,4 @@
1
- import{b as Qe,c as Ye,d as Qi}from"./chunk-ES2YST7G.js";import{a as It,b as Fe,c as qe,d as Pe,e as wt,f as yi}from"./chunk-ENH6HA3V.js";import{a as hi}from"./chunk-2RI2WRFG.js";import{a as Fi,b as Pi}from"./chunk-2XW2ZOT4.js";import{a as Ui}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import{a as Ki,b as tt}from"./chunk-DJXQKSLT.js";import{a as Vi}from"./chunk-PPXXWO4E.js";import{a as Ai,b as Ni,c as $i}from"./chunk-3DBSHDAQ.js";import{a as Mi}from"./chunk-M4SSELXT.js";import{b as Wi}from"./chunk-AD247LWQ.js";import{a as qi,i as Yi}from"./chunk-BKTBVFNX.js";import{b as gi,c as bi,e as vi,g as Ct,h as xi}from"./chunk-ZFNIPERQ.js";import{a as Li,j as Bi,l as zi,n as ji,p as Hi,y as Gi,z as Zi}from"./chunk-ME4ALIS7.js";import{a as fi}from"./chunk-DTYVTTET.js";import{Aa as Si,Da as ki,Ga as Ti,Ja as Di,Ka as Ei,La as Oi,Ma as et,Q as Ci,R as we,U as St,Ua as Ri,a as ui,e as pi,j as _i,na as Ii,pa as wi,qa as Xe,ra as Se,sa as Je,va as Ae,w as Ze,x as mi}from"./chunk-VMI3QWC6.js";import{b as ci,c as di,d as Ce,e as Ue,f as Ge,l as Ie}from"./chunk-F7PVAVLQ.js";import"./chunk-C4W7XYJD.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{a as ue,h as re,j as si,k as oi,l as ri,m as ai,s as ae,w as li}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{$b as $,$c as Le,Aa as O,Ab as $e,B as Kt,Ba as he,C as Be,Cb as bt,D as Wt,Dc as oe,Eb as m,Ec as xe,Fa as te,Fc as v,Gc as Re,H as _t,Ha as N,Hc as ti,Ic as ii,Kb as ei,Lb as R,Mb as h,N as Ut,Nb as vt,Ob as H,Oc as B,Pb as Ee,Pc as Z,Qb as Oe,Qc as yt,Rb as S,Sc as ee,Ta as Qt,Tb as ie,Ub as ne,Vb as se,Wb as u,Wc as ye,X as ze,Xb as p,Y as mt,Yb as I,Z as me,Zb as X,_ as je,_b as J,_c as E,a as de,ac as L,ba as Gt,bd as We,ca as q,d as De,da as fe,eb as Yt,ed as ni,fa as ge,fc as y,g as w,gb as Xt,gc as l,h as Ve,ha as M,hc as xt,ia as F,ib as c,ic as Ke,j as pt,lc as P,m as jt,ma as Zt,mc as U,nb as Jt,nc as k,ob as x,oc as T,pa as ft,qa as f,qb as gt,ra as g,rc as ve,s as Ht,sc as C,tc as V,ua as qt,uc as G,wa as He,yb as W,z as $t,zb as be}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function it(n,s=0){return Gn(n)?Number(n):arguments.length===2?s:0}function Gn(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Xi(n){return Array.isArray(n)?n:[n]}function Q(n){return n instanceof te?n.nativeElement:n}var Ji={theme:"light",dir:"ltr",layout:"vertical",sidebartype:"full",boxed:"boxed",colorTheme:"Blue_Theme",cardType:"shadow"};var qn=20,en=(()=>{class n{constructor(e,t,i){this._ngZone=e,this._platform=t,this._scrolled=new w,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=qn){return this._platform.isBrowser?new De(t=>{this._globalSubscription||this._addGlobalListener();let i=e>0?this._scrolled.pipe(_t(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):jt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let i=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(Wt(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,e)&&t.push(o)}),t}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,t){let i=Q(t),o=e.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let e=this._getWindow();return $t(e.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(t){return new(t||n)(M(he),M(It),M(ue,8))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Qn=20,tn=(()=>{class n{constructor(e,t,i){this._platform=e,this._change=new w,this._changeListener=o=>{this._change.next(o)},this._document=i,t.runOutsideAngular(()=>{if(e.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:i}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+t,height:i,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),i=e.documentElement,o=i.getBoundingClientRect(),r=-o.top||e.body.scrollTop||t.scrollY||i.scrollTop||0,a=-o.left||e.body.scrollLeft||t.scrollX||i.scrollLeft||0;return{top:r,left:a}}change(e=Qn){return e>0?this._change.pipe(_t(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(t){return new(t||n)(M(It),M(he),M(ue,8))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nn=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=be({type:n})}static{this.\u0275inj=fe({})}}return n})();function sn(n){return n.buttons===0||n.detail===0}function on(n){let s=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!!s&&s.identifier===-1&&(s.radiusX==null||s.radiusX===1)&&(s.radiusY==null||s.radiusY===1)}function In(n){let s=n.cloneNode(!0),e=s.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();s.removeAttribute("id");for(let i=0;i<e.length;i++)e[i].removeAttribute("id");return t==="canvas"?ln(n,s):(t==="input"||t==="select"||t==="textarea")&&an(n,s),rn("canvas",n,s,ln),rn("input, textarea, select",n,s,an),s}function rn(n,s,e,t){let i=s.querySelectorAll(n);if(i.length){let o=e.querySelectorAll(n);for(let r=0;r<i.length;r++)t(i[r],o[r])}}var Xn=0;function an(n,s){s.type!=="file"&&(s.value=n.value),s.type==="radio"&&s.name&&(s.name=`mat-clone-${s.name}-${Xn++}`)}function ln(n,s){let e=s.getContext("2d");if(e)try{e.drawImage(n,0,0)}catch{}}function Lt(n){let s=n.getBoundingClientRect();return{top:s.top,right:s.right,bottom:s.bottom,left:s.left,width:s.width,height:s.height,x:s.x,y:s.y}}function Tt(n,s,e){let{top:t,bottom:i,left:o,right:r}=n;return e>=t&&e<=i&&s>=o&&s<=r}function Ne(n,s,e){n.top+=s,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function cn(n,s,e,t){let{top:i,right:o,bottom:r,left:a,width:d,height:_}=n,b=d*s,D=_*s;return t>i-D&&t<r+D&&e>a-b&&e<o+b}var rt=class{constructor(s){this._document=s,this.positions=new Map}clear(){this.positions.clear()}cache(s){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),s.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Lt(e)})})}handleScroll(s){let e=Pe(s),t=this.positions.get(e);if(!t)return null;let i=t.scrollPosition,o,r;if(e===this._document){let _=this.getViewportScrollPosition();o=_.top,r=_.left}else o=e.scrollTop,r=e.scrollLeft;let a=i.top-o,d=i.left-r;return this.positions.forEach((_,b)=>{_.clientRect&&e!==b&&e.contains(b)&&Ne(_.clientRect,a,d)}),i.top=o,i.left=r,{top:a,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function wn(n,s){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===s.ELEMENT_NODE)return e[0];let t=s.createElement("div");return e.forEach(i=>t.appendChild(i)),t}function Ft(n,s,e){for(let t in s)if(s.hasOwnProperty(t)){let i=s[t];i?n.setProperty(t,i,e?.has(t)?"important":""):n.removeProperty(t)}return n}function Te(n,s){let e=s?"":"none";Ft(n.style,{"touch-action":s?"":"none","-webkit-user-drag":s?"":"none","-webkit-tap-highlight-color":s?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function dn(n,s,e){Ft(n.style,{position:s?"":"fixed",top:s?"":"0",opacity:s?"":"0",left:s?"":"-999em"},e)}function at(n,s){return s&&s!="none"?n+" "+s:n}function hn(n,s){n.style.width=`${s.width}px`,n.style.height=`${s.height}px`,n.style.transform=lt(s.left,s.top)}function lt(n,s){return`translate3d(${Math.round(n)}px, ${Math.round(s)}px, 0)`}function un(n){let s=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*s}function Jn(n){let s=getComputedStyle(n),e=kt(s,"transition-property"),t=e.find(a=>a==="transform"||a==="all");if(!t)return 0;let i=e.indexOf(t),o=kt(s,"transition-duration"),r=kt(s,"transition-delay");return un(o[i])+un(r[i])}function kt(n,s){return n.getPropertyValue(s).split(",").map(t=>t.trim())}var es=new Set(["position"]),Dt=class{get element(){return this._preview}constructor(s,e,t,i,o,r,a,d,_){this._document=s,this._rootElement=e,this._direction=t,this._initialDomRect=i,this._previewTemplate=o,this._previewClass=r,this._pickupPositionOnPage=a,this._initialTransform=d,this._zIndex=_}attach(s){this._preview=this._createPreview(),s.appendChild(this._preview),pn(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(s){this._preview.style.transform=s}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(s){this._preview.classList.add(s)}getTransitionDuration(){return Jn(this._preview)}addEventListener(s,e){this._preview.addEventListener(s,e)}removeEventListener(s,e){this._preview.removeEventListener(s,e)}_createPreview(){let s=this._previewTemplate,e=this._previewClass,t=s?s.template:null,i;if(t&&s){let o=s.matchSize?this._initialDomRect:null,r=s.viewContainer.createEmbeddedView(t,s.context);r.detectChanges(),i=wn(r,this._document),this._previewEmbeddedView=r,s.matchSize?hn(i,o):i.style.transform=lt(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=In(this._rootElement),hn(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return Ft(i.style,{"pointer-events":"none",margin:pn(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},es),Te(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>i.classList.add(o)):i.classList.add(e)),i}};function pn(n){return"showPopover"in n}var _n=Fe({passive:!0}),nt=Fe({passive:!1}),mn=Fe({passive:!1,capture:!0}),ts=800,fn=new Set(["position"]),Et=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(s){s!==this._disabled&&(this._disabled=s,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Te(e,s)))}constructor(s,e,t,i,o,r){this._config=e,this._document=t,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=N(!1),this._moveEvents=new w,this._pointerMoveSubscription=de.EMPTY,this._pointerUpSubscription=de.EMPTY,this._scrollSubscription=de.EMPTY,this._resizeSubscription=de.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new w,this.started=new w,this.released=new w,this.ended=new w,this.entered=new w,this.exited=new w,this.dropped=new w,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let d=this._getTargetHandle(a);d&&!this._disabledHandles.has(d)&&!this.disabled&&this._initializeDragSequence(d,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let d=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let b=Math.abs(d.x-this._pickupPositionOnPage.x),D=Math.abs(d.y-this._pickupPositionOnPage.y);if(b+D>=this._config.dragStartThreshold){let le=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),ce=this._dropContainer;if(!le){this._endDragSequence(a);return}(!ce||!ce.isDragging()&&!ce.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let _=this._getConstrainedPointerPosition(d);if(this._hasMoved=!0,this._lastKnownPointerPosition=d,this._updatePointerDirectionDelta(_),this._dropContainer)this._updateActiveDropContainer(_,d);else{let b=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,D=this._activeTransform;D.x=_.x-b.x+this._passiveTransform.x,D.y=_.y-b.y+this._passiveTransform.y,this._applyRootElementTransform(D.x,D.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:_,event:a,distance:this._getDragDistance(_),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let d=this._getTargetHandle(a);d&&!this._disabledHandles.has(d)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(s).withParent(e.parentDragRef||null),this._parentPositions=new rt(t),r.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(s){this._handles=s.map(t=>Q(t)),this._handles.forEach(t=>Te(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(s){return this._previewTemplate=s,this}withPlaceholderTemplate(s){return this._placeholderTemplate=s,this}withRootElement(s){let e=Q(s);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,nt),e.addEventListener("touchstart",this._pointerDown,_n),e.addEventListener("dragstart",this._nativeDragStart,nt)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(s){return this._boundaryElement=s?Q(s):null,this._resizeSubscription.unsubscribe(),s&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(s){return this._parentDragRef=s,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(s){!this._disabledHandles.has(s)&&this._handles.indexOf(s)>-1&&(this._disabledHandles.add(s),Te(s,!0))}enableHandle(s){this._disabledHandles.has(s)&&(this._disabledHandles.delete(s),Te(s,this.disabled))}withDirection(s){return this._direction=s,this}_withDropContainer(s){this._dropContainer=s}getFreeDragPosition(){let s=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:s.x,y:s.y}}setFreeDragPosition(s){return this._activeTransform={x:0,y:0},this._passiveTransform.x=s.x,this._passiveTransform.y=s.y,this._dropContainer||this._applyRootElementTransform(s.x,s.y),this}withPreviewContainer(s){return this._previewContainer=s,this}_sortFromLastPointerPosition(){let s=this._lastKnownPointerPosition;s&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(s),s)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",bn,mn)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(s){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:s}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(s),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(s);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:s})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(s){Me(s)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{e.addEventListener("selectstart",bn,mn)}),t){let i=this._rootElement,o=i.parentNode,r=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,i),this._initialTransform=i.style.transform||"",this._preview=new Dt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,e)),dn(i,!1,fn),this._document.body.appendChild(o.replaceChild(r,i)),this.started.next({source:this,event:s}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:s}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(s,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),i=Me(e),o=!i&&e.button!==0,r=this._rootElement,a=Pe(e),d=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+ts>Date.now(),_=i?on(e):sn(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),t||o||d||_)return;if(this._handles.length){let z=r.style;this._rootElementTapHighlight=z.webkitTapHighlightColor||"",z.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(z=>this._updateOnScroll(z)),this._boundaryElement&&(this._boundaryRect=Lt(this._boundaryElement));let b=this._previewTemplate;this._pickupPositionInElement=b&&b.template&&!b.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,s,e);let D=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:D.x,y:D.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(s){dn(this._rootElement,!0,fn),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,t=e.getItemIndex(this),i=this._getPointerPositionOnPage(s),o=this._getDragDistance(i),r=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:s}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:o,dropPoint:i,event:s}),e.drop(this,t,this._initialIndex,this._initialContainer,r,o,i,s),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:s,y:e},{x:t,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,s,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(s,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,s,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,i),this._dropContainer._sortItem(this,s,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(s,e):this._applyPreviewTransform(s-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let s=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(s.left,s.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let i=r=>{(!r||this._preview&&Pe(r)===this._preview.element&&r.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",i),t(),clearTimeout(o))},o=setTimeout(i,e*1.5);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let s=this._placeholderTemplate,e=s?s.template:null,t;return e?(this._placeholderRef=s.viewContainer.createEmbeddedView(e,s.context),this._placeholderRef.detectChanges(),t=wn(this._placeholderRef,this._document)):t=In(this._rootElement),t.style.pointerEvents="none",t.classList.add("cdk-drag-placeholder"),t}_getPointerPositionInElement(s,e,t){let i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():s,r=Me(t)?t.targetTouches[0]:t,a=this._getViewportScrollPosition(),d=r.pageX-o.left-a.left,_=r.pageY-o.top-a.top;return{x:o.left-s.left+d,y:o.top-s.top+_}}_getPointerPositionOnPage(s){let e=this._getViewportScrollPosition(),t=Me(s)?s.touches[0]||s.changedTouches[0]||{pageX:0,pageY:0}:s,i=t.pageX-e.left,o=t.pageY-e.top;if(this._ownerSVGElement){let r=this._ownerSVGElement.getScreenCTM();if(r){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(r.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(s){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:i}=this.constrainPosition?this.constrainPosition(s,this,this._initialDomRect,this._pickupPositionInElement):s;if(this.lockAxis==="x"||e==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:r}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:d,height:_}=this._getPreviewRect(),b=a.top+r,D=a.bottom-(_-r),z=a.left+o,le=a.right-(d-o);t=gn(t,z,le),i=gn(i,b,D)}return{x:t,y:i}}_updatePointerDirectionDelta(s){let{x:e,y:t}=s,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-o.x),a=Math.abs(t-o.y);return r>this._config.pointerDirectionChangeThreshold&&(i.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(i.y=t>o.y?1:-1,o.y=t),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let s=this._handles.length>0||!this.isDragging();s!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=s,Te(this._rootElement,s))}_removeRootElementListeners(s){s.removeEventListener("mousedown",this._pointerDown,nt),s.removeEventListener("touchstart",this._pointerDown,_n),s.removeEventListener("dragstart",this._nativeDragStart,nt)}_applyRootElementTransform(s,e){let t=1/this.scale,i=lt(s*t,e*t),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=at(i,this._initialTransform)}_applyPreviewTransform(s,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,i=lt(s,e);this._preview.setTransform(at(i,t))}_getDragDistance(s){let e=this._pickupPositionOnPage;return e?{x:s.x-e.x,y:s.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:s,y:e}=this._passiveTransform;if(s===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||t.width===0&&t.height===0)return;let o=i.left-t.left,r=t.right-i.right,a=i.top-t.top,d=t.bottom-i.bottom;i.width>t.width?(o>0&&(s+=o),r>0&&(s-=r)):s=0,i.height>t.height?(a>0&&(e+=a),d>0&&(e-=d)):e=0,(s!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:s})}_getDragStartDelay(s){let e=this.dragStartDelay;return typeof e=="number"?e:Me(s)?e.touch:e?e.mouse:0}_updateOnScroll(s){let e=this._parentPositions.handleScroll(s);if(e){let t=Pe(s);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&Ne(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=qe(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(s,e){let t=this._previewContainer||"global";if(t==="parent")return s;if(t==="global"){let i=this._document;return e||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return Q(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(s){return this._handles.find(e=>s.target&&(s.target===e||e.contains(s.target)))}};function gn(n,s,e){return Math.max(s,Math.min(e,n))}function Me(n){return n.type[0]==="t"}function bn(n){n.preventDefault()}function Sn(n,s,e){let t=vn(s,n.length-1),i=vn(e,n.length-1);if(t===i)return;let o=n[t],r=i<t?-1:1;for(let a=t;a!==i;a+=r)n[a]=n[a+r];n[i]=o}function vn(n,s){return Math.max(0,Math.min(s,n))}var ct=class{constructor(s){this._dragDropRegistry=s,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(s){this.withItems(s)}sort(s,e,t,i){let o=this._itemPositions,r=this._getItemIndexFromPointerPosition(s,e,t,i);if(r===-1&&o.length>0)return null;let a=this.orientation==="horizontal",d=o.findIndex(j=>j.drag===s),_=o[r],b=o[d].clientRect,D=_.clientRect,z=d>r?1:-1,le=this._getItemOffsetPx(b,D,z),ce=this._getSiblingOffsetPx(d,o,z),_e=o.slice();return Sn(o,d,r),o.forEach((j,Un)=>{if(_e[Un]===j)return;let Vt=j.drag===s,ut=Vt?le:ce,Bt=Vt?s.getPlaceholderElement():j.drag.getRootElement();j.offset+=ut;let zt=Math.round(j.offset*(1/j.drag.scale));a?(Bt.style.transform=at(`translate3d(${zt}px, 0, 0)`,j.initialTransform),Ne(j.clientRect,0,ut)):(Bt.style.transform=at(`translate3d(0, ${zt}px, 0)`,j.initialTransform),Ne(j.clientRect,ut,0))}),this._previousSwap.overlaps=Tt(D,e,t),this._previousSwap.drag=_.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:d,currentIndex:r}}enter(s,e,t,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(s,e,t):i,r=this._activeDraggables,a=r.indexOf(s),d=s.getPlaceholderElement(),_=r[o];if(_===s&&(_=r[o+1]),!_&&(o==null||o===-1||o<r.length-1)&&this._shouldEnterAsFirstChild(e,t)&&(_=r[0]),a>-1&&r.splice(a,1),_&&!this._dragDropRegistry.isDragging(_)){let b=_.getRootElement();b.parentElement.insertBefore(d,b),r.splice(o,0,s)}else this._element.appendChild(d),r.push(s);d.style.transform="",this._cacheItemPositions()}withItems(s){this._activeDraggables=s.slice(),this._cacheItemPositions()}withSortPredicate(s){this._sortPredicate=s}reset(){this._activeDraggables?.forEach(s=>{let e=s.getRootElement();if(e){let t=this._itemPositions.find(i=>i.drag===s)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(s){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===s)}updateOnScroll(s,e){this._itemPositions.forEach(({clientRect:t})=>{Ne(t,s,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(s){this._element=s}_cacheItemPositions(){let s=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:Lt(t)}}).sort((e,t)=>s?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getItemOffsetPx(s,e,t){let i=this.orientation==="horizontal",o=i?e.left-s.left:e.top-s.top;return t===-1&&(o+=i?e.width-s.width:e.height-s.height),o}_getSiblingOffsetPx(s,e,t){let i=this.orientation==="horizontal",o=e[s].clientRect,r=e[s+t*-1],a=o[i?"width":"height"]*t;if(r){let d=i?"left":"top",_=i?"right":"bottom";t===-1?a-=r.clientRect[d]-o[_]:a+=o[d]-r.clientRect[_]}return a}_shouldEnterAsFirstChild(s,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,i=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let r=t[t.length-1].clientRect;return i?s>=r.right:e>=r.bottom}else{let r=t[0].clientRect;return i?s<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(s,e,t,i){let o=this.orientation==="horizontal",r=this._itemPositions.findIndex(({drag:a,clientRect:d})=>{if(a===s)return!1;if(i){let _=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&_===this._previousSwap.delta)return!1}return o?e>=Math.floor(d.left)&&e<Math.floor(d.right):t>=Math.floor(d.top)&&t<Math.floor(d.bottom)});return r===-1||!this._sortPredicate(r,s)?-1:r}},Ot=class{constructor(s,e){this._document=s,this._dragDropRegistry=e,this._previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1},this._relatedNodes=[]}start(s){let e=this._element.childNodes;this._relatedNodes=[];for(let t=0;t<e.length;t++){let i=e[t];this._relatedNodes.push([i,i.nextSibling])}this.withItems(s)}sort(s,e,t,i){let o=this._getItemIndexFromPointerPosition(s,e,t),r=this._previousSwap;if(o===-1||this._activeItems[o]===s)return null;let a=this._activeItems[o];if(r.drag===a&&r.overlaps&&r.deltaX===i.x&&r.deltaY===i.y)return null;let d=this.getItemIndex(s),_=s.getPlaceholderElement(),b=a.getRootElement();o>d?b.after(_):b.before(_),Sn(this._activeItems,d,o);let D=this._getRootNode().elementFromPoint(e,t);return r.deltaX=i.x,r.deltaY=i.y,r.drag=a,r.overlaps=b===D||b.contains(D),{previousIndex:d,currentIndex:o}}enter(s,e,t,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(s,e,t):i;o===-1&&(o=this._getClosestItemIndexToPointer(s,e,t));let r=this._activeItems[o],a=this._activeItems.indexOf(s);a>-1&&this._activeItems.splice(a,1),r&&!this._dragDropRegistry.isDragging(r)?(this._activeItems.splice(o,0,s),r.getRootElement().before(s.getPlaceholderElement())):(this._activeItems.push(s),this._element.appendChild(s.getPlaceholderElement()))}withItems(s){this._activeItems=s.slice()}withSortPredicate(s){this._sortPredicate=s}reset(){let s=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[i,o]=this._relatedNodes[t];i.parentNode===s&&i.nextSibling!==o&&(o===null?s.appendChild(i):o.parentNode===s&&s.insertBefore(i,o))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(s){return this._activeItems.indexOf(s)}updateOnScroll(){this._activeItems.forEach(s=>{this._dragDropRegistry.isDragging(s)&&s._sortFromLastPointerPosition()})}withElementContainer(s){s!==this._element&&(this._element=s,this._rootNode=void 0)}_getItemIndexFromPointerPosition(s,e,t){let i=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),o=i?this._activeItems.findIndex(r=>{let a=r.getRootElement();return i===a||a.contains(i)}):-1;return o===-1||!this._sortPredicate(o,s)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=qe(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(s,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,o=-1;for(let r=0;r<this._activeItems.length;r++){let a=this._activeItems[r];if(a!==s){let{x:d,y:_}=a.getRootElement().getBoundingClientRect(),b=Math.hypot(e-d,t-_);b<i&&(i=b,o=r)}}return o}},xn=.05,kn=.05,K=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(K||{}),A=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(A||{}),Rt=class{constructor(s,e,t,i,o){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new w,this.entered=new w,this.exited=new w,this.dropped=new w,this.sorted=new w,this.receivingStarted=new w,this.receivingStopped=new w,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=de.EMPTY,this._verticalScrollDirection=K.NONE,this._horizontalScrollDirection=A.NONE,this._stopScrollTimers=new w,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),Kt(0,pt).pipe(me(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,d=this.autoScrollStep;this._verticalScrollDirection===K.UP?a.scrollBy(0,-d):this._verticalScrollDirection===K.DOWN&&a.scrollBy(0,d),this._horizontalScrollDirection===A.LEFT?a.scrollBy(-d,0):this._horizontalScrollDirection===A.RIGHT&&a.scrollBy(d,0)})};let r=this.element=Q(s);this._document=t,this.withOrientation("vertical").withElementContainer(r),e.registerDropContainer(this),this._parentPositions=new rt(t)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(s,e,t,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(s)),this._sortStrategy.enter(s,e,t,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:s,container:this,currentIndex:this.getItemIndex(s)})}exit(s){this._reset(),this.exited.next({item:s,container:this})}drop(s,e,t,i,o,r,a,d={}){this._reset(),this.dropped.next({item:s,currentIndex:e,previousIndex:t,container:this,previousContainer:i,isPointerOverContainer:o,distance:r,dropPoint:a,event:d})}withItems(s){let e=this._draggables;return this._draggables=s,s.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(i=>i.isDragging()).every(i=>s.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(s){return this._direction=s,this._sortStrategy instanceof ct&&(this._sortStrategy.direction=s),this}connectedTo(s){return this._siblings=s.slice(),this}withOrientation(s){if(s==="mixed")this._sortStrategy=new Ot(this._document,this._dragDropRegistry);else{let e=new ct(this._dragDropRegistry);e.direction=this._direction,e.orientation=s,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(s){let e=this._container;return this._scrollableElements=s.indexOf(e)===-1?[e,...s]:s.slice(),this}withElementContainer(s){if(s===this._container)return this;let e=Q(this.element),t=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(s);return t>-1&&this._scrollableElements.splice(t,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(s),this._cachedShadowRoot=null,this._scrollableElements.unshift(s),this._container=s,this}getScrollableParents(){return this._scrollableElements}getItemIndex(s){return this._isDragging?this._sortStrategy.getItemIndex(s):this._draggables.indexOf(s)}isReceiving(){return this._activeSiblings.size>0}_sortItem(s,e,t,i){if(this.sortingDisabled||!this._domRect||!cn(this._domRect,xn,e,t))return;let o=this._sortStrategy.sort(s,e,t,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:s})}_startScrollingIfNecessary(s,e){if(this.autoScrollDisabled)return;let t,i=K.NONE,o=A.NONE;if(this._parentPositions.positions.forEach((r,a)=>{a===this._document||!r.clientRect||t||cn(r.clientRect,xn,s,e)&&([i,o]=is(a,r.clientRect,this._direction,s,e),(i||o)&&(t=a))}),!i&&!o){let{width:r,height:a}=this._viewportRuler.getViewportSize(),d={width:r,height:a,top:0,right:r,bottom:a,left:0};i=Tn(d,e),o=Dn(d,s),t=window}t&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=t,(i||o)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let s=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=s.msScrollSnapType||s.scrollSnapType||"",s.scrollSnapType=s.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let s=this._container.style;s.scrollSnapType=s.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(s,e){return this._domRect!=null&&Tt(this._domRect,s,e)}_getSiblingContainerFromPosition(s,e,t){return this._siblings.find(i=>i._canReceive(s,e,t))}_canReceive(s,e,t){if(!this._domRect||!Tt(this._domRect,e,t)||!this.enterPredicate(s,this))return!1;let i=this._getShadowRoot().elementFromPoint(e,t);return i?i===this._container||this._container.contains(i):!1}_startReceiving(s,e){let t=this._activeSiblings;!t.has(s)&&e.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(t.add(s),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:s,receiver:this,items:e}))}_stopReceiving(s){this._activeSiblings.delete(s),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:s,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(s=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(s);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let s=qe(this._container);this._cachedShadowRoot=s||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let s=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,s))}};function Tn(n,s){let{top:e,bottom:t,height:i}=n,o=i*kn;return s>=e-o&&s<=e+o?K.UP:s>=t-o&&s<=t+o?K.DOWN:K.NONE}function Dn(n,s){let{left:e,right:t,width:i}=n,o=i*kn;return s>=e-o&&s<=e+o?A.LEFT:s>=t-o&&s<=t+o?A.RIGHT:A.NONE}function is(n,s,e,t,i){let o=Tn(s,i),r=Dn(s,t),a=K.NONE,d=A.NONE;if(o){let _=n.scrollTop;o===K.UP?_>0&&(a=K.UP):n.scrollHeight-_>n.clientHeight&&(a=K.DOWN)}if(r){let _=n.scrollLeft;e==="rtl"?r===A.RIGHT?_<0&&(d=A.RIGHT):n.scrollWidth+_>n.clientWidth&&(d=A.LEFT):r===A.LEFT?_>0&&(d=A.LEFT):n.scrollWidth-_>n.clientWidth&&(d=A.RIGHT)}return[a,d]}var st=Fe({passive:!1,capture:!0}),ot=new Set,ns=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=W({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,i){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0})}}return n})(),ss=(()=>{class n{constructor(e,t){this._ngZone=e,this._appRef=F(ei),this._environmentInjector=F(Zt),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=N([]),this._globalListeners=new Map,this._draggingPredicate=i=>i.isDragging(),this.pointerMove=new w,this.pointerUp=new w,this.scroll=new w,this._preventDefaultWhileDragging=i=>{this._activeDragInstances().length>0&&i.preventDefault()},this._persistentTouchmoveListener=i=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&i.preventDefault(),this.pointerMove.next(i))},this._document=t}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,st)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,st)}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._loadResets(),this._activeDragInstances.update(i=>[...i,e]),this._activeDragInstances().length===1)){let i=t.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:st}),i||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:st}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,r)=>{this._document.addEventListener(r,o.handler,o.options)})})}}stopDragging(e){this._activeDragInstances.update(t=>{let i=t.indexOf(e);return i>-1?(t.splice(i,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this.scroll];return e&&e!==this._document&&t.push(new De(i=>this._ngZone.runOutsideAngular(()=>{let r=a=>{this._activeDragInstances().length&&i.next(a)};return e.addEventListener("scroll",r,!0),()=>{e.removeEventListener("scroll",r,!0)}}))),Be(...t)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,t)=>{this._document.removeEventListener(t,e.handler,e.options)}),this._globalListeners.clear()}_loadResets(){if(!ot.has(this._appRef)){ot.add(this._appRef);let e=ni(ns,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{ot.delete(this._appRef),ot.size===0&&e.destroy()})}}static{this.\u0275fac=function(t){return new(t||n)(M(he),M(ue))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),os={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Pt=(()=>{class n{constructor(e,t,i,o){this._document=e,this._ngZone=t,this._viewportRuler=i,this._dragDropRegistry=o}createDrag(e,t=os){return new Et(e,t,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new Rt(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static{this.\u0275fac=function(t){return new(t||n)(M(ue),M(he),M(tn),M(ss))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),yn=new ge("CDK_DRAG_PARENT");var rs=new ge("CdkDragHandle");var dt=new ge("CDK_DRAG_CONFIG"),as="cdk-drag",En=new ge("CdkDropList"),On=(()=>{class n{static{this._dragInstances=[]}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}constructor(e,t,i,o,r,a,d,_,b,D,z){this.element=e,this.dropContainer=t,this._ngZone=o,this._viewContainerRef=r,this._dir=d,this._changeDetectorRef=b,this._selfHandle=D,this._parentDrag=z,this._destroyed=new w,this._handles=new Ve([]),this.scale=1,this.started=new O,this.released=new O,this.ended=new O,this.entered=new O,this.exited=new O,this.dropped=new O,this.moved=new De(le=>{let ce=this._dragRef.moved.pipe(Ht(_e=>({source:this,pointerPosition:_e.pointerPosition,event:_e.event,delta:_e.delta,distance:_e.distance}))).subscribe(le);return()=>{ce.unsubscribe()}}),this._injector=F(He),this._dragRef=_.createDrag(e,{dragStartThreshold:a&&a.dragStartThreshold!=null?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&a.pointerDirectionChangeThreshold!=null?a.pointerDirectionChangeThreshold:5,zIndex:a?.zIndex}),this._dragRef.data=this,n._dragInstances.push(this),a&&this._assignDefaults(a),t&&(this._dragRef._withDropContainer(t._dropListRef),t.addItem(this),t._dropListRef.beforeStarted.pipe(me(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Qt(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let t=e.rootElementSelector,i=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let e=n._dragInstances.indexOf(this);e>-1&&n._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let t=this._handles.getValue();t.push(e),this._handles.next(t)}_removeHandle(e){let t=this._handles.getValue(),i=t.indexOf(e);i>-1&&(t.splice(i,1),this._handles.next(t))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,t=e;this.rootElementSelector&&(t=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(t||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):Q(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let t=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof i=="object"&&i?i:it(i),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe(Ut(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let t=this.element.nativeElement.parentElement;for(;t;){if(t.classList.contains(as)){e.withParent(n._dragInstances.find(i=>i.element.nativeElement===t)?._dragRef||null);break}t=t.parentElement}})}_handleEvents(e){e.started.subscribe(t=>{this.started.emit({source:this,event:t.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(t=>{this.released.emit({source:this,event:t.event})}),e.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event})})}_assignDefaults(e){let{lockAxis:t,dragStartDelay:i,constrainPosition:o,previewClass:r,boundaryElement:a,draggingDisabled:d,rootElementSelector:_,previewContainer:b}=e;this.disabled=d??!1,this.dragStartDelay=i||0,t&&(this.lockAxis=t),o&&(this.constrainPosition=o),r&&(this.previewClass=r),a&&(this.boundaryElement=a),_&&(this.rootElementSelector=_),b&&(this.previewContainer=b)}_setupHandlesListener(){this._handles.pipe(je(e=>{let t=e.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&t.push(this.element),this._dragRef.withHandles(t)}),mt(e=>Be(...e.map(t=>t._stateChanges.pipe(ze(t))))),me(this._destroyed)).subscribe(e=>{let t=this._dragRef,i=e.element.nativeElement;e.disabled?t.disableHandle(i):t.enableHandle(i)})}static{this.\u0275fac=function(t){return new(t||n)(x(te),x(En,12),x(ue),x(he),x(gt),x(dt,8),x(wt,8),x(Pt),x(ye),x(rs,10),x(yn,12))}}static{this.\u0275dir=$e({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,i){t&2&&H("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",E],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Le]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[oe([{provide:yn,useExisting:n}]),ft]})}}return n})(),Cn=new ge("CdkDropListGroup");var ls=0,Rn=(()=>{class n{static{this._dropLists=[]}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}constructor(e,t,i,o,r,a,d){this.element=e,this._changeDetectorRef=i,this._scrollDispatcher=o,this._dir=r,this._group=a,this._destroyed=new w,this.connectedTo=[],this.id=`cdk-drop-list-${ls++}`,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new O,this.entered=new O,this.exited=new O,this.sorted=new O,this._unsortedItems=new Set,this._dropListRef=t.createDropList(e),this._dropListRef.data=this,d&&this._assignDefaults(d),this._dropListRef.enterPredicate=(_,b)=>this.enterPredicate(_.data,b.data),this._dropListRef.sortPredicate=(_,b,D)=>this.sortPredicate(_,b.data,D.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),a&&a._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,t)=>e._dragRef.getVisibleElement().compareDocumentPosition(t._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=n._dropLists.indexOf(this);e>-1&&n._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(ze(this._dir.value),me(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{let t=Xi(this.connectedTo).map(i=>{if(typeof i=="string"){let o=n._dropLists.find(r=>r.id===i);return o}return i});if(this._group&&this._group._items.forEach(i=>{t.indexOf(i)===-1&&t.push(i)}),!this._scrollableParentsResolved){let i=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(o=>o.getElementRef().nativeElement);this._dropListRef.withScrollableParents(i),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let i=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(i)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=it(this.autoScrollStep,2),e.connectedTo(t.filter(i=>i&&i!==this).map(i=>i._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),Be(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:t,draggingDisabled:i,sortingDisabled:o,listAutoScrollDisabled:r,listOrientation:a}=e;this.disabled=i??!1,this.sortingDisabled=o??!1,this.autoScrollDisabled=r??!1,this.orientation=a||"vertical",t&&(this.lockAxis=t)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}static{this.\u0275fac=function(t){return new(t||n)(x(te),x(Pt),x(ye),x(en),x(wt,8),x(Cn,12),x(dt,8))}}static{this.\u0275dir=$e({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,i){t&2&&(R("id",i.id),H("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",E],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",E],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",E],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[oe([{provide:Cn,useValue:void 0},{provide:En,useExisting:n}])]})}}return n})();var Ln=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=be({type:n})}static{this.\u0275inj=fe({providers:[Pt],imports:[nn]})}}return n})();var ds=["item"],hs=["group"],us=["header"],Fn=["filter"],ps=["footer"],_s=["emptyfilter"],ms=["empty"],fs=["filtericon"],gs=["checkicon"],bs=["checkmark"],vs=["loader"],xs=["headerchkbox"],ys=["lastHiddenFocusableElement"],Cs=["firstHiddenFocusableElement"],Is=["scroller"],ws=["list"],Ss=["container"],ks=[[["p-header"]],[["p-footer"]]],Ts=["p-header","p-footer"],ht=(n,s)=>({$implicit:n,options:s}),Ds=n=>({"p-checkbox-disabled":n}),Mt=n=>({$implicit:n}),An=n=>({options:n}),Mn=()=>[],Nt=n=>({height:n}),Es=()=>({}),Os=(n,s,e)=>({"p-listbox-option-selected":n,"p-focus":s,"p-disabled":e}),Rs=(n,s,e,t)=>({$implicit:n,index:s,selected:e,disabled:t}),Ls=n=>({implicit:n});function Fs(n,s){n&1&&$(0)}function Ps(n,s){if(n&1&&(u(0,"div",22),Ke(1),m(2,Fs,1,0,"ng-container",23),p()),n&2){let e=l();c(2),h("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",Re(2,ht,e.modelValue(),e.visibleOptions()))}}function As(n,s){}function Ms(n,s){n&1&&m(0,As,0,0,"ng-template")}function Ns(n,s){if(n&1&&m(0,Ms,1,0,null,23),n&2){let e=l(5);h("ngTemplateOutlet",e.checkIconTemplate||e._checkIconTemplate)("ngTemplateOutletContext",v(2,Mt,e.allSelected()))}}function Vs(n,s){n&1&&(X(0),m(1,Ns,1,4,"ng-template",null,5,ee),J())}function Bs(n,s){if(n&1&&(u(0,"p-checkbox",30),m(1,Vs,3,0,"ng-container",31),p()),n&2){let e=l(3);h("ngModel",e.allSelected())("disabled",e.disabled)("tabindex",-1)("variant",e.config.inputStyle()==="filled"||e.config.inputVariant()==="filled"?"filled":"outlined")("binary",!0),c(),h("ngIf",e.checkIconTemplate||e._checkIconTemplate)}}function zs(n,s){if(n&1){let e=L();u(0,"div",26),y("click",function(i){f(e);let o=l(2);return g(o.onToggleAll(i))})("keydown",function(i){f(e);let o=l(2);return g(o.onHeaderCheckboxKeyDown(i))}),u(1,"div",27)(2,"input",28,4),y("focus",function(i){f(e);let o=l(2);return g(o.onHeaderCheckboxFocus(i))})("blur",function(){f(e);let i=l(2);return g(i.onHeaderCheckboxBlur())}),p()(),m(4,Bs,2,6,"p-checkbox",29),p()}if(n&2){let e=l(2);h("ngClass",v(6,Ds,e.disabled)),c(),R("data-p-hidden-accessible",!0),c(),h("disabled",e.disabled),R("checked",e.allSelected())("aria-label",e.toggleAllAriaLabel),c(2),h("ngIf",e.checkbox&&e.multiple)}}function js(n,s){n&1&&$(0)}function Hs(n,s){if(n&1&&(X(0),m(1,js,1,0,"ng-container",23),J()),n&2){let e=l(2);c(),h("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",v(2,An,e.filterOptions))}}function $s(n,s){n&1&&I(0,"SearchIcon",38),n&2&&(h("styleClass","p-listbox-filter-icon"),R("aria-hidden",!0))}function Ks(n,s){}function Ws(n,s){n&1&&m(0,Ks,0,0,"ng-template")}function Us(n,s){if(n&1&&(u(0,"span",39),m(1,Ws,1,0,null,40),p()),n&2){let e=l(4);R("aria-hidden",!0),c(),h("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function Gs(n,s){if(n&1){let e=L();u(0,"div",34)(1,"p-iconfield")(2,"input",35,6),y("input",function(i){f(e);let o=l(3);return g(o.onFilterChange(i))})("keydown",function(i){f(e);let o=l(3);return g(o.onFilterKeyDown(i))})("focus",function(i){f(e);let o=l(3);return g(o.onFilterFocus(i))})("blur",function(i){f(e);let o=l(3);return g(o.onFilterBlur(i))}),p(),u(4,"p-inputicon"),m(5,$s,1,2,"SearchIcon",36)(6,Us,2,2,"span",37),p()()()}if(n&2){let e=l(3);c(2),h("value",e._filterValue()||"")("disabled",e.disabled)("tabindex",!e.disabled&&!e.focused?e.tabindex:-1),R("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),c(3),h("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),h("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function Zs(n,s){if(n&1&&(m(0,Gs,7,9,"div",32),u(1,"span",33),C(2),p()),n&2){let e=l(2);h("ngIf",e.filter),c(),R("data-p-hidden-accessible",!0),c(),G(" ",e.filterResultMessageText," ")}}function qs(n,s){if(n&1&&(u(0,"div",22),m(1,zs,5,8,"div",24)(2,Hs,2,4,"ng-container",25)(3,Zs,3,3,"ng-template",null,3,ee),p()),n&2){let e=ve(4),t=l();c(),h("ngIf",t.checkbox&&t.multiple&&t.showToggleAll),c(),h("ngIf",t.filterTemplate||t._filterTemplate)("ngIfElse",e)}}function Qs(n,s){if(n&1&&C(0),n&2){let e=l(2);G(" ",e.emptyFilterMessageText," ")}}function Ys(n,s){n&1&&$(0,null,7)}function Xs(n,s){if(n&1&&m(0,Ys,2,0,"ng-container",40),n&2){let e=l(2);h("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e._emptyTemplate||e.emptyTemplate)}}function Js(n,s){if(n&1){let e=L();u(0,"div",41),y("cdkDropListDropped",function(i){f(e);let o=l();return g(o.drop(i))}),m(1,Qs,1,1)(2,Xs,1,1,"ng-container"),p()}if(n&2){let e=l();h("cdkDropListData",xe(2,Mn)),c(),S(!e.emptyFilterTemplate&&!e._emptyFilterTemplate&&!e._emptyTemplate&&!e.emptyTemplate?1:2)}}function eo(n,s){if(n&1&&C(0),n&2){let e=l(2);G(" ",e.emptyMessage," ")}}function to(n,s){n&1&&$(0,null,8)}function io(n,s){if(n&1&&m(0,to,2,0,"ng-container",40),n&2){let e=l(2);h("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function no(n,s){if(n&1){let e=L();u(0,"div",41),y("cdkDropListDropped",function(i){f(e);let o=l();return g(o.drop(i))}),m(1,eo,1,1)(2,io,1,1,"ng-container"),p()}if(n&2){let e=l();h("cdkDropListData",xe(2,Mn)),c(),S(!e.emptyTemplate&&!e._emptyTemplate?1:2)}}function so(n,s){n&1&&$(0)}function oo(n,s){if(n&1&&m(0,so,1,0,"ng-container",23),n&2){let e=s.$implicit,t=s.options;l(2);let i=ve(3);h("ngTemplateOutlet",i)("ngTemplateOutletContext",Re(2,ht,e,t))}}function ro(n,s){n&1&&$(0)}function ao(n,s){if(n&1&&m(0,ro,1,0,"ng-container",23),n&2){let e=s.options,t=l(4);h("ngTemplateOutlet",t.loaderTemplate||t._loaderTemplate)("ngTemplateOutletContext",v(2,An,e))}}function lo(n,s){n&1&&m(0,ao,1,4,"ng-template",null,12,ee)}function co(n,s){if(n&1){let e=L();u(0,"p-scroller",43,10),y("onLazyLoad",function(i){f(e);let o=l(2);return g(o.onLazyLoad.emit(i))}),m(2,oo,1,5,"ng-template",null,11,ee)(4,lo,2,0),p()}if(n&2){let e=l(2);Ee(v(9,Nt,e.scrollHeight)),h("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions)("tabindex",e.scrollerTabIndex),c(4),S(e.loaderTemplate||e._loaderTemplate?4:-1)}}function ho(n,s){n&1&&$(0)}function uo(n,s){if(n&1&&(X(0),m(1,ho,1,0,"ng-container",23),J()),n&2){l();let e=ve(3),t=l();c(),h("ngTemplateOutlet",e)("ngTemplateOutletContext",Re(3,ht,t.visibleOptions(),xe(2,Es)))}}function po(n,s){if(n&1&&(u(0,"span"),C(1),p()),n&2){let e=l(2).$implicit,t=l(3);c(),V(t.getOptionGroupLabel(e.optionGroup))}}function _o(n,s){n&1&&$(0)}function mo(n,s){if(n&1&&(X(0),u(1,"li",46),m(2,po,2,1,"span",31)(3,_o,1,0,"ng-container",23),p(),J()),n&2){let e=l(),t=e.$implicit,i=e.index,o=l().options,r=l(2);c(),h("ngStyle",v(7,Nt,o.itemSize+"px"))("cdkDragData",t)("cdkDragDisabled",!r.dragdrop),R("id",r.id+"_"+r.getOptionIndex(i,o)),c(),h("ngIf",!r.groupTemplate&&!r._groupTemplate),c(),h("ngTemplateOutlet",r.groupTemplate||r._groupTemplate)("ngTemplateOutletContext",v(9,Mt,t.optionGroup))}}function fo(n,s){}function go(n,s){n&1&&m(0,fo,0,0,"ng-template")}function bo(n,s){if(n&1&&m(0,go,1,0,null,23),n&2){let e=l(4).$implicit,t=l(3);h("ngTemplateOutlet",t.checkIconTemplate||t._checkIconTemplate)("ngTemplateOutletContext",v(2,Mt,t.isSelected(e)))}}function vo(n,s){n&1&&(X(0),m(1,bo,1,4,"ng-template",null,5,ee),J())}function xo(n,s){if(n&1&&(u(0,"p-checkbox",49),m(1,vo,3,0,"ng-container",31),p()),n&2){let e=l(2).$implicit,t=l(3);h("ngModel",t.isSelected(e))("readonly",!0)("disabled",t.disabled||t.isOptionDisabled(e))("tabindex",-1)("variant",t.config.inputStyle()==="filled"||t.config.inputVariant()==="filled"?"filled":"outlined")("binary",!0),c(),h("ngIf",t.checkIconTemplate||t._checkIconTemplate)}}function yo(n,s){n&1&&I(0,"BlankIcon",51)}function Co(n,s){n&1&&I(0,"CheckIcon",51)}function Io(n,s){if(n&1&&(X(0),m(1,yo,1,0,"BlankIcon",50)(2,Co,1,0,"CheckIcon",50),J()),n&2){let e=l(3).$implicit,t=l(3);c(),h("ngIf",!t.isSelected(e)),c(),h("ngIf",t.isSelected(e))}}function wo(n,s){n&1&&$(0)}function So(n,s){if(n&1&&(X(0),m(1,Io,3,2,"ng-container",31)(2,wo,1,0,"ng-container",23),J()),n&2){let e=l(2).$implicit,t=l(3);c(),h("ngIf",!t.checkmarkTemplate&&!t._checkmarkTemplate),c(),h("ngTemplateOutlet",t.checkmarkTemplate||t._checkmarkTemplate)("ngTemplateOutletContext",v(3,Ls,t.isSelected(e)))}}function ko(n,s){if(n&1&&(u(0,"span"),C(1),p()),n&2){let e=l(2).$implicit,t=l(3);c(),V(t.getOptionLabel(e))}}function To(n,s){n&1&&$(0)}function Do(n,s){if(n&1){let e=L();X(0),u(1,"li",47),y("click",function(i){f(e);let o=l(),r=o.$implicit,a=o.index,d=l().options,_=l(2);return g(_.onOptionSelect(i,r,_.getOptionIndex(a,d)))})("dblclick",function(i){f(e);let o=l().$implicit,r=l(3);return g(r.onOptionDoubleClick(i,o))})("mousedown",function(i){f(e);let o=l().index,r=l().options,a=l(2);return g(a.onOptionMouseDown(i,a.getOptionIndex(o,r)))})("mouseenter",function(i){f(e);let o=l().index,r=l().options,a=l(2);return g(a.onOptionMouseEnter(i,a.getOptionIndex(o,r)))})("touchend",function(){f(e);let i=l(4);return g(i.onOptionTouchEnd())}),m(2,xo,2,7,"p-checkbox",48)(3,So,3,5,"ng-container",31)(4,ko,2,1,"span",31)(5,To,1,0,"ng-container",23),p(),J()}if(n&2){let e=l(),t=e.$implicit,i=e.index,o=l().options,r=l(2);c(),h("ngStyle",v(15,Nt,o.itemSize+"px"))("ngClass",ti(17,Os,r.isSelected(t)&&r.highlightOnSelect,r.focusedOptionIndex()===r.getOptionIndex(i,o),r.isOptionDisabled(t)))("cdkDragData",t)("cdkDragDisabled",!r.dragdrop),R("id",r.id+"_"+r.getOptionIndex(i,o))("aria-label",r.getOptionLabel(t))("aria-selected",r.isSelected(t))("aria-disabled",r.isOptionDisabled(t))("aria-setsize",r.ariaSetSize)("ariaPosInset",r.getAriaPosInset(r.getOptionIndex(i,o))),c(),h("ngIf",r.checkbox&&r.multiple),c(),h("ngIf",r.checkmark),c(),h("ngIf",!r.itemTemplate&&!r._itemTemplate),c(),h("ngTemplateOutlet",r.itemTemplate||r._itemTemplate)("ngTemplateOutletContext",ii(21,Rs,t,r.getOptionIndex(i,o),r.isSelected(t),r.isOptionDisabled(t)))}}function Eo(n,s){if(n&1&&m(0,mo,4,11,"ng-container",31)(1,Do,6,26,"ng-container",31),n&2){let e=s.$implicit,t=l(3);h("ngIf",t.isOptionGroup(e)),c(),h("ngIf",!t.isOptionGroup(e))}}function Oo(n,s){if(n&1){let e=L();u(0,"ul",44,13),y("focus",function(i){f(e);let o=l(2);return g(o.onListFocus(i))})("blur",function(i){f(e);let o=l(2);return g(o.onListBlur(i))})("keydown",function(i){f(e);let o=l(2);return g(o.onListKeyDown(i))})("cdkDropListDropped",function(i){f(e);let o=l(2);return g(o.drop(i))}),m(2,Eo,2,2,"ng-template",45),p()}if(n&2){let e=s.$implicit,t=s.options,i=l(2);Ee(t.contentStyle),h("tabindex",-1)("ngClass",t.contentStyleClass)("cdkDropListData",e),R("aria-multiselectable",!0)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("aria-label",i.ariaLabel)("aria-disabled",i.disabled),c(2),h("ngForOf",e)}}function Ro(n,s){if(n&1&&m(0,co,5,11,"p-scroller",42)(1,uo,2,6,"ng-container",31)(2,Oo,3,10,"ng-template",null,9,ee),n&2){let e=l();h("ngIf",e.virtualScroll),c(),h("ngIf",!e.virtualScroll)}}function Lo(n,s){n&1&&$(0)}function Fo(n,s){if(n&1&&(u(0,"div",52),Ke(1,1),m(2,Lo,1,0,"ng-container",23),p()),n&2){let e=l();c(2),h("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",Re(2,ht,e.modelValue(),e.visibleOptions()))}}function Po(n,s){if(n&1&&(u(0,"span",21),C(1),p()),n&2){let e=l();c(),G(" ",e.emptyMessage," ")}}var Ao=({dt:n})=>`
1
+ import{b as Qe,c as Ye,d as Qi}from"./chunk-AVSCJ22B.js";import{a as It,b as Fe,c as qe,d as Pe,e as wt,f as yi}from"./chunk-ENH6HA3V.js";import{a as hi}from"./chunk-672TXWSC.js";import{a as Fi,b as Pi}from"./chunk-2XW2ZOT4.js";import{a as Ui}from"./chunk-6WWXJJID.js";import"./chunk-U2VDC52W.js";import{a as Ki,b as tt}from"./chunk-DJXQKSLT.js";import{a as Vi}from"./chunk-PPXXWO4E.js";import{a as Ai,b as Ni,c as $i}from"./chunk-3DBSHDAQ.js";import{a as Mi}from"./chunk-M4SSELXT.js";import{b as Wi}from"./chunk-AD247LWQ.js";import{a as qi,i as Yi}from"./chunk-BKTBVFNX.js";import{b as gi,c as bi,e as vi,g as Ct,h as xi}from"./chunk-ZFNIPERQ.js";import{a as Li,j as Bi,l as zi,n as ji,p as Hi,y as Gi,z as Zi}from"./chunk-ME4ALIS7.js";import{a as fi}from"./chunk-DTYVTTET.js";import{Aa as Si,Da as ki,Ga as Ti,Ja as Di,Ka as Ei,La as Oi,Ma as et,Q as Ci,R as we,U as St,Ua as Ri,a as ui,e as pi,j as _i,na as Ii,pa as wi,qa as Xe,ra as Se,sa as Je,va as Ae,w as Ze,x as mi}from"./chunk-VMI3QWC6.js";import{b as ci,c as di,d as Ce,e as Ue,f as Ge,l as Ie}from"./chunk-F7PVAVLQ.js";import"./chunk-VFKJMUGN.js";import"./chunk-5DRALZZF.js";import"./chunk-2BI7WNJP.js";import{a as ue,h as re,j as si,k as oi,l as ri,m as ai,s as ae,w as li}from"./chunk-ZK43JB4A.js";import"./chunk-F2X3VGZZ.js";import{$b as $,$c as Le,Aa as O,Ab as $e,B as Kt,Ba as he,C as Be,Cb as bt,D as Wt,Dc as oe,Eb as m,Ec as xe,Fa as te,Fc as v,Gc as Re,H as _t,Ha as N,Hc as ti,Ic as ii,Kb as ei,Lb as R,Mb as h,N as Ut,Nb as vt,Ob as H,Oc as B,Pb as Ee,Pc as Z,Qb as Oe,Qc as yt,Rb as S,Sc as ee,Ta as Qt,Tb as ie,Ub as ne,Vb as se,Wb as u,Wc as ye,X as ze,Xb as p,Y as mt,Yb as I,Z as me,Zb as X,_ as je,_b as J,_c as E,a as de,ac as L,ba as Gt,bd as We,ca as q,d as De,da as fe,eb as Yt,ed as ni,fa as ge,fc as y,g as w,gb as Xt,gc as l,h as Ve,ha as M,hc as xt,ia as F,ib as c,ic as Ke,j as pt,lc as P,m as jt,ma as Zt,mc as U,nb as Jt,nc as k,ob as x,oc as T,pa as ft,qa as f,qb as gt,ra as g,rc as ve,s as Ht,sc as C,tc as V,ua as qt,uc as G,wa as He,yb as W,z as $t,zb as be}from"./chunk-6QJHEOXN.js";import"./chunk-YQFG5XE2.js";function it(n,s=0){return Gn(n)?Number(n):arguments.length===2?s:0}function Gn(n){return!isNaN(parseFloat(n))&&!isNaN(Number(n))}function Xi(n){return Array.isArray(n)?n:[n]}function Q(n){return n instanceof te?n.nativeElement:n}var Ji={theme:"light",dir:"ltr",layout:"vertical",sidebartype:"full",boxed:"boxed",colorTheme:"Blue_Theme",cardType:"shadow"};var qn=20,en=(()=>{class n{constructor(e,t,i){this._ngZone=e,this._platform=t,this._scrolled=new w,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=i}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let t=this.scrollContainers.get(e);t&&(t.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=qn){return this._platform.isBrowser?new De(t=>{this._globalSubscription||this._addGlobalListener();let i=e>0?this._scrolled.pipe(_t(e)).subscribe(t):this._scrolled.subscribe(t);return this._scrolledCount++,()=>{i.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):jt()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,t)=>this.deregister(t)),this._scrolled.complete()}ancestorScrolled(e,t){let i=this.getAncestorScrollContainers(e);return this.scrolled(t).pipe(Wt(o=>!o||i.indexOf(o)>-1))}getAncestorScrollContainers(e){let t=[];return this.scrollContainers.forEach((i,o)=>{this._scrollableContainsElement(o,e)&&t.push(o)}),t}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,t){let i=Q(t),o=e.getElementRef().nativeElement;do if(i==o)return!0;while(i=i.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let e=this._getWindow();return $t(e.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(t){return new(t||n)(M(he),M(It),M(ue,8))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var Qn=20,tn=(()=>{class n{constructor(e,t,i){this._platform=e,this._change=new w,this._changeListener=o=>{this._change.next(o)},this._document=i,t.runOutsideAngular(()=>{if(e.isBrowser){let o=this._getWindow();o.addEventListener("resize",this._changeListener),o.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:t,height:i}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+i,right:e.left+t,height:i,width:t}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,t=this._getWindow(),i=e.documentElement,o=i.getBoundingClientRect(),r=-o.top||e.body.scrollTop||t.scrollY||i.scrollTop||0,a=-o.left||e.body.scrollLeft||t.scrollX||i.scrollLeft||0;return{top:r,left:a}}change(e=Qn){return e>0?this._change.pipe(_t(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(t){return new(t||n)(M(It),M(he),M(ue,8))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})();var nn=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=be({type:n})}static{this.\u0275inj=fe({})}}return n})();function sn(n){return n.buttons===0||n.detail===0}function on(n){let s=n.touches&&n.touches[0]||n.changedTouches&&n.changedTouches[0];return!!s&&s.identifier===-1&&(s.radiusX==null||s.radiusX===1)&&(s.radiusY==null||s.radiusY===1)}function In(n){let s=n.cloneNode(!0),e=s.querySelectorAll("[id]"),t=n.nodeName.toLowerCase();s.removeAttribute("id");for(let i=0;i<e.length;i++)e[i].removeAttribute("id");return t==="canvas"?ln(n,s):(t==="input"||t==="select"||t==="textarea")&&an(n,s),rn("canvas",n,s,ln),rn("input, textarea, select",n,s,an),s}function rn(n,s,e,t){let i=s.querySelectorAll(n);if(i.length){let o=e.querySelectorAll(n);for(let r=0;r<i.length;r++)t(i[r],o[r])}}var Xn=0;function an(n,s){s.type!=="file"&&(s.value=n.value),s.type==="radio"&&s.name&&(s.name=`mat-clone-${s.name}-${Xn++}`)}function ln(n,s){let e=s.getContext("2d");if(e)try{e.drawImage(n,0,0)}catch{}}function Lt(n){let s=n.getBoundingClientRect();return{top:s.top,right:s.right,bottom:s.bottom,left:s.left,width:s.width,height:s.height,x:s.x,y:s.y}}function Tt(n,s,e){let{top:t,bottom:i,left:o,right:r}=n;return e>=t&&e<=i&&s>=o&&s<=r}function Ne(n,s,e){n.top+=s,n.bottom=n.top+n.height,n.left+=e,n.right=n.left+n.width}function cn(n,s,e,t){let{top:i,right:o,bottom:r,left:a,width:d,height:_}=n,b=d*s,D=_*s;return t>i-D&&t<r+D&&e>a-b&&e<o+b}var rt=class{constructor(s){this._document=s,this.positions=new Map}clear(){this.positions.clear()}cache(s){this.clear(),this.positions.set(this._document,{scrollPosition:this.getViewportScrollPosition()}),s.forEach(e=>{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:Lt(e)})})}handleScroll(s){let e=Pe(s),t=this.positions.get(e);if(!t)return null;let i=t.scrollPosition,o,r;if(e===this._document){let _=this.getViewportScrollPosition();o=_.top,r=_.left}else o=e.scrollTop,r=e.scrollLeft;let a=i.top-o,d=i.left-r;return this.positions.forEach((_,b)=>{_.clientRect&&e!==b&&e.contains(b)&&Ne(_.clientRect,a,d)}),i.top=o,i.left=r,{top:a,left:d}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function wn(n,s){let e=n.rootNodes;if(e.length===1&&e[0].nodeType===s.ELEMENT_NODE)return e[0];let t=s.createElement("div");return e.forEach(i=>t.appendChild(i)),t}function Ft(n,s,e){for(let t in s)if(s.hasOwnProperty(t)){let i=s[t];i?n.setProperty(t,i,e?.has(t)?"important":""):n.removeProperty(t)}return n}function Te(n,s){let e=s?"":"none";Ft(n.style,{"touch-action":s?"":"none","-webkit-user-drag":s?"":"none","-webkit-tap-highlight-color":s?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function dn(n,s,e){Ft(n.style,{position:s?"":"fixed",top:s?"":"0",opacity:s?"":"0",left:s?"":"-999em"},e)}function at(n,s){return s&&s!="none"?n+" "+s:n}function hn(n,s){n.style.width=`${s.width}px`,n.style.height=`${s.height}px`,n.style.transform=lt(s.left,s.top)}function lt(n,s){return`translate3d(${Math.round(n)}px, ${Math.round(s)}px, 0)`}function un(n){let s=n.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(n)*s}function Jn(n){let s=getComputedStyle(n),e=kt(s,"transition-property"),t=e.find(a=>a==="transform"||a==="all");if(!t)return 0;let i=e.indexOf(t),o=kt(s,"transition-duration"),r=kt(s,"transition-delay");return un(o[i])+un(r[i])}function kt(n,s){return n.getPropertyValue(s).split(",").map(t=>t.trim())}var es=new Set(["position"]),Dt=class{get element(){return this._preview}constructor(s,e,t,i,o,r,a,d,_){this._document=s,this._rootElement=e,this._direction=t,this._initialDomRect=i,this._previewTemplate=o,this._previewClass=r,this._pickupPositionOnPage=a,this._initialTransform=d,this._zIndex=_}attach(s){this._preview=this._createPreview(),s.appendChild(this._preview),pn(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(s){this._preview.style.transform=s}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(s){this._preview.classList.add(s)}getTransitionDuration(){return Jn(this._preview)}addEventListener(s,e){this._preview.addEventListener(s,e)}removeEventListener(s,e){this._preview.removeEventListener(s,e)}_createPreview(){let s=this._previewTemplate,e=this._previewClass,t=s?s.template:null,i;if(t&&s){let o=s.matchSize?this._initialDomRect:null,r=s.viewContainer.createEmbeddedView(t,s.context);r.detectChanges(),i=wn(r,this._document),this._previewEmbeddedView=r,s.matchSize?hn(i,o):i.style.transform=lt(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else i=In(this._rootElement),hn(i,this._initialDomRect),this._initialTransform&&(i.style.transform=this._initialTransform);return Ft(i.style,{"pointer-events":"none",margin:pn(i)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},es),Te(i,!1),i.classList.add("cdk-drag-preview"),i.setAttribute("popover","manual"),i.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>i.classList.add(o)):i.classList.add(e)),i}};function pn(n){return"showPopover"in n}var _n=Fe({passive:!0}),nt=Fe({passive:!1}),mn=Fe({passive:!1,capture:!0}),ts=800,fn=new Set(["position"]),Et=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(s){s!==this._disabled&&(this._disabled=s,this._toggleNativeDragInteractions(),this._handles.forEach(e=>Te(e,s)))}constructor(s,e,t,i,o,r){this._config=e,this._document=t,this._ngZone=i,this._viewportRuler=o,this._dragDropRegistry=r,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=N(!1),this._moveEvents=new w,this._pointerMoveSubscription=de.EMPTY,this._pointerUpSubscription=de.EMPTY,this._scrollSubscription=de.EMPTY,this._resizeSubscription=de.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new w,this.started=new w,this.released=new w,this.ended=new w,this.entered=new w,this.exited=new w,this.dropped=new w,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let d=this._getTargetHandle(a);d&&!this._disabledHandles.has(d)&&!this.disabled&&this._initializeDragSequence(d,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let d=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let b=Math.abs(d.x-this._pickupPositionOnPage.x),D=Math.abs(d.y-this._pickupPositionOnPage.y);if(b+D>=this._config.dragStartThreshold){let le=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),ce=this._dropContainer;if(!le){this._endDragSequence(a);return}(!ce||!ce.isDragging()&&!ce.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let _=this._getConstrainedPointerPosition(d);if(this._hasMoved=!0,this._lastKnownPointerPosition=d,this._updatePointerDirectionDelta(_),this._dropContainer)this._updateActiveDropContainer(_,d);else{let b=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,D=this._activeTransform;D.x=_.x-b.x+this._passiveTransform.x,D.y=_.y-b.y+this._passiveTransform.y,this._applyRootElementTransform(D.x,D.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:_,event:a,distance:this._getDragDistance(_),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let d=this._getTargetHandle(a);d&&!this._disabledHandles.has(d)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(s).withParent(e.parentDragRef||null),this._parentPositions=new rt(t),r.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(s){this._handles=s.map(t=>Q(t)),this._handles.forEach(t=>Te(t,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(t=>{this._handles.indexOf(t)>-1&&e.add(t)}),this._disabledHandles=e,this}withPreviewTemplate(s){return this._previewTemplate=s,this}withPlaceholderTemplate(s){return this._placeholderTemplate=s,this}withRootElement(s){let e=Q(s);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,nt),e.addEventListener("touchstart",this._pointerDown,_n),e.addEventListener("dragstart",this._nativeDragStart,nt)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(s){return this._boundaryElement=s?Q(s):null,this._resizeSubscription.unsubscribe(),s&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(s){return this._parentDragRef=s,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(s){!this._disabledHandles.has(s)&&this._handles.indexOf(s)>-1&&(this._disabledHandles.add(s),Te(s,!0))}enableHandle(s){this._disabledHandles.has(s)&&(this._disabledHandles.delete(s),Te(s,this.disabled))}withDirection(s){return this._direction=s,this}_withDropContainer(s){this._dropContainer=s}getFreeDragPosition(){let s=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:s.x,y:s.y}}setFreeDragPosition(s){return this._activeTransform={x:0,y:0},this._passiveTransform.x=s.x,this._passiveTransform.y=s.y,this._dropContainer||this._applyRootElementTransform(s.x,s.y),this}withPreviewContainer(s){return this._previewContainer=s,this}_sortFromLastPointerPosition(){let s=this._lastKnownPointerPosition;s&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(s),s)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",bn,mn)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(s){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:s}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(s),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(s);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:s})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(s){Me(s)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),t=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{e.addEventListener("selectstart",bn,mn)}),t){let i=this._rootElement,o=i.parentNode,r=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,i),this._initialTransform=i.style.transform||"",this._preview=new Dt(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,e)),dn(i,!1,fn),this._document.body.appendChild(o.replaceChild(r,i)),this.started.next({source:this,event:s}),t.start(),this._initialContainer=t,this._initialIndex=t.getItemIndex(this)}else this.started.next({source:this,event:s}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(t?t.getScrollableParents():[])}_initializeDragSequence(s,e){this._parentDragRef&&e.stopPropagation();let t=this.isDragging(),i=Me(e),o=!i&&e.button!==0,r=this._rootElement,a=Pe(e),d=!i&&this._lastTouchEventTime&&this._lastTouchEventTime+ts>Date.now(),_=i?on(e):sn(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),t||o||d||_)return;if(this._handles.length){let z=r.style;this._rootElementTapHighlight=z.webkitTapHighlightColor||"",z.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(z=>this._updateOnScroll(z)),this._boundaryElement&&(this._boundaryRect=Lt(this._boundaryElement));let b=this._previewTemplate;this._pickupPositionInElement=b&&b.template&&!b.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,s,e);let D=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:D.x,y:D.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(s){dn(this._rootElement,!0,fn),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,t=e.getItemIndex(this),i=this._getPointerPositionOnPage(s),o=this._getDragDistance(i),r=e._isOverContainer(i.x,i.y);this.ended.next({source:this,distance:o,dropPoint:i,event:s}),this.dropped.next({item:this,currentIndex:t,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:r,distance:o,dropPoint:i,event:s}),e.drop(this,t,this._initialIndex,this._initialContainer,r,o,i,s),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:s,y:e},{x:t,y:i}){let o=this._initialContainer._getSiblingContainerFromPosition(this,s,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(s,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,s,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(t,i),this._dropContainer._sortItem(this,s,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(s,e):this._applyPreviewTransform(s-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let s=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(s.left,s.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(t=>{let i=r=>{(!r||this._preview&&Pe(r)===this._preview.element&&r.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",i),t(),clearTimeout(o))},o=setTimeout(i,e*1.5);this._preview.addEventListener("transitionend",i)}))}_createPlaceholderElement(){let s=this._placeholderTemplate,e=s?s.template:null,t;return e?(this._placeholderRef=s.viewContainer.createEmbeddedView(e,s.context),this._placeholderRef.detectChanges(),t=wn(this._placeholderRef,this._document)):t=In(this._rootElement),t.style.pointerEvents="none",t.classList.add("cdk-drag-placeholder"),t}_getPointerPositionInElement(s,e,t){let i=e===this._rootElement?null:e,o=i?i.getBoundingClientRect():s,r=Me(t)?t.targetTouches[0]:t,a=this._getViewportScrollPosition(),d=r.pageX-o.left-a.left,_=r.pageY-o.top-a.top;return{x:o.left-s.left+d,y:o.top-s.top+_}}_getPointerPositionOnPage(s){let e=this._getViewportScrollPosition(),t=Me(s)?s.touches[0]||s.changedTouches[0]||{pageX:0,pageY:0}:s,i=t.pageX-e.left,o=t.pageY-e.top;if(this._ownerSVGElement){let r=this._ownerSVGElement.getScreenCTM();if(r){let a=this._ownerSVGElement.createSVGPoint();return a.x=i,a.y=o,a.matrixTransform(r.inverse())}}return{x:i,y:o}}_getConstrainedPointerPosition(s){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:t,y:i}=this.constrainPosition?this.constrainPosition(s,this,this._initialDomRect,this._pickupPositionInElement):s;if(this.lockAxis==="x"||e==="x"?i=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(t=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:r}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:d,height:_}=this._getPreviewRect(),b=a.top+r,D=a.bottom-(_-r),z=a.left+o,le=a.right-(d-o);t=gn(t,z,le),i=gn(i,b,D)}return{x:t,y:i}}_updatePointerDirectionDelta(s){let{x:e,y:t}=s,i=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,r=Math.abs(e-o.x),a=Math.abs(t-o.y);return r>this._config.pointerDirectionChangeThreshold&&(i.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(i.y=t>o.y?1:-1,o.y=t),i}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let s=this._handles.length>0||!this.isDragging();s!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=s,Te(this._rootElement,s))}_removeRootElementListeners(s){s.removeEventListener("mousedown",this._pointerDown,nt),s.removeEventListener("touchstart",this._pointerDown,_n),s.removeEventListener("dragstart",this._nativeDragStart,nt)}_applyRootElementTransform(s,e){let t=1/this.scale,i=lt(s*t,e*t),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=at(i,this._initialTransform)}_applyPreviewTransform(s,e){let t=this._previewTemplate?.template?void 0:this._initialTransform,i=lt(s,e);this._preview.setTransform(at(i,t))}_getDragDistance(s){let e=this._pickupPositionOnPage;return e?{x:s.x-e.x,y:s.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:s,y:e}=this._passiveTransform;if(s===0&&e===0||this.isDragging()||!this._boundaryElement)return;let t=this._rootElement.getBoundingClientRect(),i=this._boundaryElement.getBoundingClientRect();if(i.width===0&&i.height===0||t.width===0&&t.height===0)return;let o=i.left-t.left,r=t.right-i.right,a=i.top-t.top,d=t.bottom-i.bottom;i.width>t.width?(o>0&&(s+=o),r>0&&(s-=r)):s=0,i.height>t.height?(a>0&&(e+=a),d>0&&(e-=d)):e=0,(s!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:s})}_getDragStartDelay(s){let e=this.dragStartDelay;return typeof e=="number"?e:Me(s)?e.touch:e?e.mouse:0}_updateOnScroll(s){let e=this._parentPositions.handleScroll(s);if(e){let t=Pe(s);this._boundaryRect&&t!==this._boundaryElement&&t.contains(this._boundaryElement)&&Ne(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=qe(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(s,e){let t=this._previewContainer||"global";if(t==="parent")return s;if(t==="global"){let i=this._document;return e||i.fullscreenElement||i.webkitFullscreenElement||i.mozFullScreenElement||i.msFullscreenElement||i.body}return Q(t)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(s){return this._handles.find(e=>s.target&&(s.target===e||e.contains(s.target)))}};function gn(n,s,e){return Math.max(s,Math.min(e,n))}function Me(n){return n.type[0]==="t"}function bn(n){n.preventDefault()}function Sn(n,s,e){let t=vn(s,n.length-1),i=vn(e,n.length-1);if(t===i)return;let o=n[t],r=i<t?-1:1;for(let a=t;a!==i;a+=r)n[a]=n[a+r];n[i]=o}function vn(n,s){return Math.max(0,Math.min(s,n))}var ct=class{constructor(s){this._dragDropRegistry=s,this._itemPositions=[],this.orientation="vertical",this._previousSwap={drag:null,delta:0,overlaps:!1}}start(s){this.withItems(s)}sort(s,e,t,i){let o=this._itemPositions,r=this._getItemIndexFromPointerPosition(s,e,t,i);if(r===-1&&o.length>0)return null;let a=this.orientation==="horizontal",d=o.findIndex(j=>j.drag===s),_=o[r],b=o[d].clientRect,D=_.clientRect,z=d>r?1:-1,le=this._getItemOffsetPx(b,D,z),ce=this._getSiblingOffsetPx(d,o,z),_e=o.slice();return Sn(o,d,r),o.forEach((j,Un)=>{if(_e[Un]===j)return;let Vt=j.drag===s,ut=Vt?le:ce,Bt=Vt?s.getPlaceholderElement():j.drag.getRootElement();j.offset+=ut;let zt=Math.round(j.offset*(1/j.drag.scale));a?(Bt.style.transform=at(`translate3d(${zt}px, 0, 0)`,j.initialTransform),Ne(j.clientRect,0,ut)):(Bt.style.transform=at(`translate3d(0, ${zt}px, 0)`,j.initialTransform),Ne(j.clientRect,ut,0))}),this._previousSwap.overlaps=Tt(D,e,t),this._previousSwap.drag=_.drag,this._previousSwap.delta=a?i.x:i.y,{previousIndex:d,currentIndex:r}}enter(s,e,t,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(s,e,t):i,r=this._activeDraggables,a=r.indexOf(s),d=s.getPlaceholderElement(),_=r[o];if(_===s&&(_=r[o+1]),!_&&(o==null||o===-1||o<r.length-1)&&this._shouldEnterAsFirstChild(e,t)&&(_=r[0]),a>-1&&r.splice(a,1),_&&!this._dragDropRegistry.isDragging(_)){let b=_.getRootElement();b.parentElement.insertBefore(d,b),r.splice(o,0,s)}else this._element.appendChild(d),r.push(s);d.style.transform="",this._cacheItemPositions()}withItems(s){this._activeDraggables=s.slice(),this._cacheItemPositions()}withSortPredicate(s){this._sortPredicate=s}reset(){this._activeDraggables?.forEach(s=>{let e=s.getRootElement();if(e){let t=this._itemPositions.find(i=>i.drag===s)?.initialTransform;e.style.transform=t||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(s){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(t=>t.drag===s)}updateOnScroll(s,e){this._itemPositions.forEach(({clientRect:t})=>{Ne(t,s,e)}),this._itemPositions.forEach(({drag:t})=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(s){this._element=s}_cacheItemPositions(){let s=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let t=e.getVisibleElement();return{drag:e,offset:0,initialTransform:t.style.transform||"",clientRect:Lt(t)}}).sort((e,t)=>s?e.clientRect.left-t.clientRect.left:e.clientRect.top-t.clientRect.top)}_getItemOffsetPx(s,e,t){let i=this.orientation==="horizontal",o=i?e.left-s.left:e.top-s.top;return t===-1&&(o+=i?e.width-s.width:e.height-s.height),o}_getSiblingOffsetPx(s,e,t){let i=this.orientation==="horizontal",o=e[s].clientRect,r=e[s+t*-1],a=o[i?"width":"height"]*t;if(r){let d=i?"left":"top",_=i?"right":"bottom";t===-1?a-=r.clientRect[d]-o[_]:a+=o[d]-r.clientRect[_]}return a}_shouldEnterAsFirstChild(s,e){if(!this._activeDraggables.length)return!1;let t=this._itemPositions,i=this.orientation==="horizontal";if(t[0].drag!==this._activeDraggables[0]){let r=t[t.length-1].clientRect;return i?s>=r.right:e>=r.bottom}else{let r=t[0].clientRect;return i?s<=r.left:e<=r.top}}_getItemIndexFromPointerPosition(s,e,t,i){let o=this.orientation==="horizontal",r=this._itemPositions.findIndex(({drag:a,clientRect:d})=>{if(a===s)return!1;if(i){let _=o?i.x:i.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&_===this._previousSwap.delta)return!1}return o?e>=Math.floor(d.left)&&e<Math.floor(d.right):t>=Math.floor(d.top)&&t<Math.floor(d.bottom)});return r===-1||!this._sortPredicate(r,s)?-1:r}},Ot=class{constructor(s,e){this._document=s,this._dragDropRegistry=e,this._previousSwap={drag:null,deltaX:0,deltaY:0,overlaps:!1},this._relatedNodes=[]}start(s){let e=this._element.childNodes;this._relatedNodes=[];for(let t=0;t<e.length;t++){let i=e[t];this._relatedNodes.push([i,i.nextSibling])}this.withItems(s)}sort(s,e,t,i){let o=this._getItemIndexFromPointerPosition(s,e,t),r=this._previousSwap;if(o===-1||this._activeItems[o]===s)return null;let a=this._activeItems[o];if(r.drag===a&&r.overlaps&&r.deltaX===i.x&&r.deltaY===i.y)return null;let d=this.getItemIndex(s),_=s.getPlaceholderElement(),b=a.getRootElement();o>d?b.after(_):b.before(_),Sn(this._activeItems,d,o);let D=this._getRootNode().elementFromPoint(e,t);return r.deltaX=i.x,r.deltaY=i.y,r.drag=a,r.overlaps=b===D||b.contains(D),{previousIndex:d,currentIndex:o}}enter(s,e,t,i){let o=i==null||i<0?this._getItemIndexFromPointerPosition(s,e,t):i;o===-1&&(o=this._getClosestItemIndexToPointer(s,e,t));let r=this._activeItems[o],a=this._activeItems.indexOf(s);a>-1&&this._activeItems.splice(a,1),r&&!this._dragDropRegistry.isDragging(r)?(this._activeItems.splice(o,0,s),r.getRootElement().before(s.getPlaceholderElement())):(this._activeItems.push(s),this._element.appendChild(s.getPlaceholderElement()))}withItems(s){this._activeItems=s.slice()}withSortPredicate(s){this._sortPredicate=s}reset(){let s=this._element,e=this._previousSwap;for(let t=this._relatedNodes.length-1;t>-1;t--){let[i,o]=this._relatedNodes[t];i.parentNode===s&&i.nextSibling!==o&&(o===null?s.appendChild(i):o.parentNode===s&&s.insertBefore(i,o))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(s){return this._activeItems.indexOf(s)}updateOnScroll(){this._activeItems.forEach(s=>{this._dragDropRegistry.isDragging(s)&&s._sortFromLastPointerPosition()})}withElementContainer(s){s!==this._element&&(this._element=s,this._rootNode=void 0)}_getItemIndexFromPointerPosition(s,e,t){let i=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(t)),o=i?this._activeItems.findIndex(r=>{let a=r.getRootElement();return i===a||a.contains(i)}):-1;return o===-1||!this._sortPredicate(o,s)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=qe(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(s,e,t){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let i=1/0,o=-1;for(let r=0;r<this._activeItems.length;r++){let a=this._activeItems[r];if(a!==s){let{x:d,y:_}=a.getRootElement().getBoundingClientRect(),b=Math.hypot(e-d,t-_);b<i&&(i=b,o=r)}}return o}},xn=.05,kn=.05,K=function(n){return n[n.NONE=0]="NONE",n[n.UP=1]="UP",n[n.DOWN=2]="DOWN",n}(K||{}),A=function(n){return n[n.NONE=0]="NONE",n[n.LEFT=1]="LEFT",n[n.RIGHT=2]="RIGHT",n}(A||{}),Rt=class{constructor(s,e,t,i,o){this._dragDropRegistry=e,this._ngZone=i,this._viewportRuler=o,this.disabled=!1,this.sortingDisabled=!1,this.autoScrollDisabled=!1,this.autoScrollStep=2,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.beforeStarted=new w,this.entered=new w,this.exited=new w,this.dropped=new w,this.sorted=new w,this.receivingStarted=new w,this.receivingStopped=new w,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=de.EMPTY,this._verticalScrollDirection=K.NONE,this._horizontalScrollDirection=A.NONE,this._stopScrollTimers=new w,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),Kt(0,pt).pipe(me(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,d=this.autoScrollStep;this._verticalScrollDirection===K.UP?a.scrollBy(0,-d):this._verticalScrollDirection===K.DOWN&&a.scrollBy(0,d),this._horizontalScrollDirection===A.LEFT?a.scrollBy(-d,0):this._horizontalScrollDirection===A.RIGHT&&a.scrollBy(d,0)})};let r=this.element=Q(s);this._document=t,this.withOrientation("vertical").withElementContainer(r),e.registerDropContainer(this),this._parentPositions=new rt(t)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(s,e,t,i){this._draggingStarted(),i==null&&this.sortingDisabled&&(i=this._draggables.indexOf(s)),this._sortStrategy.enter(s,e,t,i),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:s,container:this,currentIndex:this.getItemIndex(s)})}exit(s){this._reset(),this.exited.next({item:s,container:this})}drop(s,e,t,i,o,r,a,d={}){this._reset(),this.dropped.next({item:s,currentIndex:e,previousIndex:t,container:this,previousContainer:i,isPointerOverContainer:o,distance:r,dropPoint:a,event:d})}withItems(s){let e=this._draggables;return this._draggables=s,s.forEach(t=>t._withDropContainer(this)),this.isDragging()&&(e.filter(i=>i.isDragging()).every(i=>s.indexOf(i)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(s){return this._direction=s,this._sortStrategy instanceof ct&&(this._sortStrategy.direction=s),this}connectedTo(s){return this._siblings=s.slice(),this}withOrientation(s){if(s==="mixed")this._sortStrategy=new Ot(this._document,this._dragDropRegistry);else{let e=new ct(this._dragDropRegistry);e.direction=this._direction,e.orientation=s,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,t)=>this.sortPredicate(e,t,this)),this}withScrollableParents(s){let e=this._container;return this._scrollableElements=s.indexOf(e)===-1?[e,...s]:s.slice(),this}withElementContainer(s){if(s===this._container)return this;let e=Q(this.element),t=this._scrollableElements.indexOf(this._container),i=this._scrollableElements.indexOf(s);return t>-1&&this._scrollableElements.splice(t,1),i>-1&&this._scrollableElements.splice(i,1),this._sortStrategy&&this._sortStrategy.withElementContainer(s),this._cachedShadowRoot=null,this._scrollableElements.unshift(s),this._container=s,this}getScrollableParents(){return this._scrollableElements}getItemIndex(s){return this._isDragging?this._sortStrategy.getItemIndex(s):this._draggables.indexOf(s)}isReceiving(){return this._activeSiblings.size>0}_sortItem(s,e,t,i){if(this.sortingDisabled||!this._domRect||!cn(this._domRect,xn,e,t))return;let o=this._sortStrategy.sort(s,e,t,i);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:s})}_startScrollingIfNecessary(s,e){if(this.autoScrollDisabled)return;let t,i=K.NONE,o=A.NONE;if(this._parentPositions.positions.forEach((r,a)=>{a===this._document||!r.clientRect||t||cn(r.clientRect,xn,s,e)&&([i,o]=is(a,r.clientRect,this._direction,s,e),(i||o)&&(t=a))}),!i&&!o){let{width:r,height:a}=this._viewportRuler.getViewportSize(),d={width:r,height:a,top:0,right:r,bottom:a,left:0};i=Tn(d,e),o=Dn(d,s),t=window}t&&(i!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||t!==this._scrollNode)&&(this._verticalScrollDirection=i,this._horizontalScrollDirection=o,this._scrollNode=t,(i||o)&&t?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let s=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=s.msScrollSnapType||s.scrollSnapType||"",s.scrollSnapType=s.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let s=this._container.style;s.scrollSnapType=s.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(s,e){return this._domRect!=null&&Tt(this._domRect,s,e)}_getSiblingContainerFromPosition(s,e,t){return this._siblings.find(i=>i._canReceive(s,e,t))}_canReceive(s,e,t){if(!this._domRect||!Tt(this._domRect,e,t)||!this.enterPredicate(s,this))return!1;let i=this._getShadowRoot().elementFromPoint(e,t);return i?i===this._container||this._container.contains(i):!1}_startReceiving(s,e){let t=this._activeSiblings;!t.has(s)&&e.every(i=>this.enterPredicate(i,this)||this._draggables.indexOf(i)>-1)&&(t.add(s),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:s,receiver:this,items:e}))}_stopReceiving(s){this._activeSiblings.delete(s),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:s,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(s=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(s);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let s=qe(this._container);this._cachedShadowRoot=s||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let s=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,s))}};function Tn(n,s){let{top:e,bottom:t,height:i}=n,o=i*kn;return s>=e-o&&s<=e+o?K.UP:s>=t-o&&s<=t+o?K.DOWN:K.NONE}function Dn(n,s){let{left:e,right:t,width:i}=n,o=i*kn;return s>=e-o&&s<=e+o?A.LEFT:s>=t-o&&s<=t+o?A.RIGHT:A.NONE}function is(n,s,e,t,i){let o=Tn(s,i),r=Dn(s,t),a=K.NONE,d=A.NONE;if(o){let _=n.scrollTop;o===K.UP?_>0&&(a=K.UP):n.scrollHeight-_>n.clientHeight&&(a=K.DOWN)}if(r){let _=n.scrollLeft;e==="rtl"?r===A.RIGHT?_<0&&(d=A.RIGHT):n.scrollWidth+_>n.clientWidth&&(d=A.LEFT):r===A.LEFT?_>0&&(d=A.LEFT):n.scrollWidth-_>n.clientWidth&&(d=A.RIGHT)}return[a,d]}var st=Fe({passive:!1,capture:!0}),ot=new Set,ns=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275cmp=W({type:n,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],decls:0,vars:0,template:function(t,i){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0})}}return n})(),ss=(()=>{class n{constructor(e,t){this._ngZone=e,this._appRef=F(ei),this._environmentInjector=F(Zt),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=N([]),this._globalListeners=new Map,this._draggingPredicate=i=>i.isDragging(),this.pointerMove=new w,this.pointerUp=new w,this.scroll=new w,this._preventDefaultWhileDragging=i=>{this._activeDragInstances().length>0&&i.preventDefault()},this._persistentTouchmoveListener=i=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&i.preventDefault(),this.pointerMove.next(i))},this._document=t}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,st)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,st)}startDragging(e,t){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._loadResets(),this._activeDragInstances.update(i=>[...i,e]),this._activeDragInstances().length===1)){let i=t.type.startsWith("touch");this._globalListeners.set(i?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:st}),i||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:st}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,r)=>{this._document.addEventListener(r,o.handler,o.options)})})}}stopDragging(e){this._activeDragInstances.update(t=>{let i=t.indexOf(e);return i>-1?(t.splice(i,1),[...t]):t}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let t=[this.scroll];return e&&e!==this._document&&t.push(new De(i=>this._ngZone.runOutsideAngular(()=>{let r=a=>{this._activeDragInstances().length&&i.next(a)};return e.addEventListener("scroll",r,!0),()=>{e.removeEventListener("scroll",r,!0)}}))),Be(...t)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,t)=>{this._document.removeEventListener(t,e.handler,e.options)}),this._globalListeners.clear()}_loadResets(){if(!ot.has(this._appRef)){ot.add(this._appRef);let e=ni(ns,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{ot.delete(this._appRef),ot.size===0&&e.destroy()})}}static{this.\u0275fac=function(t){return new(t||n)(M(he),M(ue))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),os={dragStartThreshold:5,pointerDirectionChangeThreshold:5},Pt=(()=>{class n{constructor(e,t,i,o){this._document=e,this._ngZone=t,this._viewportRuler=i,this._dragDropRegistry=o}createDrag(e,t=os){return new Et(e,t,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new Rt(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static{this.\u0275fac=function(t){return new(t||n)(M(ue),M(he),M(tn),M(ss))}}static{this.\u0275prov=q({token:n,factory:n.\u0275fac,providedIn:"root"})}}return n})(),yn=new ge("CDK_DRAG_PARENT");var rs=new ge("CdkDragHandle");var dt=new ge("CDK_DRAG_CONFIG"),as="cdk-drag",En=new ge("CdkDropList"),On=(()=>{class n{static{this._dragInstances=[]}get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}constructor(e,t,i,o,r,a,d,_,b,D,z){this.element=e,this.dropContainer=t,this._ngZone=o,this._viewContainerRef=r,this._dir=d,this._changeDetectorRef=b,this._selfHandle=D,this._parentDrag=z,this._destroyed=new w,this._handles=new Ve([]),this.scale=1,this.started=new O,this.released=new O,this.ended=new O,this.entered=new O,this.exited=new O,this.dropped=new O,this.moved=new De(le=>{let ce=this._dragRef.moved.pipe(Ht(_e=>({source:this,pointerPosition:_e.pointerPosition,event:_e.event,delta:_e.delta,distance:_e.distance}))).subscribe(le);return()=>{ce.unsubscribe()}}),this._injector=F(He),this._dragRef=_.createDrag(e,{dragStartThreshold:a&&a.dragStartThreshold!=null?a.dragStartThreshold:5,pointerDirectionChangeThreshold:a&&a.pointerDirectionChangeThreshold!=null?a.pointerDirectionChangeThreshold:5,zIndex:a?.zIndex}),this._dragRef.data=this,n._dragInstances.push(this),a&&this._assignDefaults(a),t&&(this._dragRef._withDropContainer(t._dropListRef),t.addItem(this),t._dropListRef.beforeStarted.pipe(me(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){Qt(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let t=e.rootElementSelector,i=e.freeDragPosition;t&&!t.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,i&&!i.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let e=n._dragInstances.indexOf(this);e>-1&&n._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let t=this._handles.getValue();t.push(e),this._handles.next(t)}_removeHandle(e){let t=this._handles.getValue(),i=t.indexOf(e);i>-1&&(t.splice(i,1),this._handles.next(t))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,t=e;this.rootElementSelector&&(t=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(t||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):Q(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let t=this._dir,i=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,r=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof i=="object"&&i?i:it(i),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(r).withPreviewContainer(this.previewContainer||"global"),t&&e.withDirection(t.value)}}),e.beforeStarted.pipe(Ut(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let t=this.element.nativeElement.parentElement;for(;t;){if(t.classList.contains(as)){e.withParent(n._dragInstances.find(i=>i.element.nativeElement===t)?._dragRef||null);break}t=t.parentElement}})}_handleEvents(e){e.started.subscribe(t=>{this.started.emit({source:this,event:t.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(t=>{this.released.emit({source:this,event:t.event})}),e.ended.subscribe(t=>{this.ended.emit({source:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:t.container.data,item:this,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:t.container.data,item:this})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,isPointerOverContainer:t.isPointerOverContainer,item:this,distance:t.distance,dropPoint:t.dropPoint,event:t.event})})}_assignDefaults(e){let{lockAxis:t,dragStartDelay:i,constrainPosition:o,previewClass:r,boundaryElement:a,draggingDisabled:d,rootElementSelector:_,previewContainer:b}=e;this.disabled=d??!1,this.dragStartDelay=i||0,t&&(this.lockAxis=t),o&&(this.constrainPosition=o),r&&(this.previewClass=r),a&&(this.boundaryElement=a),_&&(this.rootElementSelector=_),b&&(this.previewContainer=b)}_setupHandlesListener(){this._handles.pipe(je(e=>{let t=e.map(i=>i.element);this._selfHandle&&this.rootElementSelector&&t.push(this.element),this._dragRef.withHandles(t)}),mt(e=>Be(...e.map(t=>t._stateChanges.pipe(ze(t))))),me(this._destroyed)).subscribe(e=>{let t=this._dragRef,i=e.element.nativeElement;e.disabled?t.disableHandle(i):t.enableHandle(i)})}static{this.\u0275fac=function(t){return new(t||n)(x(te),x(En,12),x(ue),x(he),x(gt),x(dt,8),x(wt,8),x(Pt),x(ye),x(rs,10),x(yn,12))}}static{this.\u0275dir=$e({type:n,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(t,i){t&2&&H("cdk-drag-disabled",i.disabled)("cdk-drag-dragging",i._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",E],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Le]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],features:[oe([{provide:yn,useExisting:n}]),ft]})}}return n})(),Cn=new ge("CdkDropListGroup");var ls=0,Rn=(()=>{class n{static{this._dropLists=[]}get disabled(){return this._disabled||!!this._group&&this._group.disabled}set disabled(e){this._dropListRef.disabled=this._disabled=e}constructor(e,t,i,o,r,a,d){this.element=e,this._changeDetectorRef=i,this._scrollDispatcher=o,this._dir=r,this._group=a,this._destroyed=new w,this.connectedTo=[],this.id=`cdk-drop-list-${ls++}`,this.enterPredicate=()=>!0,this.sortPredicate=()=>!0,this.dropped=new O,this.entered=new O,this.exited=new O,this.sorted=new O,this._unsortedItems=new Set,this._dropListRef=t.createDropList(e),this._dropListRef.data=this,d&&this._assignDefaults(d),this._dropListRef.enterPredicate=(_,b)=>this.enterPredicate(_.data,b.data),this._dropListRef.sortPredicate=(_,b,D)=>this.sortPredicate(_,b.data,D.data),this._setupInputSyncSubscription(this._dropListRef),this._handleEvents(this._dropListRef),n._dropLists.push(this),a&&a._items.add(this)}addItem(e){this._unsortedItems.add(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}removeItem(e){this._unsortedItems.delete(e),this._dropListRef.isDragging()&&this._syncItemsWithRef()}getSortedItems(){return Array.from(this._unsortedItems).sort((e,t)=>e._dragRef.getVisibleElement().compareDocumentPosition(t._dragRef.getVisibleElement())&Node.DOCUMENT_POSITION_FOLLOWING?-1:1)}ngOnDestroy(){let e=n._dropLists.indexOf(this);e>-1&&n._dropLists.splice(e,1),this._group&&this._group._items.delete(this),this._unsortedItems.clear(),this._dropListRef.dispose(),this._destroyed.next(),this._destroyed.complete()}_setupInputSyncSubscription(e){this._dir&&this._dir.change.pipe(ze(this._dir.value),me(this._destroyed)).subscribe(t=>e.withDirection(t)),e.beforeStarted.subscribe(()=>{let t=Xi(this.connectedTo).map(i=>{if(typeof i=="string"){let o=n._dropLists.find(r=>r.id===i);return o}return i});if(this._group&&this._group._items.forEach(i=>{t.indexOf(i)===-1&&t.push(i)}),!this._scrollableParentsResolved){let i=this._scrollDispatcher.getAncestorScrollContainers(this.element).map(o=>o.getElementRef().nativeElement);this._dropListRef.withScrollableParents(i),this._scrollableParentsResolved=!0}if(this.elementContainerSelector){let i=this.element.nativeElement.querySelector(this.elementContainerSelector);e.withElementContainer(i)}e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.sortingDisabled=this.sortingDisabled,e.autoScrollDisabled=this.autoScrollDisabled,e.autoScrollStep=it(this.autoScrollStep,2),e.connectedTo(t.filter(i=>i&&i!==this).map(i=>i._dropListRef)).withOrientation(this.orientation)})}_handleEvents(e){e.beforeStarted.subscribe(()=>{this._syncItemsWithRef(),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(t=>{this.entered.emit({container:this,item:t.item.data,currentIndex:t.currentIndex})}),e.exited.subscribe(t=>{this.exited.emit({container:this,item:t.item.data}),this._changeDetectorRef.markForCheck()}),e.sorted.subscribe(t=>{this.sorted.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,container:this,item:t.item.data})}),e.dropped.subscribe(t=>{this.dropped.emit({previousIndex:t.previousIndex,currentIndex:t.currentIndex,previousContainer:t.previousContainer.data,container:t.container.data,item:t.item.data,isPointerOverContainer:t.isPointerOverContainer,distance:t.distance,dropPoint:t.dropPoint,event:t.event}),this._changeDetectorRef.markForCheck()}),Be(e.receivingStarted,e.receivingStopped).subscribe(()=>this._changeDetectorRef.markForCheck())}_assignDefaults(e){let{lockAxis:t,draggingDisabled:i,sortingDisabled:o,listAutoScrollDisabled:r,listOrientation:a}=e;this.disabled=i??!1,this.sortingDisabled=o??!1,this.autoScrollDisabled=r??!1,this.orientation=a||"vertical",t&&(this.lockAxis=t)}_syncItemsWithRef(){this._dropListRef.withItems(this.getSortedItems().map(e=>e._dragRef))}static{this.\u0275fac=function(t){return new(t||n)(x(te),x(Pt),x(ye),x(en),x(wt,8),x(Cn,12),x(dt,8))}}static{this.\u0275dir=$e({type:n,selectors:[["","cdkDropList",""],["cdk-drop-list"]],hostAttrs:[1,"cdk-drop-list"],hostVars:7,hostBindings:function(t,i){t&2&&(R("id",i.id),H("cdk-drop-list-disabled",i.disabled)("cdk-drop-list-dragging",i._dropListRef.isDragging())("cdk-drop-list-receiving",i._dropListRef.isReceiving()))},inputs:{connectedTo:[0,"cdkDropListConnectedTo","connectedTo"],data:[0,"cdkDropListData","data"],orientation:[0,"cdkDropListOrientation","orientation"],id:"id",lockAxis:[0,"cdkDropListLockAxis","lockAxis"],disabled:[2,"cdkDropListDisabled","disabled",E],sortingDisabled:[2,"cdkDropListSortingDisabled","sortingDisabled",E],enterPredicate:[0,"cdkDropListEnterPredicate","enterPredicate"],sortPredicate:[0,"cdkDropListSortPredicate","sortPredicate"],autoScrollDisabled:[2,"cdkDropListAutoScrollDisabled","autoScrollDisabled",E],autoScrollStep:[0,"cdkDropListAutoScrollStep","autoScrollStep"],elementContainerSelector:[0,"cdkDropListElementContainer","elementContainerSelector"]},outputs:{dropped:"cdkDropListDropped",entered:"cdkDropListEntered",exited:"cdkDropListExited",sorted:"cdkDropListSorted"},exportAs:["cdkDropList"],features:[oe([{provide:Cn,useValue:void 0},{provide:En,useExisting:n}])]})}}return n})();var Ln=(()=>{class n{static{this.\u0275fac=function(t){return new(t||n)}}static{this.\u0275mod=be({type:n})}static{this.\u0275inj=fe({providers:[Pt],imports:[nn]})}}return n})();var ds=["item"],hs=["group"],us=["header"],Fn=["filter"],ps=["footer"],_s=["emptyfilter"],ms=["empty"],fs=["filtericon"],gs=["checkicon"],bs=["checkmark"],vs=["loader"],xs=["headerchkbox"],ys=["lastHiddenFocusableElement"],Cs=["firstHiddenFocusableElement"],Is=["scroller"],ws=["list"],Ss=["container"],ks=[[["p-header"]],[["p-footer"]]],Ts=["p-header","p-footer"],ht=(n,s)=>({$implicit:n,options:s}),Ds=n=>({"p-checkbox-disabled":n}),Mt=n=>({$implicit:n}),An=n=>({options:n}),Mn=()=>[],Nt=n=>({height:n}),Es=()=>({}),Os=(n,s,e)=>({"p-listbox-option-selected":n,"p-focus":s,"p-disabled":e}),Rs=(n,s,e,t)=>({$implicit:n,index:s,selected:e,disabled:t}),Ls=n=>({implicit:n});function Fs(n,s){n&1&&$(0)}function Ps(n,s){if(n&1&&(u(0,"div",22),Ke(1),m(2,Fs,1,0,"ng-container",23),p()),n&2){let e=l();c(2),h("ngTemplateOutlet",e.headerTemplate||e._headerTemplate)("ngTemplateOutletContext",Re(2,ht,e.modelValue(),e.visibleOptions()))}}function As(n,s){}function Ms(n,s){n&1&&m(0,As,0,0,"ng-template")}function Ns(n,s){if(n&1&&m(0,Ms,1,0,null,23),n&2){let e=l(5);h("ngTemplateOutlet",e.checkIconTemplate||e._checkIconTemplate)("ngTemplateOutletContext",v(2,Mt,e.allSelected()))}}function Vs(n,s){n&1&&(X(0),m(1,Ns,1,4,"ng-template",null,5,ee),J())}function Bs(n,s){if(n&1&&(u(0,"p-checkbox",30),m(1,Vs,3,0,"ng-container",31),p()),n&2){let e=l(3);h("ngModel",e.allSelected())("disabled",e.disabled)("tabindex",-1)("variant",e.config.inputStyle()==="filled"||e.config.inputVariant()==="filled"?"filled":"outlined")("binary",!0),c(),h("ngIf",e.checkIconTemplate||e._checkIconTemplate)}}function zs(n,s){if(n&1){let e=L();u(0,"div",26),y("click",function(i){f(e);let o=l(2);return g(o.onToggleAll(i))})("keydown",function(i){f(e);let o=l(2);return g(o.onHeaderCheckboxKeyDown(i))}),u(1,"div",27)(2,"input",28,4),y("focus",function(i){f(e);let o=l(2);return g(o.onHeaderCheckboxFocus(i))})("blur",function(){f(e);let i=l(2);return g(i.onHeaderCheckboxBlur())}),p()(),m(4,Bs,2,6,"p-checkbox",29),p()}if(n&2){let e=l(2);h("ngClass",v(6,Ds,e.disabled)),c(),R("data-p-hidden-accessible",!0),c(),h("disabled",e.disabled),R("checked",e.allSelected())("aria-label",e.toggleAllAriaLabel),c(2),h("ngIf",e.checkbox&&e.multiple)}}function js(n,s){n&1&&$(0)}function Hs(n,s){if(n&1&&(X(0),m(1,js,1,0,"ng-container",23),J()),n&2){let e=l(2);c(),h("ngTemplateOutlet",e.filterTemplate||e._filterTemplate)("ngTemplateOutletContext",v(2,An,e.filterOptions))}}function $s(n,s){n&1&&I(0,"SearchIcon",38),n&2&&(h("styleClass","p-listbox-filter-icon"),R("aria-hidden",!0))}function Ks(n,s){}function Ws(n,s){n&1&&m(0,Ks,0,0,"ng-template")}function Us(n,s){if(n&1&&(u(0,"span",39),m(1,Ws,1,0,null,40),p()),n&2){let e=l(4);R("aria-hidden",!0),c(),h("ngTemplateOutlet",e.filterIconTemplate||e._filterIconTemplate)}}function Gs(n,s){if(n&1){let e=L();u(0,"div",34)(1,"p-iconfield")(2,"input",35,6),y("input",function(i){f(e);let o=l(3);return g(o.onFilterChange(i))})("keydown",function(i){f(e);let o=l(3);return g(o.onFilterKeyDown(i))})("focus",function(i){f(e);let o=l(3);return g(o.onFilterFocus(i))})("blur",function(i){f(e);let o=l(3);return g(o.onFilterBlur(i))}),p(),u(4,"p-inputicon"),m(5,$s,1,2,"SearchIcon",36)(6,Us,2,2,"span",37),p()()()}if(n&2){let e=l(3);c(2),h("value",e._filterValue()||"")("disabled",e.disabled)("tabindex",!e.disabled&&!e.focused?e.tabindex:-1),R("aria-owns",e.id+"_list")("aria-activedescendant",e.focusedOptionId)("placeholder",e.filterPlaceHolder)("aria-label",e.ariaFilterLabel),c(3),h("ngIf",!e.filterIconTemplate&&!e._filterIconTemplate),c(),h("ngIf",e.filterIconTemplate||e._filterIconTemplate)}}function Zs(n,s){if(n&1&&(m(0,Gs,7,9,"div",32),u(1,"span",33),C(2),p()),n&2){let e=l(2);h("ngIf",e.filter),c(),R("data-p-hidden-accessible",!0),c(),G(" ",e.filterResultMessageText," ")}}function qs(n,s){if(n&1&&(u(0,"div",22),m(1,zs,5,8,"div",24)(2,Hs,2,4,"ng-container",25)(3,Zs,3,3,"ng-template",null,3,ee),p()),n&2){let e=ve(4),t=l();c(),h("ngIf",t.checkbox&&t.multiple&&t.showToggleAll),c(),h("ngIf",t.filterTemplate||t._filterTemplate)("ngIfElse",e)}}function Qs(n,s){if(n&1&&C(0),n&2){let e=l(2);G(" ",e.emptyFilterMessageText," ")}}function Ys(n,s){n&1&&$(0,null,7)}function Xs(n,s){if(n&1&&m(0,Ys,2,0,"ng-container",40),n&2){let e=l(2);h("ngTemplateOutlet",e.emptyFilterTemplate||e._emptyFilterTemplate||e._emptyTemplate||e.emptyTemplate)}}function Js(n,s){if(n&1){let e=L();u(0,"div",41),y("cdkDropListDropped",function(i){f(e);let o=l();return g(o.drop(i))}),m(1,Qs,1,1)(2,Xs,1,1,"ng-container"),p()}if(n&2){let e=l();h("cdkDropListData",xe(2,Mn)),c(),S(!e.emptyFilterTemplate&&!e._emptyFilterTemplate&&!e._emptyTemplate&&!e.emptyTemplate?1:2)}}function eo(n,s){if(n&1&&C(0),n&2){let e=l(2);G(" ",e.emptyMessage," ")}}function to(n,s){n&1&&$(0,null,8)}function io(n,s){if(n&1&&m(0,to,2,0,"ng-container",40),n&2){let e=l(2);h("ngTemplateOutlet",e.emptyTemplate||e._emptyTemplate)}}function no(n,s){if(n&1){let e=L();u(0,"div",41),y("cdkDropListDropped",function(i){f(e);let o=l();return g(o.drop(i))}),m(1,eo,1,1)(2,io,1,1,"ng-container"),p()}if(n&2){let e=l();h("cdkDropListData",xe(2,Mn)),c(),S(!e.emptyTemplate&&!e._emptyTemplate?1:2)}}function so(n,s){n&1&&$(0)}function oo(n,s){if(n&1&&m(0,so,1,0,"ng-container",23),n&2){let e=s.$implicit,t=s.options;l(2);let i=ve(3);h("ngTemplateOutlet",i)("ngTemplateOutletContext",Re(2,ht,e,t))}}function ro(n,s){n&1&&$(0)}function ao(n,s){if(n&1&&m(0,ro,1,0,"ng-container",23),n&2){let e=s.options,t=l(4);h("ngTemplateOutlet",t.loaderTemplate||t._loaderTemplate)("ngTemplateOutletContext",v(2,An,e))}}function lo(n,s){n&1&&m(0,ao,1,4,"ng-template",null,12,ee)}function co(n,s){if(n&1){let e=L();u(0,"p-scroller",43,10),y("onLazyLoad",function(i){f(e);let o=l(2);return g(o.onLazyLoad.emit(i))}),m(2,oo,1,5,"ng-template",null,11,ee)(4,lo,2,0),p()}if(n&2){let e=l(2);Ee(v(9,Nt,e.scrollHeight)),h("items",e.visibleOptions())("itemSize",e.virtualScrollItemSize)("autoSize",!0)("lazy",e.lazy)("options",e.virtualScrollOptions)("tabindex",e.scrollerTabIndex),c(4),S(e.loaderTemplate||e._loaderTemplate?4:-1)}}function ho(n,s){n&1&&$(0)}function uo(n,s){if(n&1&&(X(0),m(1,ho,1,0,"ng-container",23),J()),n&2){l();let e=ve(3),t=l();c(),h("ngTemplateOutlet",e)("ngTemplateOutletContext",Re(3,ht,t.visibleOptions(),xe(2,Es)))}}function po(n,s){if(n&1&&(u(0,"span"),C(1),p()),n&2){let e=l(2).$implicit,t=l(3);c(),V(t.getOptionGroupLabel(e.optionGroup))}}function _o(n,s){n&1&&$(0)}function mo(n,s){if(n&1&&(X(0),u(1,"li",46),m(2,po,2,1,"span",31)(3,_o,1,0,"ng-container",23),p(),J()),n&2){let e=l(),t=e.$implicit,i=e.index,o=l().options,r=l(2);c(),h("ngStyle",v(7,Nt,o.itemSize+"px"))("cdkDragData",t)("cdkDragDisabled",!r.dragdrop),R("id",r.id+"_"+r.getOptionIndex(i,o)),c(),h("ngIf",!r.groupTemplate&&!r._groupTemplate),c(),h("ngTemplateOutlet",r.groupTemplate||r._groupTemplate)("ngTemplateOutletContext",v(9,Mt,t.optionGroup))}}function fo(n,s){}function go(n,s){n&1&&m(0,fo,0,0,"ng-template")}function bo(n,s){if(n&1&&m(0,go,1,0,null,23),n&2){let e=l(4).$implicit,t=l(3);h("ngTemplateOutlet",t.checkIconTemplate||t._checkIconTemplate)("ngTemplateOutletContext",v(2,Mt,t.isSelected(e)))}}function vo(n,s){n&1&&(X(0),m(1,bo,1,4,"ng-template",null,5,ee),J())}function xo(n,s){if(n&1&&(u(0,"p-checkbox",49),m(1,vo,3,0,"ng-container",31),p()),n&2){let e=l(2).$implicit,t=l(3);h("ngModel",t.isSelected(e))("readonly",!0)("disabled",t.disabled||t.isOptionDisabled(e))("tabindex",-1)("variant",t.config.inputStyle()==="filled"||t.config.inputVariant()==="filled"?"filled":"outlined")("binary",!0),c(),h("ngIf",t.checkIconTemplate||t._checkIconTemplate)}}function yo(n,s){n&1&&I(0,"BlankIcon",51)}function Co(n,s){n&1&&I(0,"CheckIcon",51)}function Io(n,s){if(n&1&&(X(0),m(1,yo,1,0,"BlankIcon",50)(2,Co,1,0,"CheckIcon",50),J()),n&2){let e=l(3).$implicit,t=l(3);c(),h("ngIf",!t.isSelected(e)),c(),h("ngIf",t.isSelected(e))}}function wo(n,s){n&1&&$(0)}function So(n,s){if(n&1&&(X(0),m(1,Io,3,2,"ng-container",31)(2,wo,1,0,"ng-container",23),J()),n&2){let e=l(2).$implicit,t=l(3);c(),h("ngIf",!t.checkmarkTemplate&&!t._checkmarkTemplate),c(),h("ngTemplateOutlet",t.checkmarkTemplate||t._checkmarkTemplate)("ngTemplateOutletContext",v(3,Ls,t.isSelected(e)))}}function ko(n,s){if(n&1&&(u(0,"span"),C(1),p()),n&2){let e=l(2).$implicit,t=l(3);c(),V(t.getOptionLabel(e))}}function To(n,s){n&1&&$(0)}function Do(n,s){if(n&1){let e=L();X(0),u(1,"li",47),y("click",function(i){f(e);let o=l(),r=o.$implicit,a=o.index,d=l().options,_=l(2);return g(_.onOptionSelect(i,r,_.getOptionIndex(a,d)))})("dblclick",function(i){f(e);let o=l().$implicit,r=l(3);return g(r.onOptionDoubleClick(i,o))})("mousedown",function(i){f(e);let o=l().index,r=l().options,a=l(2);return g(a.onOptionMouseDown(i,a.getOptionIndex(o,r)))})("mouseenter",function(i){f(e);let o=l().index,r=l().options,a=l(2);return g(a.onOptionMouseEnter(i,a.getOptionIndex(o,r)))})("touchend",function(){f(e);let i=l(4);return g(i.onOptionTouchEnd())}),m(2,xo,2,7,"p-checkbox",48)(3,So,3,5,"ng-container",31)(4,ko,2,1,"span",31)(5,To,1,0,"ng-container",23),p(),J()}if(n&2){let e=l(),t=e.$implicit,i=e.index,o=l().options,r=l(2);c(),h("ngStyle",v(15,Nt,o.itemSize+"px"))("ngClass",ti(17,Os,r.isSelected(t)&&r.highlightOnSelect,r.focusedOptionIndex()===r.getOptionIndex(i,o),r.isOptionDisabled(t)))("cdkDragData",t)("cdkDragDisabled",!r.dragdrop),R("id",r.id+"_"+r.getOptionIndex(i,o))("aria-label",r.getOptionLabel(t))("aria-selected",r.isSelected(t))("aria-disabled",r.isOptionDisabled(t))("aria-setsize",r.ariaSetSize)("ariaPosInset",r.getAriaPosInset(r.getOptionIndex(i,o))),c(),h("ngIf",r.checkbox&&r.multiple),c(),h("ngIf",r.checkmark),c(),h("ngIf",!r.itemTemplate&&!r._itemTemplate),c(),h("ngTemplateOutlet",r.itemTemplate||r._itemTemplate)("ngTemplateOutletContext",ii(21,Rs,t,r.getOptionIndex(i,o),r.isSelected(t),r.isOptionDisabled(t)))}}function Eo(n,s){if(n&1&&m(0,mo,4,11,"ng-container",31)(1,Do,6,26,"ng-container",31),n&2){let e=s.$implicit,t=l(3);h("ngIf",t.isOptionGroup(e)),c(),h("ngIf",!t.isOptionGroup(e))}}function Oo(n,s){if(n&1){let e=L();u(0,"ul",44,13),y("focus",function(i){f(e);let o=l(2);return g(o.onListFocus(i))})("blur",function(i){f(e);let o=l(2);return g(o.onListBlur(i))})("keydown",function(i){f(e);let o=l(2);return g(o.onListKeyDown(i))})("cdkDropListDropped",function(i){f(e);let o=l(2);return g(o.drop(i))}),m(2,Eo,2,2,"ng-template",45),p()}if(n&2){let e=s.$implicit,t=s.options,i=l(2);Ee(t.contentStyle),h("tabindex",-1)("ngClass",t.contentStyleClass)("cdkDropListData",e),R("aria-multiselectable",!0)("aria-activedescendant",i.focused?i.focusedOptionId:void 0)("aria-label",i.ariaLabel)("aria-disabled",i.disabled),c(2),h("ngForOf",e)}}function Ro(n,s){if(n&1&&m(0,co,5,11,"p-scroller",42)(1,uo,2,6,"ng-container",31)(2,Oo,3,10,"ng-template",null,9,ee),n&2){let e=l();h("ngIf",e.virtualScroll),c(),h("ngIf",!e.virtualScroll)}}function Lo(n,s){n&1&&$(0)}function Fo(n,s){if(n&1&&(u(0,"div",52),Ke(1,1),m(2,Lo,1,0,"ng-container",23),p()),n&2){let e=l();c(2),h("ngTemplateOutlet",e.footerTemplate||e._footerTemplate)("ngTemplateOutletContext",Re(2,ht,e.modelValue(),e.visibleOptions()))}}function Po(n,s){if(n&1&&(u(0,"span",21),C(1),p()),n&2){let e=l();c(),G(" ",e.emptyMessage," ")}}var Ao=({dt:n})=>`
2
2
  .p-listbox {
3
3
  background: ${n("listbox.background")};
4
4
  color: ${n("listbox.color")};