marketplacepos 3.6.3 → 3.6.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 (76) hide show
  1. package/Marketplace/{chunk-GQBV5OAK.js → chunk-2TNMBZG6.js} +1 -1
  2. package/Marketplace/{chunk-6G6GKWWY.js → chunk-4EAH4CVW.js} +1 -1
  3. package/Marketplace/{chunk-4OJVE2Q5.js → chunk-4JJEXEXD.js} +1 -1
  4. package/Marketplace/{chunk-NXCMFVSB.js → chunk-4XO4E2OI.js} +1 -1
  5. package/Marketplace/{chunk-WKRAISAM.js → chunk-5437ABT5.js} +1 -1
  6. package/Marketplace/{chunk-PP4ELWXY.js → chunk-5W3D75EL.js} +1 -1
  7. package/Marketplace/{chunk-QEO6A33I.js → chunk-6CMIQC4Z.js} +1 -1
  8. package/Marketplace/{chunk-JTTK3RAC.js → chunk-6JF7QYRS.js} +1 -1
  9. package/Marketplace/{chunk-WUPPCYDC.js → chunk-7IYEHG7N.js} +1 -1
  10. package/Marketplace/{chunk-L5RZ2NWC.js → chunk-7W5OCB74.js} +1 -1
  11. package/Marketplace/{chunk-7NGXKP3O.js → chunk-ART3IBLH.js} +1 -1
  12. package/Marketplace/{chunk-JKVEO7GJ.js → chunk-AUQYI2EA.js} +1 -1
  13. package/Marketplace/{chunk-O3ASI5PY.js → chunk-AYVVAF2D.js} +1 -1
  14. package/Marketplace/{chunk-JDFOZTNQ.js → chunk-BVNI7M43.js} +1 -1
  15. package/Marketplace/{chunk-QUZBZ5K4.js → chunk-BWTDHNZV.js} +1 -1
  16. package/Marketplace/{chunk-WZRJRVH6.js → chunk-C2A52LSM.js} +1 -1
  17. package/Marketplace/{chunk-MAVB5XKB.js → chunk-C6EE6UMS.js} +1 -1
  18. package/Marketplace/{chunk-VUAKZHTF.js → chunk-CC7AXJ62.js} +1 -1
  19. package/Marketplace/{chunk-HHAAJG6G.js → chunk-CSPU7H6P.js} +1 -1
  20. package/Marketplace/{chunk-XXLBTCRU.js → chunk-D5NWJJ3K.js} +1 -1
  21. package/Marketplace/{chunk-7KBKCIN6.js → chunk-EX7JS5XV.js} +1 -1
  22. package/Marketplace/{chunk-23JYSN6Q.js → chunk-EZPFNEBG.js} +1 -1
  23. package/Marketplace/{chunk-HUTPG746.js → chunk-FOXV7BI2.js} +1 -1
  24. package/Marketplace/{chunk-EHWPM4BE.js → chunk-G7VXQRNU.js} +1 -1
  25. package/Marketplace/{chunk-QNIEXALL.js → chunk-GGUUOJBM.js} +2 -2
  26. package/Marketplace/{chunk-7U5UAWCO.js → chunk-GOLQA2OV.js} +1 -1
  27. package/Marketplace/{chunk-NTY552OQ.js → chunk-HCXIXQ3P.js} +1 -1
  28. package/Marketplace/{chunk-7KXBD73I.js → chunk-IYJYQNSW.js} +1 -1
  29. package/Marketplace/{chunk-LYFRN35D.js → chunk-J6FCA2GC.js} +1 -1
  30. package/Marketplace/{chunk-VPP6ZKI2.js → chunk-JTPNWUC5.js} +1 -1
  31. package/Marketplace/{chunk-FCTD55SB.js → chunk-LRJDQQMW.js} +1 -1
  32. package/Marketplace/{chunk-UREGZMHY.js → chunk-M7SI7KCP.js} +1 -1
  33. package/Marketplace/{chunk-JW6NHBN5.js → chunk-MWEX4KT3.js} +1 -1
  34. package/Marketplace/{chunk-TQSDPBUE.js → chunk-N4KAWMLG.js} +1 -1
  35. package/Marketplace/{chunk-KJXEV3CR.js → chunk-N5JT3L3P.js} +1 -1
  36. package/Marketplace/{chunk-W6QK3KI2.js → chunk-NP4NUU26.js} +1 -1
  37. package/Marketplace/{chunk-YMMBFSTV.js → chunk-O4JO5HBG.js} +1 -1
  38. package/Marketplace/{chunk-NJI6OAOU.js → chunk-PJ55JADV.js} +1 -1
  39. package/Marketplace/{chunk-TIWU4GET.js → chunk-PJIKFDGL.js} +1 -1
  40. package/Marketplace/{chunk-LX6C545M.js → chunk-PO44ILHG.js} +1 -1
  41. package/Marketplace/{chunk-PSWRS2QZ.js → chunk-Q2GGNFJX.js} +1 -1
  42. package/Marketplace/{chunk-WOXH3LCZ.js → chunk-TGTYAI7P.js} +1 -1
  43. package/Marketplace/{chunk-IYRCZVA4.js → chunk-THMRV5XU.js} +1 -1
  44. package/Marketplace/{chunk-2PUWLP55.js → chunk-TKFPKCG2.js} +1 -1
  45. package/Marketplace/{chunk-AU4SOVII.js → chunk-TM72OVCB.js} +1 -1
  46. package/Marketplace/{chunk-PTRHHOMT.js → chunk-U7J6Y2ZR.js} +1 -1
  47. package/Marketplace/{chunk-KRHP6DRW.js → chunk-UGPHFJAX.js} +1 -1
  48. package/Marketplace/{chunk-J6AJBBZ3.js → chunk-UIXUUR3M.js} +1 -1
  49. package/Marketplace/{chunk-7KE42BE5.js → chunk-ULL6P5FP.js} +1 -1
  50. package/Marketplace/{chunk-E22FOFQL.js → chunk-URMIO2PO.js} +1 -1
  51. package/Marketplace/{chunk-WRAMXNGJ.js → chunk-WAQZNQJA.js} +1 -1
  52. package/Marketplace/{chunk-ZQL3IYZ4.js → chunk-WDFNDY2L.js} +1 -1
  53. package/Marketplace/{chunk-C7F32KU3.js → chunk-WEPTPOTB.js} +1 -1
  54. package/Marketplace/{chunk-QP3S52F6.js → chunk-WRPFY7PU.js} +1 -1
  55. package/Marketplace/chunk-XB6JTMTF.js +1 -0
  56. package/Marketplace/{chunk-UU26ASVF.js → chunk-XGU6OKNN.js} +1 -1
  57. package/Marketplace/chunk-XKSSZDF5.js +1 -0
  58. package/Marketplace/{chunk-FSLQ5TRN.js → chunk-XLVT5MIX.js} +1 -1
  59. package/Marketplace/{chunk-A3QB35Z5.js → chunk-XRYND57F.js} +1 -1
  60. package/Marketplace/{chunk-NG6JQWVZ.js → chunk-YDJHEKKE.js} +1 -1
  61. package/Marketplace/{chunk-ZVHCE4K4.js → chunk-YSP6AH3T.js} +1 -1
  62. package/Marketplace/{chunk-2CW5UYLD.js → chunk-YW4ETQW2.js} +1 -1
  63. package/Marketplace/{chunk-QO6GWCX7.js → chunk-YZSU7OTN.js} +1 -1
  64. package/Marketplace/{chunk-5PZ6BLED.js → chunk-ZO24DBCC.js} +1 -1
  65. package/Marketplace/index.html +2 -2
  66. package/Marketplace/{main-3ZACSMQZ.js → main-C2ZAIPC7.js} +1 -1
  67. package/Marketplace/{styles-DE7M2S4O.css → styles-5ZLA5BQS.css} +1 -1
  68. package/package.json +1 -1
  69. package/Marketplace/chunk-G7267XOM.js +0 -1
  70. package/Marketplace/chunk-P7QKTYYT.js +0 -1
  71. /package/Marketplace/{chunk-4EVRTQJX.js → chunk-72YRW3ZC.js} +0 -0
  72. /package/Marketplace/{chunk-5TEZF6KQ.js → chunk-F5TBMY3G.js} +0 -0
  73. /package/Marketplace/{chunk-SINQ7SXI.js → chunk-NDVNSHV5.js} +0 -0
  74. /package/Marketplace/{chunk-RHYO2A6O.js → chunk-TRPWLPXX.js} +0 -0
  75. /package/Marketplace/{chunk-KTBPHH7N.js → chunk-UTOILVIA.js} +0 -0
  76. /package/Marketplace/{polyfills-AGGI3U6M.js → polyfills-HPRX66LM.js} +0 -0
@@ -1,2 +1,2 @@
1
- import{a as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-UREGZMHY.js";import{$ as J,$a as j,A as Z,B as ge,Ba as O,D as _e,Da as ye,Fa as u,Ga as h,Gb as p,H as fe,Hb as _,Ia as Ie,Ib as R,Ja as T,Jb as y,Ka as Fe,Kb as f,Lb as V,Na as ee,Oa as d,Qa as k,S as Ee,Ua as v,V as P,Vb as Le,X as Ce,Xb as Be,Z as ve,Za as g,Zb as Ve,_a as E,_b as oe,aa as Te,ab as M,ac as ae,ba as be,bb as N,c as W,cb as se,db as U,ea as X,f as he,fa as we,fc as Pe,ga as w,hb as B,i as pe,ia as G,ja as I,jb as c,ka as F,kb as le,lb as re,mb as Se,oa as ne,ob as A,pb as L,q as me,qb as Q,rb as Ae,tb as xe,wb as z,x as q,xb as De,yb as Oe,zb as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";import{a as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-4EVRTQJX.js";var We=["content"],qe=["scroll"],Ge=["padding"],Y=n=>({searchTerm:n});function $e(n,t){if(n&1&&(g(0,"div",6),se(1,7),E()),n&2){let s=c();u(1),d("ngTemplateOutlet",s.headerTemplate)("ngTemplateOutletContext",z(2,Y,s.filterValue))}}function Ye(n,t){if(n&1&&(g(0,"div",8),se(1,7),E()),n&2){let s=c();u(1),d("ngTemplateOutlet",s.footerTemplate)("ngTemplateOutletContext",z(2,Y,s.filterValue))}}var He=["*"],Ke=["searchInput"],Ze=["clearButton"];function Je(n,t){if(n&1){let s=U();g(0,"span",15),B("click",function(){I(s);let i=c().$implicit,l=c(2);return F(l.unselect(i))}),L(1,"\xD7"),E(),j(2,"span",16)}if(n&2){let s=c().$implicit,e=c(2);u(2),d("ngItemLabel",s.label)("escape",e.escapeHTML)}}function Xe(n,t){}var et=(n,t,s)=>({item:n,clear:t,label:s});function tt(n,t){if(n&1&&(g(0,"div",12),v(1,Je,3,2,"ng-template",null,13,V)(3,Xe,0,0,"ng-template",14),E()),n&2){let s=t.$implicit,e=A(2),i=c(2);k("ng-value-disabled",s.disabled),u(3),d("ngTemplateOutlet",i.labelTemplate||e)("ngTemplateOutletContext",Oe(4,et,s.value,i.clearItem,s.label))}}function it(n,t){if(n&1&&(M(0),v(1,tt,4,8,"div",11),N()),n&2){let s=c();u(1),d("ngForOf",s.selectedItems)("ngForTrackBy",s.trackByOption)}}function nt(n,t){}var st=(n,t)=>({items:n,clear:t});function lt(n,t){if(n&1&&v(0,nt,0,0,"ng-template",14),n&2){let s=c();d("ngTemplateOutlet",s.multiLabelTemplate)("ngTemplateOutletContext",De(2,st,s.selectedValues,s.clearItem))}}function rt(n,t){n&1&&j(0,"div",19)}function ot(n,t){}function at(n,t){if(n&1&&(M(0),v(1,rt,1,0,"ng-template",null,17,V)(3,ot,0,0,"ng-template",18),N()),n&2){let s=A(2),e=c();u(3),d("ngTemplateOutlet",e.loadingSpinnerTemplate||s)}}function ut(n,t){if(n&1&&(g(0,"span",20,21)(2,"span",22),L(3,"\xD7"),E()()),n&2){let s=c();Se("title",s.clearAllText)}}function ct(n,t){if(n&1&&j(0,"span",28),n&2){let s=c().$implicit,e=c(2);d("ngItemLabel",s.label)("escape",e.escapeHTML)}}function dt(n,t){}var ht=(n,t,s,e)=>({item:n,item$:t,index:s,searchTerm:e});function pt(n,t){if(n&1){let s=U();g(0,"div",26),B("click",function(){let l=I(s).$implicit,r=c(2);return F(r.toggleItem(l))})("mouseover",function(){let l=I(s).$implicit,r=c(2);return F(r.onItemHover(l))}),v(1,ct,1,2,"ng-template",null,27,V)(3,dt,0,0,"ng-template",14),E()}if(n&2){let s=t.$implicit,e=A(2),i=c(2);k("ng-option-disabled",s.disabled)("ng-option-selected",s.selected)("ng-optgroup",s.children)("ng-option",!s.children)("ng-option-child",!!s.parent)("ng-option-marked",s===i.itemsList.markedItem),ee("role",s.children?"group":"option")("aria-selected",s.selected)("id",s==null?null:s.htmlId),u(3),d("ngTemplateOutlet",s.children?i.optgroupTemplate||e:i.optionTemplate||e)("ngTemplateOutletContext",ke(17,ht,s.value,s,s.index,i.searchTerm))}}function mt(n,t){if(n&1&&(g(0,"span")(1,"span",31),L(2),E(),L(3),E()),n&2){let s=c(3);u(2),Q(s.addTagText),u(1),Ae('"',s.searchTerm,'"')}}function gt(n,t){}function _t(n,t){if(n&1){let s=U();g(0,"div",29),B("mouseover",function(){I(s);let i=c(2);return F(i.itemsList.unmarkItem())})("click",function(){I(s);let i=c(2);return F(i.selectTag())}),v(1,mt,4,2,"ng-template",null,30,V)(3,gt,0,0,"ng-template",14),E()}if(n&2){let s=A(2),e=c(2);k("ng-option-marked",!e.itemsList.markedItem),u(3),d("ngTemplateOutlet",e.tagTemplate||s)("ngTemplateOutletContext",z(4,Y,e.searchTerm))}}function ft(n,t){if(n&1&&(g(0,"div",33),L(1),E()),n&2){let s=c(3);u(1),Q(s.notFoundText)}}function Et(n,t){}function Ct(n,t){if(n&1&&(M(0),v(1,ft,2,1,"ng-template",null,32,V)(3,Et,0,0,"ng-template",14),N()),n&2){let s=A(2),e=c(2);u(3),d("ngTemplateOutlet",e.notFoundTemplate||s)("ngTemplateOutletContext",z(2,Y,e.searchTerm))}}function vt(n,t){if(n&1&&(g(0,"div",33),L(1),E()),n&2){let s=c(3);u(1),Q(s.typeToSearchText)}}function Tt(n,t){}function bt(n,t){if(n&1&&(M(0),v(1,vt,2,1,"ng-template",null,34,V)(3,Tt,0,0,"ng-template",18),N()),n&2){let s=A(2),e=c(2);u(3),d("ngTemplateOutlet",e.typeToSearchTemplate||s)}}function wt(n,t){if(n&1&&(g(0,"div",33),L(1),E()),n&2){let s=c(3);u(1),Q(s.loadingText)}}function yt(n,t){}function It(n,t){if(n&1&&(M(0),v(1,wt,2,1,"ng-template",null,35,V)(3,yt,0,0,"ng-template",14),N()),n&2){let s=A(2),e=c(2);u(3),d("ngTemplateOutlet",e.loadingTextTemplate||s)("ngTemplateOutletContext",z(2,Y,e.searchTerm))}}function Ft(n,t){if(n&1){let s=U();g(0,"ng-dropdown-panel",23),B("update",function(i){I(s);let l=c();return F(l.viewPortItems=i)})("scroll",function(i){I(s);let l=c();return F(l.scroll.emit(i))})("scrollToEnd",function(i){I(s);let l=c();return F(l.scrollToEnd.emit(i))})("outsideClick",function(){I(s);let i=c();return F(i.close())}),M(1),v(2,pt,4,22,"div",24)(3,_t,4,6,"div",25),N(),v(4,Ct,4,4,"ng-container",3)(5,bt,4,1,"ng-container",3)(6,It,4,4,"ng-container",3),E()}if(n&2){let s=c();k("ng-select-multiple",s.multiple),d("virtualScroll",s.virtualScroll)("bufferAmount",s.bufferAmount)("appendTo",s.appendTo)("position",s.dropdownPosition)("headerTemplate",s.headerTemplate)("footerTemplate",s.footerTemplate)("filterValue",s.searchTerm)("items",s.itemsList.filteredItems)("markedItem",s.itemsList.markedItem)("ngClass",s.appendTo?s.classes:null)("id",s.dropdownId),u(2),d("ngForOf",s.viewPortItems)("ngForTrackBy",s.trackByOption),u(1),d("ngIf",s.showAddTag),u(1),d("ngIf",s.showNoItemsFound()),u(1),d("ngIf",s.showTypeToSearch()),u(1),d("ngIf",s.loading&&s.itemsList.filteredItems.length===0)}}var je=/[&<>"']/g,St=RegExp(je.source),At={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function xt(n){return n&&St.test(n)?n.replace(je,t=>At[t]):n}function m(n){return n!=null}function $(n){return typeof n=="object"&&m(n)}function Dt(n){return n instanceof Promise}function ie(n){return n instanceof Function}var Ot=(()=>{let t=class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?xt(this.ngItemLabel):this.ngItemLabel}};t.\u0275fac=function(i){return new(i||t)(h(O))},t.\u0275dir=w({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[G]});let n=t;return n})(),kt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-option-tmp",""]]});let n=t;return n})(),Lt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-optgroup-tmp",""]]});let n=t;return n})(),Bt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-label-tmp",""]]});let n=t;return n})(),Vt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-multi-label-tmp",""]]});let n=t;return n})(),Pt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-header-tmp",""]]});let n=t;return n})(),Mt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-footer-tmp",""]]});let n=t;return n})(),Nt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-notfound-tmp",""]]});let n=t;return n})(),Rt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-typetosearch-tmp",""]]});let n=t;return n})(),Ht=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-loadingtext-tmp",""]]});let n=t;return n})(),jt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-tag-tmp",""]]});let n=t;return n})(),Ut=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-loadingspinner-tmp",""]]});let n=t;return n})();function Ue(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var Qt={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function te(n){let t=s=>Qt[s]||s;return n.replace(/[^\u0000-\u007E]/g,t)}var ue=class{constructor(t,s){this._ngSelect=t,this._selectionModel=s,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let t=this.selectedItems.length-1;for(;t>=0;t--){let s=this.selectedItems[t];if(!s.disabled)return s}return null}setItems(t){this._items=t.map((s,e)=>this.mapItem(s,e)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(t){if(t.selected||this.maxItemsSelected)return;let s=this._ngSelect.multiple;s||this.clearSelected(),this._selectionModel.select(t,s,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(t)}unselect(t){t.selected&&(this._selectionModel.unselect(t,this._ngSelect.multiple),this._ngSelect.hideSelected&&m(t.index)&&this._ngSelect.multiple&&this._showSelected(t))}findItem(t){let s;return this._ngSelect.compareWith?s=e=>this._ngSelect.compareWith(e.value,t):this._ngSelect.bindValue?s=e=>!e.children&&this.resolveNested(e.value,this._ngSelect.bindValue)===t:s=e=>e.value===t||!e.children&&e.label&&e.label===this.resolveNested(t,this._ngSelect.bindLabel),this._items.find(e=>s(e))}addItem(t){let s=this.mapItem(t,this._items.length);return this._items.push(s),this._filteredItems.push(s),s}clearSelected(t=!1){this._selectionModel.clear(t),this._items.forEach(s=>{s.selected=t&&s.selected&&s.disabled,s.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(t){return t=te(t).toLocaleLowerCase(),this.filteredItems.find(s=>te(s.label).toLocaleLowerCase().substr(0,t.length)===t)}filter(t){if(!t){this.resetFilteredItems();return}this._filteredItems=[],t=this._ngSelect.searchFn?t:te(t).toLocaleLowerCase();let s=this._ngSelect.searchFn||this._defaultSearchFn,e=this._ngSelect.hideSelected;for(let i of Array.from(this._groups.keys())){let l=[];for(let r of this._groups.get(i)){if(e&&(r.parent&&r.parent.selected||r.selected))continue;let o=this._ngSelect.searchFn?r.value:r;s(t,o)&&l.push(r)}if(l.length>0){let[r]=l.slice(-1);if(r.parent){let o=this._items.find(a=>a===r.parent);this._filteredItems.push(o)}this._filteredItems.push(...l)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(t=>!t.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(t){this._markedIndex=this._filteredItems.indexOf(t)}markSelectedOrDefault(t){if(this._filteredItems.length===0)return;let s=this._getLastMarkedIndex();s>-1?this._markedIndex=s:this._markedIndex=t?this.filteredItems.findIndex(e=>!e.disabled):-1}resolveNested(t,s){if(!$(t))return t;if(s.indexOf(".")===-1)return t[s];{let e=s.split("."),i=t;for(let l=0,r=e.length;l<r;++l){if(i==null)return null;i=i[e[l]]}return i}}mapItem(t,s){let e=m(t.$ngOptionLabel)?t.$ngOptionLabel:this.resolveNested(t,this._ngSelect.bindLabel),i=m(t.$ngOptionValue)?t.$ngOptionValue:t;return{index:s,label:m(e)?e.toString():"",value:i,disabled:t.disabled,htmlId:`${this._ngSelect.dropdownId}-${s}`}}mapSelectedItems(){let t=this._ngSelect.multiple;for(let s of this.selectedItems){let e=this._ngSelect.bindValue?this.resolveNested(s.value,this._ngSelect.bindValue):s.value,i=m(e)?this.findItem(e):null;this._selectionModel.unselect(s,t),this._selectionModel.select(i||s,t,this._ngSelect.selectableGroupAsModel)}this._ngSelect.hideSelected&&(this._filteredItems=this.filteredItems.filter(s=>this.selectedItems.indexOf(s)===-1))}_showSelected(t){if(this._filteredItems.push(t),t.parent){let s=t.parent;this._filteredItems.find(i=>i===s)||this._filteredItems.push(s)}else if(t.children)for(let s of t.children)s.selected=!1,this._filteredItems.push(s);this._filteredItems=[...this._filteredItems.sort((s,e)=>s.index-e.index)]}_hideSelected(t){this._filteredItems=this._filteredItems.filter(s=>s!==t),t.parent?t.parent.children.every(e=>e.selected)&&(this._filteredItems=this._filteredItems.filter(e=>e!==t.parent)):t.children&&(this._filteredItems=this.filteredItems.filter(s=>s.parent!==t))}_defaultSearchFn(t,s){return te(s.label).toLocaleLowerCase().indexOf(t)>-1}_getNextItemIndex(t){return t>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(t){this._filteredItems.length===0||this._filteredItems.every(s=>s.disabled)||(this._markedIndex=this._getNextItemIndex(t),this.markedItem.disabled&&this._stepToItem(t))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let t=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&t<0?-1:Math.max(this.markedIndex,t)}_groupBy(t,s){let e=new Map;if(t.length===0)return e;if(Array.isArray(t[0].value[s])){for(let r of t){let o=(r.value[s]||[]).map((a,S)=>this.mapItem(a,S));e.set(r,o)}return e}let i=ie(this._ngSelect.groupBy),l=r=>{let o=i?s(r.value):r.value[s];return m(o)?o:void 0};for(let r of t){let o=l(r),a=e.get(o);a?a.push(r):e.set(o,[r])}return e}_flatten(t){let s=ie(this._ngSelect.groupBy),e=[];for(let i of Array.from(t.keys())){let l=e.length;if(i===void 0){let b=t.get(void 0)||[];e.push(...b.map(H=>(H.index=l++,H)));continue}let r=$(i),o={label:r?"":String(i),children:void 0,parent:null,index:l++,disabled:!this._ngSelect.selectableGroup,htmlId:Ue()},a=s?this._ngSelect.bindLabel:this._ngSelect.groupBy,S=this._ngSelect.groupValue||(()=>r?i.value:{[a]:i}),C=t.get(i).map(b=>(b.parent=o,b.children=void 0,b.index=l++,b));o.children=C,o.value=S(i,C.map(b=>b.value)),e.push(o),e.push(...C)}return e}},x=function(n){return n[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Esc=27]="Esc",n[n.Space=32]="Space",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowDown=40]="ArrowDown",n[n.Backspace=8]="Backspace",n}(x||{}),Qe=(()=>{let t=class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,i,l){let r=this._dimensions,o=r.itemHeight*i,S=Math.max(0,e)/o*i,C=Math.min(i,Math.ceil(S)+(r.itemsPerViewport+1)),H=Math.max(0,C-r.itemsPerViewport),D=Math.min(H,Math.floor(S)),K=r.itemHeight*Math.ceil(D)-r.itemHeight*Math.min(D,l);return K=isNaN(K)?0:K,D=isNaN(D)?-1:D,C=isNaN(C)?-1:C,D-=l,D=Math.max(0,D),C+=l,C=Math.min(i,C),{topPadding:K,scrollHeight:o,start:D,end:C}}setDimensions(e,i){let l=Math.max(1,Math.floor(i/e));this._dimensions={itemHeight:e,panelHeight:i,itemsPerViewport:l}}getScrollTo(e,i,l){let{panelHeight:r}=this.dimensions,o=e+i,a=l,S=a+r;return r>=o&&l===e?null:o>S?a+o-S:e<=a?e:null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac});let n=t;return n})(),Ne=["top","right","bottom","left"],zt=typeof requestAnimationFrame<"u"?pe:he,Re=(()=>{let t=class t{constructor(e,i,l,r,o){this._renderer=e,this._zone=i,this._panelService=l,this._document=o,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new T,this.scroll=new T,this.scrollToEnd=new T,this.outsideClick=new T,this._destroy$=new W,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=r.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){let{itemHeight:e,panelHeight:i}=this._panelService.dimensions,l=this.markedItem.index*e;return i>l?0:l}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){let i=e.items;this._onItemsChange(i.currentValue,i.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,i=!1){if(!e)return;let l=this.items.indexOf(e);if(l<0||l>=this.itemsLength)return;let r;if(this.virtualScroll){let o=this._panelService.dimensions.itemHeight;r=this._panelService.getScrollTo(l*o,o,this._lastScrollPosition)}else{let o=this._dropdown.querySelector(`#${e.htmlId}`),a=i?o.offsetTop:this._lastScrollPosition;r=this._panelService.getScrollTo(o.offsetTop,o.clientHeight,a)}m(r)&&(this._scrollablePanel.scrollTop=r)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),Ne.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){Ne.forEach(l=>{let r=`ng-select-${l}`;this._renderer.removeClass(this._dropdown,r),this._renderer.removeClass(this._select,r)});let i=`ng-select-${e}`;this._renderer.addClass(this._dropdown,i),this._renderer.addClass(this._select,i)}_handleScroll(){this._zone.runOutsideAngular(()=>{q(this.scrollElementRef.nativeElement,"scroll").pipe(P(this._destroy$),_e(0,zt)).subscribe(e=>{let i=e.path||e.composedPath&&e.composedPath(),l=!i||i.length===0?e.target.scrollTop:i[0].scrollTop;this._onContentScrolled(l)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Z(q(this._document,"touchstart",{capture:!0}),q(this._document,"mousedown",{capture:!0})).pipe(P(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let i=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&i&&i[0]&&this._select.contains(i[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,i){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let i=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,i),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;let i=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(i.scrollHeight),this._contentPanel.style.transform=`translateY(${i.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(i.start,i.end)),this.scroll.emit({start:i.start,end:i.end})}),m(e)&&this._lastScrollPosition===0&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{let l=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${l*this.itemsLength}px`;let r=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(l,r),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let i=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=i.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let i=this._select.getBoundingClientRect(),l=document.documentElement.scrollTop||document.body.scrollTop,r=i.top+window.pageYOffset,o=i.height,a=e.getBoundingClientRect().height;return r+o+a>l+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),l=e.left-i.left;this._dropdown.style.left=l+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),l=e.height;if(this._currentPosition==="top"){let r=i.bottom-e.bottom;this._dropdown.style.bottom=r+l+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let r=e.top-i.top;this._dropdown.style.top=r+l+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{q(this._dropdown,"mousedown").pipe(P(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}};t.\u0275fac=function(i){return new(i||t)(h(ye),h(Fe),h(Qe),h(O),h(Le,8))},t.\u0275cmp=X({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,l){if(i&1&&(R(We,7,O),R(qe,7,O),R(Ge,7,O)),i&2){let r;_(r=f())&&(l.contentElementRef=r.first),_(r=f())&&(l.scrollElementRef=r.first),_(r=f())&&(l.paddingElementRef=r.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[G],ngContentSelectors:He,decls:9,vars:6,consts:[["class","ng-dropdown-header",4,"ngIf"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],["scroll",""],["padding",""],["content",""],["class","ng-dropdown-footer",4,"ngIf"],[1,"ng-dropdown-header"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-dropdown-footer"]],template:function(i,l){i&1&&(le(),v(0,$e,2,4,"div",0),g(1,"div",1,2),j(3,"div",null,3),g(5,"div",null,4),re(7),E()(),v(8,Ye,2,4,"div",5)),i&2&&(d("ngIf",l.headerTemplate),u(3),k("total-padding",l.virtualScroll),u(2),k("scrollable-content",l.virtualScroll&&l.items.length),u(3),d("ngIf",l.footerTemplate))},dependencies:[oe,ae],encapsulation:2,changeDetection:0});let n=t;return n})(),Wt=(()=>{let t=class t{get disabled(){return this._disabled}set disabled(e){this._disabled=this._isDisabled(e)}constructor(e){this.elementRef=e,this.stateChange$=new W,this._disabled=!1}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this._disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this._disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}_isDisabled(e){return e!=null&&`${e}`!="false"}};t.\u0275fac=function(i){return new(i||t)(h(O))},t.\u0275cmp=X({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:"disabled"},features:[G],ngContentSelectors:He,decls:1,vars:0,template:function(i,l){i&1&&(le(),re(0))},encapsulation:2,changeDetection:0});let n=t;return n})(),qt=(()=>{let t=class t{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Gt=(()=>{let t=class t{warn(e){console.warn(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),ze=new be("ng-select-selection-model"),Ei=(()=>{let t=class t{get items(){return this._items}set items(e){e===null&&(e=[]),this._itemsAreUsed=!0,this._items=e}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!ie(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return m(this._clearSearchOnAdd)?this._clearSearchOnAdd:m(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return m(this._deselectOnClick)?this._deselectOnClick:m(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}constructor(e,i,l,r,o,a,S){this.classes=e,this.autoFocus=i,this.config=l,this._cd=a,this._console=S,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=C=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new T,this.focusEvent=new T,this.changeEvent=new T,this.openEvent=new T,this.closeEvent=new T,this.searchEvent=new T,this.clearEvent=new T,this.addEvent=new T,this.removeEvent=new T,this.scroll=new T,this.scrollToEnd=new T,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Ue(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new W,this._keyPress$=new W,this._onChange=C=>{},this._onTouched=()=>{},this.clearItem=C=>{let b=this.selectedItems.find(H=>H.value===C);this.unselect(b)},this.trackByOption=(C,b)=>this.trackByFn?this.trackByFn(b.value):b,this._mergeGlobalConfig(l),this.itemsList=new ue(this,r()),this.element=o.nativeElement}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=m(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),m(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(x[e.which]){if(this.keyDownFn(e)===!1)return;this.handleKeyCode(e)}else e.key&&e.key.length===1&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){let i=e.target;this.clearButton&&this.clearButton.nativeElement===i?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case x.ArrowDown:this._handleArrowDown(e);break;case x.ArrowUp:this._handleArrowUp(e);break;case x.Space:this._handleSpace(e);break;case x.Enter:this._handleEnter(e);break;case x.Tab:this._handleTab(e);break;case x.Esc:this.close(),e.preventDefault();break;case x.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case x.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){let i=e.target;if(i.tagName!=="INPUT"&&e.preventDefault(),i.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(i.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}i.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value))}selectTag(){let e;ie(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let i=l=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(l,null):this.itemsList.addItem(l);Dt(e)?e.then(l=>this.select(i(l))).catch(()=>{}):e&&this.select(i(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(i=>i.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(i=>i.label.toLowerCase()===e))&&!this.loading}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||this.minTermLength===0)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(i=>i.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){let i=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=m(i)?!$(i):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&m(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=l=>{this.items=l.map(r=>({$ngOptionValue:r.value,$ngOptionLabel:r.elementRef.nativeElement.innerHTML,disabled:r.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},i=()=>{let l=Z(this.ngOptions.changes,this._destroy$);Z(...this.ngOptions.map(r=>r.stateChange$)).pipe(P(l)).subscribe(r=>{let o=this.itemsList.findItem(r.value);o.disabled=r.disabled,o.label=r.label||o.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(Ee(this.ngOptions),P(this._destroy$)).subscribe(l=>{this.bindLabel=this._defaultLabel,e(l),i()})}_isValidWriteValue(e){if(!m(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let i=l=>!m(this.compareWith)&&$(l)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(l)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(l=>i(l)):(this._console.warn("Multiple select ngModel should be array."),!1):i(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let i=l=>{let r=this.itemsList.findItem(l);if(r)this.itemsList.select(r);else{let o=$(l),a=!o&&!this.bindValue;o||a?this.itemsList.select(this.itemsList.mapItem(l,null)):this.bindValue&&(r={[this.bindLabel]:null,[this.bindValue]:l},this.itemsList.select(this.itemsList.mapItem(r,null)))}};this.multiple?e.forEach(l=>i(l)):i(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(P(this._destroy$),Ce(e=>this._pressedKeys.push(e)),fe(200),ge(()=>this._pressedKeys.length>0),me(()=>this._pressedKeys.join(""))).subscribe(e=>{let i=this.itemsList.findByLabel(e);i&&(this.isOpen?(this.itemsList.markItem(i),this._scrollToMarked(),this._cd.markForCheck()):this.select(i)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,i=de({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let l of Object.keys(i))e.setAttribute(l,i[l])}_updateNgModel(){let e=[];for(let l of this.selectedItems)if(this.bindValue){let r=null;if(l.children){let o=this.groupValue?this.bindValue:this.groupBy;r=l.value[o||this.groupBy]}else r=this.itemsList.resolveNested(l.value,this.bindValue);e.push(r)}else e.push(l.value);let i=this.selectedItems.map(l=>l.value);this.multiple?(this._onChange(e),this.changeEvent.emit(i)):(this._onChange(m(e[0])?e[0]:null),this.changeEvent.emit(i[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(this.isOpen===!1){if(this.showClear())this.focusOnClear(),e.preventDefault();else if(!this.addTag)return}this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(this.openOnEnter)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let i=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(i<0||i===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){let e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=m(this.virtualScroll)?this.virtualScroll:m(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=m(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}};t.\u0275fac=function(i){return new(i||t)(ne("class"),ne("autofocus"),h(qt),h(ze),h(O),h(Ie),h(Gt))},t.\u0275cmp=X({type:t,selectors:[["ng-select"]],contentQueries:function(i,l,r){if(i&1&&(y(r,kt,5,p),y(r,Lt,5,p),y(r,Bt,5,p),y(r,Vt,5,p),y(r,Pt,5,p),y(r,Mt,5,p),y(r,Nt,5,p),y(r,Rt,5,p),y(r,Ht,5,p),y(r,jt,5,p),y(r,Ut,5,p),y(r,Wt,5)),i&2){let o;_(o=f())&&(l.optionTemplate=o.first),_(o=f())&&(l.optgroupTemplate=o.first),_(o=f())&&(l.labelTemplate=o.first),_(o=f())&&(l.multiLabelTemplate=o.first),_(o=f())&&(l.headerTemplate=o.first),_(o=f())&&(l.footerTemplate=o.first),_(o=f())&&(l.notFoundTemplate=o.first),_(o=f())&&(l.typeToSearchTemplate=o.first),_(o=f())&&(l.loadingTextTemplate=o.first),_(o=f())&&(l.tagTemplate=o.first),_(o=f())&&(l.loadingSpinnerTemplate=o.first),_(o=f())&&(l.ngOptions=o)}},viewQuery:function(i,l){if(i&1&&(R(Re,5),R(Ke,7),R(Ze,5)),i&2){let r;_(r=f())&&(l.dropdownPanel=r.first),_(r=f())&&(l.searchInput=r.first),_(r=f())&&(l.clearButton=r.first)}},hostVars:20,hostBindings:function(i,l){i&1&&B("keydown",function(o){return l.handleKeyDown(o)}),i&2&&k("ng-select-typeahead",l.typeahead)("ng-select-multiple",l.multiple)("ng-select-taggable",l.addTag)("ng-select-searchable",l.searchable)("ng-select-clearable",l.clearable)("ng-select-opened",l.isOpen)("ng-select",l.useDefaultClass)("ng-select-disabled",l.disabled)("ng-select-filtered",l.filtered)("ng-select-single",l.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:"markFirst",placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:"loading",closeOnSelect:"closeOnSelect",hideSelected:"hideSelected",selectOnTab:"selectOnTab",openOnEnter:"openOnEnter",maxSelectedItems:"maxSelectedItems",groupBy:"groupBy",groupValue:"groupValue",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",selectableGroup:"selectableGroup",selectableGroupAsModel:"selectableGroupAsModel",searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:"clearOnBackspace",labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:"tabIndex",readonly:"readonly",searchWhileComposing:"searchWhileComposing",minTermLength:"minTermLength",editableSearchTerm:"editableSearchTerm",keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:"multiple",addTag:"addTag",searchable:"searchable",clearable:"clearable",isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[xe([{provide:Me,useExisting:ve(()=>t),multi:!0},Qe]),G],decls:14,vars:19,consts:[[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[4,"ngIf"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"readOnly","disabled","value","input","compositionstart","compositionend","focus","blur","change"],["searchInput",""],["class","ng-clear-wrapper","tabindex","0",3,"title",4,"ngIf"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["class","ng-dropdown-panel","role","listbox","aria-label","Options list",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id","update","scroll","scrollToEnd","outsideClick",4,"ngIf"],["class","ng-value",3,"ng-value-disabled",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ng-value"],["defaultLabelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],["defaultLoadingSpinnerTemplate",""],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],["tabindex","0",1,"ng-clear-wrapper",3,"title"],["clearButton",""],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id","update","scroll","scrollToEnd","outsideClick"],["class","ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked","click","mouseover",4,"ngFor","ngForOf","ngForTrackBy"],["class","ng-option","role","option",3,"ng-option-marked","mouseover","click",4,"ngIf"],[1,"ng-option",3,"click","mouseover"],["defaultOptionTemplate",""],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],["defaultTagTemplate",""],[1,"ng-tag-label"],["defaultNotFoundTemplate",""],[1,"ng-option","ng-option-disabled"],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""]],template:function(i,l){if(i&1){let r=U();g(0,"div",0),B("mousedown",function(a){return l.handleMousedown(a)}),g(1,"div",1)(2,"div",2),L(3),E(),v(4,it,2,2,"ng-container",3)(5,lt,1,5,null,3),g(6,"div",4)(7,"input",5,6),B("input",function(){I(r);let a=A(8);return F(l.filter(a.value))})("compositionstart",function(){return l.onCompositionStart()})("compositionend",function(){I(r);let a=A(8);return F(l.onCompositionEnd(a.value))})("focus",function(a){return l.onInputFocus(a)})("blur",function(a){return l.onInputBlur(a)})("change",function(a){return a.stopPropagation()}),E()()(),v(9,at,4,1,"ng-container",3)(10,ut,4,1,"span",7),g(11,"span",8),j(12,"span",9),E()(),v(13,Ft,7,19,"ng-dropdown-panel",10)}i&2&&(k("ng-appearance-outline",l.appearance==="outline")("ng-has-value",l.hasValue),u(3),Q(l.placeholder),u(1),d("ngIf",(!l.multiLabelTemplate||!l.multiple)&&l.selectedItems.length>0),u(1),d("ngIf",l.multiple&&l.multiLabelTemplate&&l.selectedValues.length>0),u(1),ee("aria-expanded",l.isOpen)("aria-owns",l.isOpen?l.dropdownId:null),u(1),d("readOnly",!l.searchable||l.itemsList.maxItemsSelected)("disabled",l.disabled)("value",l.searchTerm?l.searchTerm:""),ee("id",l.labelForId)("tabindex",l.tabIndex)("aria-activedescendant",l.isOpen?l.itemsList==null||l.itemsList.markedItem==null?null:l.itemsList.markedItem.htmlId:null)("aria-controls",l.isOpen?l.dropdownId:null),u(2),d("ngIf",l.loading),u(1),d("ngIf",l.showClear()),u(3),d("ngIf",l.isOpen))},dependencies:[Be,Ve,oe,ae,Re,Ot],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}
1
+ import{a as Me}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-M7SI7KCP.js";import{$ as J,$a as j,A as Z,B as ge,Ba as O,D as _e,Da as ye,Fa as u,Ga as h,Gb as p,H as fe,Hb as _,Ia as Ie,Ib as R,Ja as T,Jb as y,Ka as Fe,Kb as f,Lb as V,Na as ee,Oa as d,Qa as k,S as Ee,Ua as v,V as P,Vb as Le,X as Ce,Xb as Be,Z as ve,Za as g,Zb as Ve,_a as E,_b as oe,aa as Te,ab as M,ac as ae,ba as be,bb as N,c as W,cb as se,db as U,ea as X,f as he,fa as we,fc as Pe,ga as w,hb as B,i as pe,ia as G,ja as I,jb as c,ka as F,kb as le,lb as re,mb as Se,oa as ne,ob as A,pb as L,q as me,qb as Q,rb as Ae,tb as xe,wb as z,x as q,xb as De,yb as Oe,zb as ke}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";import{a as de}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-72YRW3ZC.js";var We=["content"],qe=["scroll"],Ge=["padding"],Y=n=>({searchTerm:n});function $e(n,t){if(n&1&&(g(0,"div",6),se(1,7),E()),n&2){let s=c();u(1),d("ngTemplateOutlet",s.headerTemplate)("ngTemplateOutletContext",z(2,Y,s.filterValue))}}function Ye(n,t){if(n&1&&(g(0,"div",8),se(1,7),E()),n&2){let s=c();u(1),d("ngTemplateOutlet",s.footerTemplate)("ngTemplateOutletContext",z(2,Y,s.filterValue))}}var He=["*"],Ke=["searchInput"],Ze=["clearButton"];function Je(n,t){if(n&1){let s=U();g(0,"span",15),B("click",function(){I(s);let i=c().$implicit,l=c(2);return F(l.unselect(i))}),L(1,"\xD7"),E(),j(2,"span",16)}if(n&2){let s=c().$implicit,e=c(2);u(2),d("ngItemLabel",s.label)("escape",e.escapeHTML)}}function Xe(n,t){}var et=(n,t,s)=>({item:n,clear:t,label:s});function tt(n,t){if(n&1&&(g(0,"div",12),v(1,Je,3,2,"ng-template",null,13,V)(3,Xe,0,0,"ng-template",14),E()),n&2){let s=t.$implicit,e=A(2),i=c(2);k("ng-value-disabled",s.disabled),u(3),d("ngTemplateOutlet",i.labelTemplate||e)("ngTemplateOutletContext",Oe(4,et,s.value,i.clearItem,s.label))}}function it(n,t){if(n&1&&(M(0),v(1,tt,4,8,"div",11),N()),n&2){let s=c();u(1),d("ngForOf",s.selectedItems)("ngForTrackBy",s.trackByOption)}}function nt(n,t){}var st=(n,t)=>({items:n,clear:t});function lt(n,t){if(n&1&&v(0,nt,0,0,"ng-template",14),n&2){let s=c();d("ngTemplateOutlet",s.multiLabelTemplate)("ngTemplateOutletContext",De(2,st,s.selectedValues,s.clearItem))}}function rt(n,t){n&1&&j(0,"div",19)}function ot(n,t){}function at(n,t){if(n&1&&(M(0),v(1,rt,1,0,"ng-template",null,17,V)(3,ot,0,0,"ng-template",18),N()),n&2){let s=A(2),e=c();u(3),d("ngTemplateOutlet",e.loadingSpinnerTemplate||s)}}function ut(n,t){if(n&1&&(g(0,"span",20,21)(2,"span",22),L(3,"\xD7"),E()()),n&2){let s=c();Se("title",s.clearAllText)}}function ct(n,t){if(n&1&&j(0,"span",28),n&2){let s=c().$implicit,e=c(2);d("ngItemLabel",s.label)("escape",e.escapeHTML)}}function dt(n,t){}var ht=(n,t,s,e)=>({item:n,item$:t,index:s,searchTerm:e});function pt(n,t){if(n&1){let s=U();g(0,"div",26),B("click",function(){let l=I(s).$implicit,r=c(2);return F(r.toggleItem(l))})("mouseover",function(){let l=I(s).$implicit,r=c(2);return F(r.onItemHover(l))}),v(1,ct,1,2,"ng-template",null,27,V)(3,dt,0,0,"ng-template",14),E()}if(n&2){let s=t.$implicit,e=A(2),i=c(2);k("ng-option-disabled",s.disabled)("ng-option-selected",s.selected)("ng-optgroup",s.children)("ng-option",!s.children)("ng-option-child",!!s.parent)("ng-option-marked",s===i.itemsList.markedItem),ee("role",s.children?"group":"option")("aria-selected",s.selected)("id",s==null?null:s.htmlId),u(3),d("ngTemplateOutlet",s.children?i.optgroupTemplate||e:i.optionTemplate||e)("ngTemplateOutletContext",ke(17,ht,s.value,s,s.index,i.searchTerm))}}function mt(n,t){if(n&1&&(g(0,"span")(1,"span",31),L(2),E(),L(3),E()),n&2){let s=c(3);u(2),Q(s.addTagText),u(1),Ae('"',s.searchTerm,'"')}}function gt(n,t){}function _t(n,t){if(n&1){let s=U();g(0,"div",29),B("mouseover",function(){I(s);let i=c(2);return F(i.itemsList.unmarkItem())})("click",function(){I(s);let i=c(2);return F(i.selectTag())}),v(1,mt,4,2,"ng-template",null,30,V)(3,gt,0,0,"ng-template",14),E()}if(n&2){let s=A(2),e=c(2);k("ng-option-marked",!e.itemsList.markedItem),u(3),d("ngTemplateOutlet",e.tagTemplate||s)("ngTemplateOutletContext",z(4,Y,e.searchTerm))}}function ft(n,t){if(n&1&&(g(0,"div",33),L(1),E()),n&2){let s=c(3);u(1),Q(s.notFoundText)}}function Et(n,t){}function Ct(n,t){if(n&1&&(M(0),v(1,ft,2,1,"ng-template",null,32,V)(3,Et,0,0,"ng-template",14),N()),n&2){let s=A(2),e=c(2);u(3),d("ngTemplateOutlet",e.notFoundTemplate||s)("ngTemplateOutletContext",z(2,Y,e.searchTerm))}}function vt(n,t){if(n&1&&(g(0,"div",33),L(1),E()),n&2){let s=c(3);u(1),Q(s.typeToSearchText)}}function Tt(n,t){}function bt(n,t){if(n&1&&(M(0),v(1,vt,2,1,"ng-template",null,34,V)(3,Tt,0,0,"ng-template",18),N()),n&2){let s=A(2),e=c(2);u(3),d("ngTemplateOutlet",e.typeToSearchTemplate||s)}}function wt(n,t){if(n&1&&(g(0,"div",33),L(1),E()),n&2){let s=c(3);u(1),Q(s.loadingText)}}function yt(n,t){}function It(n,t){if(n&1&&(M(0),v(1,wt,2,1,"ng-template",null,35,V)(3,yt,0,0,"ng-template",14),N()),n&2){let s=A(2),e=c(2);u(3),d("ngTemplateOutlet",e.loadingTextTemplate||s)("ngTemplateOutletContext",z(2,Y,e.searchTerm))}}function Ft(n,t){if(n&1){let s=U();g(0,"ng-dropdown-panel",23),B("update",function(i){I(s);let l=c();return F(l.viewPortItems=i)})("scroll",function(i){I(s);let l=c();return F(l.scroll.emit(i))})("scrollToEnd",function(i){I(s);let l=c();return F(l.scrollToEnd.emit(i))})("outsideClick",function(){I(s);let i=c();return F(i.close())}),M(1),v(2,pt,4,22,"div",24)(3,_t,4,6,"div",25),N(),v(4,Ct,4,4,"ng-container",3)(5,bt,4,1,"ng-container",3)(6,It,4,4,"ng-container",3),E()}if(n&2){let s=c();k("ng-select-multiple",s.multiple),d("virtualScroll",s.virtualScroll)("bufferAmount",s.bufferAmount)("appendTo",s.appendTo)("position",s.dropdownPosition)("headerTemplate",s.headerTemplate)("footerTemplate",s.footerTemplate)("filterValue",s.searchTerm)("items",s.itemsList.filteredItems)("markedItem",s.itemsList.markedItem)("ngClass",s.appendTo?s.classes:null)("id",s.dropdownId),u(2),d("ngForOf",s.viewPortItems)("ngForTrackBy",s.trackByOption),u(1),d("ngIf",s.showAddTag),u(1),d("ngIf",s.showNoItemsFound()),u(1),d("ngIf",s.showTypeToSearch()),u(1),d("ngIf",s.loading&&s.itemsList.filteredItems.length===0)}}var je=/[&<>"']/g,St=RegExp(je.source),At={"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"};function xt(n){return n&&St.test(n)?n.replace(je,t=>At[t]):n}function m(n){return n!=null}function $(n){return typeof n=="object"&&m(n)}function Dt(n){return n instanceof Promise}function ie(n){return n instanceof Function}var Ot=(()=>{let t=class t{constructor(e){this.element=e,this.escape=!0}ngOnChanges(e){this.element.nativeElement.innerHTML=this.escape?xt(this.ngItemLabel):this.ngItemLabel}};t.\u0275fac=function(i){return new(i||t)(h(O))},t.\u0275dir=w({type:t,selectors:[["","ngItemLabel",""]],inputs:{ngItemLabel:"ngItemLabel",escape:"escape"},features:[G]});let n=t;return n})(),kt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-option-tmp",""]]});let n=t;return n})(),Lt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-optgroup-tmp",""]]});let n=t;return n})(),Bt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-label-tmp",""]]});let n=t;return n})(),Vt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-multi-label-tmp",""]]});let n=t;return n})(),Pt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-header-tmp",""]]});let n=t;return n})(),Mt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-footer-tmp",""]]});let n=t;return n})(),Nt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-notfound-tmp",""]]});let n=t;return n})(),Rt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-typetosearch-tmp",""]]});let n=t;return n})(),Ht=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-loadingtext-tmp",""]]});let n=t;return n})(),jt=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-tag-tmp",""]]});let n=t;return n})(),Ut=(()=>{let t=class t{constructor(e){this.template=e}};t.\u0275fac=function(i){return new(i||t)(h(p))},t.\u0275dir=w({type:t,selectors:[["","ng-loadingspinner-tmp",""]]});let n=t;return n})();function Ue(){return"axxxxxxxxxxx".replace(/[x]/g,()=>(Math.random()*16|0).toString(16))}var Qt={"\u24B6":"A",\uFF21:"A",\u00C0:"A",\u00C1:"A",\u00C2:"A",\u1EA6:"A",\u1EA4:"A",\u1EAA:"A",\u1EA8:"A",\u00C3:"A",\u0100:"A",\u0102:"A",\u1EB0:"A",\u1EAE:"A",\u1EB4:"A",\u1EB2:"A",\u0226:"A",\u01E0:"A",\u00C4:"A",\u01DE:"A",\u1EA2:"A",\u00C5:"A",\u01FA:"A",\u01CD:"A",\u0200:"A",\u0202:"A",\u1EA0:"A",\u1EAC:"A",\u1EB6:"A",\u1E00:"A",\u0104:"A","\u023A":"A","\u2C6F":"A","\uA732":"AA",\u00C6:"AE",\u01FC:"AE",\u01E2:"AE","\uA734":"AO","\uA736":"AU","\uA738":"AV","\uA73A":"AV","\uA73C":"AY","\u24B7":"B",\uFF22:"B",\u1E02:"B",\u1E04:"B",\u1E06:"B","\u0243":"B",\u0182:"B",\u0181:"B","\u24B8":"C",\uFF23:"C",\u0106:"C",\u0108:"C",\u010A:"C",\u010C:"C",\u00C7:"C",\u1E08:"C",\u0187:"C","\u023B":"C","\uA73E":"C","\u24B9":"D",\uFF24:"D",\u1E0A:"D",\u010E:"D",\u1E0C:"D",\u1E10:"D",\u1E12:"D",\u1E0E:"D",\u0110:"D",\u018B:"D",\u018A:"D",\u0189:"D","\uA779":"D",\u01F1:"DZ",\u01C4:"DZ",\u01F2:"Dz",\u01C5:"Dz","\u24BA":"E",\uFF25:"E",\u00C8:"E",\u00C9:"E",\u00CA:"E",\u1EC0:"E",\u1EBE:"E",\u1EC4:"E",\u1EC2:"E",\u1EBC:"E",\u0112:"E",\u1E14:"E",\u1E16:"E",\u0114:"E",\u0116:"E",\u00CB:"E",\u1EBA:"E",\u011A:"E",\u0204:"E",\u0206:"E",\u1EB8:"E",\u1EC6:"E",\u0228:"E",\u1E1C:"E",\u0118:"E",\u1E18:"E",\u1E1A:"E",\u0190:"E",\u018E:"E","\u24BB":"F",\uFF26:"F",\u1E1E:"F",\u0191:"F","\uA77B":"F","\u24BC":"G",\uFF27:"G",\u01F4:"G",\u011C:"G",\u1E20:"G",\u011E:"G",\u0120:"G",\u01E6:"G",\u0122:"G",\u01E4:"G",\u0193:"G","\uA7A0":"G","\uA77D":"G","\uA77E":"G","\u24BD":"H",\uFF28:"H",\u0124:"H",\u1E22:"H",\u1E26:"H",\u021E:"H",\u1E24:"H",\u1E28:"H",\u1E2A:"H",\u0126:"H","\u2C67":"H","\u2C75":"H","\uA78D":"H","\u24BE":"I",\uFF29:"I",\u00CC:"I",\u00CD:"I",\u00CE:"I",\u0128:"I",\u012A:"I",\u012C:"I",\u0130:"I",\u00CF:"I",\u1E2E:"I",\u1EC8:"I",\u01CF:"I",\u0208:"I",\u020A:"I",\u1ECA:"I",\u012E:"I",\u1E2C:"I",\u0197:"I","\u24BF":"J",\uFF2A:"J",\u0134:"J","\u0248":"J","\u24C0":"K",\uFF2B:"K",\u1E30:"K",\u01E8:"K",\u1E32:"K",\u0136:"K",\u1E34:"K",\u0198:"K","\u2C69":"K","\uA740":"K","\uA742":"K","\uA744":"K","\uA7A2":"K","\u24C1":"L",\uFF2C:"L",\u013F:"L",\u0139:"L",\u013D:"L",\u1E36:"L",\u1E38:"L",\u013B:"L",\u1E3C:"L",\u1E3A:"L",\u0141:"L","\u023D":"L","\u2C62":"L","\u2C60":"L","\uA748":"L","\uA746":"L","\uA780":"L",\u01C7:"LJ",\u01C8:"Lj","\u24C2":"M",\uFF2D:"M",\u1E3E:"M",\u1E40:"M",\u1E42:"M","\u2C6E":"M",\u019C:"M","\u24C3":"N",\uFF2E:"N",\u01F8:"N",\u0143:"N",\u00D1:"N",\u1E44:"N",\u0147:"N",\u1E46:"N",\u0145:"N",\u1E4A:"N",\u1E48:"N","\u0220":"N",\u019D:"N","\uA790":"N","\uA7A4":"N",\u01CA:"NJ",\u01CB:"Nj","\u24C4":"O",\uFF2F:"O",\u00D2:"O",\u00D3:"O",\u00D4:"O",\u1ED2:"O",\u1ED0:"O",\u1ED6:"O",\u1ED4:"O",\u00D5:"O",\u1E4C:"O",\u022C:"O",\u1E4E:"O",\u014C:"O",\u1E50:"O",\u1E52:"O",\u014E:"O",\u022E:"O",\u0230:"O",\u00D6:"O",\u022A:"O",\u1ECE:"O",\u0150:"O",\u01D1:"O",\u020C:"O",\u020E:"O",\u01A0:"O",\u1EDC:"O",\u1EDA:"O",\u1EE0:"O",\u1EDE:"O",\u1EE2:"O",\u1ECC:"O",\u1ED8:"O",\u01EA:"O",\u01EC:"O",\u00D8:"O",\u01FE:"O",\u0186:"O",\u019F:"O","\uA74A":"O","\uA74C":"O",\u01A2:"OI","\uA74E":"OO",\u0222:"OU","\u24C5":"P",\uFF30:"P",\u1E54:"P",\u1E56:"P",\u01A4:"P","\u2C63":"P","\uA750":"P","\uA752":"P","\uA754":"P","\u24C6":"Q",\uFF31:"Q","\uA756":"Q","\uA758":"Q","\u024A":"Q","\u24C7":"R",\uFF32:"R",\u0154:"R",\u1E58:"R",\u0158:"R",\u0210:"R",\u0212:"R",\u1E5A:"R",\u1E5C:"R",\u0156:"R",\u1E5E:"R","\u024C":"R","\u2C64":"R","\uA75A":"R","\uA7A6":"R","\uA782":"R","\u24C8":"S",\uFF33:"S","\u1E9E":"S",\u015A:"S",\u1E64:"S",\u015C:"S",\u1E60:"S",\u0160:"S",\u1E66:"S",\u1E62:"S",\u1E68:"S",\u0218:"S",\u015E:"S","\u2C7E":"S","\uA7A8":"S","\uA784":"S","\u24C9":"T",\uFF34:"T",\u1E6A:"T",\u0164:"T",\u1E6C:"T",\u021A:"T",\u0162:"T",\u1E70:"T",\u1E6E:"T",\u0166:"T",\u01AC:"T",\u01AE:"T","\u023E":"T","\uA786":"T","\uA728":"TZ","\u24CA":"U",\uFF35:"U",\u00D9:"U",\u00DA:"U",\u00DB:"U",\u0168:"U",\u1E78:"U",\u016A:"U",\u1E7A:"U",\u016C:"U",\u00DC:"U",\u01DB:"U",\u01D7:"U",\u01D5:"U",\u01D9:"U",\u1EE6:"U",\u016E:"U",\u0170:"U",\u01D3:"U",\u0214:"U",\u0216:"U",\u01AF:"U",\u1EEA:"U",\u1EE8:"U",\u1EEE:"U",\u1EEC:"U",\u1EF0:"U",\u1EE4:"U",\u1E72:"U",\u0172:"U",\u1E76:"U",\u1E74:"U","\u0244":"U","\u24CB":"V",\uFF36:"V",\u1E7C:"V",\u1E7E:"V",\u01B2:"V","\uA75E":"V","\u0245":"V","\uA760":"VY","\u24CC":"W",\uFF37:"W",\u1E80:"W",\u1E82:"W",\u0174:"W",\u1E86:"W",\u1E84:"W",\u1E88:"W","\u2C72":"W","\u24CD":"X",\uFF38:"X",\u1E8A:"X",\u1E8C:"X","\u24CE":"Y",\uFF39:"Y",\u1EF2:"Y",\u00DD:"Y",\u0176:"Y",\u1EF8:"Y",\u0232:"Y",\u1E8E:"Y",\u0178:"Y",\u1EF6:"Y",\u1EF4:"Y",\u01B3:"Y","\u024E":"Y","\u1EFE":"Y","\u24CF":"Z",\uFF3A:"Z",\u0179:"Z",\u1E90:"Z",\u017B:"Z",\u017D:"Z",\u1E92:"Z",\u1E94:"Z",\u01B5:"Z",\u0224:"Z","\u2C7F":"Z","\u2C6B":"Z","\uA762":"Z","\u24D0":"a",\uFF41:"a",\u1E9A:"a",\u00E0:"a",\u00E1:"a",\u00E2:"a",\u1EA7:"a",\u1EA5:"a",\u1EAB:"a",\u1EA9:"a",\u00E3:"a",\u0101:"a",\u0103:"a",\u1EB1:"a",\u1EAF:"a",\u1EB5:"a",\u1EB3:"a",\u0227:"a",\u01E1:"a",\u00E4:"a",\u01DF:"a",\u1EA3:"a",\u00E5:"a",\u01FB:"a",\u01CE:"a",\u0201:"a",\u0203:"a",\u1EA1:"a",\u1EAD:"a",\u1EB7:"a",\u1E01:"a",\u0105:"a","\u2C65":"a",\u0250:"a","\uA733":"aa",\u00E6:"ae",\u01FD:"ae",\u01E3:"ae","\uA735":"ao","\uA737":"au","\uA739":"av","\uA73B":"av","\uA73D":"ay","\u24D1":"b",\uFF42:"b",\u1E03:"b",\u1E05:"b",\u1E07:"b",\u0180:"b",\u0183:"b",\u0253:"b","\u24D2":"c",\uFF43:"c",\u0107:"c",\u0109:"c",\u010B:"c",\u010D:"c",\u00E7:"c",\u1E09:"c",\u0188:"c","\u023C":"c","\uA73F":"c","\u2184":"c","\u24D3":"d",\uFF44:"d",\u1E0B:"d",\u010F:"d",\u1E0D:"d",\u1E11:"d",\u1E13:"d",\u1E0F:"d",\u0111:"d",\u018C:"d",\u0256:"d",\u0257:"d","\uA77A":"d",\u01F3:"dz",\u01C6:"dz","\u24D4":"e",\uFF45:"e",\u00E8:"e",\u00E9:"e",\u00EA:"e",\u1EC1:"e",\u1EBF:"e",\u1EC5:"e",\u1EC3:"e",\u1EBD:"e",\u0113:"e",\u1E15:"e",\u1E17:"e",\u0115:"e",\u0117:"e",\u00EB:"e",\u1EBB:"e",\u011B:"e",\u0205:"e",\u0207:"e",\u1EB9:"e",\u1EC7:"e",\u0229:"e",\u1E1D:"e",\u0119:"e",\u1E19:"e",\u1E1B:"e","\u0247":"e",\u025B:"e",\u01DD:"e","\u24D5":"f",\uFF46:"f",\u1E1F:"f",\u0192:"f","\uA77C":"f","\u24D6":"g",\uFF47:"g",\u01F5:"g",\u011D:"g",\u1E21:"g",\u011F:"g",\u0121:"g",\u01E7:"g",\u0123:"g",\u01E5:"g",\u0260:"g","\uA7A1":"g","\u1D79":"g","\uA77F":"g","\u24D7":"h",\uFF48:"h",\u0125:"h",\u1E23:"h",\u1E27:"h",\u021F:"h",\u1E25:"h",\u1E29:"h",\u1E2B:"h",\u1E96:"h",\u0127:"h","\u2C68":"h","\u2C76":"h",\u0265:"h",\u0195:"hv","\u24D8":"i",\uFF49:"i",\u00EC:"i",\u00ED:"i",\u00EE:"i",\u0129:"i",\u012B:"i",\u012D:"i",\u00EF:"i",\u1E2F:"i",\u1EC9:"i",\u01D0:"i",\u0209:"i",\u020B:"i",\u1ECB:"i",\u012F:"i",\u1E2D:"i",\u0268:"i",\u0131:"i","\u24D9":"j",\uFF4A:"j",\u0135:"j",\u01F0:"j","\u0249":"j","\u24DA":"k",\uFF4B:"k",\u1E31:"k",\u01E9:"k",\u1E33:"k",\u0137:"k",\u1E35:"k",\u0199:"k","\u2C6A":"k","\uA741":"k","\uA743":"k","\uA745":"k","\uA7A3":"k","\u24DB":"l",\uFF4C:"l",\u0140:"l",\u013A:"l",\u013E:"l",\u1E37:"l",\u1E39:"l",\u013C:"l",\u1E3D:"l",\u1E3B:"l",\u017F:"l",\u0142:"l",\u019A:"l",\u026B:"l","\u2C61":"l","\uA749":"l","\uA781":"l","\uA747":"l",\u01C9:"lj","\u24DC":"m",\uFF4D:"m",\u1E3F:"m",\u1E41:"m",\u1E43:"m",\u0271:"m",\u026F:"m","\u24DD":"n",\uFF4E:"n",\u01F9:"n",\u0144:"n",\u00F1:"n",\u1E45:"n",\u0148:"n",\u1E47:"n",\u0146:"n",\u1E4B:"n",\u1E49:"n",\u019E:"n",\u0272:"n",\u0149:"n","\uA791":"n","\uA7A5":"n",\u01CC:"nj","\u24DE":"o",\uFF4F:"o",\u00F2:"o",\u00F3:"o",\u00F4:"o",\u1ED3:"o",\u1ED1:"o",\u1ED7:"o",\u1ED5:"o",\u00F5:"o",\u1E4D:"o",\u022D:"o",\u1E4F:"o",\u014D:"o",\u1E51:"o",\u1E53:"o",\u014F:"o",\u022F:"o",\u0231:"o",\u00F6:"o",\u022B:"o",\u1ECF:"o",\u0151:"o",\u01D2:"o",\u020D:"o",\u020F:"o",\u01A1:"o",\u1EDD:"o",\u1EDB:"o",\u1EE1:"o",\u1EDF:"o",\u1EE3:"o",\u1ECD:"o",\u1ED9:"o",\u01EB:"o",\u01ED:"o",\u00F8:"o",\u01FF:"o",\u0254:"o","\uA74B":"o","\uA74D":"o",\u0275:"o",\u01A3:"oi",\u0223:"ou","\uA74F":"oo","\u24DF":"p",\uFF50:"p",\u1E55:"p",\u1E57:"p",\u01A5:"p","\u1D7D":"p","\uA751":"p","\uA753":"p","\uA755":"p","\u24E0":"q",\uFF51:"q","\u024B":"q","\uA757":"q","\uA759":"q","\u24E1":"r",\uFF52:"r",\u0155:"r",\u1E59:"r",\u0159:"r",\u0211:"r",\u0213:"r",\u1E5B:"r",\u1E5D:"r",\u0157:"r",\u1E5F:"r","\u024D":"r",\u027D:"r","\uA75B":"r","\uA7A7":"r","\uA783":"r","\u24E2":"s",\uFF53:"s",\u00DF:"s",\u015B:"s",\u1E65:"s",\u015D:"s",\u1E61:"s",\u0161:"s",\u1E67:"s",\u1E63:"s",\u1E69:"s",\u0219:"s",\u015F:"s","\u023F":"s","\uA7A9":"s","\uA785":"s",\u1E9B:"s","\u24E3":"t",\uFF54:"t",\u1E6B:"t",\u1E97:"t",\u0165:"t",\u1E6D:"t",\u021B:"t",\u0163:"t",\u1E71:"t",\u1E6F:"t",\u0167:"t",\u01AD:"t",\u0288:"t","\u2C66":"t","\uA787":"t","\uA729":"tz","\u24E4":"u",\uFF55:"u",\u00F9:"u",\u00FA:"u",\u00FB:"u",\u0169:"u",\u1E79:"u",\u016B:"u",\u1E7B:"u",\u016D:"u",\u00FC:"u",\u01DC:"u",\u01D8:"u",\u01D6:"u",\u01DA:"u",\u1EE7:"u",\u016F:"u",\u0171:"u",\u01D4:"u",\u0215:"u",\u0217:"u",\u01B0:"u",\u1EEB:"u",\u1EE9:"u",\u1EEF:"u",\u1EED:"u",\u1EF1:"u",\u1EE5:"u",\u1E73:"u",\u0173:"u",\u1E77:"u",\u1E75:"u",\u0289:"u","\u24E5":"v",\uFF56:"v",\u1E7D:"v",\u1E7F:"v",\u028B:"v","\uA75F":"v",\u028C:"v","\uA761":"vy","\u24E6":"w",\uFF57:"w",\u1E81:"w",\u1E83:"w",\u0175:"w",\u1E87:"w",\u1E85:"w",\u1E98:"w",\u1E89:"w","\u2C73":"w","\u24E7":"x",\uFF58:"x",\u1E8B:"x",\u1E8D:"x","\u24E8":"y",\uFF59:"y",\u1EF3:"y",\u00FD:"y",\u0177:"y",\u1EF9:"y",\u0233:"y",\u1E8F:"y",\u00FF:"y",\u1EF7:"y",\u1E99:"y",\u1EF5:"y",\u01B4:"y","\u024F":"y","\u1EFF":"y","\u24E9":"z",\uFF5A:"z",\u017A:"z",\u1E91:"z",\u017C:"z",\u017E:"z",\u1E93:"z",\u1E95:"z",\u01B6:"z",\u0225:"z","\u0240":"z","\u2C6C":"z","\uA763":"z",\u0386:"\u0391",\u0388:"\u0395",\u0389:"\u0397",\u038A:"\u0399",\u03AA:"\u0399",\u038C:"\u039F",\u038E:"\u03A5",\u03AB:"\u03A5",\u038F:"\u03A9",\u03AC:"\u03B1",\u03AD:"\u03B5",\u03AE:"\u03B7",\u03AF:"\u03B9",\u03CA:"\u03B9",\u0390:"\u03B9",\u03CC:"\u03BF",\u03CD:"\u03C5",\u03CB:"\u03C5",\u03B0:"\u03C5",\u03C9:"\u03C9",\u03C2:"\u03C3"};function te(n){let t=s=>Qt[s]||s;return n.replace(/[^\u0000-\u007E]/g,t)}var ue=class{constructor(t,s){this._ngSelect=t,this._selectionModel=s,this._items=[],this._filteredItems=[],this._markedIndex=-1}get items(){return this._items}get filteredItems(){return this._filteredItems}get markedIndex(){return this._markedIndex}get selectedItems(){return this._selectionModel.value}get markedItem(){return this._filteredItems[this._markedIndex]}get noItemsToSelect(){return this._ngSelect.hideSelected&&this._items.length===this.selectedItems.length}get maxItemsSelected(){return this._ngSelect.multiple&&this._ngSelect.maxSelectedItems<=this.selectedItems.length}get lastSelectedItem(){let t=this.selectedItems.length-1;for(;t>=0;t--){let s=this.selectedItems[t];if(!s.disabled)return s}return null}setItems(t){this._items=t.map((s,e)=>this.mapItem(s,e)),this._ngSelect.groupBy?(this._groups=this._groupBy(this._items,this._ngSelect.groupBy),this._items=this._flatten(this._groups)):(this._groups=new Map,this._groups.set(void 0,this._items)),this._filteredItems=[...this._items]}select(t){if(t.selected||this.maxItemsSelected)return;let s=this._ngSelect.multiple;s||this.clearSelected(),this._selectionModel.select(t,s,this._ngSelect.selectableGroupAsModel),this._ngSelect.hideSelected&&this._hideSelected(t)}unselect(t){t.selected&&(this._selectionModel.unselect(t,this._ngSelect.multiple),this._ngSelect.hideSelected&&m(t.index)&&this._ngSelect.multiple&&this._showSelected(t))}findItem(t){let s;return this._ngSelect.compareWith?s=e=>this._ngSelect.compareWith(e.value,t):this._ngSelect.bindValue?s=e=>!e.children&&this.resolveNested(e.value,this._ngSelect.bindValue)===t:s=e=>e.value===t||!e.children&&e.label&&e.label===this.resolveNested(t,this._ngSelect.bindLabel),this._items.find(e=>s(e))}addItem(t){let s=this.mapItem(t,this._items.length);return this._items.push(s),this._filteredItems.push(s),s}clearSelected(t=!1){this._selectionModel.clear(t),this._items.forEach(s=>{s.selected=t&&s.selected&&s.disabled,s.marked=!1}),this._ngSelect.hideSelected&&this.resetFilteredItems()}findByLabel(t){return t=te(t).toLocaleLowerCase(),this.filteredItems.find(s=>te(s.label).toLocaleLowerCase().substr(0,t.length)===t)}filter(t){if(!t){this.resetFilteredItems();return}this._filteredItems=[],t=this._ngSelect.searchFn?t:te(t).toLocaleLowerCase();let s=this._ngSelect.searchFn||this._defaultSearchFn,e=this._ngSelect.hideSelected;for(let i of Array.from(this._groups.keys())){let l=[];for(let r of this._groups.get(i)){if(e&&(r.parent&&r.parent.selected||r.selected))continue;let o=this._ngSelect.searchFn?r.value:r;s(t,o)&&l.push(r)}if(l.length>0){let[r]=l.slice(-1);if(r.parent){let o=this._items.find(a=>a===r.parent);this._filteredItems.push(o)}this._filteredItems.push(...l)}}}resetFilteredItems(){this._filteredItems.length!==this._items.length&&(this._ngSelect.hideSelected&&this.selectedItems.length>0?this._filteredItems=this._items.filter(t=>!t.selected):this._filteredItems=this._items)}unmarkItem(){this._markedIndex=-1}markNextItem(){this._stepToItem(1)}markPreviousItem(){this._stepToItem(-1)}markItem(t){this._markedIndex=this._filteredItems.indexOf(t)}markSelectedOrDefault(t){if(this._filteredItems.length===0)return;let s=this._getLastMarkedIndex();s>-1?this._markedIndex=s:this._markedIndex=t?this.filteredItems.findIndex(e=>!e.disabled):-1}resolveNested(t,s){if(!$(t))return t;if(s.indexOf(".")===-1)return t[s];{let e=s.split("."),i=t;for(let l=0,r=e.length;l<r;++l){if(i==null)return null;i=i[e[l]]}return i}}mapItem(t,s){let e=m(t.$ngOptionLabel)?t.$ngOptionLabel:this.resolveNested(t,this._ngSelect.bindLabel),i=m(t.$ngOptionValue)?t.$ngOptionValue:t;return{index:s,label:m(e)?e.toString():"",value:i,disabled:t.disabled,htmlId:`${this._ngSelect.dropdownId}-${s}`}}mapSelectedItems(){let t=this._ngSelect.multiple;for(let s of this.selectedItems){let e=this._ngSelect.bindValue?this.resolveNested(s.value,this._ngSelect.bindValue):s.value,i=m(e)?this.findItem(e):null;this._selectionModel.unselect(s,t),this._selectionModel.select(i||s,t,this._ngSelect.selectableGroupAsModel)}this._ngSelect.hideSelected&&(this._filteredItems=this.filteredItems.filter(s=>this.selectedItems.indexOf(s)===-1))}_showSelected(t){if(this._filteredItems.push(t),t.parent){let s=t.parent;this._filteredItems.find(i=>i===s)||this._filteredItems.push(s)}else if(t.children)for(let s of t.children)s.selected=!1,this._filteredItems.push(s);this._filteredItems=[...this._filteredItems.sort((s,e)=>s.index-e.index)]}_hideSelected(t){this._filteredItems=this._filteredItems.filter(s=>s!==t),t.parent?t.parent.children.every(e=>e.selected)&&(this._filteredItems=this._filteredItems.filter(e=>e!==t.parent)):t.children&&(this._filteredItems=this.filteredItems.filter(s=>s.parent!==t))}_defaultSearchFn(t,s){return te(s.label).toLocaleLowerCase().indexOf(t)>-1}_getNextItemIndex(t){return t>0?this._markedIndex>=this._filteredItems.length-1?0:this._markedIndex+1:this._markedIndex<=0?this._filteredItems.length-1:this._markedIndex-1}_stepToItem(t){this._filteredItems.length===0||this._filteredItems.every(s=>s.disabled)||(this._markedIndex=this._getNextItemIndex(t),this.markedItem.disabled&&this._stepToItem(t))}_getLastMarkedIndex(){if(this._ngSelect.hideSelected||this._markedIndex>-1&&this.markedItem===void 0)return-1;let t=this._filteredItems.indexOf(this.lastSelectedItem);return this.lastSelectedItem&&t<0?-1:Math.max(this.markedIndex,t)}_groupBy(t,s){let e=new Map;if(t.length===0)return e;if(Array.isArray(t[0].value[s])){for(let r of t){let o=(r.value[s]||[]).map((a,S)=>this.mapItem(a,S));e.set(r,o)}return e}let i=ie(this._ngSelect.groupBy),l=r=>{let o=i?s(r.value):r.value[s];return m(o)?o:void 0};for(let r of t){let o=l(r),a=e.get(o);a?a.push(r):e.set(o,[r])}return e}_flatten(t){let s=ie(this._ngSelect.groupBy),e=[];for(let i of Array.from(t.keys())){let l=e.length;if(i===void 0){let b=t.get(void 0)||[];e.push(...b.map(H=>(H.index=l++,H)));continue}let r=$(i),o={label:r?"":String(i),children:void 0,parent:null,index:l++,disabled:!this._ngSelect.selectableGroup,htmlId:Ue()},a=s?this._ngSelect.bindLabel:this._ngSelect.groupBy,S=this._ngSelect.groupValue||(()=>r?i.value:{[a]:i}),C=t.get(i).map(b=>(b.parent=o,b.children=void 0,b.index=l++,b));o.children=C,o.value=S(i,C.map(b=>b.value)),e.push(o),e.push(...C)}return e}},x=function(n){return n[n.Tab=9]="Tab",n[n.Enter=13]="Enter",n[n.Esc=27]="Esc",n[n.Space=32]="Space",n[n.ArrowUp=38]="ArrowUp",n[n.ArrowDown=40]="ArrowDown",n[n.Backspace=8]="Backspace",n}(x||{}),Qe=(()=>{let t=class t{constructor(){this._dimensions={itemHeight:0,panelHeight:0,itemsPerViewport:0}}get dimensions(){return this._dimensions}calculateItems(e,i,l){let r=this._dimensions,o=r.itemHeight*i,S=Math.max(0,e)/o*i,C=Math.min(i,Math.ceil(S)+(r.itemsPerViewport+1)),H=Math.max(0,C-r.itemsPerViewport),D=Math.min(H,Math.floor(S)),K=r.itemHeight*Math.ceil(D)-r.itemHeight*Math.min(D,l);return K=isNaN(K)?0:K,D=isNaN(D)?-1:D,C=isNaN(C)?-1:C,D-=l,D=Math.max(0,D),C+=l,C=Math.min(i,C),{topPadding:K,scrollHeight:o,start:D,end:C}}setDimensions(e,i){let l=Math.max(1,Math.floor(i/e));this._dimensions={itemHeight:e,panelHeight:i,itemsPerViewport:l}}getScrollTo(e,i,l){let{panelHeight:r}=this.dimensions,o=e+i,a=l,S=a+r;return r>=o&&l===e?null:o>S?a+o-S:e<=a?e:null}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac});let n=t;return n})(),Ne=["top","right","bottom","left"],zt=typeof requestAnimationFrame<"u"?pe:he,Re=(()=>{let t=class t{constructor(e,i,l,r,o){this._renderer=e,this._zone=i,this._panelService=l,this._document=o,this.items=[],this.position="auto",this.virtualScroll=!1,this.filterValue=null,this.update=new T,this.scroll=new T,this.scrollToEnd=new T,this.outsideClick=new T,this._destroy$=new W,this._scrollToEndFired=!1,this._updateScrollHeight=!1,this._lastScrollPosition=0,this._dropdown=r.nativeElement}get currentPosition(){return this._currentPosition}get itemsLength(){return this._itemsLength}set itemsLength(e){e!==this._itemsLength&&(this._itemsLength=e,this._onItemsLengthChanged())}get _startOffset(){if(this.markedItem){let{itemHeight:e,panelHeight:i}=this._panelService.dimensions,l=this.markedItem.index*e;return i>l?0:l}return 0}ngOnInit(){this._select=this._dropdown.parentElement,this._virtualPadding=this.paddingElementRef.nativeElement,this._scrollablePanel=this.scrollElementRef.nativeElement,this._contentPanel=this.contentElementRef.nativeElement,this._handleScroll(),this._handleOutsideClick(),this._appendDropdown(),this._setupMousedownListener()}ngOnChanges(e){if(e.items){let i=e.items;this._onItemsChange(i.currentValue,i.firstChange)}}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete(),this._destroy$.unsubscribe(),this.appendTo&&this._renderer.removeChild(this._dropdown.parentNode,this._dropdown)}scrollTo(e,i=!1){if(!e)return;let l=this.items.indexOf(e);if(l<0||l>=this.itemsLength)return;let r;if(this.virtualScroll){let o=this._panelService.dimensions.itemHeight;r=this._panelService.getScrollTo(l*o,o,this._lastScrollPosition)}else{let o=this._dropdown.querySelector(`#${e.htmlId}`),a=i?o.offsetTop:this._lastScrollPosition;r=this._panelService.getScrollTo(o.offsetTop,o.clientHeight,a)}m(r)&&(this._scrollablePanel.scrollTop=r)}scrollToTag(){let e=this._scrollablePanel;e.scrollTop=e.scrollHeight-e.clientHeight}adjustPosition(){this._updateYPosition()}_handleDropdownPosition(){this._currentPosition=this._calculateCurrentPosition(this._dropdown),Ne.includes(this._currentPosition)?this._updateDropdownClass(this._currentPosition):this._updateDropdownClass("bottom"),this.appendTo&&this._updateYPosition(),this._dropdown.style.opacity="1"}_updateDropdownClass(e){Ne.forEach(l=>{let r=`ng-select-${l}`;this._renderer.removeClass(this._dropdown,r),this._renderer.removeClass(this._select,r)});let i=`ng-select-${e}`;this._renderer.addClass(this._dropdown,i),this._renderer.addClass(this._select,i)}_handleScroll(){this._zone.runOutsideAngular(()=>{q(this.scrollElementRef.nativeElement,"scroll").pipe(P(this._destroy$),_e(0,zt)).subscribe(e=>{let i=e.path||e.composedPath&&e.composedPath(),l=!i||i.length===0?e.target.scrollTop:i[0].scrollTop;this._onContentScrolled(l)})})}_handleOutsideClick(){this._document&&this._zone.runOutsideAngular(()=>{Z(q(this._document,"touchstart",{capture:!0}),q(this._document,"mousedown",{capture:!0})).pipe(P(this._destroy$)).subscribe(e=>this._checkToClose(e))})}_checkToClose(e){if(this._select.contains(e.target)||this._dropdown.contains(e.target))return;let i=e.path||e.composedPath&&e.composedPath();e.target&&e.target.shadowRoot&&i&&i[0]&&this._select.contains(i[0])||this._zone.run(()=>this.outsideClick.emit())}_onItemsChange(e,i){this.items=e||[],this._scrollToEndFired=!1,this.itemsLength=e.length,this.virtualScroll?this._updateItemsRange(i):(this._setVirtualHeight(),this._updateItems(i))}_updateItems(e){this.update.emit(this.items),e!==!1&&this._zone.runOutsideAngular(()=>{Promise.resolve().then(()=>{let i=this._scrollablePanel.clientHeight;this._panelService.setDimensions(0,i),this._handleDropdownPosition(),this.scrollTo(this.markedItem,e)})})}_updateItemsRange(e){this._zone.runOutsideAngular(()=>{this._measureDimensions().then(()=>{e?(this._renderItemsRange(this._startOffset),this._handleDropdownPosition()):this._renderItemsRange()})})}_onContentScrolled(e){this.virtualScroll&&this._renderItemsRange(e),this._lastScrollPosition=e,this._fireScrollToEnd(e)}_updateVirtualHeight(e){this._updateScrollHeight&&(this._virtualPadding.style.height=`${e}px`,this._updateScrollHeight=!1)}_setVirtualHeight(){this._virtualPadding&&(this._virtualPadding.style.height="0px")}_onItemsLengthChanged(){this._updateScrollHeight=!0}_renderItemsRange(e=null){if(e&&this._lastScrollPosition===e)return;e=e||this._scrollablePanel.scrollTop;let i=this._panelService.calculateItems(e,this.itemsLength,this.bufferAmount);this._updateVirtualHeight(i.scrollHeight),this._contentPanel.style.transform=`translateY(${i.topPadding}px)`,this._zone.run(()=>{this.update.emit(this.items.slice(i.start,i.end)),this.scroll.emit({start:i.start,end:i.end})}),m(e)&&this._lastScrollPosition===0&&(this._scrollablePanel.scrollTop=e,this._lastScrollPosition=e)}_measureDimensions(){if(this._panelService.dimensions.itemHeight>0||this.itemsLength===0)return Promise.resolve(this._panelService.dimensions);let[e]=this.items;return this.update.emit([e]),Promise.resolve().then(()=>{let l=this._dropdown.querySelector(`#${e.htmlId}`).clientHeight;this._virtualPadding.style.height=`${l*this.itemsLength}px`;let r=this._scrollablePanel.clientHeight;return this._panelService.setDimensions(l,r),this._panelService.dimensions})}_fireScrollToEnd(e){if(this._scrollToEndFired||e===0)return;let i=this.virtualScroll?this._virtualPadding:this._contentPanel;e+this._dropdown.clientHeight>=i.clientHeight-1&&(this._zone.run(()=>this.scrollToEnd.emit()),this._scrollToEndFired=!0)}_calculateCurrentPosition(e){if(this.position!=="auto")return this.position;let i=this._select.getBoundingClientRect(),l=document.documentElement.scrollTop||document.body.scrollTop,r=i.top+window.pageYOffset,o=i.height,a=e.getBoundingClientRect().height;return r+o+a>l+document.documentElement.clientHeight?"top":"bottom"}_appendDropdown(){if(this.appendTo){if(this._parent=document.querySelector(this.appendTo),!this._parent)throw new Error(`appendTo selector ${this.appendTo} did not found any parent element`);this._updateXPosition(),this._parent.appendChild(this._dropdown)}}_updateXPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),l=e.left-i.left;this._dropdown.style.left=l+"px",this._dropdown.style.width=e.width+"px",this._dropdown.style.minWidth=e.width+"px"}_updateYPosition(){let e=this._select.getBoundingClientRect(),i=this._parent.getBoundingClientRect(),l=e.height;if(this._currentPosition==="top"){let r=i.bottom-e.bottom;this._dropdown.style.bottom=r+l+"px",this._dropdown.style.top="auto"}else if(this._currentPosition==="bottom"){let r=e.top-i.top;this._dropdown.style.top=r+l+"px",this._dropdown.style.bottom="auto"}}_setupMousedownListener(){this._zone.runOutsideAngular(()=>{q(this._dropdown,"mousedown").pipe(P(this._destroy$)).subscribe(e=>{e.target.tagName!=="INPUT"&&e.preventDefault()})})}};t.\u0275fac=function(i){return new(i||t)(h(ye),h(Fe),h(Qe),h(O),h(Le,8))},t.\u0275cmp=X({type:t,selectors:[["ng-dropdown-panel"]],viewQuery:function(i,l){if(i&1&&(R(We,7,O),R(qe,7,O),R(Ge,7,O)),i&2){let r;_(r=f())&&(l.contentElementRef=r.first),_(r=f())&&(l.scrollElementRef=r.first),_(r=f())&&(l.paddingElementRef=r.first)}},inputs:{items:"items",markedItem:"markedItem",position:"position",appendTo:"appendTo",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",headerTemplate:"headerTemplate",footerTemplate:"footerTemplate",filterValue:"filterValue"},outputs:{update:"update",scroll:"scroll",scrollToEnd:"scrollToEnd",outsideClick:"outsideClick"},features:[G],ngContentSelectors:He,decls:9,vars:6,consts:[["class","ng-dropdown-header",4,"ngIf"],["role","listbox",1,"ng-dropdown-panel-items","scroll-host"],["scroll",""],["padding",""],["content",""],["class","ng-dropdown-footer",4,"ngIf"],[1,"ng-dropdown-header"],[3,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"ng-dropdown-footer"]],template:function(i,l){i&1&&(le(),v(0,$e,2,4,"div",0),g(1,"div",1,2),j(3,"div",null,3),g(5,"div",null,4),re(7),E()(),v(8,Ye,2,4,"div",5)),i&2&&(d("ngIf",l.headerTemplate),u(3),k("total-padding",l.virtualScroll),u(2),k("scrollable-content",l.virtualScroll&&l.items.length),u(3),d("ngIf",l.footerTemplate))},dependencies:[oe,ae],encapsulation:2,changeDetection:0});let n=t;return n})(),Wt=(()=>{let t=class t{get disabled(){return this._disabled}set disabled(e){this._disabled=this._isDisabled(e)}constructor(e){this.elementRef=e,this.stateChange$=new W,this._disabled=!1}get label(){return(this.elementRef.nativeElement.textContent||"").trim()}ngOnChanges(e){e.disabled&&this.stateChange$.next({value:this.value,disabled:this._disabled})}ngAfterViewChecked(){this.label!==this._previousLabel&&(this._previousLabel=this.label,this.stateChange$.next({value:this.value,disabled:this._disabled,label:this.elementRef.nativeElement.innerHTML}))}ngOnDestroy(){this.stateChange$.complete()}_isDisabled(e){return e!=null&&`${e}`!="false"}};t.\u0275fac=function(i){return new(i||t)(h(O))},t.\u0275cmp=X({type:t,selectors:[["ng-option"]],inputs:{value:"value",disabled:"disabled"},features:[G],ngContentSelectors:He,decls:1,vars:0,template:function(i,l){i&1&&(le(),re(0))},encapsulation:2,changeDetection:0});let n=t;return n})(),qt=(()=>{let t=class t{constructor(){this.notFoundText="No items found",this.typeToSearchText="Type to search",this.addTagText="Add item",this.loadingText="Loading...",this.clearAllText="Clear all",this.disableVirtualScroll=!0,this.openOnEnter=!0,this.appearance="underline"}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),Gt=(()=>{let t=class t{warn(e){console.warn(e)}};t.\u0275fac=function(i){return new(i||t)},t.\u0275prov=J({token:t,factory:t.\u0275fac,providedIn:"root"});let n=t;return n})(),ze=new be("ng-select-selection-model"),Ei=(()=>{let t=class t{get items(){return this._items}set items(e){e===null&&(e=[]),this._itemsAreUsed=!0,this._items=e}get compareWith(){return this._compareWith}set compareWith(e){if(e!=null&&!ie(e))throw Error("`compareWith` must be a function.");this._compareWith=e}get clearSearchOnAdd(){return m(this._clearSearchOnAdd)?this._clearSearchOnAdd:m(this.config.clearSearchOnAdd)?this.config.clearSearchOnAdd:this.closeOnSelect}set clearSearchOnAdd(e){this._clearSearchOnAdd=e}get deselectOnClick(){return m(this._deselectOnClick)?this._deselectOnClick:m(this.config.deselectOnClick)?this.config.deselectOnClick:this.multiple}set deselectOnClick(e){this._deselectOnClick=e}get disabled(){return this.readonly||this._disabled}get filtered(){return!!this.searchTerm&&this.searchable||this._isComposing}get single(){return!this.multiple}get _editableSearchTerm(){return this.editableSearchTerm&&!this.multiple}constructor(e,i,l,r,o,a,S){this.classes=e,this.autoFocus=i,this.config=l,this._cd=a,this._console=S,this.markFirst=!0,this.dropdownPosition="auto",this.loading=!1,this.closeOnSelect=!0,this.hideSelected=!1,this.selectOnTab=!1,this.bufferAmount=4,this.selectableGroup=!1,this.selectableGroupAsModel=!0,this.searchFn=null,this.trackByFn=null,this.clearOnBackspace=!0,this.labelForId=null,this.inputAttrs={},this.readonly=!1,this.searchWhileComposing=!0,this.minTermLength=0,this.editableSearchTerm=!1,this.keyDownFn=C=>!0,this.multiple=!1,this.addTag=!1,this.searchable=!0,this.clearable=!0,this.isOpen=!1,this.blurEvent=new T,this.focusEvent=new T,this.changeEvent=new T,this.openEvent=new T,this.closeEvent=new T,this.searchEvent=new T,this.clearEvent=new T,this.addEvent=new T,this.removeEvent=new T,this.scroll=new T,this.scrollToEnd=new T,this.useDefaultClass=!0,this.viewPortItems=[],this.searchTerm=null,this.dropdownId=Ue(),this.escapeHTML=!0,this._items=[],this._defaultLabel="label",this._pressedKeys=[],this._isComposing=!1,this._destroy$=new W,this._keyPress$=new W,this._onChange=C=>{},this._onTouched=()=>{},this.clearItem=C=>{let b=this.selectedItems.find(H=>H.value===C);this.unselect(b)},this.trackByOption=(C,b)=>this.trackByFn?this.trackByFn(b.value):b,this._mergeGlobalConfig(l),this.itemsList=new ue(this,r()),this.element=o.nativeElement}get selectedItems(){return this.itemsList.selectedItems}get selectedValues(){return this.selectedItems.map(e=>e.value)}get hasValue(){return this.selectedItems.length>0}get currentPanelPosition(){if(this.dropdownPanel)return this.dropdownPanel.currentPosition}ngOnInit(){this._handleKeyPresses(),this._setInputAttributes()}ngOnChanges(e){e.multiple&&this.itemsList.clearSelected(),e.items&&this._setItems(e.items.currentValue||[]),e.isOpen&&(this._manualOpen=m(e.isOpen.currentValue))}ngAfterViewInit(){this._itemsAreUsed||(this.escapeHTML=!1,this._setItemsFromNgOptions()),m(this.autoFocus)&&this.focus()}ngOnDestroy(){this._destroy$.next(),this._destroy$.complete()}handleKeyDown(e){if(x[e.which]){if(this.keyDownFn(e)===!1)return;this.handleKeyCode(e)}else e.key&&e.key.length===1&&this._keyPress$.next(e.key.toLocaleLowerCase())}handleKeyCode(e){let i=e.target;this.clearButton&&this.clearButton.nativeElement===i?this.handleKeyCodeClear(e):this.handleKeyCodeInput(e)}handleKeyCodeInput(e){switch(e.which){case x.ArrowDown:this._handleArrowDown(e);break;case x.ArrowUp:this._handleArrowUp(e);break;case x.Space:this._handleSpace(e);break;case x.Enter:this._handleEnter(e);break;case x.Tab:this._handleTab(e);break;case x.Esc:this.close(),e.preventDefault();break;case x.Backspace:this._handleBackspace();break}}handleKeyCodeClear(e){switch(e.which){case x.Enter:this.handleClearClick(),e.preventDefault();break}}handleMousedown(e){let i=e.target;if(i.tagName!=="INPUT"&&e.preventDefault(),i.classList.contains("ng-clear-wrapper")){this.handleClearClick();return}if(i.classList.contains("ng-arrow-wrapper")){this.handleArrowClick();return}i.classList.contains("ng-value-icon")||(this.focused||this.focus(),this.searchable?this.open():this.toggle())}handleArrowClick(){this.isOpen?this.close():this.open()}handleClearClick(){this.hasValue&&(this.itemsList.clearSelected(!0),this._updateNgModel()),this._clearSearch(),this.focus(),this.clearEvent.emit(),this._onSelectionChanged()}clearModel(){this.clearable&&(this.itemsList.clearSelected(),this._updateNgModel())}writeValue(e){this.itemsList.clearSelected(),this._handleWriteValue(e),this._cd.markForCheck()}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._disabled=e,this._cd.markForCheck()}toggle(){this.isOpen?this.close():this.open()}open(){this.disabled||this.isOpen||this._manualOpen||!this._isTypeahead&&!this.addTag&&this.itemsList.noItemsToSelect||(this.isOpen=!0,this.itemsList.markSelectedOrDefault(this.markFirst),this.openEvent.emit(),this.searchTerm||this.focus(),this.detectChanges())}close(){!this.isOpen||this._manualOpen||(this.isOpen=!1,this._isComposing=!1,this._editableSearchTerm?this.itemsList.resetFilteredItems():this._clearSearch(),this.itemsList.unmarkItem(),this._onTouched(),this.closeEvent.emit(),this._cd.markForCheck())}toggleItem(e){!e||e.disabled||this.disabled||(this.deselectOnClick&&e.selected?this.unselect(e):this.select(e),this._editableSearchTerm&&this._setSearchTermFromItems(),this._onSelectionChanged())}select(e){e.selected||(this.itemsList.select(e),this.clearSearchOnAdd&&!this._editableSearchTerm&&this._clearSearch(),this._updateNgModel(),this.multiple&&this.addEvent.emit(e.value)),(this.closeOnSelect||this.itemsList.noItemsToSelect)&&this.close()}focus(){this.searchInput.nativeElement.focus()}blur(){this.searchInput.nativeElement.blur()}unselect(e){e&&(this.itemsList.unselect(e),this.focus(),this._updateNgModel(),this.removeEvent.emit(e.value))}selectTag(){let e;ie(this.addTag)?e=this.addTag(this.searchTerm):e=this._primitive?this.searchTerm:{[this.bindLabel]:this.searchTerm};let i=l=>this._isTypeahead||!this.isOpen?this.itemsList.mapItem(l,null):this.itemsList.addItem(l);Dt(e)?e.then(l=>this.select(i(l))).catch(()=>{}):e&&this.select(i(e))}showClear(){return this.clearable&&(this.hasValue||this.searchTerm)&&!this.disabled}focusOnClear(){this.blur(),this.clearButton&&this.clearButton.nativeElement.focus()}get showAddTag(){if(!this._validTerm)return!1;let e=this.searchTerm.toLowerCase().trim();return this.addTag&&!this.itemsList.filteredItems.some(i=>i.label.toLowerCase()===e)&&(!this.hideSelected&&this.isOpen||!this.selectedItems.some(i=>i.label.toLowerCase()===e))&&!this.loading}showNoItemsFound(){let e=this.itemsList.filteredItems.length===0;return(e&&!this._isTypeahead&&!this.loading||e&&this._isTypeahead&&this._validTerm&&!this.loading)&&!this.showAddTag}showTypeToSearch(){return this.itemsList.filteredItems.length===0&&this._isTypeahead&&!this._validTerm&&!this.loading}onCompositionStart(){this._isComposing=!0}onCompositionEnd(e){this._isComposing=!1,!this.searchWhileComposing&&this.filter(e)}filter(e){this._isComposing&&!this.searchWhileComposing||(this.searchTerm=e,this._isTypeahead&&(this._validTerm||this.minTermLength===0)&&this.typeahead.next(e),this._isTypeahead||(this.itemsList.filter(this.searchTerm),this.isOpen&&this.itemsList.markSelectedOrDefault(this.markFirst)),this.searchEvent.emit({term:e,items:this.itemsList.filteredItems.map(i=>i.value)}),this.open())}onInputFocus(e){this.focused||(this._editableSearchTerm&&this._setSearchTermFromItems(),this.element.classList.add("ng-select-focused"),this.focusEvent.emit(e),this.focused=!0)}onInputBlur(e){this.element.classList.remove("ng-select-focused"),this.blurEvent.emit(e),!this.isOpen&&!this.disabled&&this._onTouched(),this._editableSearchTerm&&this._setSearchTermFromItems(),this.focused=!1}onItemHover(e){e.disabled||this.itemsList.markItem(e)}detectChanges(){this._cd.destroyed||this._cd.detectChanges()}_setSearchTermFromItems(){let e=this.selectedItems&&this.selectedItems[0];this.searchTerm=e&&e.label||null}_setItems(e){let i=e[0];this.bindLabel=this.bindLabel||this._defaultLabel,this._primitive=m(i)?!$(i):this._primitive||this.bindLabel===this._defaultLabel,this.itemsList.setItems(e),e.length>0&&this.hasValue&&this.itemsList.mapSelectedItems(),this.isOpen&&m(this.searchTerm)&&!this._isTypeahead&&this.itemsList.filter(this.searchTerm),(this._isTypeahead||this.isOpen)&&this.itemsList.markSelectedOrDefault(this.markFirst)}_setItemsFromNgOptions(){let e=l=>{this.items=l.map(r=>({$ngOptionValue:r.value,$ngOptionLabel:r.elementRef.nativeElement.innerHTML,disabled:r.disabled})),this.itemsList.setItems(this.items),this.hasValue&&this.itemsList.mapSelectedItems(),this.detectChanges()},i=()=>{let l=Z(this.ngOptions.changes,this._destroy$);Z(...this.ngOptions.map(r=>r.stateChange$)).pipe(P(l)).subscribe(r=>{let o=this.itemsList.findItem(r.value);o.disabled=r.disabled,o.label=r.label||o.label,this._cd.detectChanges()})};this.ngOptions.changes.pipe(Ee(this.ngOptions),P(this._destroy$)).subscribe(l=>{this.bindLabel=this._defaultLabel,e(l),i()})}_isValidWriteValue(e){if(!m(e)||this.multiple&&e===""||Array.isArray(e)&&e.length===0)return!1;let i=l=>!m(this.compareWith)&&$(l)&&this.bindValue?(this._console.warn(`Setting object(${JSON.stringify(l)}) as your model with bindValue is not allowed unless [compareWith] is used.`),!1):!0;return this.multiple?Array.isArray(e)?e.every(l=>i(l)):(this._console.warn("Multiple select ngModel should be array."),!1):i(e)}_handleWriteValue(e){if(!this._isValidWriteValue(e))return;let i=l=>{let r=this.itemsList.findItem(l);if(r)this.itemsList.select(r);else{let o=$(l),a=!o&&!this.bindValue;o||a?this.itemsList.select(this.itemsList.mapItem(l,null)):this.bindValue&&(r={[this.bindLabel]:null,[this.bindValue]:l},this.itemsList.select(this.itemsList.mapItem(r,null)))}};this.multiple?e.forEach(l=>i(l)):i(e)}_handleKeyPresses(){this.searchable||this._keyPress$.pipe(P(this._destroy$),Ce(e=>this._pressedKeys.push(e)),fe(200),ge(()=>this._pressedKeys.length>0),me(()=>this._pressedKeys.join(""))).subscribe(e=>{let i=this.itemsList.findByLabel(e);i&&(this.isOpen?(this.itemsList.markItem(i),this._scrollToMarked(),this._cd.markForCheck()):this.select(i)),this._pressedKeys=[]})}_setInputAttributes(){let e=this.searchInput.nativeElement,i=de({type:"text",autocorrect:"off",autocapitalize:"off",autocomplete:this.labelForId?"off":this.dropdownId},this.inputAttrs);for(let l of Object.keys(i))e.setAttribute(l,i[l])}_updateNgModel(){let e=[];for(let l of this.selectedItems)if(this.bindValue){let r=null;if(l.children){let o=this.groupValue?this.bindValue:this.groupBy;r=l.value[o||this.groupBy]}else r=this.itemsList.resolveNested(l.value,this.bindValue);e.push(r)}else e.push(l.value);let i=this.selectedItems.map(l=>l.value);this.multiple?(this._onChange(e),this.changeEvent.emit(i)):(this._onChange(m(e[0])?e[0]:null),this.changeEvent.emit(i[0])),this._cd.markForCheck()}_clearSearch(){this.searchTerm&&(this._changeSearch(null),this.itemsList.resetFilteredItems())}_changeSearch(e){this.searchTerm=e,this._isTypeahead&&this.typeahead.next(e)}_scrollToMarked(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollTo(this.itemsList.markedItem)}_scrollToTag(){!this.isOpen||!this.dropdownPanel||this.dropdownPanel.scrollToTag()}_onSelectionChanged(){this.isOpen&&this.deselectOnClick&&this.appendTo&&(this._cd.detectChanges(),this.dropdownPanel.adjustPosition())}_handleTab(e){if(this.isOpen===!1){if(this.showClear())this.focusOnClear(),e.preventDefault();else if(!this.addTag)return}this.selectOnTab?this.itemsList.markedItem?(this.toggleItem(this.itemsList.markedItem),e.preventDefault()):this.showAddTag?(this.selectTag(),e.preventDefault()):this.close():this.close()}_handleEnter(e){if(this.isOpen||this._manualOpen)this.itemsList.markedItem?this.toggleItem(this.itemsList.markedItem):this.showAddTag&&this.selectTag();else if(this.openOnEnter)this.open();else return;e.preventDefault()}_handleSpace(e){this.isOpen||this._manualOpen||(this.open(),e.preventDefault())}_handleArrowDown(e){this._nextItemIsTag(1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markNextItem(),this._scrollToMarked()),this.open(),e.preventDefault()}_handleArrowUp(e){this.isOpen&&(this._nextItemIsTag(-1)?(this.itemsList.unmarkItem(),this._scrollToTag()):(this.itemsList.markPreviousItem(),this._scrollToMarked()),e.preventDefault())}_nextItemIsTag(e){let i=this.itemsList.markedIndex+e;return this.addTag&&this.searchTerm&&this.itemsList.markedItem&&(i<0||i===this.itemsList.filteredItems.length)}_handleBackspace(){this.searchTerm||!this.clearable||!this.clearOnBackspace||!this.hasValue||(this.multiple?this.unselect(this.itemsList.lastSelectedItem):this.clearModel())}get _isTypeahead(){return this.typeahead&&this.typeahead.observers.length>0}get _validTerm(){let e=this.searchTerm&&this.searchTerm.trim();return e&&e.length>=this.minTermLength}_mergeGlobalConfig(e){this.placeholder=this.placeholder||e.placeholder,this.notFoundText=this.notFoundText||e.notFoundText,this.typeToSearchText=this.typeToSearchText||e.typeToSearchText,this.addTagText=this.addTagText||e.addTagText,this.loadingText=this.loadingText||e.loadingText,this.clearAllText=this.clearAllText||e.clearAllText,this.virtualScroll=m(this.virtualScroll)?this.virtualScroll:m(e.disableVirtualScroll)?!e.disableVirtualScroll:!1,this.openOnEnter=m(this.openOnEnter)?this.openOnEnter:e.openOnEnter,this.appendTo=this.appendTo||e.appendTo,this.bindValue=this.bindValue||e.bindValue,this.bindLabel=this.bindLabel||e.bindLabel,this.appearance=this.appearance||e.appearance}};t.\u0275fac=function(i){return new(i||t)(ne("class"),ne("autofocus"),h(qt),h(ze),h(O),h(Ie),h(Gt))},t.\u0275cmp=X({type:t,selectors:[["ng-select"]],contentQueries:function(i,l,r){if(i&1&&(y(r,kt,5,p),y(r,Lt,5,p),y(r,Bt,5,p),y(r,Vt,5,p),y(r,Pt,5,p),y(r,Mt,5,p),y(r,Nt,5,p),y(r,Rt,5,p),y(r,Ht,5,p),y(r,jt,5,p),y(r,Ut,5,p),y(r,Wt,5)),i&2){let o;_(o=f())&&(l.optionTemplate=o.first),_(o=f())&&(l.optgroupTemplate=o.first),_(o=f())&&(l.labelTemplate=o.first),_(o=f())&&(l.multiLabelTemplate=o.first),_(o=f())&&(l.headerTemplate=o.first),_(o=f())&&(l.footerTemplate=o.first),_(o=f())&&(l.notFoundTemplate=o.first),_(o=f())&&(l.typeToSearchTemplate=o.first),_(o=f())&&(l.loadingTextTemplate=o.first),_(o=f())&&(l.tagTemplate=o.first),_(o=f())&&(l.loadingSpinnerTemplate=o.first),_(o=f())&&(l.ngOptions=o)}},viewQuery:function(i,l){if(i&1&&(R(Re,5),R(Ke,7),R(Ze,5)),i&2){let r;_(r=f())&&(l.dropdownPanel=r.first),_(r=f())&&(l.searchInput=r.first),_(r=f())&&(l.clearButton=r.first)}},hostVars:20,hostBindings:function(i,l){i&1&&B("keydown",function(o){return l.handleKeyDown(o)}),i&2&&k("ng-select-typeahead",l.typeahead)("ng-select-multiple",l.multiple)("ng-select-taggable",l.addTag)("ng-select-searchable",l.searchable)("ng-select-clearable",l.clearable)("ng-select-opened",l.isOpen)("ng-select",l.useDefaultClass)("ng-select-disabled",l.disabled)("ng-select-filtered",l.filtered)("ng-select-single",l.single)},inputs:{bindLabel:"bindLabel",bindValue:"bindValue",markFirst:"markFirst",placeholder:"placeholder",notFoundText:"notFoundText",typeToSearchText:"typeToSearchText",addTagText:"addTagText",loadingText:"loadingText",clearAllText:"clearAllText",appearance:"appearance",dropdownPosition:"dropdownPosition",appendTo:"appendTo",loading:"loading",closeOnSelect:"closeOnSelect",hideSelected:"hideSelected",selectOnTab:"selectOnTab",openOnEnter:"openOnEnter",maxSelectedItems:"maxSelectedItems",groupBy:"groupBy",groupValue:"groupValue",bufferAmount:"bufferAmount",virtualScroll:"virtualScroll",selectableGroup:"selectableGroup",selectableGroupAsModel:"selectableGroupAsModel",searchFn:"searchFn",trackByFn:"trackByFn",clearOnBackspace:"clearOnBackspace",labelForId:"labelForId",inputAttrs:"inputAttrs",tabIndex:"tabIndex",readonly:"readonly",searchWhileComposing:"searchWhileComposing",minTermLength:"minTermLength",editableSearchTerm:"editableSearchTerm",keyDownFn:"keyDownFn",typeahead:"typeahead",multiple:"multiple",addTag:"addTag",searchable:"searchable",clearable:"clearable",isOpen:"isOpen",items:"items",compareWith:"compareWith",clearSearchOnAdd:"clearSearchOnAdd",deselectOnClick:"deselectOnClick"},outputs:{blurEvent:"blur",focusEvent:"focus",changeEvent:"change",openEvent:"open",closeEvent:"close",searchEvent:"search",clearEvent:"clear",addEvent:"add",removeEvent:"remove",scroll:"scroll",scrollToEnd:"scrollToEnd"},features:[xe([{provide:Me,useExisting:ve(()=>t),multi:!0},Qe]),G],decls:14,vars:19,consts:[[1,"ng-select-container",3,"mousedown"],[1,"ng-value-container"],[1,"ng-placeholder"],[4,"ngIf"],["role","combobox","aria-haspopup","listbox",1,"ng-input"],["aria-autocomplete","list",3,"readOnly","disabled","value","input","compositionstart","compositionend","focus","blur","change"],["searchInput",""],["class","ng-clear-wrapper","tabindex","0",3,"title",4,"ngIf"],[1,"ng-arrow-wrapper"],[1,"ng-arrow"],["class","ng-dropdown-panel","role","listbox","aria-label","Options list",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ng-select-multiple","ngClass","id","update","scroll","scrollToEnd","outsideClick",4,"ngIf"],["class","ng-value",3,"ng-value-disabled",4,"ngFor","ngForOf","ngForTrackBy"],[1,"ng-value"],["defaultLabelTemplate",""],[3,"ngTemplateOutlet","ngTemplateOutletContext"],["aria-hidden","true",1,"ng-value-icon","left",3,"click"],[1,"ng-value-label",3,"ngItemLabel","escape"],["defaultLoadingSpinnerTemplate",""],[3,"ngTemplateOutlet"],[1,"ng-spinner-loader"],["tabindex","0",1,"ng-clear-wrapper",3,"title"],["clearButton",""],["aria-hidden","true",1,"ng-clear"],["role","listbox","aria-label","Options list",1,"ng-dropdown-panel",3,"virtualScroll","bufferAmount","appendTo","position","headerTemplate","footerTemplate","filterValue","items","markedItem","ngClass","id","update","scroll","scrollToEnd","outsideClick"],["class","ng-option",3,"ng-option-disabled","ng-option-selected","ng-optgroup","ng-option","ng-option-child","ng-option-marked","click","mouseover",4,"ngFor","ngForOf","ngForTrackBy"],["class","ng-option","role","option",3,"ng-option-marked","mouseover","click",4,"ngIf"],[1,"ng-option",3,"click","mouseover"],["defaultOptionTemplate",""],[1,"ng-option-label",3,"ngItemLabel","escape"],["role","option",1,"ng-option",3,"mouseover","click"],["defaultTagTemplate",""],[1,"ng-tag-label"],["defaultNotFoundTemplate",""],[1,"ng-option","ng-option-disabled"],["defaultTypeToSearchTemplate",""],["defaultLoadingTextTemplate",""]],template:function(i,l){if(i&1){let r=U();g(0,"div",0),B("mousedown",function(a){return l.handleMousedown(a)}),g(1,"div",1)(2,"div",2),L(3),E(),v(4,it,2,2,"ng-container",3)(5,lt,1,5,null,3),g(6,"div",4)(7,"input",5,6),B("input",function(){I(r);let a=A(8);return F(l.filter(a.value))})("compositionstart",function(){return l.onCompositionStart()})("compositionend",function(){I(r);let a=A(8);return F(l.onCompositionEnd(a.value))})("focus",function(a){return l.onInputFocus(a)})("blur",function(a){return l.onInputBlur(a)})("change",function(a){return a.stopPropagation()}),E()()(),v(9,at,4,1,"ng-container",3)(10,ut,4,1,"span",7),g(11,"span",8),j(12,"span",9),E()(),v(13,Ft,7,19,"ng-dropdown-panel",10)}i&2&&(k("ng-appearance-outline",l.appearance==="outline")("ng-has-value",l.hasValue),u(3),Q(l.placeholder),u(1),d("ngIf",(!l.multiLabelTemplate||!l.multiple)&&l.selectedItems.length>0),u(1),d("ngIf",l.multiple&&l.multiLabelTemplate&&l.selectedValues.length>0),u(1),ee("aria-expanded",l.isOpen)("aria-owns",l.isOpen?l.dropdownId:null),u(1),d("readOnly",!l.searchable||l.itemsList.maxItemsSelected)("disabled",l.disabled)("value",l.searchTerm?l.searchTerm:""),ee("id",l.labelForId)("tabindex",l.tabIndex)("aria-activedescendant",l.isOpen?l.itemsList==null||l.itemsList.markedItem==null?null:l.itemsList.markedItem.htmlId:null)("aria-controls",l.isOpen?l.dropdownId:null),u(2),d("ngIf",l.loading),u(1),d("ngIf",l.showClear()),u(3),d("ngIf",l.isOpen))},dependencies:[Be,Ve,oe,ae,Re,Ot],styles:[`@charset "UTF-8";.ng-select{position:relative;display:block;box-sizing:border-box}.ng-select div,.ng-select input,.ng-select span{box-sizing:border-box}.ng-select [hidden]{display:none}.ng-select.ng-select-searchable .ng-select-container .ng-value-container .ng-input{opacity:1}.ng-select.ng-select-opened .ng-select-container{z-index:1001}.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-placeholder,.ng-select.ng-select-disabled .ng-select-container .ng-value-container .ng-value{-webkit-user-select:none;user-select:none;cursor:default}.ng-select.ng-select-disabled .ng-arrow-wrapper{cursor:default}.ng-select.ng-select-filtered .ng-placeholder{display:none}.ng-select .ng-select-container{cursor:default;display:flex;outline:none;overflow:hidden;position:relative;width:100%}.ng-select .ng-select-container .ng-value-container{display:flex;flex:1}.ng-select .ng-select-container .ng-value-container .ng-input{opacity:0}.ng-select .ng-select-container .ng-value-container .ng-input>input{box-sizing:content-box;background:none transparent;border:0 none;box-shadow:none;outline:none;padding:0;cursor:default;width:100%}.ng-select .ng-select-container .ng-value-container .ng-input>input::-ms-clear{display:none}.ng-select .ng-select-container .ng-value-container .ng-input>input[readonly]{-webkit-user-select:none;user-select:none;width:0;padding:0}.ng-select.ng-select-single.ng-select-filtered .ng-select-container .ng-value-container .ng-value{visibility:hidden}.ng-select.ng-select-single .ng-select-container .ng-value-container,.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-single .ng-select-container .ng-value-container .ng-input{position:absolute;left:0;width:100%}.ng-select.ng-select-multiple.ng-select-disabled>.ng-select-container .ng-value-container .ng-value .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container{flex-wrap:wrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{position:absolute}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value{white-space:nowrap}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value.ng-value-disabled .ng-value-icon{display:none}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-value .ng-value-icon{cursor:pointer}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-input{flex:1;z-index:2}.ng-select.ng-select-multiple .ng-select-container .ng-value-container .ng-placeholder{z-index:1}.ng-select .ng-clear-wrapper{cursor:pointer;position:relative;width:17px;-webkit-user-select:none;user-select:none}.ng-select .ng-clear-wrapper .ng-clear{display:inline-block;font-size:18px;line-height:1;pointer-events:none}.ng-select .ng-spinner-loader{border-radius:50%;width:17px;height:17px;margin-right:5px;font-size:10px;position:relative;text-indent:-9999em;border-top:2px solid rgba(66,66,66,.2);border-right:2px solid rgba(66,66,66,.2);border-bottom:2px solid rgba(66,66,66,.2);border-left:2px solid #424242;transform:translateZ(0);animation:load8 .8s infinite linear}.ng-select .ng-spinner-loader:after{border-radius:50%;width:17px;height:17px}@keyframes load8{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.ng-select .ng-arrow-wrapper{cursor:pointer;position:relative;text-align:center;-webkit-user-select:none;user-select:none}.ng-select .ng-arrow-wrapper .ng-arrow{pointer-events:none;display:inline-block;height:0;width:0;position:relative}.ng-dropdown-panel{box-sizing:border-box;position:absolute;opacity:0;width:100%;z-index:1050;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .ng-dropdown-panel-items{display:block;height:auto;box-sizing:border-box;max-height:240px;overflow-y:auto}.ng-dropdown-panel .ng-dropdown-panel-items .ng-optgroup{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option{box-sizing:border-box;cursor:pointer;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .ng-option-label:empty:before{content:"\\200b"}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option .highlighted{font-weight:700;text-decoration:underline}.ng-dropdown-panel .ng-dropdown-panel-items .ng-option.disabled{cursor:default}.ng-dropdown-panel .scroll-host{overflow:hidden;overflow-y:auto;position:relative;display:block;-webkit-overflow-scrolling:touch}.ng-dropdown-panel .scrollable-content{top:0;left:0;width:100%;height:100%;position:absolute}.ng-dropdown-panel .total-padding{width:1px;opacity:0}
2
2
  `],encapsulation:2,changeDetection:0});let n=t;return n})();function $t(){return new ce}var ce=class{constructor(){this._selected=[]}get value(){return this._selected}select(t,s,e){if(t.selected=!0,(!t.children||!s&&e)&&this._selected.push(t),s)if(t.parent){let i=t.parent.children.length,l=t.parent.children.filter(r=>r.selected).length;t.parent.selected=i===l}else t.children&&(this._setChildrenSelectedState(t.children,!0),this._removeChildren(t),e&&this._activeChildren(t)?this._selected=[...this._selected.filter(i=>i.parent!==t),t]:this._selected=[...this._selected,...t.children.filter(i=>!i.disabled)])}unselect(t,s){if(this._selected=this._selected.filter(e=>e!==t),t.selected=!1,s)if(t.parent&&t.parent.selected){let e=t.parent.children;this._removeParent(t.parent),this._removeChildren(t.parent),this._selected.push(...e.filter(i=>i!==t&&!i.disabled)),t.parent.selected=!1}else t.children&&(this._setChildrenSelectedState(t.children,!1),this._removeChildren(t))}clear(t){this._selected=t?this._selected.filter(s=>s.disabled):[]}_setChildrenSelectedState(t,s){for(let e of t)e.disabled||(e.selected=s)}_removeChildren(t){this._selected=[...this._selected.filter(s=>s.parent!==t),...t.children.filter(s=>s.parent===t&&s.disabled&&s.selected)]}_removeParent(t){this._selected=this._selected.filter(s=>s!==t)}_activeChildren(t){return t.children.every(s=>!s.disabled||s.selected)}},Ci=(()=>{let t=class t{};t.\u0275fac=function(i){return new(i||t)},t.\u0275mod=we({type:t}),t.\u0275inj=Te({providers:[{provide:ze,useValue:$t}],imports:[Pe]});let n=t;return n})();export{kt as a,Wt as b,Ei as c,Ci as d};
@@ -1 +1 @@
1
- import{$a as f,Cb as c,Db as u,Fa as a,Ja as r,Oa as s,Ua as C,Za as o,_a as l,_b as T,db as P,ea as b,ec as w,fc as y,hb as d,ja as v,jb as h,ka as _,pb as m,qb as k,sb as N,ub as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";function I(t,i){if(t&1){let g=P();o(0,"span",10),d("click",function(){v(g);let n=h();return n.getTotal(),_(n.hasClicked=!0)}),o(1,"i",11),m(2,"?"),l()()}}function M(t,i){if(t&1&&(o(0,"span"),m(1),c(2,"number"),l()),t&2){let g=h();a(1),k(u(2,1,g.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.get=new r,this.change=new r,this.next=new r,this.previous=new r,this.total=new r,this.hasClicked=!1}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=b({type:i,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[S],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,e){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),c(4,"number"),c(5,"number"),C(6,I,3,0,"span",3)(7,M,3,3,"span",4),l()(),o(8,"div",5)(9,"button",6),d("click",function(){return e.PreviousPage()}),f(10,"i",7),l(),o(11,"button",8),d("click",function(){return e.NextPage()}),f(12,"i",9),l()()()),n&2&&(a(3),N(" Showing ",u(4,6,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",u(5,8,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),a(3),s("ngIf",!e.hasClicked),a(1),s("ngIf",e.hasClicked),a(2),s("disabled",e.filter.PageNumber==1),a(2),s("disabled",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[y,T,w]});let t=i;return t})();export{O as a};
1
+ import{$a as f,Cb as c,Db as u,Fa as a,Ja as r,Oa as s,Ua as C,Za as o,_a as l,_b as T,db as P,ea as b,ec as w,fc as y,hb as d,ja as v,jb as h,ka as _,pb as m,qb as k,sb as N,ub as S}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";function I(t,i){if(t&1){let g=P();o(0,"span",10),d("click",function(){v(g);let n=h();return n.getTotal(),_(n.hasClicked=!0)}),o(1,"i",11),m(2,"?"),l()()}}function M(t,i){if(t&1&&(o(0,"span"),m(1),c(2,"number"),l()),t&2){let g=h();a(1),k(u(2,1,g.paginationTotal))}}var O=(()=>{let i=class i{constructor(){this.get=new r,this.change=new r,this.next=new r,this.previous=new r,this.total=new r,this.hasClicked=!1}changePage(p){this.filter.PageNumber=p.pageIndex+1,this.change.emit(this.filter)}getTotal(){this.total.emit()}PreviousPage(){this.previous.emit()}NextPage(){this.next.emit()}};i.\u0275fac=function(n){return new(n||i)},i.\u0275cmp=b({type:i,selectors:[["app-mat-paginator-no-count"]],inputs:{filter:"filter",paginationTotal:"paginationTotal",totaldata:"totaldata",hasClicked:"hasClicked"},outputs:{get:"get",change:"change",next:"next",previous:"previous",total:"total"},standalone:!0,features:[S],decls:13,vars:10,consts:[[1,"d-flex","justify-content-end","mt-5"],[1,"d-sm-block","collapse","mt-3","me-5"],[1,"text-dark","hidden-xxs"],["style","cursor:pointer",3,"click",4,"ngIf"],[4,"ngIf"],[1,"btn-group"],["role","button",1,"btn","btn-outline-secondary","btn-sm","me-3","border-0",3,"disabled","click"],[1,"fas","fa-chevron-left"],["role","button",1,"btn","btn-outline-secondary","btn-sm","border-0",3,"disabled","click"],[1,"fas","fa-chevron-right"],[2,"cursor","pointer",3,"click"],["title","Retreive rows count",1,"border","p-3"]],template:function(n,e){n&1&&(o(0,"div",0)(1,"div",1)(2,"div",2),m(3),c(4,"number"),c(5,"number"),C(6,I,3,0,"span",3)(7,M,3,3,"span",4),l()(),o(8,"div",5)(9,"button",6),d("click",function(){return e.PreviousPage()}),f(10,"i",7),l(),o(11,"button",8),d("click",function(){return e.NextPage()}),f(12,"i",9),l()()()),n&2&&(a(3),N(" Showing ",u(4,6,e.filter.PageSize*(e.filter.PageNumber-1)+1)," - ",u(5,8,e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata)," of "),a(3),s("ngIf",!e.hasClicked),a(1),s("ngIf",e.hasClicked),a(2),s("disabled",e.filter.PageNumber==1),a(2),s("disabled",e.filter.PageSize*(e.filter.PageNumber-1)+e.totaldata==e.paginationTotal||e.totaldata<e.filter.PageSize))},dependencies:[y,T,w]});let t=i;return t})();export{O as a};
@@ -1 +1 @@
1
- import{$ as I,I as B,aa as q,b as g,ba as M,c as y,ca as v,fa as k,fc as P,gc as E,m,r as C,ua as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-TIWU4GET.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.3/Marketplace/chunk-4EVRTQJX.js";function f(a,u,e,o){return new Promise((t,r)=>{a||r("IndexedDB not available");let n=a.open(u,e),i;n.onsuccess=c=>{i=n.result,t(i)},n.onerror=c=>{r(`IndexedDB error: ${n.error}`)},typeof o=="function"&&(n.onupgradeneeded=c=>{o(c,i)})})}function A(a,u,e,o,t){if(!a)return;let r=a.open(u,e);r.onupgradeneeded=n=>{let i=n.target.result;o.forEach(s=>{if(!i.objectStoreNames.contains(s.store)){let h=i.createObjectStore(s.store,s.storeConfig);s.storeSchema.forEach(d=>{h.createIndex(d.name,d.keypath,d.options)})}});let c=t&&t();c&&Object.keys(c).map(s=>parseInt(s,10)).filter(s=>s>n.oldVersion).sort((s,h)=>s-h).forEach(s=>{c[s](i,r.transaction)}),i.close()},r.onsuccess=n=>{n.target.result.close()}}function R(a,u,e){if(!a||!u||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(o=>{try{let t=u+1,r=indexedDB.open(a,t);r.onupgradeneeded=n=>{let i=n.target.result;i.deleteObjectStore(e),i.close(),console.log("onupgradeneeded"),o.next(!0),o.complete()},r.onerror=n=>o.error(n)}catch(t){o.error(t)}})}function V(a,u){return a.objectStoreNames.contains(u)}function S(a,u,e){a||e("You need to use the openDatabase function to create a database before you query it!"),V(a,u)||e(`objectStore does not exists: ${u}`)}function p(a,u){let e=a.transaction(u.storeName,u.dbMode);return e.onerror=u.error,e.onabort=u.abort,e}function j(a,u,e,o){return{storeName:u,dbMode:a,error:t=>{e(t)},abort:t=>{e(t)}}}var x=function(a){return a.readonly="readonly",a.readwrite="readwrite",a}(x||{}),K=new M(null),_=(()=>{class a{constructor(e,o){if(this.dbConfig=e,this.platformId=o,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=E(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,A(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),f(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(this.dbConfig.version=t.version)}))}createObjectStore(e,o){let t=[e];A(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,o)}add(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let c=p(n,j(x.readwrite,e,h=>r.error(h))).objectStore(e),s=t?c.add(o,t):c.add(o);s.onsuccess=h=>b(this,null,function*(){let d=h.target.result,l=c.get(d);l.onsuccess=w=>{r.next(w.target.result),r.complete()}})}).catch(n=>r.error(n))})}bulkAdd(e,o){let t=new Promise((r,n)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let s=p(i,j(x.readwrite,e,r,n)).objectStore(e),h=o.map(d=>new Promise((l,w)=>{let D=d.key;delete d.key;let $=D?s.add(d,D):s.add(d);$.onsuccess=T=>{let F=T.target.result;l(F)}}));r(Promise.all(h))}).catch(i=>n(i))});return m(t)}bulkDelete(e,o){let t=o.map(r=>new Promise((n,i)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let s=p(c,j(x.readwrite,e,i,n));s.objectStore(e).delete(r),s.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(d=>{n(d)})}}).catch(c=>i(c))}));return m(Promise.all(t))}getByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=p(r,j(x.readonly,e,t.error)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result),t.complete()},c.onerror=s=>{t.error(s)}}).catch(r=>t.error(r))})}bulkGet(e,o){let t=o.map(r=>this.getByKey(e,r));return new g(r=>{C(t).subscribe(n=>{r.next(n),r.complete()})})}getByID(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error,t.next)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result)}}).catch(r=>t.error(r))})}getByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).get(t);h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}getAll(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,c=>o.error(c));let i=p(t,j(x.readonly,e,o.error,o.next)).objectStore(e).getAll();i.onerror=c=>{o.error(c)},i.onsuccess=({target:{result:c}})=>{o.next(c),o.complete()}}).catch(t=>o.error(t))})}update(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readwrite,e,s=>t.error(s))).objectStore(e),c=i.put(o);c.onsuccess=s=>b(this,null,function*(){let h=s.target.result,d=i.get(h);d.onsuccess=l=>{t.next(l.target.result),t.complete()}})}).catch(r=>t.error(r))})}delete(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c)));n.objectStore(e).delete(o),n.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(c=>{t.next(c),t.complete()})}}).catch(r=>t.error(r))})}deleteByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c))),i=n.objectStore(e);n.oncomplete=()=>{t.next(!0),t.complete()},i.delete(o)}).catch(r=>t.error(r))})}clear(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,i=>o.error(i));let r=p(t,j(x.readwrite,e,i=>o.error(i)));r.objectStore(e).clear(),r.oncomplete=()=>{o.next(!0),o.complete()}}).catch(t=>o.error(t))})}deleteDatabase(){return new g(e=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>b(this,null,function*(){yield o.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=r=>e.error(r),t.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(o=>e.error(o))})}openCursor(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readonly,e,t.error)).objectStore(e),c=o===void 0?i.openCursor():i.openCursor(o);c.onsuccess=s=>{t.next(s),t.complete()}}).catch(r=>t.error(r))})}openCursorByIndex(e,o,t,r=x.readonly){let n=new y;return f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>{n.error(l)});let d=p(i,j(r,e,l=>{n.error(l)},()=>{n.next()})).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{n.next(l)}}).catch(i=>n.error(i)),n}getAllByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push(w.value),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}getAllKeysByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openKeyCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push({primaryKey:w.primaryKey,key:w.key}),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}count(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error)).objectStore(e).count(o);c.onerror=s=>t.error(s),c.onsuccess=s=>{t.next(s.target.result),t.complete()}}).catch(r=>t.error(r))})}countByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).count(t);h.onerror=d=>r.error(d),h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}deleteObjectStore(e){return R(this.dbConfig.name,++this.dbConfig.version,e)}}return a.\u0275fac=function(e){return new(e||a)(v(K),v(O))},a.\u0275prov=I({token:a,factory:a.\u0275fac}),a})(),W=(()=>{class a{static forRoot(e){return{ngModule:a,providers:[_,{provide:K,useValue:e}]}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=k({type:a}),a.\u0275inj=q({imports:[[P]]}),a})();export{_ as a,W as b};
1
+ import{$ as I,I as B,aa as q,b as g,ba as M,c as y,ca as v,fa as k,fc as P,gc as E,m,r as C,ua as O}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-PJIKFDGL.js";import{h as b}from"https://cdn.jsdelivr.net/npm/marketplacepos@3.6.4/Marketplace/chunk-72YRW3ZC.js";function f(a,u,e,o){return new Promise((t,r)=>{a||r("IndexedDB not available");let n=a.open(u,e),i;n.onsuccess=c=>{i=n.result,t(i)},n.onerror=c=>{r(`IndexedDB error: ${n.error}`)},typeof o=="function"&&(n.onupgradeneeded=c=>{o(c,i)})})}function A(a,u,e,o,t){if(!a)return;let r=a.open(u,e);r.onupgradeneeded=n=>{let i=n.target.result;o.forEach(s=>{if(!i.objectStoreNames.contains(s.store)){let h=i.createObjectStore(s.store,s.storeConfig);s.storeSchema.forEach(d=>{h.createIndex(d.name,d.keypath,d.options)})}});let c=t&&t();c&&Object.keys(c).map(s=>parseInt(s,10)).filter(s=>s>n.oldVersion).sort((s,h)=>s-h).forEach(s=>{c[s](i,r.transaction)}),i.close()},r.onsuccess=n=>{n.target.result.close()}}function R(a,u,e){if(!a||!u||!e)throw Error('Params: "dbName", "version", "storeName" are mandatory.');return new g(o=>{try{let t=u+1,r=indexedDB.open(a,t);r.onupgradeneeded=n=>{let i=n.target.result;i.deleteObjectStore(e),i.close(),console.log("onupgradeneeded"),o.next(!0),o.complete()},r.onerror=n=>o.error(n)}catch(t){o.error(t)}})}function V(a,u){return a.objectStoreNames.contains(u)}function S(a,u,e){a||e("You need to use the openDatabase function to create a database before you query it!"),V(a,u)||e(`objectStore does not exists: ${u}`)}function p(a,u){let e=a.transaction(u.storeName,u.dbMode);return e.onerror=u.error,e.onabort=u.abort,e}function j(a,u,e,o){return{storeName:u,dbMode:a,error:t=>{e(t)},abort:t=>{e(t)}}}var x=function(a){return a.readonly="readonly",a.readwrite="readwrite",a}(x||{}),K=new M(null),_=(()=>{class a{constructor(e,o){if(this.dbConfig=e,this.platformId=o,!e.name)throw new Error("NgxIndexedDB: Please, provide the dbName in the configuration");if(!e.version)throw new Error("NgxIndexedDB: Please, provide the db version in the configuration");this.isBrowser=E(this.platformId),this.isBrowser&&(this.indexedDB=window.indexedDB||window.mozIndexedDB||window.webkitIndexedDB||window.msIndexedDB,A(this.indexedDB,e.name,e.version,e.objectStoresMeta,e.migrationFactory),f(this.indexedDB,e.name).then(t=>{t.version!==e.version&&(this.dbConfig.version=t.version)}))}createObjectStore(e,o){let t=[e];A(this.indexedDB,this.dbConfig.name,++this.dbConfig.version,t,o)}add(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{let c=p(n,j(x.readwrite,e,h=>r.error(h))).objectStore(e),s=t?c.add(o,t):c.add(o);s.onsuccess=h=>b(this,null,function*(){let d=h.target.result,l=c.get(d);l.onsuccess=w=>{r.next(w.target.result),r.complete()}})}).catch(n=>r.error(n))})}bulkAdd(e,o){let t=new Promise((r,n)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{let s=p(i,j(x.readwrite,e,r,n)).objectStore(e),h=o.map(d=>new Promise((l,w)=>{let D=d.key;delete d.key;let $=D?s.add(d,D):s.add(d);$.onsuccess=T=>{let F=T.target.result;l(F)}}));r(Promise.all(h))}).catch(i=>n(i))});return m(t)}bulkDelete(e,o){let t=o.map(r=>new Promise((n,i)=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(c=>{let s=p(c,j(x.readwrite,e,i,n));s.objectStore(e).delete(r),s.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(d=>{n(d)})}}).catch(c=>i(c))}));return m(Promise.all(t))}getByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{let c=p(r,j(x.readonly,e,t.error)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result),t.complete()},c.onerror=s=>{t.error(s)}}).catch(r=>t.error(r))})}bulkGet(e,o){let t=o.map(r=>this.getByKey(e,r));return new g(r=>{C(t).subscribe(n=>{r.next(n),r.complete()})})}getByID(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error,t.next)).objectStore(e).get(o);c.onsuccess=s=>{t.next(s.target.result)}}).catch(r=>t.error(r))})}getByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).get(t);h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}getAll(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,c=>o.error(c));let i=p(t,j(x.readonly,e,o.error,o.next)).objectStore(e).getAll();i.onerror=c=>{o.error(c)},i.onsuccess=({target:{result:c}})=>{o.next(c),o.complete()}}).catch(t=>o.error(t))})}update(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readwrite,e,s=>t.error(s))).objectStore(e),c=i.put(o);c.onsuccess=s=>b(this,null,function*(){let h=s.target.result,d=i.get(h);d.onsuccess=l=>{t.next(l.target.result),t.complete()}})}).catch(r=>t.error(r))})}delete(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c)));n.objectStore(e).delete(o),n.oncomplete=()=>{this.getAll(e).pipe(B(1)).subscribe(c=>{t.next(c),t.complete()})}}).catch(r=>t.error(r))})}deleteByKey(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,c=>t.error(c));let n=p(r,j(x.readwrite,e,c=>t.error(c))),i=n.objectStore(e);n.oncomplete=()=>{t.next(!0),t.complete()},i.delete(o)}).catch(r=>t.error(r))})}clear(e){return new g(o=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(t=>{S(t,e,i=>o.error(i));let r=p(t,j(x.readwrite,e,i=>o.error(i)));r.objectStore(e).clear(),r.oncomplete=()=>{o.next(!0),o.complete()}}).catch(t=>o.error(t))})}deleteDatabase(){return new g(e=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(o=>b(this,null,function*(){yield o.close();let t=this.indexedDB.deleteDatabase(this.dbConfig.name);t.onsuccess=()=>{e.next(!0),e.complete()},t.onerror=r=>e.error(r),t.onblocked=()=>{throw new Error("Unable to delete database because it's blocked")}})).catch(o=>e.error(o))})}openCursor(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let i=p(r,j(x.readonly,e,t.error)).objectStore(e),c=o===void 0?i.openCursor():i.openCursor(o);c.onsuccess=s=>{t.next(s),t.complete()}}).catch(r=>t.error(r))})}openCursorByIndex(e,o,t,r=x.readonly){let n=new y;return f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>{n.error(l)});let d=p(i,j(r,e,l=>{n.error(l)},()=>{n.next()})).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{n.next(l)}}).catch(i=>n.error(i)),n}getAllByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push(w.value),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}getAllKeysByIndex(e,o,t){let r=[];return new g(n=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(i=>{S(i,e,l=>n.error(l));let d=p(i,j(x.readonly,e,n.error)).objectStore(e).index(o).openKeyCursor(t);d.onsuccess=l=>{let w=l.target.result;w?(r.push({primaryKey:w.primaryKey,key:w.key}),w.continue()):(n.next(r),n.complete())}}).catch(i=>n.error(i))})}count(e,o){return new g(t=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(r=>{S(r,e,s=>t.error(s));let c=p(r,j(x.readonly,e,t.error)).objectStore(e).count(o);c.onerror=s=>t.error(s),c.onsuccess=s=>{t.next(s.target.result),t.complete()}}).catch(r=>t.error(r))})}countByIndex(e,o,t){return new g(r=>{f(this.indexedDB,this.dbConfig.name,this.dbConfig.version).then(n=>{S(n,e,d=>r.error(d));let h=p(n,j(x.readonly,e,r.error)).objectStore(e).index(o).count(t);h.onerror=d=>r.error(d),h.onsuccess=d=>{r.next(d.target.result),r.complete()}}).catch(n=>r.error(n))})}deleteObjectStore(e){return R(this.dbConfig.name,++this.dbConfig.version,e)}}return a.\u0275fac=function(e){return new(e||a)(v(K),v(O))},a.\u0275prov=I({token:a,factory:a.\u0275fac}),a})(),W=(()=>{class a{static forRoot(e){return{ngModule:a,providers:[_,{provide:K,useValue:e}]}}}return a.\u0275fac=function(e){return new(e||a)},a.\u0275mod=k({type:a}),a.\u0275inj=q({imports:[[P]]}),a})();export{_ as a,W as b};